| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 library.define(new ForeignElement( | 260 library.define(new ForeignElement( |
| 261 const SourceString('JS'), library), this); | 261 const SourceString('JS'), library), this); |
| 262 library.define(new ForeignElement( | 262 library.define(new ForeignElement( |
| 263 const SourceString('UNINTERCEPTED'), library), this); | 263 const SourceString('UNINTERCEPTED'), library), this); |
| 264 library.define(new ForeignElement( | 264 library.define(new ForeignElement( |
| 265 const SourceString('JS_HAS_EQUALS'), library), this); | 265 const SourceString('JS_HAS_EQUALS'), library), this); |
| 266 library.define(new ForeignElement( | 266 library.define(new ForeignElement( |
| 267 const SourceString('JS_CURRENT_ISOLATE'), library), this); | 267 const SourceString('JS_CURRENT_ISOLATE'), library), this); |
| 268 library.define(new ForeignElement( | 268 library.define(new ForeignElement( |
| 269 const SourceString('JS_CALL_IN_ISOLATE'), library), this); | 269 const SourceString('JS_CALL_IN_ISOLATE'), library), this); |
| 270 library.define(new ForeignElement( |
| 271 const SourceString('DART_CLOSURE_TO_JS'), library), this); |
| 270 } | 272 } |
| 271 | 273 |
| 272 void runCompiler(Uri uri) { | 274 void runCompiler(Uri uri) { |
| 273 scanBuiltinLibraries(); | 275 scanBuiltinLibraries(); |
| 274 mainApp = scanner.loadLibrary(uri, null); | 276 mainApp = scanner.loadLibrary(uri, null); |
| 275 final Element mainMethod = mainApp.find(MAIN); | 277 final Element mainMethod = mainApp.find(MAIN); |
| 276 if (mainMethod === null) { | 278 if (mainMethod === null) { |
| 277 withCurrentElement(mainApp, () => cancel('Could not find $MAIN')); | 279 withCurrentElement(mainApp, () => cancel('Could not find $MAIN')); |
| 278 } else { | 280 } else { |
| 279 withCurrentElement(mainMethod, () { | 281 withCurrentElement(mainMethod, () { |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 } | 540 } |
| 539 } | 541 } |
| 540 | 542 |
| 541 class SourceSpan { | 543 class SourceSpan { |
| 542 final Uri uri; | 544 final Uri uri; |
| 543 final int begin; | 545 final int begin; |
| 544 final int end; | 546 final int end; |
| 545 | 547 |
| 546 const SourceSpan(this.uri, this.begin, this.end); | 548 const SourceSpan(this.uri, this.begin, this.end); |
| 547 } | 549 } |
| OLD | NEW |