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

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: Fix type errors 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 // TODO(9556): Remove 'holders'. The general interceptor is used on type
ngeoffray 2013/05/15 08:33:10 This is the correct fix, so you can remove the TOD
2527 // checks and needs to handle 'native' classes for 'holders'. 2527 // checks and needs to handle 'native' classes for 'holders'.
2528 hasNative = true; 2528 hasNative = compiler.enqueuer.codegen.nativeEnqueuer.hasNativeClasses();
2529 } 2529 }
2530 2530
2531 jsAst.Block block = new jsAst.Block.empty(); 2531 jsAst.Block block = new jsAst.Block.empty();
2532 2532
2533 if (hasNumber) { 2533 if (hasNumber) {
2534 jsAst.Statement whenNumber; 2534 jsAst.Statement whenNumber;
2535 2535
2536 /// Note: there are two number classes in play: Dart's [num], 2536 /// Note: there are two number classes in play: Dart's [num],
2537 /// and JavaScript's Number (typeof receiver == 'number'). This 2537 /// and JavaScript's Number (typeof receiver == 'number'). This
2538 /// is the fallback used when we have determined that receiver 2538 /// is the fallback used when we have determined that receiver
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 """; 3115 """;
3116 const String HOOKS_API_USAGE = """ 3116 const String HOOKS_API_USAGE = """
3117 // The code supports the following hooks: 3117 // The code supports the following hooks:
3118 // dartPrint(message) - if this function is defined it is called 3118 // dartPrint(message) - if this function is defined it is called
3119 // instead of the Dart [print] method. 3119 // instead of the Dart [print] method.
3120 // dartMainRunner(main) - if this function is defined, the Dart [main] 3120 // dartMainRunner(main) - if this function is defined, the Dart [main]
3121 // method will not be invoked directly. 3121 // method will not be invoked directly.
3122 // Instead, a closure that will invoke [main] is 3122 // Instead, a closure that will invoke [main] is
3123 // passed to [dartMainRunner]. 3123 // passed to [dartMainRunner].
3124 """; 3124 """;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698