diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1995-06-22 10:11:18 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1995-06-22 10:11:18 +0000 |
commit | 41bd2b61538eedb5d24dcae01b11e533a398dff8 (patch) | |
tree | a8f60e0397eaebdcba0f2000c7deaff28b0f7371 /bytecomp/emitcode.ml | |
parent | 57c7dfd8fed5efd2d66f0b990941ade7382fa012 (diff) |
Fermetures representees en un seul bloc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@49 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'bytecomp/emitcode.ml')
-rw-r--r-- | bytecomp/emitcode.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bytecomp/emitcode.ml b/bytecomp/emitcode.ml index fe81650f8..1fa60e649 100644 --- a/bytecomp/emitcode.ml +++ b/bytecomp/emitcode.ml @@ -132,7 +132,7 @@ let emit_instr = function | Kacc n -> if n < 8 then out(opACC0 + n) else (out opACC; out_int n) | Kenvacc n -> - if n < 4 then out(opENVACC0 + n) else (out opENVACC; out_int n) + if n < 4 then out(opENVACC1 + n) else (out opENVACC; out_int (n+1)) | Kpush -> out opPUSH | Kpop n -> @@ -175,7 +175,7 @@ let emit_instr = function | Ksetfield n -> if n < 4 then out(opSETFIELD0 + n) else (out opSETFIELD; out_int n) | Kdummy n -> out opDUMMY; out_int n - | Kupdate -> out opUPDATE + | Kupdate n -> out opUPDATE | Kvectlength -> out opVECTLENGTH | Kgetvectitem -> out opGETVECTITEM | Ksetvectitem -> out opSETVECTITEM @@ -228,7 +228,8 @@ let rec emit = function if n < 8 then out(opPUSHACC0 + n) else (out opPUSHACC; out_int n); emit c | Kpush :: Kenvacc n :: c -> - if n < 4 then out(opPUSHENVACC0 + n) else (out opPUSHENVACC; out_int n); + if n < 4 then out(opPUSHENVACC1 + n) + else (out opPUSHENVACC; out_int (n+1)); emit c | Kpush :: Kgetglobal id :: Kgetfield n :: c -> out opPUSHGETGLOBALFIELD; slot_for_getglobal id; out n; emit c |