File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 3232* Compiler: fix rewriter bug in share_constant (fix #1247 )
3333* Compiler: fix miscompilation of mutually recursive functions in loop (#1321 )
3434* Compiler: fix bug while minifying/renaming try-catch blocks
35+ * Compiler: no dead code elimination for caml_js_get
3536* Runtime: fix ocamlyacc parse engine (#1307 )
3637* Runtime: fix Out_channel.is_buffered, set_buffered
3738* Runtime: fix format wrt alternative
Original file line number Diff line number Diff line change @@ -965,7 +965,9 @@ let _ =
965965
966966 register_tern_prim " caml_js_set" (fun cx cy cz _ ->
967967 J. EBin (J. Eq , J. EAccess (cx, cy), cz));
968- register_bin_prim " caml_js_get" `Mutable (fun cx cy _ -> J. EAccess (cx, cy));
968+ (* [caml_js_get] can have side effect, we declare it as mutator.
969+ see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get *)
970+ register_bin_prim " caml_js_get" `Mutator (fun cx cy _ -> J. EAccess (cx, cy));
969971 register_bin_prim " caml_js_delete" `Mutator (fun cx cy _ ->
970972 J. EUn (J. Delete , J. EAccess (cx, cy)));
971973 register_bin_prim " caml_js_equals" `Mutable (fun cx cy _ ->
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ function caml_js_pure_expr (f) { return f(); }
2424
2525//Provides: caml_js_set (mutable, const, const)
2626function caml_js_set ( o , f , v ) { o [ f ] = v ; return 0 }
27- //Provides: caml_js_get mutable (const, const)
27+ //Provides: caml_js_get (const, const)
2828function caml_js_get ( o , f ) { return o [ f ] ; }
2929//Provides: caml_js_delete (mutable, const)
3030function caml_js_delete ( o , f ) { delete o [ f ] ; return 0 }
You can’t perform that action at this time.
0 commit comments