Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1607373002: dart2js: switching isolate is not 'PURE' (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of ssa; 5 part of ssa;
6 6
7 class SsaFunctionCompiler implements FunctionCompiler { 7 class SsaFunctionCompiler implements FunctionCompiler {
8 final SsaCodeGeneratorTask generator; 8 final SsaCodeGeneratorTask generator;
9 final SsaBuilderTask builder; 9 final SsaBuilderTask builder;
10 final SsaOptimizerTask optimizer; 10 final SsaOptimizerTask optimizer;
(...skipping 4460 matching lines...) Expand 10 before | Expand all | Expand 10 after
4471 'Exactly one argument required.'); 4471 'Exactly one argument required.');
4472 } 4472 }
4473 visit(node.arguments.head); 4473 visit(node.arguments.head);
4474 String isolateName = backend.namer.staticStateHolder; 4474 String isolateName = backend.namer.staticStateHolder;
4475 SideEffects sideEffects = new SideEffects.empty(); 4475 SideEffects sideEffects = new SideEffects.empty();
4476 sideEffects.setAllSideEffects(); 4476 sideEffects.setAllSideEffects();
4477 push(new HForeignCode( 4477 push(new HForeignCode(
4478 js.js.parseForeignJS("$isolateName = #"), 4478 js.js.parseForeignJS("$isolateName = #"),
4479 backend.dynamicType, 4479 backend.dynamicType,
4480 <HInstruction>[pop()], 4480 <HInstruction>[pop()],
4481 nativeBehavior: native.NativeBehavior.PURE, 4481 nativeBehavior: native.NativeBehavior.CHANGES_STATIC_PROPERTY,
4482 effects: sideEffects)); 4482 effects: sideEffects));
4483 } 4483 }
4484 4484
4485 void handleForeignJsGetStaticState(ast.Send node) { 4485 void handleForeignJsGetStaticState(ast.Send node) {
4486 if (!node.arguments.isEmpty) { 4486 if (!node.arguments.isEmpty) {
4487 reporter.internalError(node.argumentsNode, 'Too many arguments.'); 4487 reporter.internalError(node.argumentsNode, 'Too many arguments.');
4488 } 4488 }
4489 push(new HForeignCode(js.js.parseForeignJS(backend.namer.staticStateHolder), 4489 push(new HForeignCode(js.js.parseForeignJS(backend.namer.staticStateHolder),
4490 backend.dynamicType, 4490 backend.dynamicType,
4491 <HInstruction>[])); 4491 <HInstruction>[]));
(...skipping 4691 matching lines...) Expand 10 before | Expand all | Expand 10 after
9183 if (unaliased is TypedefType) throw 'unable to unalias $type'; 9183 if (unaliased is TypedefType) throw 'unable to unalias $type';
9184 unaliased.accept(this, builder); 9184 unaliased.accept(this, builder);
9185 } 9185 }
9186 9186
9187 void visitDynamicType(DynamicType type, SsaBuilder builder) { 9187 void visitDynamicType(DynamicType type, SsaBuilder builder) {
9188 JavaScriptBackend backend = builder.compiler.backend; 9188 JavaScriptBackend backend = builder.compiler.backend;
9189 ClassElement cls = backend.helpers.DynamicRuntimeType; 9189 ClassElement cls = backend.helpers.DynamicRuntimeType;
9190 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); 9190 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
9191 } 9191 }
9192 } 9192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698