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

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

Issue 9417031: Mock up all remaining core library implementation classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 10 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/resolver.dart ('k') | dart/frog/leg/ssa/closure.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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 /** 314 /**
315 * Returns an [HInstruction] for the given element. If the element is 315 * Returns an [HInstruction] for the given element. If the element is
316 * boxed or stored in a closure then the method generates code to retrieve 316 * boxed or stored in a closure then the method generates code to retrieve
317 * the value. 317 * the value.
318 */ 318 */
319 HInstruction readLocal(Element element) { 319 HInstruction readLocal(Element element) {
320 if (isAccessedDirectly(element)) { 320 if (isAccessedDirectly(element)) {
321 if (directLocals[element] == null) { 321 if (directLocals[element] == null) {
322 builder.compiler.internalError( 322 builder.compiler.internalError("cannot find value", element: element);
323 "Could not find value", node: element.parseNode(builder.compiler));
324 } 323 }
325 return directLocals[element]; 324 return directLocals[element];
326 } else if (isStoredInClosureField(element)) { 325 } else if (isStoredInClosureField(element)) {
327 Element redirect = redirectionMapping[element]; 326 Element redirect = redirectionMapping[element];
328 // We must not use the [LocalsHandler.readThis()] since that could 327 // We must not use the [LocalsHandler.readThis()] since that could
329 // point to a captured this which would be stored in a closure-field 328 // point to a captured this which would be stored in a closure-field
330 // itself. 329 // itself.
331 HInstruction receiver = new HThis(); 330 HInstruction receiver = new HThis();
332 builder.add(receiver); 331 builder.add(receiver);
333 HInstruction fieldGet = new HFieldGet(redirect, receiver); 332 HInstruction fieldGet = new HFieldGet(redirect, receiver);
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 } 2069 }
2071 2070
2072 visitCatchBlock(CatchBlock node) { 2071 visitCatchBlock(CatchBlock node) {
2073 visit(node.block); 2072 visit(node.block);
2074 } 2073 }
2075 2074
2076 visitTypedef(Typedef node) { 2075 visitTypedef(Typedef node) {
2077 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 2076 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
2078 } 2077 }
2079 } 2078 }
OLDNEW
« no previous file with comments | « dart/frog/leg/resolver.dart ('k') | dart/frog/leg/ssa/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698