Skip to content

Commit 1ad0ace

Browse files
committed
feat: adding counter to compile time to avoid collisions
1 parent be381d1 commit 1ad0ace

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+108
-105
lines changed

jscomp/core/js_exp_make.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,4 +1322,7 @@ let resolve_and_apply (s : string) (args : t list) : t =
13221322
[ str (if s.[0] = '?' then String.sub s 1 (String.length s - 1) else s) ])
13231323
args
13241324

1325-
let make_exception (s : string): t = str (s ^ "/" ^(string_of_int (Hashtbl.hash s)))
1325+
let counter = ref 0
1326+
let make_exception (s : string): t =
1327+
counter := counter.contents + 1;
1328+
str (s ^ "/" ^(string_of_int counter.contents))

jscomp/test/406_primitive_test.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/array_test.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/equal_exception_test.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/exception_raise_test.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/exception_rebound_err_test.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/exception_value_test.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/ext_bytes_test.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/ext_pervasives_test.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/ext_string_test.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)