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

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: Created 8 years, 7 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return generator.generateMethod(work, graph); 57 return generator.generateMethod(work, graph);
58 } 58 }
59 59
60 void processNativeClasses(world, libraries) { 60 void processNativeClasses(world, libraries) {
61 native.processNativeClasses(world, emitter, libraries); 61 native.processNativeClasses(world, emitter, libraries);
62 } 62 }
63 63
64 void assembleProgram() => emitter.assembleProgram(); 64 void assembleProgram() => emitter.assembleProgram();
65 } 65 }
66 66
67 class DartBackend extends Backend {
68 DartBackend(Compiler compiler) : super(compiler);
69 }
70
71 class Compiler implements DiagnosticListener { 67 class Compiler implements DiagnosticListener {
72 final Map<String, LibraryElement> libraries; 68 final Map<String, LibraryElement> libraries;
73 int nextFreeClassId = 0; 69 int nextFreeClassId = 0;
74 World world; 70 World world;
75 String assembledCode; 71 String assembledCode;
76 Namer namer; 72 Namer namer;
77 Types types; 73 Types types;
78 final bool enableTypeAssertions; 74 final bool enableTypeAssertions;
79 75
80 final Tracer tracer; 76 final Tracer tracer;
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 // invariant that endOffset > beginOffset, but for EOF the 570 // invariant that endOffset > beginOffset, but for EOF the
575 // charoffset of the next token may be [beginOffset]. This can 571 // charoffset of the next token may be [beginOffset]. This can
576 // also happen for synthetized tokens that are produced during 572 // also happen for synthetized tokens that are produced during
577 // error handling. 573 // error handling.
578 final endOffset = 574 final endOffset =
579 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1); 575 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1);
580 assert(endOffset > beginOffset); 576 assert(endOffset > beginOffset);
581 return f(beginOffset, endOffset); 577 return f(beginOffset, endOffset);
582 } 578 }
583 } 579 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/dart_backend.dart » ('j') | lib/compiler/implementation/dart_backend.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698