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

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

Issue 2538233005: dart2js-kernel: Fix code for JS_SET_STATIC_STATE (Closed)
Patch Set: remove debug print Created 4 years 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 | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; 8 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
9 import '../common/names.dart'; 9 import '../common/names.dart';
10 import '../common/tasks.dart' show CompilerTask; 10 import '../common/tasks.dart' show CompilerTask;
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 } 1290 }
1291 } 1291 }
1292 1292
1293 compiler.reporter.reportErrorMessage(astAdapter.getNode(invocation), 1293 compiler.reporter.reportErrorMessage(astAdapter.getNode(invocation),
1294 MessageKind.GENERIC, {'text': "'$name' $problem."}); 1294 MessageKind.GENERIC, {'text': "'$name' $problem."});
1295 stack.add(graph.addConstantNull(compiler)); // Result expected on stack. 1295 stack.add(graph.addConstantNull(compiler)); // Result expected on stack.
1296 return; 1296 return;
1297 } 1297 }
1298 1298
1299 void handleForeignJsSetStaticState(ir.StaticInvocation invocation) { 1299 void handleForeignJsSetStaticState(ir.StaticInvocation invocation) {
1300 if (_unexpectedForeignArguments(invocation, 0, 0)) { 1300 if (_unexpectedForeignArguments(invocation, 1, 1)) {
1301 stack.add(graph.addConstantNull(compiler)); // Result expected on stack. 1301 stack.add(graph.addConstantNull(compiler)); // Result expected on stack.
1302 return; 1302 return;
1303 } 1303 }
1304 _visitArguments(invocation.arguments); 1304
1305 List<HInstruction> inputs = _visitArguments(invocation.arguments);
1306
1305 String isolateName = backend.namer.staticStateHolder; 1307 String isolateName = backend.namer.staticStateHolder;
1306 SideEffects sideEffects = new SideEffects.empty(); 1308 SideEffects sideEffects = new SideEffects.empty();
1307 sideEffects.setAllSideEffects(); 1309 sideEffects.setAllSideEffects();
1308 push(new HForeignCode(js.js.parseForeignJS("$isolateName = #"), 1310 push(new HForeignCode(js.js.parseForeignJS("$isolateName = #"),
1309 backend.dynamicType, <HInstruction>[pop()], 1311 backend.dynamicType, inputs,
1310 nativeBehavior: native.NativeBehavior.CHANGES_OTHER, 1312 nativeBehavior: native.NativeBehavior.CHANGES_OTHER,
1311 effects: sideEffects)); 1313 effects: sideEffects));
1312 } 1314 }
1313 1315
1314 void handleForeignJsGetStaticState(ir.StaticInvocation invocation) { 1316 void handleForeignJsGetStaticState(ir.StaticInvocation invocation) {
1315 if (_unexpectedForeignArguments(invocation, 0, 0)) { 1317 if (_unexpectedForeignArguments(invocation, 0, 0)) {
1316 stack.add(graph.addConstantNull(compiler)); // Result expected on stack. 1318 stack.add(graph.addConstantNull(compiler)); // Result expected on stack.
1317 return; 1319 return;
1318 } 1320 }
1319 1321
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 push(new HNot(popBoolified(), backend.boolType)); 1713 push(new HNot(popBoolified(), backend.boolType));
1712 } 1714 }
1713 1715
1714 @override 1716 @override
1715 void visitStringConcatenation(ir.StringConcatenation stringConcat) { 1717 void visitStringConcatenation(ir.StringConcatenation stringConcat) {
1716 KernelStringBuilder stringBuilder = new KernelStringBuilder(this); 1718 KernelStringBuilder stringBuilder = new KernelStringBuilder(this);
1717 stringConcat.accept(stringBuilder); 1719 stringConcat.accept(stringBuilder);
1718 stack.add(stringBuilder.result); 1720 stack.add(stringBuilder.result);
1719 } 1721 }
1720 } 1722 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698