diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-09-19 18:17:52 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-09-19 18:17:52 -0300 |
| commit | 2079cfe8faa34ebe435d1ef0526b04d3e57b5349 (patch) | |
| tree | 617a80c97583dc9eff9a11a2db88049c49b65e1a /lopcodes.h | |
| parent | dfe03c7abea6a00925a56239dfaac5be2770396e (diff) | |
| download | lua-2079cfe8faa34ebe435d1ef0526b04d3e57b5349.tar.gz lua-2079cfe8faa34ebe435d1ef0526b04d3e57b5349.tar.bz2 lua-2079cfe8faa34ebe435d1ef0526b04d3e57b5349.zip | |
new way to code globals, using const table instead of putting global
index inside the opcode.
Diffstat (limited to 'lopcodes.h')
| -rw-r--r-- | lopcodes.h | 10 |
1 files changed, 6 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lopcodes.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.2 1997/09/19 18:40:32 roberto Exp roberto $ |
| 3 | ** Opcodes for Lua virtual machine | 3 | ** Opcodes for Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -35,7 +35,8 @@ PUSHLOCAL7,/* - LOC[7] */ | |||
| 35 | PUSHLOCAL8,/* - LOC[8] */ | 35 | PUSHLOCAL8,/* - LOC[8] */ |
| 36 | PUSHLOCAL9,/* - LOC[9] */ | 36 | PUSHLOCAL9,/* - LOC[9] */ |
| 37 | PUSHLOCAL,/* b - LOC[b] */ | 37 | PUSHLOCAL,/* b - LOC[b] */ |
| 38 | PUSHGLOBAL,/* w - VAR[w] */ | 38 | PUSHGLOBALB,/* b - VAR[CNST[b]] */ |
| 39 | PUSHGLOBAL,/* w - VAR[CNST[w]] */ | ||
| 39 | GETTABLE,/* i t t[i] */ | 40 | GETTABLE,/* i t t[i] */ |
| 40 | PUSHSELF,/* w t t t[CNST[w]] */ | 41 | PUSHSELF,/* w t t t[CNST[w]] */ |
| 41 | CREATEARRAY,/* w - newarray(size = w) */ | 42 | CREATEARRAY,/* w - newarray(size = w) */ |
| @@ -51,8 +52,9 @@ SETLOCAL7,/* x - LOC[7]=x */ | |||
| 51 | SETLOCAL8,/* x - LOC[8]=x */ | 52 | SETLOCAL8,/* x - LOC[8]=x */ |
| 52 | SETLOCAL9,/* x - LOC[9]=x */ | 53 | SETLOCAL9,/* x - LOC[9]=x */ |
| 53 | SETLOCAL,/* b x - LOC[b]=x */ | 54 | SETLOCAL,/* b x - LOC[b]=x */ |
| 54 | SETGLOBAL,/* w x - VAR[w]=x */ | 55 | SETGLOBALB,/* b x - VAR[CNST[b]]=x */ |
| 55 | SETTABLE0,/* v i t - t[i]=v */ | 56 | SETGLOBAL,/* w x - VAR[CNST[w]]=x */ |
| 57 | SETTABLE0,/* v i t - t[i]=v */ | ||
| 56 | SETTABLE,/* b v a_b...a_1 i t a_b...a_1 i t t[i]=v */ | 58 | SETTABLE,/* b v a_b...a_1 i t a_b...a_1 i t t[i]=v */ |
| 57 | SETLIST0,/* b v_b...v_1 t - t[i]=v_i */ | 59 | SETLIST0,/* b v_b...v_1 t - t[i]=v_i */ |
| 58 | SETLIST,/* b c v_b...v_1 t - t[i+c*FPF]=v_i */ | 60 | SETLIST,/* b c v_b...v_1 t - t[i+c*FPF]=v_i */ |
