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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 12226074: Cleanup universe to not have backend related things. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (revision 18239)
+++ sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (working copy)
@@ -714,10 +714,11 @@
|| member.isGenerativeConstructorBody()
|| member.isAccessor()) {
if (member.isAbstract(compiler)) return;
- js.Expression code = compiler.codegenWorld.generatedCode[member];
+ JavaScriptBackend backend = compiler.backend;
karlklose 2013/02/08 11:44:53 How about making this a getter? I count 19 occurre
+ js.Expression code = backend.generatedCode[member];
if (code == null) return;
builder.addProperty(namer.getName(member), code);
- code = compiler.codegenWorld.generatedBailoutCode[member];
+ code = backend.generatedBailoutCode[member];
if (code != null) {
builder.addProperty(namer.getBailoutName(member), code);
}
@@ -1392,21 +1393,21 @@
}
void emitStaticFunctions(CodeBuffer buffer) {
+ JavaScriptBackend backend = compiler.backend;
bool isStaticFunction(Element element) =>
!element.isInstanceMember() && !element.isField();
Iterable<Element> elements =
- compiler.codegenWorld.generatedCode.keys.where(isStaticFunction);
+ backend.generatedCode.keys.where(isStaticFunction);
Set<Element> pendingElementsWithBailouts =
- compiler.codegenWorld.generatedBailoutCode.keys
+ backend.generatedBailoutCode.keys
.where(isStaticFunction)
.toSet();
for (Element element in Elements.sortedByPosition(elements)) {
- js.Expression code = compiler.codegenWorld.generatedCode[element];
+ js.Expression code = backend.generatedCode[element];
emitStaticFunction(buffer, namer.getName(element), code);
- js.Expression bailoutCode =
- compiler.codegenWorld.generatedBailoutCode[element];
+ js.Expression bailoutCode = backend.generatedBailoutCode[element];
if (bailoutCode != null) {
pendingElementsWithBailouts.remove(element);
emitStaticFunction(buffer, namer.getBailoutName(element), bailoutCode);
@@ -1416,8 +1417,7 @@
// Is it possible the primary function was inlined but the bailout was not?
for (Element element in
Elements.sortedByPosition(pendingElementsWithBailouts)) {
- js.Expression bailoutCode =
- compiler.codegenWorld.generatedBailoutCode[element];
+ js.Expression bailoutCode = backend.generatedBailoutCode[element];
emitStaticFunction(buffer, namer.getBailoutName(element), bailoutCode);
}
}
@@ -1723,11 +1723,12 @@
ConstantHandler handler = compiler.constantHandler;
List<VariableElement> lazyFields =
handler.getLazilyInitializedFieldsForEmission();
+ JavaScriptBackend backend = compiler.backend;
if (!lazyFields.isEmpty) {
needsLazyInitializer = true;
for (VariableElement element in Elements.sortedByPosition(lazyFields)) {
- assert(compiler.codegenWorld.generatedBailoutCode[element] == null);
- js.Expression code = compiler.codegenWorld.generatedCode[element];
+ assert(backend.generatedBailoutCode[element] == null);
+ js.Expression code = backend.generatedCode[element];
assert(code != null);
// The code only computes the initial value. We build the lazy-check
// here:

Powered by Google App Engine
This is Rietveld 408576698