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

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

Issue 10392024: Add a "Label" Node around an Identifier that is being used as a label. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressede review comments. Created 8 years, 7 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 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2808 VariableDefinitions variableDefinitions = node.declaredIdentifier; 2808 VariableDefinitions variableDefinitions = node.declaredIdentifier;
2809 variable = elements[variableDefinitions.definitions.nodes.head]; 2809 variable = elements[variableDefinitions.definitions.nodes.head];
2810 } 2810 }
2811 localsHandler.updateLocal(variable, pop()); 2811 localsHandler.updateLocal(variable, pop());
2812 2812
2813 visit(node.body); 2813 visit(node.body);
2814 } 2814 }
2815 handleLoop(node, buildInitializer, buildCondition, () {}, buildBody); 2815 handleLoop(node, buildInitializer, buildCondition, () {}, buildBody);
2816 } 2816 }
2817 2817
2818 visitLabel(Label node) {
2819 compiler.internalError('SsaBuilder.visitLabel', node: node);
2820 }
2821
2818 visitLabeledStatement(LabeledStatement node) { 2822 visitLabeledStatement(LabeledStatement node) {
2819 Statement body = node.getBody(); 2823 Statement body = node.getBody();
2820 if (body is Loop || body is SwitchStatement) { 2824 if (body is Loop || body is SwitchStatement) {
2821 // Loops and switches handle their own labels. 2825 // Loops and switches handle their own labels.
2822 visit(body); 2826 visit(body);
2823 return; 2827 return;
2824 } 2828 }
2825 // Non-loop statements can only be break targets, not continue targets. 2829 // Non-loop statements can only be break targets, not continue targets.
2826 TargetElement targetElement = elements[body]; 2830 TargetElement targetElement = elements[body];
2827 if (targetElement === null || targetElement.statement !== body) { 2831 if (targetElement === null || targetElement.statement !== body) {
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
3316 <HInstruction>[target, input], 3320 <HInstruction>[target, input],
3317 HType.STRING)); 3321 HType.STRING));
3318 return builder.pop(); 3322 return builder.pop();
3319 } 3323 }
3320 3324
3321 HInstruction result() { 3325 HInstruction result() {
3322 flushLiterals(); 3326 flushLiterals();
3323 return prefix; 3327 return prefix;
3324 } 3328 }
3325 } 3329 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/scanner/parser.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698