Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart |
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart |
index 90bc77245a06f4cd30138aa6ff50da25dcf6faad..acb7d20a514d91bdf5eee6e21bedefbfbffb509a 100644 |
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart |
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart |
@@ -3182,13 +3182,19 @@ class JsIrBuilderVisitor extends IrBuilderVisitor { |
if (!compiler.hasIsolateSupport) { |
// If the isolate library is not used, we just generate code |
// to fetch the current isolate. |
- String name = backend.namer.currentIsolate; |
- return irBuilder.buildForeignCode(js.js.parseForeignJS(name), |
- const <ir.Primitive>[], NativeBehavior.PURE); |
+ continue GET_CURRENT_ISOLATE; |
} |
return buildIsolateHelperInvocation('_currentIsolate', |
CallStructure.NO_ARGS); |
+ GET_CURRENT_ISOLATE: case 'JS_CURRENT_ISOLATE': |
+ validateArgumentCount(exactly: 0); |
+ |
+ return irBuilder.buildForeignCode( |
+ js.js.parseForeignJS(backend.namer.currentIsolate), |
+ const <ir.Primitive>[], |
+ NativeBehavior.PURE); |
+ |
case 'JS_CALL_IN_ISOLATE': |
validateArgumentCount(exactly: 2); |