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

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

Issue 2488353004: Remove Compiler access from ResolutionEnqueuer (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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) 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.js_emitter.full_emitter; 5 library dart2js.js_emitter.full_emitter;
6 6
7 import 'dart:collection' show HashMap; 7 import 'dart:collection' show HashMap;
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 1145
1146 void assemblePrecompiledConstructor( 1146 void assemblePrecompiledConstructor(
1147 OutputUnit outputUnit, 1147 OutputUnit outputUnit,
1148 jsAst.Name constructorName, 1148 jsAst.Name constructorName,
1149 jsAst.Expression constructorAst, 1149 jsAst.Expression constructorAst,
1150 List<jsAst.Name> fields) { 1150 List<jsAst.Name> fields) {
1151 cspPrecompiledFunctionFor(outputUnit) 1151 cspPrecompiledFunctionFor(outputUnit)
1152 .add(new jsAst.FunctionDeclaration(constructorName, constructorAst)); 1152 .add(new jsAst.FunctionDeclaration(constructorName, constructorAst));
1153 1153
1154 String fieldNamesProperty = FIELD_NAMES_PROPERTY_NAME; 1154 String fieldNamesProperty = FIELD_NAMES_PROPERTY_NAME;
1155 bool hasIsolateSupport = compiler.hasIsolateSupport; 1155 bool hasIsolateSupport = compiler.resolverWorld.hasIsolateSupport;
1156 jsAst.Node fieldNamesArray; 1156 jsAst.Node fieldNamesArray;
1157 if (hasIsolateSupport) { 1157 if (hasIsolateSupport) {
1158 fieldNamesArray = 1158 fieldNamesArray =
1159 new jsAst.ArrayInitializer(fields.map(js.quoteName).toList()); 1159 new jsAst.ArrayInitializer(fields.map(js.quoteName).toList());
1160 } else { 1160 } else {
1161 fieldNamesArray = new jsAst.LiteralNull(); 1161 fieldNamesArray = new jsAst.LiteralNull();
1162 } 1162 }
1163 1163
1164 cspPrecompiledFunctionFor(outputUnit).add(js.statement( 1164 cspPrecompiledFunctionFor(outputUnit).add(js.statement(
1165 r''' 1165 r'''
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
2152 if (cachedElements.isEmpty) return; 2152 if (cachedElements.isEmpty) return;
2153 for (Element element in backend.codegenEnqueuer.newlyEnqueuedElements) { 2153 for (Element element in backend.codegenEnqueuer.newlyEnqueuedElements) {
2154 if (element.isInstanceMember) { 2154 if (element.isInstanceMember) {
2155 cachedClassBuilders.remove(element.enclosingClass); 2155 cachedClassBuilders.remove(element.enclosingClass);
2156 2156
2157 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2157 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2158 } 2158 }
2159 } 2159 }
2160 } 2160 }
2161 } 2161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698