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

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

Issue 10879010: Add named constants for all type codes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/nodes.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) 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 class SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 final JavaScriptBackend backend; 6 final JavaScriptBackend backend;
7 SsaCodeGeneratorTask(JavaScriptBackend backend) 7 SsaCodeGeneratorTask(JavaScriptBackend backend)
8 : this.backend = backend, 8 : this.backend = backend,
9 super(backend.compiler); 9 super(backend.compiler);
10 String get name => 'SSA code generator'; 10 String get name => 'SSA code generator';
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 use(node.receiver); 1485 use(node.receiver);
1486 push(jsPropertyCall(pop(), 1486 push(jsPropertyCall(pop(),
1487 compiler.namer.closureInvocationName(node.selector), 1487 compiler.namer.closureInvocationName(node.selector),
1488 visitArguments(node.inputs)), 1488 visitArguments(node.inputs)),
1489 node); 1489 node);
1490 Selector call = new Selector.callClosureFrom(node.selector); 1490 Selector call = new Selector.callClosureFrom(node.selector);
1491 world.registerDynamicInvocation(call.name, call); 1491 world.registerDynamicInvocation(call.name, call);
1492 } 1492 }
1493 1493
1494 visitInvokeStatic(HInvokeStatic node) { 1494 visitInvokeStatic(HInvokeStatic node) {
1495 if (Elements.isStaticOrTopLevelFunction(node.element) && 1495 if (Elements.isStaticOrTopLevelFunction(node.element) &&
ngeoffray 2012/08/22 14:21:07 Why this check? Why aren't we unconditionally regi
Søren Gjesse 2012/08/23 07:02:04 Good question. Removed.
1496 (node.typeCode() == HInvokeStatic.INVOKE_STATIC_TYPECODE || 1496 (node.typeCode() == HInstruction.INVOKE_STATIC_TYPECODE ||
1497 node.typeCode() == HInvokeStatic.INVOKE_INTERCEPTOR_TYPECODE)) { 1497 node.typeCode() == HInstruction.INVOKE_INTERCEPTOR_TYPECODE)) {
1498 // Register this invocation to collect the types used at all call sites. 1498 // Register this invocation to collect the types used at all call sites.
1499 backend.registerStaticInvocation(node, types); 1499 backend.registerStaticInvocation(node, types);
1500 } 1500 }
1501 use(node.target); 1501 use(node.target);
1502 push(new js.Call(pop(), visitArguments(node.inputs)), node); 1502 push(new js.Call(pop(), visitArguments(node.inputs)), node);
1503 } 1503 }
1504 1504
1505 visitInvokeSuper(HInvokeSuper node) { 1505 visitInvokeSuper(HInvokeSuper node) {
1506 Element superMethod = node.element; 1506 Element superMethod = node.element;
1507 Element superClass = superMethod.getEnclosingClass(); 1507 Element superClass = superMethod.getEnclosingClass();
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2908 if (leftType.canBeNull() && rightType.canBeNull()) { 2908 if (leftType.canBeNull() && rightType.canBeNull()) {
2909 if (left.isConstantNull() || right.isConstantNull() || 2909 if (left.isConstantNull() || right.isConstantNull() ||
2910 (leftType.isPrimitive() && leftType == rightType)) { 2910 (leftType.isPrimitive() && leftType == rightType)) {
2911 return '=='; 2911 return '==';
2912 } 2912 }
2913 return null; 2913 return null;
2914 } else { 2914 } else {
2915 return '==='; 2915 return '===';
2916 } 2916 }
2917 } 2917 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698