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

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

Issue 1244473002: dart2js: Fix check for support of reflection. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
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 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 const USE_LAZY_EMITTER = const bool.fromEnvironment("dart2js.use.lazy.emitter"); 7 const USE_LAZY_EMITTER = const bool.fromEnvironment("dart2js.use.lazy.emitter");
8 const USE_STARTUP_EMITTER = 8 const USE_STARTUP_EMITTER =
9 const bool.fromEnvironment("dart2js.use.startup.emitter"); 9 const bool.fromEnvironment("dart2js.use.startup.emitter");
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return size; 145 return size;
146 }); 146 });
147 } 147 }
148 } 148 }
149 149
150 abstract class Emitter { 150 abstract class Emitter {
151 /// Uses the [programBuilder] to generate a model of the program, emits 151 /// Uses the [programBuilder] to generate a model of the program, emits
152 /// the program, and returns the size of the generated output. 152 /// the program, and returns the size of the generated output.
153 int emitProgram(ProgramBuilder programBuilder); 153 int emitProgram(ProgramBuilder programBuilder);
154 154
155 /// Returns true, if the emitter supports reflection.
156 bool get supportsReflection;
157
155 /// Returns the JS function that must be invoked to get the value of the 158 /// Returns the JS function that must be invoked to get the value of the
156 /// lazily initialized static. 159 /// lazily initialized static.
157 jsAst.Expression isolateLazyInitializerAccess(FieldElement element); 160 jsAst.Expression isolateLazyInitializerAccess(FieldElement element);
158 161
159 /// Returns the closure expression of a static function. 162 /// Returns the closure expression of a static function.
160 jsAst.Expression isolateStaticClosureAccess(FunctionElement element); 163 jsAst.Expression isolateStaticClosureAccess(FunctionElement element);
161 164
162 /// Returns the JS code for accessing the embedded [global]. 165 /// Returns the JS code for accessing the embedded [global].
163 jsAst.Expression generateEmbeddedGlobalAccess(String global); 166 jsAst.Expression generateEmbeddedGlobalAccess(String global);
164 167
(...skipping 25 matching lines...) Expand all
190 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant); 193 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant);
191 194
192 /// Returns the JS code for accessing the given [constant]. 195 /// Returns the JS code for accessing the given [constant].
193 jsAst.Expression constantReference(ConstantValue constant); 196 jsAst.Expression constantReference(ConstantValue constant);
194 197
195 /// Returns the JS template for the given [builtin]. 198 /// Returns the JS template for the given [builtin].
196 jsAst.Template templateForBuiltin(JsBuiltin builtin); 199 jsAst.Template templateForBuiltin(JsBuiltin builtin);
197 200
198 void invalidateCaches(); 201 void invalidateCaches();
199 } 202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698