@@ -341,6 +341,7 @@ private WasmTestStatus runTestCase(WasmCase testCase, Engine sharedEngine) {
341
341
342
342
contextBuilder .option ("wasm.Builtins" , includedExternalModules ());
343
343
contextBuilder .option ("wasm.WasiConstantRandomGet" , "true" );
344
+ contextBuilder .option ("wasm.EvalReturnsInstance" , "true" );
344
345
final String commandLineArgs = testCase .options ().getProperty ("command-line-args" );
345
346
if (commandLineArgs != null ) {
346
347
// The first argument is the program name. We set it to the empty string in tests.
@@ -415,7 +416,7 @@ private void runInContexts(WasmCase testCase, Context.Builder contextBuilder, Ar
415
416
interpreterIterations = Math .min (interpreterIterations , 1 );
416
417
}
417
418
418
- context = contextBuilder .options (getInterpreted ()).option ( "wasm.EvalReturnsInstance" , "true" ). build ();
419
+ context = contextBuilder .options (getInterpreted ()).build ();
419
420
runInContext (testCase , context , sources , interpreterIterations , PHASE_INTERPRETER_ICON , "interpreter" , testOut );
420
421
421
422
if (isFallbackRuntime ()) {
@@ -429,7 +430,7 @@ private void runInContexts(WasmCase testCase, Context.Builder contextBuilder, Ar
429
430
if (WasmTestOptions .COVERAGE_MODE ) {
430
431
syncNoinlineIterations = Math .min (syncNoinlineIterations , 1 );
431
432
}
432
- context = contextBuilder .options (getSyncCompiledNoInline ()).option ( "wasm.EvalReturnsInstance" , "true" ). build ();
433
+ context = contextBuilder .options (getSyncCompiledNoInline ()).build ();
433
434
runInContext (testCase , context , sources , syncNoinlineIterations , PHASE_SYNC_NO_INLINE_ICON , "sync,no-inl" , testOut );
434
435
435
436
// Run in synchronous compiled mode, with inlining turned on.
@@ -439,15 +440,15 @@ private void runInContexts(WasmCase testCase, Context.Builder contextBuilder, Ar
439
440
if (WasmTestOptions .COVERAGE_MODE ) {
440
441
syncInlineIterations = Math .min (syncInlineIterations , 1 );
441
442
}
442
- context = contextBuilder .options (getSyncCompiledWithInline ()).option ( "wasm.EvalReturnsInstance" , "true" ). build ();
443
+ context = contextBuilder .options (getSyncCompiledWithInline ()).build ();
443
444
runInContext (testCase , context , sources , syncInlineIterations , PHASE_SYNC_INLINE_ICON , "sync,inl" , testOut );
444
445
445
446
// Run with normal, asynchronous compilation.
446
447
int asyncIterations = Integer .parseInt (testCase .options ().getProperty ("async-iterations" , String .valueOf (DEFAULT_ASYNC_ITERATIONS )));
447
448
if (WasmTestOptions .COVERAGE_MODE ) {
448
449
asyncIterations = Math .min (asyncIterations , 1 );
449
450
}
450
- context = contextBuilder .options (getAsyncCompiled ()).option ( "wasm.EvalReturnsInstance" , "true" ). build ();
451
+ context = contextBuilder .options (getAsyncCompiled ()).build ();
451
452
runInContext (testCase , context , sources , asyncIterations , PHASE_ASYNC_ICON , "async,multi" , testOut );
452
453
} else {
453
454
int asyncSharedIterations = testCase .options ().containsKey ("async-iterations" ) && !testCase .options ().containsKey ("async-shared-iterations" )
@@ -456,7 +457,7 @@ private void runInContexts(WasmCase testCase, Context.Builder contextBuilder, Ar
456
457
if (WasmTestOptions .COVERAGE_MODE ) {
457
458
asyncSharedIterations = Math .min (asyncSharedIterations , 1 );
458
459
}
459
- context = contextBuilder .option ( "wasm.EvalReturnsInstance" , "true" ). build ();
460
+ context = contextBuilder .build ();
460
461
runInContext (testCase , context , sources , asyncSharedIterations , PHASE_SHARED_ENGINE_ICON , "async,shared" , testOut );
461
462
}
462
463
}
0 commit comments