| 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 * A function element that represents a closure call. The signature is copied | 6 * A function element that represents a closure call. The signature is copied |
| 7 * from the given element. | 7 * from the given element. |
| 8 */ | 8 */ |
| 9 class ClosureInvocationElement extends FunctionElement { | 9 class ClosureInvocationElement extends FunctionElement { |
| 10 ClosureInvocationElement(SourceString name, | 10 ClosureInvocationElement(SourceString name, |
| (...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 mainEnsureGetter = "$mainAccess.$invocationName = $mainAccess"; | 1211 mainEnsureGetter = "$mainAccess.$invocationName = $mainAccess"; |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 // TODO(ngeoffray): These globals are currently required by the isolate | 1214 // TODO(ngeoffray): These globals are currently required by the isolate |
| 1215 // library, but since leg already generates code on an Isolate object, they | 1215 // library, but since leg already generates code on an Isolate object, they |
| 1216 // are not really needed. We should remove them once Leg replaces Frog. | 1216 // are not really needed. We should remove them once Leg replaces Frog. |
| 1217 buffer.add(""" | 1217 buffer.add(""" |
| 1218 var \$globalThis = $currentIsolate; | 1218 var \$globalThis = $currentIsolate; |
| 1219 var \$globalState; | 1219 var \$globalState; |
| 1220 var \$globals; | 1220 var \$globals; |
| 1221 var \$isWorker; | 1221 var \$isWorker = false; |
| 1222 var \$supportsWorkers; | 1222 var \$supportsWorkers = false; |
| 1223 var \$thisScriptUrl; | 1223 var \$thisScriptUrl; |
| 1224 function \$static_init(){}; | 1224 function \$static_init(){}; |
| 1225 | 1225 |
| 1226 function \$initGlobals(context) { | 1226 function \$initGlobals(context) { |
| 1227 context.isolateStatics = new ${namer.ISOLATE}(); | 1227 context.isolateStatics = new ${namer.ISOLATE}(); |
| 1228 } | 1228 } |
| 1229 function \$setGlobals(context) { | 1229 function \$setGlobals(context) { |
| 1230 $currentIsolate = context.isolateStatics; | 1230 $currentIsolate = context.isolateStatics; |
| 1231 \$globalThis = $currentIsolate; | 1231 \$globalThis = $currentIsolate; |
| 1232 } | 1232 } |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 const String HOOKS_API_USAGE = """ | 1350 const String HOOKS_API_USAGE = """ |
| 1351 // Generated by dart2js, the Dart to JavaScript compiler. | 1351 // Generated by dart2js, the Dart to JavaScript compiler. |
| 1352 // The code supports the following hooks: | 1352 // The code supports the following hooks: |
| 1353 // dartPrint(message) - if this function is defined it is called | 1353 // dartPrint(message) - if this function is defined it is called |
| 1354 // instead of the Dart [print] method. | 1354 // instead of the Dart [print] method. |
| 1355 // dartMainRunner(main) - if this function is defined, the Dart [main] | 1355 // dartMainRunner(main) - if this function is defined, the Dart [main] |
| 1356 // method will not be invoked directly. | 1356 // method will not be invoked directly. |
| 1357 // Instead, a closure that will invoke [main] is | 1357 // Instead, a closure that will invoke [main] is |
| 1358 // passed to [dartMainRunner]. | 1358 // passed to [dartMainRunner]. |
| 1359 """; | 1359 """; |
| OLD | NEW |