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

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

Issue 10915030: Parse argument definition test expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
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 side-by-side diff with in-line comments
Download patch
Index: dart/lib/compiler/implementation/ssa/builder.dart
diff --git a/dart/lib/compiler/implementation/ssa/builder.dart b/dart/lib/compiler/implementation/ssa/builder.dart
index 51b6d476d575ce529731e273bd735f8be47a41ea..e8517ce475764335c6489bd52a864f9fbc6c4a97 100644
--- a/dart/lib/compiler/implementation/ssa/builder.dart
+++ b/dart/lib/compiler/implementation/ssa/builder.dart
@@ -1779,6 +1779,12 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
}
void visitUnary(Send node, Operator op) {
+ String value = op.source.stringValue;
+ if (value === '?') {
+ // TODO(ahe): Implement argument definition test.
+ stack.add(graph.addConstantBool(true));
+ return;
+ }
assert(node.argumentsNode is Prefix);
visit(node.receiver);
assert(op.token.kind !== PLUS_TOKEN);
@@ -1788,7 +1794,6 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
new HStatic(interceptors.getPrefixOperatorInterceptor(op));
add(target);
HInvokeUnary result;
- String value = op.source.stringValue;
switch (value) {
case "-": result = new HNegate(target, operand); break;
case "~": result = new HBitNot(target, operand); break;
« no previous file with comments | « dart/lib/compiler/implementation/scanner/parser.dart ('k') | dart/tests/compiler/dart2js_extra/argument_definition_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698