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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 16035026: Fix 2 host-checked error with the enqueuer: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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 SsaCodeGeneratorTask extends CompilerTask { 7 class SsaCodeGeneratorTask extends CompilerTask {
8 8
9 final JavaScriptBackend backend; 9 final JavaScriptBackend backend;
10 10
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 registerGetter(node); 1523 registerGetter(node);
1524 } else if (selector.isSetter()) { 1524 } else if (selector.isSetter()) {
1525 registerSetter(node); 1525 registerSetter(node);
1526 } else { 1526 } else {
1527 registerMethodInvoke(node); 1527 registerMethodInvoke(node);
1528 } 1528 }
1529 backend.registerUseInterceptor(world); 1529 backend.registerUseInterceptor(world);
1530 } 1530 }
1531 1531
1532 Selector getOptimizedSelectorFor(HInvokeDynamic node, Selector selector) { 1532 Selector getOptimizedSelectorFor(HInvokeDynamic node, Selector selector) {
1533 if (node.element != null) {
1534 // Create an artificial type mask to make sure only
1535 // [node.element] will be enqueued. We're not using the receiver
1536 // type because our optimizations might end up in a state where the
1537 // invoke dynamic knows more than the receiver.
1538 HType receiverType = new HType.fromMask(
1539 new TypeMask.nonNullExact(node.element.getEnclosingClass().rawType),
1540 compiler);
1541 return receiverType.refine(selector, compiler);
1542 }
1533 // If [JSInvocationMirror._invokeOn] has been called, we must not create a 1543 // If [JSInvocationMirror._invokeOn] has been called, we must not create a
1534 // typed selector based on the receiver type. 1544 // typed selector based on the receiver type.
1535 if (node.element == null && // Invocation is not exact. 1545 if (backend.compiler.enabledInvokeOn) {
1536 backend.compiler.enabledInvokeOn) {
1537 return selector.asUntyped; 1546 return selector.asUntyped;
1538 } 1547 }
1539 HType receiverType = node.getDartReceiver(compiler).instructionType; 1548 HType receiverType = node.getDartReceiver(compiler).instructionType;
1540 return receiverType.refine(selector, compiler); 1549 return receiverType.refine(selector, compiler);
1541 } 1550 }
1542 1551
1543 void registerInvoke(HInvokeDynamic node, Selector selector) { 1552 void registerInvoke(HInvokeDynamic node, Selector selector) {
1544 if (node.isInterceptedCall) { 1553 if (node.isInterceptedCall) {
1545 backend.addInterceptedSelector(selector); 1554 backend.addInterceptedSelector(selector);
1546 } 1555 }
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 if (leftType.canBeNull() && rightType.canBeNull()) { 3012 if (leftType.canBeNull() && rightType.canBeNull()) {
3004 if (left.isConstantNull() || right.isConstantNull() || 3013 if (left.isConstantNull() || right.isConstantNull() ||
3005 (leftType.isPrimitive() && leftType == rightType)) { 3014 (leftType.isPrimitive() && leftType == rightType)) {
3006 return '=='; 3015 return '==';
3007 } 3016 }
3008 return null; 3017 return null;
3009 } else { 3018 } else {
3010 return '==='; 3019 return '===';
3011 } 3020 }
3012 } 3021 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698