OLD | NEW |
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 Loading... |
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.resolverWorld.hasIsolateSupport; | 1155 bool hasIsolateSupport = backend.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 Loading... |
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 } |
OLD | NEW |