| 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 class WorkItem { | 5 class WorkItem { |
| 6 final Element element; | 6 final Element element; |
| 7 TreeElements resolutionTree; | 7 TreeElements resolutionTree; |
| 8 Function run; | 8 Function run; |
| 9 Map<int, BailoutInfo> bailouts = null; | 9 Map<int, BailoutInfo> bailouts = null; |
| 10 bool allowSpeculativeOptimization = true; | 10 bool allowSpeculativeOptimization = true; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 } | 244 } |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 | 250 |
| 251 void runCompiler(Script script) { | 251 void runCompiler(Script script) { |
| 252 scanBuiltinLibraries(); | 252 scanBuiltinLibraries(); |
| 253 mainApp = new LibraryElement(script); | 253 mainApp = new LibraryElement(script); |
| 254 native.checkNativeSupport(this, mainApp); | 254 native.checkNativeSupport(this, mainApp, null); |
| 255 | 255 |
| 256 Element element; | 256 Element element; |
| 257 withCurrentElement(mainApp, () { | 257 withCurrentElement(mainApp, () { |
| 258 scanner.scan(currentElement); | 258 scanner.scan(currentElement); |
| 259 element = mainApp.find(MAIN); | 259 element = mainApp.find(MAIN); |
| 260 if (element === null) cancel('Could not find $MAIN'); | 260 if (element === null) cancel('Could not find $MAIN'); |
| 261 }); | 261 }); |
| 262 worklist.add(new WorkItem.toCompile(element)); | 262 worklist.add(new WorkItem.toCompile(element)); |
| 263 do { | 263 do { |
| 264 while (!worklist.isEmpty()) { | 264 while (!worklist.isEmpty()) { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 399 |
| 400 class CompilerCancelledException implements Exception { | 400 class CompilerCancelledException implements Exception { |
| 401 final String reason; | 401 final String reason; |
| 402 CompilerCancelledException(this.reason); | 402 CompilerCancelledException(this.reason); |
| 403 | 403 |
| 404 String toString() { | 404 String toString() { |
| 405 String banner = 'compiler cancelled'; | 405 String banner = 'compiler cancelled'; |
| 406 return (reason !== null) ? '$banner: $reason' : '$banner'; | 406 return (reason !== null) ? '$banner: $reason' : '$banner'; |
| 407 } | 407 } |
| 408 } | 408 } |
| OLD | NEW |