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

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

Issue 9419048: Resolve class element of Object, even if no objects are used. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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
« no previous file with comments | « frog/leg/resolver.dart ('k') | 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 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after
2068 } 2067 }
2069 2068
2070 visitCatchBlock(CatchBlock node) { 2069 visitCatchBlock(CatchBlock node) {
2071 visit(node.block); 2070 visit(node.block);
2072 } 2071 }
2073 2072
2074 visitTypedef(Typedef node) { 2073 visitTypedef(Typedef node) {
2075 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 2074 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
2076 } 2075 }
2077 } 2076 }
OLDNEW
« no previous file with comments | « frog/leg/resolver.dart ('k') | frog/leg/ssa/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698