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

Unified Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10139012: Refactor types in ssa nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index 80b33d877bd0d91a9b482af6b36236578973d5fa..6452b41c03213a1774531b6345896a662a900788 100644
--- a/lib/compiler/implementation/ssa/codegen.dart
+++ b/lib/compiler/implementation/ssa/codegen.dart
@@ -1554,6 +1554,10 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
endExpression(JSPrecedence.PREFIX_PRECEDENCE);
}
+ void checkExtendableArray(HInstruction input) {
+ compiler.unimplemented("check extendable array");
+ }
+
void checkNull(HInstruction input) {
beginExpression(JSPrecedence.EQUALITY_PRECEDENCE);
use(input, JSPrecedence.EQUALITY_PRECEDENCE);
@@ -1742,6 +1746,15 @@ class SsaOptimizedCodeGenerator extends SsaCodeGenerator {
checkString(input, '!==');
buffer.add(') ');
bailout(node, 'Not a string');
+ } else if (node.isExtendableArray()) {
+ buffer.add('if (');
+ checkObject(input, '!==');
+ buffer.add('||');
+ checkArray(input, '!==');
+ buffer.add('||');
+ checkExtendableArray(input);
+ buffer.add(') ');
+ bailout(node, 'Not an extendable array');
} else if (node.isMutableArray()) {
buffer.add('if (');
checkObject(input, '!==');
@@ -1751,14 +1764,14 @@ class SsaOptimizedCodeGenerator extends SsaCodeGenerator {
checkImmutableArray(input);
buffer.add(') ');
bailout(node, 'Not a mutable array');
- } else if (node.isArray()) {
+ } else if (node.isReadableArray()) {
buffer.add('if (');
checkObject(input, '!==');
buffer.add('||');
checkArray(input, '!==');
buffer.add(') ');
bailout(node, 'Not an array');
- } else if (node.isStringOrArray()) {
+ } else if (node.isIndexablePrimitive()) {
buffer.add('if (');
checkString(input, '!==');
buffer.add(' && (');
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698