You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compiler/tests-compiler/tailcall.ml
+11-46Lines changed: 11 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -164,51 +164,16 @@ let rec grow (iters : int) (n : t) : t =
164
164
in
165
165
let program =Util.compile_and_parse ~flags:[ "--debug"; "js_assign" ] prog in
166
166
Util.print_fun_decl program (Some"grow");
167
-
[%expect.unreachable]
168
-
[@@expect.uncaught_exn {|
169
-
(* CR expect_test_collector: This test expectation appears to contain a backtrace.
170
-
This is strongly discouraged as backtraces are fragile.
171
-
Please change this test to not include a backtrace. *)
172
-
(Failure"non-zero exit code")
173
-
Raised at Stdlib__Buffer.add_channel in file "buffer.ml", line 213, characters 18-35
174
-
Called from Jsoo_compiler_expect_tests_helper__Util.channel_to_string.loop in file "compiler/tests-compiler/util/util.ml", line 169, characters 4-52
175
-
Called from Jsoo_compiler_expect_tests_helper__Util.channel_to_string in file "compiler/tests-compiler/util/util.ml", line 172, characters 7-14
176
-
177
-
Trailing output
178
-
---------------
179
-
(function(globalThis){
180
-
"use strict";
181
-
var runtime = globalThis.jsoo_runtime;
182
-
function caml_call1(f, a0){
183
-
return (f.l >=0 ? f.l : f.l = f.length) ===1
184
-
? f(a0)
185
-
: runtime.caml_call_gen(f, [a0]);
186
-
}
187
-
var _a_ = [0, 0];
188
-
function rules(rules, param){
189
-
if(! param) return _a_;
190
-
var n = param[1];
191
-
return [0, caml_call1(rules, n)];
192
-
}
193
-
function step(n){return rules(step, n);}
194
-
function grow(iters$1, n$0){
195
-
var iters = iters$1, n = n$0;
196
-
for(;;){
197
-
if(0> iters) return n;
198
-
var n$1= rules(<v26{step}>, n), iters$0= iters -1|0;
199
-
iters = iters$0;
200
-
n = n$1;
201
-
}
167
+
[%expect
168
+
{|
169
+
function grow(iters$1, n$1){
170
+
var iters = iters$1, n = n$1;
171
+
for(;;){
172
+
if(0> iters) return n;
173
+
var n$0= step(n), iters$0= iters -1|0;
174
+
iters = iters$0;
175
+
n = n$0;
202
176
}
203
-
var Test= [0, rules, step, grow];
204
-
runtime.caml_register_global(1, Test, "Test");
205
-
return;
206
177
}
207
-
(globalThis));
208
-
Some variables escaped: <v26{step}>
209
-
/home/hugo/js_of_ocaml/_build/default/compiler/bin-js_of_ocaml/js_of_ocaml.exe: You found a bug. Please report it at https://github.com/ocsigen/js_of_ocaml/issues :
210
-
Error: File"compiler/lib/js_assign.ml", line 503, characters 5-11: Assertion failed
0 commit comments