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

Side by Side Diff: dart/frog/leg/ssa/builder.dart

Issue 9453021: Start supporting fixed length and immutable lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Handle constant list expressions. Created 8 years, 9 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 | « dart/frog/leg/lib/js_helper.dart ('k') | dart/frog/leg/ssa/codegen.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 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 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 } 1923 }
1924 1924
1925 visitLiteralList(LiteralList node) { 1925 visitLiteralList(LiteralList node) {
1926 List<HInstruction> inputs = <HInstruction>[]; 1926 List<HInstruction> inputs = <HInstruction>[];
1927 for (Link<Node> link = node.elements.nodes; 1927 for (Link<Node> link = node.elements.nodes;
1928 !link.isEmpty(); 1928 !link.isEmpty();
1929 link = link.tail) { 1929 link = link.tail) {
1930 visit(link.head); 1930 visit(link.head);
1931 inputs.add(pop()); 1931 inputs.add(pop());
1932 } 1932 }
1933 push(new HLiteralList(inputs)); 1933 push(new HLiteralList(inputs, node.isConst()));
1934 } 1934 }
1935 1935
1936 visitConditional(Conditional node) { 1936 visitConditional(Conditional node) {
1937 visit(node.condition); 1937 visit(node.condition);
1938 HBasicBlock conditionBlock = close(new HIf(popBoolified(), true)); 1938 HBasicBlock conditionBlock = close(new HIf(popBoolified(), true));
1939 LocalsHandler savedLocals = new LocalsHandler.from(localsHandler); 1939 LocalsHandler savedLocals = new LocalsHandler.from(localsHandler);
1940 1940
1941 HBasicBlock thenBlock = addNewBlock(); 1941 HBasicBlock thenBlock = addNewBlock();
1942 conditionBlock.addSuccessor(thenBlock); 1942 conditionBlock.addSuccessor(thenBlock);
1943 open(thenBlock); 1943 open(thenBlock);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 } 2274 }
2275 2275
2276 visitCatchBlock(CatchBlock node) { 2276 visitCatchBlock(CatchBlock node) {
2277 visit(node.block); 2277 visit(node.block);
2278 } 2278 }
2279 2279
2280 visitTypedef(Typedef node) { 2280 visitTypedef(Typedef node) {
2281 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 2281 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
2282 } 2282 }
2283 } 2283 }
OLDNEW
« no previous file with comments | « dart/frog/leg/lib/js_helper.dart ('k') | dart/frog/leg/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698