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

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

Issue 2875313002: Access BackendUsage through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 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 'package:js_runtime/shared/embedded_names.dart' 7 import 'package:js_runtime/shared/embedded_names.dart'
8 show 8 show
9 CREATE_NEW_ISOLATE, 9 CREATE_NEW_ISOLATE,
10 DEFERRED_LIBRARY_URIS, 10 DEFERRED_LIBRARY_URIS,
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 holes.addAll(nativeHoles(program)); 247 holes.addAll(nativeHoles(program));
248 248
249 return js.js.statement(boilerplate, holes); 249 return js.js.statement(boilerplate, holes);
250 } 250 }
251 251
252 Map<String, dynamic> nativeHoles(Program program) { 252 Map<String, dynamic> nativeHoles(Program program) {
253 Map<String, dynamic> nativeHoles = <String, dynamic>{}; 253 Map<String, dynamic> nativeHoles = <String, dynamic>{};
254 254
255 js.Statement nativeIsolateAffinityTagInitialization; 255 js.Statement nativeIsolateAffinityTagInitialization;
256 if (NativeGenerator.needsIsolateAffinityTagInitialization(backend)) { 256 if (NativeGenerator
257 .needsIsolateAffinityTagInitialization(_closedWorld.backendUsage)) {
257 nativeIsolateAffinityTagInitialization = 258 nativeIsolateAffinityTagInitialization =
258 NativeGenerator.generateIsolateAffinityTagInitialization( 259 NativeGenerator.generateIsolateAffinityTagInitialization(
259 backend, 260 _closedWorld.backendUsage,
260 generateEmbeddedGlobalAccess, 261 generateEmbeddedGlobalAccess,
261 // TODO(floitsch): internStringFunction. 262 // TODO(floitsch): internStringFunction.
262 js.js("(function(x) { return x; })", [])); 263 js.js("(function(x) { return x; })", []));
263 } else { 264 } else {
264 nativeIsolateAffinityTagInitialization = js.js.statement(";"); 265 nativeIsolateAffinityTagInitialization = js.js.statement(";");
265 } 266 }
266 nativeHoles['nativeIsolateAffinityTagInitialization'] = 267 nativeHoles['nativeIsolateAffinityTagInitialization'] =
267 nativeIsolateAffinityTagInitialization; 268 nativeIsolateAffinityTagInitialization;
268 269
269 js.Expression nativeInfoAccess = js.js('nativeInfo', []); 270 js.Expression nativeInfoAccess = js.js('nativeInfo', []);
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 #eagerClasses; 1287 #eagerClasses;
1287 1288
1288 var end = Date.now(); 1289 var end = Date.now();
1289 // print('Setup: ' + (end - start) + ' ms.'); 1290 // print('Setup: ' + (end - start) + ' ms.');
1290 1291
1291 #invokeMain; // Start main. 1292 #invokeMain; // Start main.
1292 1293
1293 })(Date.now(), #code) 1294 })(Date.now(), #code)
1294 }"""; 1295 }""";
1295 } 1296 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698