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

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: 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
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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(
323 "Could not find value", node: element.parseNode(builder.compiler)); 323 "Could not find value", element: element);
ngeoffray 2012/02/17 10:03:50 This is exactly what we talked about with Florian:
floitsch 2012/02/17 10:40:40 While you are it: with "Cannot find value" it fits
ahe 2012/02/17 16:26:46 Done.
324 } 324 }
325 return directLocals[element]; 325 return directLocals[element];
326 } else if (isStoredInClosureField(element)) { 326 } else if (isStoredInClosureField(element)) {
327 Element redirect = redirectionMapping[element]; 327 Element redirect = redirectionMapping[element];
328 // We must not use the [LocalsHandler.readThis()] since that could 328 // We must not use the [LocalsHandler.readThis()] since that could
329 // point to a captured this which would be stored in a closure-field 329 // point to a captured this which would be stored in a closure-field
330 // itself. 330 // itself.
331 HInstruction receiver = new HThis(); 331 HInstruction receiver = new HThis();
332 builder.add(receiver); 332 builder.add(receiver);
333 HInstruction fieldGet = new HFieldGet(redirect, receiver); 333 HInstruction fieldGet = new HFieldGet(redirect, receiver);
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 } 2070 }
2071 2071
2072 visitCatchBlock(CatchBlock node) { 2072 visitCatchBlock(CatchBlock node) {
2073 visit(node.block); 2073 visit(node.block);
2074 } 2074 }
2075 2075
2076 visitTypedef(Typedef node) { 2076 visitTypedef(Typedef node) {
2077 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 2077 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
2078 } 2078 }
2079 } 2079 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698