OLD | NEW |
---|---|
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 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2490 } | 2490 } |
2491 } | 2491 } |
2492 if (hasDouble) { | 2492 if (hasDouble) { |
2493 hasNumber = true; | 2493 hasNumber = true; |
2494 } | 2494 } |
2495 if (hasInt) hasNumber = true; | 2495 if (hasInt) hasNumber = true; |
2496 | 2496 |
2497 if (classes == backend.interceptedClasses) { | 2497 if (classes == backend.interceptedClasses) { |
2498 // I.e. this is the general interceptor. | 2498 // I.e. this is the general interceptor. |
2499 // TODO(9556): Remove 'holders'. The general interceptor is used on type | 2499 // TODO(9556): Remove 'holders'. The general interceptor is used on type |
2500 // checks and needs to handle 'native' classes for 'holders'. | 2500 // checks and needs to handle 'native' classes for 'holders'. |
ngeoffray
2013/05/14 11:20:47
You can remove the TODO.
ahe
2013/05/14 11:38:53
I already committed the CL.
| |
2501 hasNative = true; | 2501 hasNative = compiler.enqueuer.codegen.nativeEnqueuer.hasNativeClasses(); |
2502 } | 2502 } |
2503 | 2503 |
2504 jsAst.Block block = new jsAst.Block.empty(); | 2504 jsAst.Block block = new jsAst.Block.empty(); |
2505 | 2505 |
2506 if (hasNumber) { | 2506 if (hasNumber) { |
2507 jsAst.Statement whenNumber; | 2507 jsAst.Statement whenNumber; |
2508 | 2508 |
2509 /// Note: there are two number classes in play: Dart's [num], | 2509 /// Note: there are two number classes in play: Dart's [num], |
2510 /// and JavaScript's Number (typeof receiver == 'number'). This | 2510 /// and JavaScript's Number (typeof receiver == 'number'). This |
2511 /// is the fallback used when we have determined that receiver | 2511 /// is the fallback used when we have determined that receiver |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3089 """; | 3089 """; |
3090 const String HOOKS_API_USAGE = """ | 3090 const String HOOKS_API_USAGE = """ |
3091 // The code supports the following hooks: | 3091 // The code supports the following hooks: |
3092 // dartPrint(message) - if this function is defined it is called | 3092 // dartPrint(message) - if this function is defined it is called |
3093 // instead of the Dart [print] method. | 3093 // instead of the Dart [print] method. |
3094 // dartMainRunner(main) - if this function is defined, the Dart [main] | 3094 // dartMainRunner(main) - if this function is defined, the Dart [main] |
3095 // method will not be invoked directly. | 3095 // method will not be invoked directly. |
3096 // Instead, a closure that will invoke [main] is | 3096 // Instead, a closure that will invoke [main] is |
3097 // passed to [dartMainRunner]. | 3097 // passed to [dartMainRunner]. |
3098 """; | 3098 """; |
OLD | NEW |