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

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

Issue 906713002: Extract invoke-main stub generator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix by adding a missing semicolon. Created 5 years, 10 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) 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; 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;
11 11
12 import 'js_emitter.dart' show MetadataCollector; 12 import 'js_emitter.dart' show MetadataCollector;
13 13
14 import '../common.dart'; 14 import '../common.dart';
15 15
16 class Program { 16 class Program {
17 final List<Fragment> fragments; 17 final List<Fragment> fragments;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 MainFragment get mainFragment; 96 MainFragment get mainFragment;
97 } 97 }
98 98
99 /** 99 /**
100 * The main output file. 100 * The main output file.
101 * 101 *
102 * This code emitted from this [Fragment] must be loaded first. It can then load 102 * This code emitted from this [Fragment] must be loaded first. It can then load
103 * other [DeferredFragment]s. 103 * other [DeferredFragment]s.
104 */ 104 */
105 class MainFragment extends Fragment { 105 class MainFragment extends Fragment {
106 final js.Expression main; 106 final js.Statement invokeMain;
107 final List<Holder> holders; 107 final List<Holder> holders;
108 108
109 MainFragment(OutputUnit outputUnit, 109 MainFragment(OutputUnit outputUnit,
110 String outputFileName, 110 String outputFileName,
111 this.main, 111 this.invokeMain,
112 List<Library> libraries, 112 List<Library> libraries,
113 List<StaticField> staticNonFinalFields, 113 List<StaticField> staticNonFinalFields,
114 List<StaticField> staticLazilyInitializedFields, 114 List<StaticField> staticLazilyInitializedFields,
115 List<Constant> constants, 115 List<Constant> constants,
116 this.holders) 116 this.holders)
117 : super(outputUnit, 117 : super(outputUnit,
118 outputFileName, 118 outputFileName,
119 libraries, 119 libraries,
120 staticNonFinalFields, 120 staticNonFinalFields,
121 staticLazilyInitializedFields, 121 staticLazilyInitializedFields,
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 tearOffName : tearOffName, 434 tearOffName : tearOffName,
435 canBeApplied : canBeApplied, 435 canBeApplied : canBeApplied,
436 canBeReflected : canBeReflected); 436 canBeReflected : canBeReflected);
437 } 437 }
438 438
439 class StaticStubMethod extends StubMethod implements StaticMethod { 439 class StaticStubMethod extends StubMethod implements StaticMethod {
440 Holder holder; 440 Holder holder;
441 StaticStubMethod(String name, this.holder, js.Expression code) 441 StaticStubMethod(String name, this.holder, js.Expression code)
442 : super(name, code); 442 : super(name, code);
443 } 443 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698