Skip to content

Commit 61de16f

Browse files
committed
change tag to TAG for easy renaming later
1 parent 357d151 commit 61de16f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

jscomp/core/js_dump_lit.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ let true_ = "true"
7171
let false_ = "false"
7272

7373
let debugger = "debugger"
74-
let tag = "tag"
74+
let tag = "TAG"
7575
let bind = "bind"
7676
let math = "Math"
7777
let apply = "apply"

jscomp/runtime/bs_stdlib_mini.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module Obj : sig
5757
external set_field : t -> int -> t -> unit = "%obj_set_field"
5858
external tag : t -> int = "caml_obj_tag"
5959
(* The compiler ensures (|0) operation *)
60-
external set_tag : t -> int -> unit = "tag" [@@bs.set]
60+
external set_tag : t -> int -> unit = "TAG" [@@bs.set]
6161
external repr : 'a -> t = "%identity"
6262
external obj : t -> 'a = "%identity"
6363
external magic : 'a -> 'b = "%identity"

jscomp/runtime/caml_obj.ml

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ let caml_obj_dup : Obj.t -> Obj.t = [%raw{|function(x){
8080
for(var i = 0 ; i < len ; ++i){
8181
v[i] = x[i]
8282
}
83-
if(x.tag !== undefined){
84-
v.tag = x.tag
83+
if(x.TAG !== undefined){
84+
v.TAG = x.TAG // TODO this can be removed eventually
8585
}
8686
return v
8787
}
@@ -106,8 +106,8 @@ let update_dummy : _ -> _ -> unit= [%raw{|function(x,y){
106106
for(k = 0; k < y.length ; ++k){
107107
x[k] = y[k]
108108
}
109-
if(y.tag !== undefined){
110-
x.tag = y.tag
109+
if(y.TAG !== undefined){
110+
x.TAG = y.TAG
111111
}
112112
} else {
113113
for (var k in y){

jscomp/runtime/caml_parser.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ let caml_parse_engine : parse_tables -> parser_env -> (*Parsing.parser_input *)O
241241
/* symb_start and symb_end */
242242
case Automata.TOKEN_READ:
243243
if (typeof arg !== 'number') {
244-
env[env_curr_char] = tables[tbl_transl_block][arg.tag | 0 /* + 1 */];
244+
env[env_curr_char] = tables[tbl_transl_block][arg.TAG | 0 /* + 1 */];
245245
env[env_lval] = arg._0; // token carries payload
246246
}
247247
else {

jscomp/stdlib-406/camlinternalOO.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
let new_object_tag_block : int -> Obj.t = [%raw{|function(size){
1818
var v = new Array(size)
19-
v.tag = 248 // tag
19+
v.TAG = 248 // tag
2020
return v
2121
}|}]
2222

0 commit comments

Comments
 (0)