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

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

Issue 993573002: Ensure that collectedClasses always contains a [globalObject, descriptor] pair. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/dart2js_incremental/lib/library_updater.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 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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 String fieldNamesProperty = FIELD_NAMES_PROPERTY_NAME; 1187 String fieldNamesProperty = FIELD_NAMES_PROPERTY_NAME;
1188 bool hasIsolateSupport = compiler.hasIsolateSupport; 1188 bool hasIsolateSupport = compiler.hasIsolateSupport;
1189 jsAst.Node fieldNamesArray = 1189 jsAst.Node fieldNamesArray =
1190 hasIsolateSupport ? js.stringArray(fields) : new jsAst.LiteralNull(); 1190 hasIsolateSupport ? js.stringArray(fields) : new jsAst.LiteralNull();
1191 1191
1192 cspPrecompiledFunctionFor(outputUnit).add(js.statement(r''' 1192 cspPrecompiledFunctionFor(outputUnit).add(js.statement(r'''
1193 { 1193 {
1194 #constructorName.builtin$cls = #constructorNameString; 1194 #constructorName.builtin$cls = #constructorNameString;
1195 if (!"name" in #constructorName) 1195 if (!"name" in #constructorName)
1196 #constructorName.name = #constructorNameString; 1196 #constructorName.name = #constructorNameString;
1197 $desc = $collectedClasses.#constructorName; 1197 $desc = $collectedClasses.#constructorName[1];
1198 if ($desc instanceof Array) $desc = $desc[1];
1199 #constructorName.prototype = $desc; 1198 #constructorName.prototype = $desc;
1200 ''' /* next string is not a raw string */ ''' 1199 ''' /* next string is not a raw string */ '''
1201 if (#hasIsolateSupport) { 1200 if (#hasIsolateSupport) {
1202 #constructorName.$fieldNamesProperty = #fieldNamesArray; 1201 #constructorName.$fieldNamesProperty = #fieldNamesArray;
1203 } 1202 }
1204 }''', 1203 }''',
1205 {"constructorName": constructorName, 1204 {"constructorName": constructorName,
1206 "constructorNameString": js.string(constructorName), 1205 "constructorNameString": js.string(constructorName),
1207 "hasIsolateSupport": hasIsolateSupport, 1206 "hasIsolateSupport": hasIsolateSupport,
1208 "fieldNamesArray": fieldNamesArray})); 1207 "fieldNamesArray": fieldNamesArray}));
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 2021 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
2023 if (element.isInstanceMember) { 2022 if (element.isInstanceMember) {
2024 cachedClassBuilders.remove(element.enclosingClass); 2023 cachedClassBuilders.remove(element.enclosingClass);
2025 2024
2026 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2025 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2027 2026
2028 } 2027 }
2029 } 2028 }
2030 } 2029 }
2031 } 2030 }
OLDNEW
« no previous file with comments | « no previous file | pkg/dart2js_incremental/lib/library_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698