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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 785303003: Add option for outputting a deferred loading mapping. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 5 years, 11 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 js_backend; 5 part of js_backend;
6 6
7 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR");
10 10
(...skipping 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 aliasedSuperMembers.remove(element); 2300 aliasedSuperMembers.remove(element);
2301 } 2301 }
2302 2302
2303 void registerMainHasArguments(Enqueuer enqueuer) { 2303 void registerMainHasArguments(Enqueuer enqueuer) {
2304 // If the main method takes arguments, this compilation could be the target 2304 // If the main method takes arguments, this compilation could be the target
2305 // of Isolate.spawnUri. Strictly speaking, that can happen also if main 2305 // of Isolate.spawnUri. Strictly speaking, that can happen also if main
2306 // takes no arguments, but in this case the spawned isolate can't 2306 // takes no arguments, but in this case the spawned isolate can't
2307 // communicate with the spawning isolate. 2307 // communicate with the spawning isolate.
2308 enqueuer.enableIsolateSupport(); 2308 enqueuer.enableIsolateSupport();
2309 } 2309 }
2310
2311 /// Returns a name composed of the main output file name and [name].
floitsch 2015/01/05 15:46:19 Not your comment, but: That describes what it does
sigurdm 2015/01/06 09:02:20 Done.
2312 String outputFileName(String name) {
2313 assert(name != "");
2314 String outPath = compiler.outputUri != null
2315 ? compiler.outputUri.path
2316 : "out";
2317 String outName = outPath.substring(outPath.lastIndexOf('/') + 1);
2318 return "${outName}_$name";
2319 }
2320
2310 } 2321 }
2311 2322
2312 class JavaScriptResolutionCallbacks extends ResolutionCallbacks { 2323 class JavaScriptResolutionCallbacks extends ResolutionCallbacks {
2313 final JavaScriptBackend backend; 2324 final JavaScriptBackend backend;
2314 2325
2315 JavaScriptResolutionCallbacks(this.backend); 2326 JavaScriptResolutionCallbacks(this.backend);
2316 2327
2317 void registerBackendStaticInvocation(Element element, Registry registry) { 2328 void registerBackendStaticInvocation(Element element, Registry registry) {
2318 registry.registerStaticInvocation(backend.registerBackendUse(element)); 2329 registry.registerStaticInvocation(backend.registerBackendUse(element));
2319 } 2330 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2506 } 2517 }
2507 } 2518 }
2508 2519
2509 /// Records that [constant] is used by the element behind [registry]. 2520 /// Records that [constant] is used by the element behind [registry].
2510 class Dependency { 2521 class Dependency {
2511 final ConstantValue constant; 2522 final ConstantValue constant;
2512 final Element annotatedElement; 2523 final Element annotatedElement;
2513 2524
2514 const Dependency(this.constant, this.annotatedElement); 2525 const Dependency(this.constant, this.annotatedElement);
2515 } 2526 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698