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

Side by Side Diff: dart/frog/leg/compiler.dart

Issue 9568008: Do not allow native syntax on all libraries. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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 | dart/frog/leg/elements/elements.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 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 } 253 }
254 } 254 }
255 } 255 }
256 } 256 }
257 } 257 }
258 258
259 void runCompiler(Script script) { 259 void runCompiler(Script script) {
260 scanBuiltinLibraries(); 260 scanBuiltinLibraries();
261 mainApp = new LibraryElement(script); 261 mainApp = new LibraryElement(script);
262 native.checkNativeSupport(this, mainApp, null); 262 native.maybeEnableNative(this, mainApp, null);
263 263
264 Element element; 264 Element element;
265 withCurrentElement(mainApp, () { 265 withCurrentElement(mainApp, () {
266 scanner.scan(currentElement); 266 scanner.scan(currentElement);
267 element = mainApp.find(MAIN); 267 element = mainApp.find(MAIN);
268 if (element === null) cancel('Could not find $MAIN'); 268 if (element === null) cancel('Could not find $MAIN');
269 }); 269 });
270 worklist.add(new WorkItem.toCompile(element)); 270 worklist.add(new WorkItem.toCompile(element));
271 do { 271 do {
272 while (!worklist.isEmpty()) { 272 while (!worklist.isEmpty()) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 424
425 // TODO(ahe): Remove when the VM supports implicit interfaces. 425 // TODO(ahe): Remove when the VM supports implicit interfaces.
426 class LTracer implements Tracer { 426 class LTracer implements Tracer {
427 const LTracer(); 427 const LTracer();
428 final bool enabled = false; 428 final bool enabled = false;
429 void traceGraph(String name, var graph) { 429 void traceGraph(String name, var graph) {
430 } 430 }
431 void close() { 431 void close() {
432 } 432 }
433 } 433 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698