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

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

Issue 834133002: dart2js OldEmitter: Small cleanups in output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 7
8 class OldEmitter implements Emitter { 8 class OldEmitter implements Emitter {
9 final Compiler compiler; 9 final Compiler compiler;
10 final CodeEmitterTask task; 10 final CodeEmitterTask task;
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 jsAst.Expression finishedClassesAccess = 1074 jsAst.Expression finishedClassesAccess =
1075 generateEmbeddedGlobalAccess(embeddedNames.FINISHED_CLASSES); 1075 generateEmbeddedGlobalAccess(embeddedNames.FINISHED_CLASSES);
1076 jsAst.Expression cyclicThrow = 1076 jsAst.Expression cyclicThrow =
1077 staticFunctionAccess(backend.getCyclicThrowHelper()); 1077 staticFunctionAccess(backend.getCyclicThrowHelper());
1078 jsAst.Expression laziesAccess = 1078 jsAst.Expression laziesAccess =
1079 generateEmbeddedGlobalAccess(embeddedNames.LAZIES); 1079 generateEmbeddedGlobalAccess(embeddedNames.LAZIES);
1080 1080
1081 jsAst.FunctionDeclaration decl = js.statement(''' 1081 jsAst.FunctionDeclaration decl = js.statement('''
1082 function init() { 1082 function init() {
1083 $isolateProperties = Object.create(null); 1083 $isolateProperties = Object.create(null);
1084 (function(){ 1084 #allClasses = Object.create(null);
ahe 2015/01/05 14:42:25 Indentation.
zarah 2015/01/06 12:38:38 Done.
1085 #allClasses = Object.create(null); 1085 #interceptorsByTag = Object.create(null);
1086 #interceptorsByTag = Object.create(null); 1086 #leafTags = Object.create(null);
1087 #leafTags = Object.create(null); 1087 #finishedClasses = Object.create(null);
1088 #finishedClasses = Object.create(null);
1089 })();
1090 1088
1091 if (#needsLazyInitializer) { 1089 if (#needsLazyInitializer) {
1092 $lazyInitializerName = function (prototype, staticName, fieldName, 1090 $lazyInitializerName = function (prototype, staticName, fieldName,
1093 getterName, lazyValue) { 1091 getterName, lazyValue) {
1094 if (!#lazies) #lazies = Object.create(null); 1092 if (!#lazies) #lazies = Object.create(null);
1095 #lazies[fieldName] = getterName; 1093 #lazies[fieldName] = getterName;
1096 1094
1097 var sentinelUndefined = {}; 1095 var sentinelUndefined = {};
1098 var sentinelInProgress = {}; 1096 var sentinelInProgress = {};
1099 prototype[fieldName] = sentinelUndefined; 1097 prototype[fieldName] = sentinelUndefined;
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 2092 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
2095 if (element.isInstanceMember) { 2093 if (element.isInstanceMember) {
2096 cachedClassBuilders.remove(element.enclosingClass); 2094 cachedClassBuilders.remove(element.enclosingClass);
2097 2095
2098 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2096 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2099 2097
2100 } 2098 }
2101 } 2099 }
2102 } 2100 }
2103 } 2101 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698