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