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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/model.dart

Issue 1072403005: dart2js: fully assemble program before emitting it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix Created 5 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 | pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library dart2js.new_js_emitter.model; 5 library dart2js.new_js_emitter.model;
6 6
7 import '../js/js.dart' as js show Expression, Statement; 7 import '../js/js.dart' as js show Expression, Statement;
8 import '../constants/values.dart' show ConstantValue; 8 import '../constants/values.dart' show ConstantValue;
9 9
10 import '../deferred_load.dart' show OutputUnit; 10 import '../deferred_load.dart' show OutputUnit;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 /// Note: the metadata is derived from the task's `metadataCollector`. The 64 /// Note: the metadata is derived from the task's `metadataCollector`. The
65 /// list must not be emitted before all operations on it are done. For 65 /// list must not be emitted before all operations on it are done. For
66 /// example, the old emitter generates metadata when emitting reflection 66 /// example, the old emitter generates metadata when emitting reflection
67 /// data. 67 /// data.
68 Map<OutputUnit, List<String>> get metadataTypes 68 Map<OutputUnit, List<String>> get metadataTypes
69 => _metadataCollector.types; 69 => _metadataCollector.types;
70 70
71 71
72 bool get isSplit => fragments.length > 1; 72 bool get isSplit => fragments.length > 1;
73 Iterable<Fragment> get deferredFragments => fragments.skip(1); 73 Iterable<Fragment> get deferredFragments => fragments.skip(1);
74 Fragment get mainFragment => fragments.first;
74 } 75 }
75 76
76 /** 77 /**
77 * This class represents a JavaScript object that contains static state, like 78 * This class represents a JavaScript object that contains static state, like
78 * classes or functions. 79 * classes or functions.
79 */ 80 */
80 class Holder { 81 class Holder {
81 final String name; 82 final String name;
82 final int index; 83 final int index;
83 Holder(this.name, this.index); 84 Holder(this.name, this.index);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 requiredParameterCount: requiredParameterCount, 481 requiredParameterCount: requiredParameterCount,
481 optionalParameterDefaultValues: optionalParameterDefaultValues, 482 optionalParameterDefaultValues: optionalParameterDefaultValues,
482 functionType: functionType); 483 functionType: functionType);
483 } 484 }
484 485
485 class StaticStubMethod extends StubMethod implements StaticMethod { 486 class StaticStubMethod extends StubMethod implements StaticMethod {
486 Holder holder; 487 Holder holder;
487 StaticStubMethod(String name, this.holder, js.Expression code) 488 StaticStubMethod(String name, this.holder, js.Expression code)
488 : super(name, code); 489 : super(name, code);
489 } 490 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698