Skip to content

Commit c594a8e

Browse files
committed
Stop emitting Kgetmutablefield in bytegen and remove Kgetmutablefield
1 parent cb4da64 commit c594a8e

File tree

5 files changed

+1
-7
lines changed

5 files changed

+1
-7
lines changed

bytecomp/bytegen.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,7 @@ let comp_primitive p sz args =
397397
| Pcompare_floats -> Kccall("caml_float_compare", 2)
398398
| Pcompare_bints bi -> comp_bint_primitive bi "compare" args
399399
| Pmakeblock(tag, _mut, _) -> Kmakeblock(List.length args, tag)
400-
| Pfield(n, _ptr, Immutable) -> Kgetfield n
401-
| Pfield(n, _ptr, Mutable) -> Kgetmutablefield n
400+
| Pfield(n, _ptr, _mut) -> Kgetfield n
402401
| Pfield_computed -> Kgetvectitem
403402
| Psetfield(n, _ptr, _init) -> Ksetfield n
404403
| Psetfield_computed(_ptr, _init) -> Ksetvectitem

bytecomp/emitcode.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ let emit_instr = function
251251
else (out opMAKEBLOCK; out_int n; out_int t)
252252
| Kgetfield n ->
253253
if n < 4 then out(opGETFIELD0 + n) else (out opGETFIELD; out_int n)
254-
| Kgetmutablefield n ->
255-
if n < 4 then out(opGETMUTABLEFIELD0 + n) else (out opGETMUTABLEFIELD; out_int n)
256254
| Ksetfield n ->
257255
if n < 4 then out(opSETFIELD0 + n) else (out opSETFIELD; out_int n)
258256
| Kmakefloatblock(n) ->

bytecomp/instruct.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ type instruction =
7272
| Kmakeblock of int * int (* size, tag *)
7373
| Kmakefloatblock of int
7474
| Kgetfield of int
75-
| Kgetmutablefield of int
7675
| Ksetfield of int
7776
| Kgetfloatfield of int
7877
| Ksetfloatfield of int

bytecomp/instruct.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ type instruction =
9292
| Kmakeblock of int * int (* size, tag *)
9393
| Kmakefloatblock of int
9494
| Kgetfield of int
95-
| Kgetmutablefield of int
9695
| Ksetfield of int
9796
| Kgetfloatfield of int
9897
| Ksetfloatfield of int

bytecomp/printinstr.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ let instruction ppf = function
4949
| Kmakefloatblock(n) ->
5050
fprintf ppf "\tmakefloatblock %i" n
5151
| Kgetfield n -> fprintf ppf "\tgetfield %i" n
52-
| Kgetmutablefield n -> fprintf ppf "\tgetmutablefield %i" n
5352
| Ksetfield n -> fprintf ppf "\tsetfield %i" n
5453
| Kgetfloatfield n -> fprintf ppf "\tgetfloatfield %i" n
5554
| Ksetfloatfield n -> fprintf ppf "\tsetfloatfield %i" n

0 commit comments

Comments
 (0)