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

Side by Side Diff: frog/evaluator.dart

Issue 8591033: Support globals in frog isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: john comments Created 9 years, 1 month 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 | « frog/corejs.dart ('k') | frog/frogsh » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #import('file_system.dart'); 6 #import('file_system.dart');
7 #import('lang.dart'); 7 #import('lang.dart');
8 8
9 interface JsEvaluator { 9 interface JsEvaluator {
10 var eval(String source); 10 var eval(String source);
(...skipping 10 matching lines...) Expand all
21 initializeWorld(files); 21 initializeWorld(files);
22 world.process(); 22 world.process();
23 world.resolveAll(); 23 world.resolveAll();
24 24
25 _marked = new Set(); 25 _marked = new Set();
26 26
27 world.gen = new WorldGenerator(null, new CodeWriter()); 27 world.gen = new WorldGenerator(null, new CodeWriter());
28 _markAllUsed(world.corelib); 28 _markAllUsed(world.corelib);
29 world.gen.writeTypes(world.coreimpl); 29 world.gen.writeTypes(world.coreimpl);
30 world.gen.writeTypes(world.corelib); 30 world.gen.writeTypes(world.corelib);
31 world.gen.writeGlobals();
31 _prelude = world.gen.writer.text; 32 _prelude = world.gen.writer.text;
32 33
33 // Set these here so that we can compile the corelib without its errors 34 // Set these here so that we can compile the corelib without its errors
34 // killing us 35 // killing us
35 options.throwOnErrors = true; 36 options.throwOnErrors = true;
36 options.throwOnFatal = true; 37 options.throwOnFatal = true;
37 } 38 }
38 39
39 // TODO(jimhug): Should be calling world.genMethod - but I'm scared to 40 // TODO(jimhug): Should be calling world.genMethod - but I'm scared to
40 // make the change myself because we don't have any test coverage here. 41 // make the change myself because we don't have any test coverage here.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 world.gen.writeType(type); 147 world.gen.writeType(type);
147 code = world.gen.writer.text; 148 code = world.gen.writer.text;
148 } else { 149 } else {
149 parsed.visit(methGen); 150 parsed.visit(methGen);
150 code = methGen.writer.text; 151 code = methGen.writer.text;
151 } 152 }
152 153
153 return this._jsEvaluator.eval(code); 154 return this._jsEvaluator.eval(code);
154 } 155 }
155 } 156 }
OLDNEW
« no previous file with comments | « frog/corejs.dart ('k') | frog/frogsh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698