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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 15132006: Remove _WorkerStub hack to make benefit closing an isolate. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | 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 /** 7 /**
8 * A function element that represents a closure call. The signature is copied 8 * A function element that represents a closure call. The signature is copied
9 * from the given element. 9 * from the given element.
10 */ 10 */
(...skipping 2505 matching lines...) Expand 10 before | Expand all | Expand 10 after
2516 if (cls.isNative()) hasNative = true; 2516 if (cls.isNative()) hasNative = true;
2517 } 2517 }
2518 } 2518 }
2519 if (hasDouble) { 2519 if (hasDouble) {
2520 hasNumber = true; 2520 hasNumber = true;
2521 } 2521 }
2522 if (hasInt) hasNumber = true; 2522 if (hasInt) hasNumber = true;
2523 2523
2524 if (classes == backend.interceptedClasses) { 2524 if (classes == backend.interceptedClasses) {
2525 // I.e. this is the general interceptor. 2525 // I.e. this is the general interceptor.
2526 // TODO(9556): Remove 'holders'. The general interceptor is used on type 2526 hasNative = compiler.enqueuer.codegen.nativeEnqueuer.hasNativeClasses();
2527 // checks and needs to handle 'native' classes for 'holders'.
2528 hasNative = true;
2529 } 2527 }
2530 2528
2531 jsAst.Block block = new jsAst.Block.empty(); 2529 jsAst.Block block = new jsAst.Block.empty();
2532 2530
2533 if (hasNumber) { 2531 if (hasNumber) {
2534 jsAst.Statement whenNumber; 2532 jsAst.Statement whenNumber;
2535 2533
2536 /// Note: there are two number classes in play: Dart's [num], 2534 /// Note: there are two number classes in play: Dart's [num],
2537 /// and JavaScript's Number (typeof receiver == 'number'). This 2535 /// and JavaScript's Number (typeof receiver == 'number'). This
2538 /// is the fallback used when we have determined that receiver 2536 /// is the fallback used when we have determined that receiver
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 """; 3113 """;
3116 const String HOOKS_API_USAGE = """ 3114 const String HOOKS_API_USAGE = """
3117 // The code supports the following hooks: 3115 // The code supports the following hooks:
3118 // dartPrint(message) - if this function is defined it is called 3116 // dartPrint(message) - if this function is defined it is called
3119 // instead of the Dart [print] method. 3117 // instead of the Dart [print] method.
3120 // dartMainRunner(main) - if this function is defined, the Dart [main] 3118 // dartMainRunner(main) - if this function is defined, the Dart [main]
3121 // method will not be invoked directly. 3119 // method will not be invoked directly.
3122 // Instead, a closure that will invoke [main] is 3120 // Instead, a closure that will invoke [main] is
3123 // passed to [dartMainRunner]. 3121 // passed to [dartMainRunner].
3124 """; 3122 """;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698