| 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 /** | 5 /** |
| 6 * Top level generator object for writing code and keeping track of | 6 * Top level generator object for writing code and keeping track of |
| 7 * dependencies. | 7 * dependencies. |
| 8 * | 8 * |
| 9 * Should have two compilation models, but only one implemented so far. | 9 * Should have two compilation models, but only one implemented so far. |
| 10 * | 10 * |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 if (options.compileAll) { | 67 if (options.compileAll) { |
| 68 markLibrariesUsed( | 68 markLibrariesUsed( |
| 69 [world.coreimpl, world.corelib, main.declaringType.library]); | 69 [world.coreimpl, world.corelib, main.declaringType.library]); |
| 70 } | 70 } |
| 71 | 71 |
| 72 // These are essentially always used through literals - just include them | 72 // These are essentially always used through literals - just include them |
| 73 world.numImplType.markUsed(); | 73 world.numImplType.markUsed(); |
| 74 world.stringImplType.markUsed(); | 74 world.stringImplType.markUsed(); |
| 75 | 75 |
| 76 if (corejs.useIndex || corejs.useSetIndex) { |
| 77 if (!options.disableBoundsChecks) { |
| 78 // These exceptions might be thrown by array bounds checks. |
| 79 markTypeUsed(world.corelib.types['IndexOutOfRangeException']); |
| 80 markTypeUsed(world.corelib.types['IllegalArgumentException']); |
| 81 } |
| 82 } |
| 83 |
| 76 // Only include isolate-specific code if isolates are used. | 84 // Only include isolate-specific code if isolates are used. |
| 77 if (world.corelib.types['Isolate'].isUsed | 85 if (world.corelib.types['Isolate'].isUsed |
| 78 || world.coreimpl.types['ReceivePortImpl'].isUsed) { | 86 || world.coreimpl.types['ReceivePortImpl'].isUsed) { |
| 79 | 87 |
| 80 // Generate callbacks from JS to isolate code if needed | 88 // Generate callbacks from JS to isolate code if needed |
| 81 if (corejs.useWrap0 || corejs.useWrap1) { | 89 if (corejs.useWrap0 || corejs.useWrap1) { |
| 82 genMethod(world.coreimpl.types['IsolateContext'].getMember('eval')); | 90 genMethod(world.coreimpl.types['IsolateContext'].getMember('eval')); |
| 83 genMethod(world.coreimpl.types['EventLoop'].getMember('run')); | 91 genMethod(world.coreimpl.types['EventLoop'].getMember('run')); |
| 84 } | 92 } |
| 85 | 93 |
| (...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2430 return true; | 2438 return true; |
| 2431 } | 2439 } |
| 2432 | 2440 |
| 2433 } | 2441 } |
| 2434 | 2442 |
| 2435 class ReturnKind { | 2443 class ReturnKind { |
| 2436 static final int IGNORE = 1; | 2444 static final int IGNORE = 1; |
| 2437 static final int POST = 2; | 2445 static final int POST = 2; |
| 2438 static final int PRE = 3; | 2446 static final int PRE = 3; |
| 2439 } | 2447 } |
| OLD | NEW |