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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart

Issue 1264303002: dart2js: fix a few TODOs in the startup emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Emit affinity tag only once. Created 5 years, 4 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
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.lazy_emitter.model_emitter; 5 library dart2js.js_emitter.lazy_emitter.model_emitter;
6 6
7 import '../../constants/values.dart' show ConstantValue, FunctionConstantValue; 7 import '../../constants/values.dart' show ConstantValue, FunctionConstantValue;
8 import '../../dart2jslib.dart' show Compiler; 8 import '../../dart2jslib.dart' show Compiler;
9 import '../../elements/elements.dart' show ClassElement, FunctionElement; 9 import '../../elements/elements.dart' show ClassElement, FunctionElement;
10 import '../../js/js.dart' as js; 10 import '../../js/js.dart' as js;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 Map<String, dynamic> nativeHoles(Program program) { 229 Map<String, dynamic> nativeHoles(Program program) {
230 Map<String, dynamic> nativeHoles = <String, dynamic>{}; 230 Map<String, dynamic> nativeHoles = <String, dynamic>{};
231 231
232 js.Statement nativeIsolateAffinityTagInitialization; 232 js.Statement nativeIsolateAffinityTagInitialization;
233 if (NativeGenerator.needsIsolateAffinityTagInitialization(backend)) { 233 if (NativeGenerator.needsIsolateAffinityTagInitialization(backend)) {
234 nativeIsolateAffinityTagInitialization = 234 nativeIsolateAffinityTagInitialization =
235 NativeGenerator.generateIsolateAffinityTagInitialization( 235 NativeGenerator.generateIsolateAffinityTagInitialization(
236 backend, 236 backend,
237 generateEmbeddedGlobalAccess, 237 generateEmbeddedGlobalAccess,
238 // TODO(floitsch): convertToFastObject. 238 // TODO(floitsch): internStringFunction.
239 js.js("(function(x) { return x; })", [])); 239 js.js("(function(x) { return x; })", []));
240 } else { 240 } else {
241 nativeIsolateAffinityTagInitialization = js.js.statement(";"); 241 nativeIsolateAffinityTagInitialization = js.js.statement(";");
242 } 242 }
243 nativeHoles['nativeIsolateAffinityTagInitialization'] = 243 nativeHoles['nativeIsolateAffinityTagInitialization'] =
244 nativeIsolateAffinityTagInitialization; 244 nativeIsolateAffinityTagInitialization;
245 245
246 246
247 js.Expression nativeInfoAccess = js.js('nativeInfo', []); 247 js.Expression nativeInfoAccess = js.js('nativeInfo', []);
248 js.Expression constructorAccess = js.js('constructor', []); 248 js.Expression constructorAccess = js.js('constructor', []);
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 1238
1239 var end = Date.now(); 1239 var end = Date.now();
1240 // print('Setup: ' + (end - start) + ' ms.'); 1240 // print('Setup: ' + (end - start) + ' ms.');
1241 1241
1242 #invokeMain; // Start main. 1242 #invokeMain; // Start main.
1243 1243
1244 })(Date.now(), #code) 1244 })(Date.now(), #code)
1245 }"""; 1245 }""";
1246 1246
1247 } 1247 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698