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

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

Issue 10332315: Add a draft of traversing visitor which will analyse function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Next iteration Created 8 years, 6 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
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 bool allowSpeculativeOptimization = true; 8 bool allowSpeculativeOptimization = true;
9 List<HTypeGuard> guards = const <HTypeGuard>[]; 9 List<HTypeGuard> guards = const <HTypeGuard>[];
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 void processNativeClasses(world, libraries) { 65 void processNativeClasses(world, libraries) {
66 native.processNativeClasses(world, emitter, libraries); 66 native.processNativeClasses(world, emitter, libraries);
67 } 67 }
68 68
69 void assembleProgram() { 69 void assembleProgram() {
70 emitter.assembleProgram(); 70 emitter.assembleProgram();
71 } 71 }
72 } 72 }
73 73
74 class DartBackend extends Backend {
75 DartBackend(Compiler compiler) : super(compiler);
76 final List<CompilerTask> tasks = const <CompilerTask>[];
77 }
78
79 class Compiler implements DiagnosticListener { 74 class Compiler implements DiagnosticListener {
80 final Map<String, LibraryElement> libraries; 75 final Map<String, LibraryElement> libraries;
81 int nextFreeClassId = 0; 76 int nextFreeClassId = 0;
82 World world; 77 World world;
83 String assembledCode; 78 String assembledCode;
84 Namer namer; 79 Namer namer;
85 Types types; 80 Types types;
86 final bool enableTypeAssertions; 81 final bool enableTypeAssertions;
87 82
88 final Tracer tracer; 83 final Tracer tracer;
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 // invariant that endOffset > beginOffset, but for EOF the 589 // invariant that endOffset > beginOffset, but for EOF the
595 // charoffset of the next token may be [beginOffset]. This can 590 // charoffset of the next token may be [beginOffset]. This can
596 // also happen for synthetized tokens that are produced during 591 // also happen for synthetized tokens that are produced during
597 // error handling. 592 // error handling.
598 final endOffset = 593 final endOffset =
599 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1); 594 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1);
600 assert(endOffset > beginOffset); 595 assert(endOffset > beginOffset);
601 return f(beginOffset, endOffset); 596 return f(beginOffset, endOffset);
602 } 597 }
603 } 598 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/dart/backend.dart » ('j') | lib/compiler/implementation/leg.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698