| OLD | NEW |
| 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 typedef void Recompile(Element element); | 5 typedef void Recompile(Element element); |
| 6 | 6 |
| 7 class ReturnInfo { | 7 class ReturnInfo { |
| 8 HType returnType; | 8 HType returnType; |
| 9 List<Element> compiledFunctions; | 9 List<Element> compiledFunctions; |
| 10 | 10 |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 void codegen(WorkItem work) { | 345 void codegen(WorkItem work) { |
| 346 HGraph graph = builder.build(work); | 346 HGraph graph = builder.build(work); |
| 347 optimizer.optimize(work, graph); | 347 optimizer.optimize(work, graph); |
| 348 if (work.allowSpeculativeOptimization | 348 if (work.allowSpeculativeOptimization |
| 349 && optimizer.trySpeculativeOptimizations(work, graph)) { | 349 && optimizer.trySpeculativeOptimizations(work, graph)) { |
| 350 CodeBuffer codeBuffer = generator.generateBailoutMethod(work, graph); | 350 CodeBuffer codeBuffer = generator.generateBailoutMethod(work, graph); |
| 351 compiler.codegenWorld.addBailoutCode(work, codeBuffer); | 351 compiler.codegenWorld.addBailoutCode(work, codeBuffer); |
| 352 optimizer.prepareForSpeculativeOptimizations(work, graph); | 352 optimizer.prepareForSpeculativeOptimizations(work, graph); |
| 353 optimizer.optimize(work, graph); | 353 optimizer.optimize(work, graph); |
| 354 } | 354 } |
| 355 CodeBuffer codeBuffer = generator.generateMethod(work, graph); | 355 CodeBuffer codeBuffer = generator.generateCode(work, graph); |
| 356 compiler.codegenWorld.addGeneratedCode(work, codeBuffer); | 356 compiler.codegenWorld.addGeneratedCode(work, codeBuffer); |
| 357 invalidateAfterCodegen.forEach( | 357 invalidateAfterCodegen.forEach( |
| 358 compiler.enqueuer.codegen.eagerRecompile); | 358 compiler.enqueuer.codegen.eagerRecompile); |
| 359 invalidateAfterCodegen.clear(); | 359 invalidateAfterCodegen.clear(); |
| 360 } | 360 } |
| 361 | 361 |
| 362 void processNativeClasses(Enqueuer world, | 362 void processNativeClasses(Enqueuer world, |
| 363 Collection<LibraryElement> libraries) { | 363 Collection<LibraryElement> libraries) { |
| 364 native.processNativeClasses(world, emitter, libraries); | 364 native.processNativeClasses(world, emitter, libraries); |
| 365 } | 365 } |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 return const SourceString('listSuperTypeCheck'); | 577 return const SourceString('listSuperTypeCheck'); |
| 578 } | 578 } |
| 579 } else if (nativeCheck) { | 579 } else if (nativeCheck) { |
| 580 return const SourceString('callTypeCheck'); | 580 return const SourceString('callTypeCheck'); |
| 581 } else { | 581 } else { |
| 582 return const SourceString('propertyTypeCheck'); | 582 return const SourceString('propertyTypeCheck'); |
| 583 } | 583 } |
| 584 } | 584 } |
| 585 } | 585 } |
| 586 } | 586 } |
| OLD | NEW |