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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1607373002: dart2js: switching isolate is not 'PURE' (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: fixed 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/native/behavior.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library dart2js.ir_builder_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closure; 7 import '../closure.dart' as closure;
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/names.dart' show 9 import '../common/names.dart' show
10 Names, 10 Names,
(...skipping 2882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2893 } 2893 }
2894 return buildIsolateHelperInvocation(helpers.currentIsolate, 2894 return buildIsolateHelperInvocation(helpers.currentIsolate,
2895 CallStructure.NO_ARGS); 2895 CallStructure.NO_ARGS);
2896 2896
2897 getStaticState: case 'JS_GET_STATIC_STATE': 2897 getStaticState: case 'JS_GET_STATIC_STATE':
2898 validateArgumentCount(exactly: 0); 2898 validateArgumentCount(exactly: 0);
2899 2899
2900 return irBuilder.buildForeignCode( 2900 return irBuilder.buildForeignCode(
2901 js.js.parseForeignJS(backend.namer.staticStateHolder), 2901 js.js.parseForeignJS(backend.namer.staticStateHolder),
2902 const <ir.Primitive>[], 2902 const <ir.Primitive>[],
2903 NativeBehavior.PURE); 2903 NativeBehavior.DEPENDS_OTHER);
2904 2904
2905 case 'JS_SET_STATIC_STATE': 2905 case 'JS_SET_STATIC_STATE':
2906 validateArgumentCount(exactly: 1); 2906 validateArgumentCount(exactly: 1);
2907 2907
2908 ir.Primitive value = visit(argumentNodes.single); 2908 ir.Primitive value = visit(argumentNodes.single);
2909 String isolateName = backend.namer.staticStateHolder; 2909 String isolateName = backend.namer.staticStateHolder;
2910 return irBuilder.buildForeignCode( 2910 return irBuilder.buildForeignCode(
2911 js.js.parseForeignJS("$isolateName = #"), 2911 js.js.parseForeignJS("$isolateName = #"),
2912 <ir.Primitive>[value], 2912 <ir.Primitive>[value],
2913 NativeBehavior.PURE); 2913 NativeBehavior.CHANGES_OTHER);
2914 2914
2915 case 'JS_CALL_IN_ISOLATE': 2915 case 'JS_CALL_IN_ISOLATE':
2916 validateArgumentCount(exactly: 2); 2916 validateArgumentCount(exactly: 2);
2917 2917
2918 if (!compiler.hasIsolateSupport) { 2918 if (!compiler.hasIsolateSupport) {
2919 ir.Primitive closure = visit(argumentNodes.tail.head); 2919 ir.Primitive closure = visit(argumentNodes.tail.head);
2920 return irBuilder.buildCallInvocation(closure, CallStructure.NO_ARGS, 2920 return irBuilder.buildCallInvocation(closure, CallStructure.NO_ARGS,
2921 const <ir.Primitive>[]); 2921 const <ir.Primitive>[]);
2922 } 2922 }
2923 return buildIsolateHelperInvocation(helpers.callInIsolate, 2923 return buildIsolateHelperInvocation(helpers.callInIsolate,
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
3553 } 3553 }
3554 3554
3555 Element get closureConverter { 3555 Element get closureConverter {
3556 return _backend.helpers.closureConverter; 3556 return _backend.helpers.closureConverter;
3557 } 3557 }
3558 3558
3559 void addNativeMethod(FunctionElement function) { 3559 void addNativeMethod(FunctionElement function) {
3560 _backend.emitter.nativeEmitter.nativeMethods.add(function); 3560 _backend.emitter.nativeEmitter.nativeMethods.add(function);
3561 } 3561 }
3562 } 3562 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/native/behavior.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698