summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorMike Pall <mike>2013-02-23 02:17:50 +0100
committerMike Pall <mike>2013-02-23 02:17:50 +0100
commit60e380fd936ef45b57e89d8df23ab16325f29e9b (patch)
treee4b60a535833ff6415e252ad228b965e9656a4a2 /src/host
parent73ef845fcaf65937ad63e9cf6b681cb3e61f4504 (diff)
downloadluajit-60e380fd936ef45b57e89d8df23ab16325f29e9b.tar.gz
luajit-60e380fd936ef45b57e89d8df23ab16325f29e9b.tar.bz2
luajit-60e380fd936ef45b57e89d8df23ab16325f29e9b.zip
Replace table.getn/foreach/foreachi with bytecode builtins.
Diffstat (limited to 'src/host')
-rw-r--r--src/host/buildvm_libbc.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/host/buildvm_libbc.h b/src/host/buildvm_libbc.h
index 6b0e1d03..a71aa630 100644
--- a/src/host/buildvm_libbc.h
+++ b/src/host/buildvm_libbc.h
@@ -4,12 +4,20 @@ static const int libbc_endian = 0;
4 4
5static const uint8_t libbc_code[] = { 5static const uint8_t libbc_code[] = {
60,1,2,0,0,1,2,24,1,0,0,76,1,2,0,241,135,158,166,3,220,203,178,130,4,0,1,2,0, 60,1,2,0,0,1,2,24,1,0,0,76,1,2,0,241,135,158,166,3,220,203,178,130,4,0,1,2,0,
70,1,2,24,1,0,0,76,1,2,0,243,244,148,165,20,198,190,199,252,3,0 70,1,2,24,1,0,0,76,1,2,0,243,244,148,165,20,198,190,199,252,3,0,2,9,0,0,0,15,
816,0,12,0,16,1,9,0,41,2,1,0,21,3,0,0,41,4,1,0,77,2,8,128,18,6,1,0,18,7,5,0,
959,8,5,0,66,6,3,2,10,6,0,0,88,7,1,128,76,6,2,0,79,2,248,127,75,0,1,0,0,2,10,
100,0,0,16,16,0,12,0,16,1,9,0,43,2,0,0,18,3,0,0,41,4,0,0,88,5,7,128,18,7,1,0,
1118,8,5,0,18,9,6,0,66,7,3,2,10,7,0,0,88,8,1,128,76,7,2,0,70,5,3,3,82,5,247,127,
1275,0,1,0,0,1,2,0,0,0,3,16,0,12,0,21,1,0,0,76,1,2,0,0
8}; 13};
9 14
10static const struct { const char *name; int ofs; } libbc_map[] = { 15static const struct { const char *name; int ofs; } libbc_map[] = {
11{"math_deg",0}, 16{"math_deg",0},
12{"math_rad",25}, 17{"math_rad",25},
13{NULL,50} 18{"table_foreachi",50},
19{"table_foreach",117},
20{"table_getn",188},
21{NULL,207}
14}; 22};
15 23