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

Side by Side Diff: lib/compiler/implementation/js_backend/backend.dart

Issue 10855174: Lazy implementation of final variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tests. Created 8 years, 4 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 InvocationInfo { 5 class InvocationInfo {
6 int parameterCount; 6 int parameterCount;
7 List<HType> providedTypes; 7 List<HType> providedTypes;
8 List<Element> compiledFunctions; 8 List<Element> compiledFunctions;
9 9
10 InvocationInfo(List<HType> types) 10 InvocationInfo(List<HType> types)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 CodeBuffer codegen(WorkItem work) { 61 CodeBuffer codegen(WorkItem work) {
62 HGraph graph = builder.build(work); 62 HGraph graph = builder.build(work);
63 optimizer.optimize(work, graph); 63 optimizer.optimize(work, graph);
64 if (work.allowSpeculativeOptimization 64 if (work.allowSpeculativeOptimization
65 && optimizer.trySpeculativeOptimizations(work, graph)) { 65 && optimizer.trySpeculativeOptimizations(work, graph)) {
66 CodeBuffer codeBuffer = generator.generateBailoutMethod(work, graph); 66 CodeBuffer codeBuffer = generator.generateBailoutMethod(work, graph);
67 compiler.codegenWorld.addBailoutCode(work, codeBuffer); 67 compiler.codegenWorld.addBailoutCode(work, codeBuffer);
68 optimizer.prepareForSpeculativeOptimizations(work, graph); 68 optimizer.prepareForSpeculativeOptimizations(work, graph);
69 optimizer.optimize(work, graph); 69 optimizer.optimize(work, graph);
70 } 70 }
71 return generator.generateMethod(work, graph); 71 return generator.generateCode(work, graph);
72 } 72 }
73 73
74 void processNativeClasses(Enqueuer world, 74 void processNativeClasses(Enqueuer world,
75 Collection<LibraryElement> libraries) { 75 Collection<LibraryElement> libraries) {
76 native.processNativeClasses(world, emitter, libraries); 76 native.processNativeClasses(world, emitter, libraries);
77 } 77 }
78 78
79 void assembleProgram() { 79 void assembleProgram() {
80 emitter.assembleProgram(); 80 emitter.assembleProgram();
81 } 81 }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 if (foundCount == 1 && found.hasTypeInformation) { 264 if (foundCount == 1 && found.hasTypeInformation) {
265 FunctionSignature signature = element.computeSignature(compiler); 265 FunctionSignature signature = element.computeSignature(compiler);
266 if (signature.parameterCount == found.parameterCount) { 266 if (signature.parameterCount == found.parameterCount) {
267 found.addCompiledFunction(element); 267 found.addCompiledFunction(element);
268 return found.providedTypes; 268 return found.providedTypes;
269 } 269 }
270 } 270 }
271 return null; 271 return null;
272 } 272 }
273 } 273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698