Skip to content

Commit 4d84fe6

Browse files
committed
No Unknown in static catch.
1 parent 3e5a2d7 commit 4d84fe6

32 files changed

+308
-308
lines changed

jscomp/core/lam_compile.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -771,15 +771,15 @@ and compile_staticcatch (lam : Lam.t) (lambda_cxt : Lam_compile_context.t)=
771771
Js_output.append_output
772772
(Js_output.make (S.declare_variable ~kind:Variable v :: declares) )
773773
(Js_output.append_output lbody (Js_output.make (
774-
compile_cases ~is_tag:false new_cxt exit_expr handlers NonComplete (Some {consts=[||]; blocks=[||]})) ~value:(E.var v )))
774+
compile_cases ~is_tag:false new_cxt exit_expr handlers NonComplete None) ~value:(E.var v )))
775775
| Declare (kind, id)
776776
(* declare first this we will do branching*) ->
777777
let declares = S.declare_variable ~kind id :: declares in
778778
let new_cxt = {lambda_cxt with jmp_table = jmp_table; continuation = Assign id } in
779779
let lbody = compile_lambda new_cxt body in
780780
Js_output.append_output (Js_output.make declares)
781781
(Js_output.append_output lbody
782-
(Js_output.make (compile_cases ~is_tag:false new_cxt exit_expr handlers NonComplete (Some {consts=[||]; blocks=[||]}))))
782+
(Js_output.make (compile_cases ~is_tag:false new_cxt exit_expr handlers NonComplete None)))
783783
(* place holder -- tell the compiler that
784784
we don't know if it's complete
785785
*)
@@ -788,13 +788,13 @@ and compile_staticcatch (lam : Lam.t) (lambda_cxt : Lam_compile_context.t)=
788788
let lbody = compile_lambda new_cxt body in
789789
Js_output.append_output (Js_output.make declares)
790790
(Js_output.append_output lbody
791-
(Js_output.make (compile_cases ~is_tag:false new_cxt exit_expr handlers NonComplete (Some {consts=[||]; blocks=[||]}))))
791+
(Js_output.make (compile_cases ~is_tag:false new_cxt exit_expr handlers NonComplete None)))
792792
| Assign _ ->
793793
let new_cxt = {lambda_cxt with jmp_table = jmp_table } in
794794
let lbody = compile_lambda new_cxt body in
795795
Js_output.append_output (Js_output.make declares)
796796
(Js_output.append_output lbody
797-
(Js_output.make (compile_cases ~is_tag:false new_cxt exit_expr handlers NonComplete (Some {consts=[||]; blocks=[||]}))))
797+
(Js_output.make (compile_cases ~is_tag:false new_cxt exit_expr handlers NonComplete None)))
798798

799799
and compile_sequand
800800
(l : Lam.t) (r : Lam.t) (lambda_cxt : Lam_compile_context.t) =

jscomp/test/complex_if_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function escaped(s) {
9898
}
9999
}
100100
switch (exit) {
101-
case /* Unknown */1 :
101+
case 1 :
102102
s$prime[n] = /* "\\" */92;
103103
n = n + 1 | 0;
104104
s$prime[n] = 48 + (c / 100 | 0) | 0;
@@ -107,7 +107,7 @@ function escaped(s) {
107107
n = n + 1 | 0;
108108
s$prime[n] = 48 + c % 10 | 0;
109109
break;
110-
case /* Unknown */2 :
110+
case 2 :
111111
s$prime[n] = /* "\\" */92;
112112
n = n + 1 | 0;
113113
s$prime[n] = c;

jscomp/test/exception_rebound_err_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function test_js_error4(param) {
4949
} else {
5050
exit = 2;
5151
}
52-
if (exit === /* Unknown */2 && e[0] === A && e[1] === 2) {
52+
if (exit === 2 && e[0] === A && e[1] === 2) {
5353
return 4;
5454
}
5555
if (e === B) {

jscomp/test/ext_bytes_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function escaped(s) {
100100
}
101101
}
102102
switch (exit) {
103-
case /* Unknown */1 :
103+
case 1 :
104104
s$prime[n] = /* "\\" */92;
105105
n = n + 1 | 0;
106106
s$prime[n] = 48 + (c / 100 | 0) | 0;
@@ -109,7 +109,7 @@ function escaped(s) {
109109
n = n + 1 | 0;
110110
s$prime[n] = 48 + c % 10 | 0;
111111
break;
112-
case /* Unknown */2 :
112+
case 2 :
113113
s$prime[n] = /* "\\" */92;
114114
n = n + 1 | 0;
115115
s$prime[n] = c;

0 commit comments

Comments
 (0)