Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: lib/compiler/implementation/emitter.dart

Issue 10050035: isolate: fix how we get the current script now that frog automatically wraps the (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/isolate/frog/isolateimpl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 mainEnsureGetter = "$mainAccess.$invocationName = $mainAccess"; 669 mainEnsureGetter = "$mainAccess.$invocationName = $mainAccess";
670 } 670 }
671 671
672 // TODO(ngeoffray): These globals are currently required by the isolate 672 // TODO(ngeoffray): These globals are currently required by the isolate
673 // library, but since leg already generates code on an Isolate object, they 673 // library, but since leg already generates code on an Isolate object, they
674 // are not really needed. We should remove them once Leg replaces Frog. 674 // are not really needed. We should remove them once Leg replaces Frog.
675 buffer.add(""" 675 buffer.add("""
676 var \$globalThis = $currentIsolate; 676 var \$globalThis = $currentIsolate;
677 var \$globalState; 677 var \$globalState;
678 var \$globals; 678 var \$globals;
679 var \$isWorker;
680 var \$supportsWorkers;
681 var \$thisScriptUrl;
679 function \$static_init(){}; 682 function \$static_init(){};
680 683
681 function \$initGlobals(context) { 684 function \$initGlobals(context) {
682 context.isolateStatics = new ${namer.ISOLATE}(); 685 context.isolateStatics = new ${namer.ISOLATE}();
683 } 686 }
684 function \$setGlobals(context) { 687 function \$setGlobals(context) {
685 $currentIsolate = context.isolateStatics; 688 $currentIsolate = context.isolateStatics;
686 \$globalThis = $currentIsolate; 689 \$globalThis = $currentIsolate;
687 } 690 }
688 $mainEnsureGetter 691 $mainEnsureGetter
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 nativeEmitter.emitDynamicDispatchMetadata(); 729 nativeEmitter.emitDynamicDispatchMetadata();
727 mainBuffer.add( 730 mainBuffer.add(
728 'var ${namer.CURRENT_ISOLATE} = new ${namer.ISOLATE}();\n'); 731 'var ${namer.CURRENT_ISOLATE} = new ${namer.ISOLATE}();\n');
729 nativeEmitter.assembleCode(mainBuffer); 732 nativeEmitter.assembleCode(mainBuffer);
730 emitMain(mainBuffer); 733 emitMain(mainBuffer);
731 compiler.assembledCode = mainBuffer.toString(); 734 compiler.assembledCode = mainBuffer.toString();
732 }); 735 });
733 return compiler.assembledCode; 736 return compiler.assembledCode;
734 } 737 }
735 } 738 }
OLDNEW
« no previous file with comments | « no previous file | lib/isolate/frog/isolateimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698