| 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 /// Enables debugging of fast/slow objects using V8-specific primitives. | 7 /// Enables debugging of fast/slow objects using V8-specific primitives. |
| 8 const DEBUG_FAST_OBJECTS = false; | 8 const DEBUG_FAST_OBJECTS = false; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2918 Map<String, Selector> addedJsNames = new Map<String, Selector>(); | 2918 Map<String, Selector> addedJsNames = new Map<String, Selector>(); |
| 2919 | 2919 |
| 2920 void addNoSuchMethodHandlers(SourceString ignore, Set<Selector> selectors) { | 2920 void addNoSuchMethodHandlers(SourceString ignore, Set<Selector> selectors) { |
| 2921 // Cache the object class and type. | 2921 // Cache the object class and type. |
| 2922 ClassElement objectClass = compiler.objectClass; | 2922 ClassElement objectClass = compiler.objectClass; |
| 2923 DartType objectType = objectClass.computeType(compiler); | 2923 DartType objectType = objectClass.computeType(compiler); |
| 2924 | 2924 |
| 2925 for (Selector selector in selectors) { | 2925 for (Selector selector in selectors) { |
| 2926 TypeMask mask = selector.mask; | 2926 TypeMask mask = selector.mask; |
| 2927 if (mask == null) { | 2927 if (mask == null) { |
| 2928 mask = new TypeMask.subclass(compiler.objectClass.rawType); | 2928 mask = new TypeMask.subclass(compiler.objectClass); |
| 2929 } | 2929 } |
| 2930 | 2930 |
| 2931 if (!mask.needsNoSuchMethodHandling(selector, compiler)) continue; | 2931 if (!mask.needsNoSuchMethodHandling(selector, compiler)) continue; |
| 2932 String jsName = namer.invocationMirrorInternalName(selector); | 2932 String jsName = namer.invocationMirrorInternalName(selector); |
| 2933 addedJsNames[jsName] = selector; | 2933 addedJsNames[jsName] = selector; |
| 2934 String reflectionName = getReflectionName(selector, jsName); | 2934 String reflectionName = getReflectionName(selector, jsName); |
| 2935 if (reflectionName != null) { | 2935 if (reflectionName != null) { |
| 2936 mangledFieldNames[jsName] = reflectionName; | 2936 mangledFieldNames[jsName] = reflectionName; |
| 2937 } | 2937 } |
| 2938 } | 2938 } |
| (...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4367 | 4367 |
| 4368 const String HOOKS_API_USAGE = """ | 4368 const String HOOKS_API_USAGE = """ |
| 4369 // The code supports the following hooks: | 4369 // The code supports the following hooks: |
| 4370 // dartPrint(message) - if this function is defined it is called | 4370 // dartPrint(message) - if this function is defined it is called |
| 4371 // instead of the Dart [print] method. | 4371 // instead of the Dart [print] method. |
| 4372 // dartMainRunner(main) - if this function is defined, the Dart [main] | 4372 // dartMainRunner(main) - if this function is defined, the Dart [main] |
| 4373 // method will not be invoked directly. | 4373 // method will not be invoked directly. |
| 4374 // Instead, a closure that will invoke [main] is | 4374 // Instead, a closure that will invoke [main] is |
| 4375 // passed to [dartMainRunner]. | 4375 // passed to [dartMainRunner]. |
| 4376 """; | 4376 """; |
| OLD | NEW |