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 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 7 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
8 final Set<HInstruction> boundsChecked; | 8 final Set<HInstruction> boundsChecked; |
9 | 9 |
10 JavaScriptItemCompilationContext() | 10 JavaScriptItemCompilationContext() |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 Set<ClassElement> classes = getInterceptedClassesOn(selector.name); | 470 Set<ClassElement> classes = getInterceptedClassesOn(selector.name); |
471 String name = namer.getOneShotInterceptorName(selector, classes); | 471 String name = namer.getOneShotInterceptorName(selector, classes); |
472 if (!oneShotInterceptors.containsKey(name)) { | 472 if (!oneShotInterceptors.containsKey(name)) { |
473 registerSpecializedGetInterceptor(classes); | 473 registerSpecializedGetInterceptor(classes); |
474 oneShotInterceptors[name] = selector; | 474 oneShotInterceptors[name] = selector; |
475 } | 475 } |
476 return name; | 476 return name; |
477 } | 477 } |
478 | 478 |
479 bool isInterceptedMethod(Element element) { | 479 bool isInterceptedMethod(Element element) { |
480 return element.isInstanceMember() | 480 if (!element.isInstanceMember()) return false; |
481 && !element.isGenerativeConstructorBody() | 481 if (element.isGenerativeConstructorBody()) { |
482 && interceptedElements[element.name] != null; | 482 return Elements.isNativeOrExtendsNative(element.getEnclosingClass()); |
| 483 } |
| 484 return interceptedElements[element.name] != null; |
483 } | 485 } |
484 | 486 |
485 bool fieldHasInterceptedGetter(Element element) { | 487 bool fieldHasInterceptedGetter(Element element) { |
486 assert(element.isField()); | 488 assert(element.isField()); |
487 return interceptedElements[element.name] != null; | 489 return interceptedElements[element.name] != null; |
488 } | 490 } |
489 | 491 |
490 bool fieldHasInterceptedSetter(Element element) { | 492 bool fieldHasInterceptedSetter(Element element) { |
491 assert(element.isField()); | 493 assert(element.isField()); |
492 return interceptedElements[element.name] != null; | 494 return interceptedElements[element.name] != null; |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 copy(constant.values); | 1860 copy(constant.values); |
1859 copy(constant.protoValue); | 1861 copy(constant.protoValue); |
1860 copy(constant); | 1862 copy(constant); |
1861 } | 1863 } |
1862 | 1864 |
1863 void visitConstructed(ConstructedConstant constant) { | 1865 void visitConstructed(ConstructedConstant constant) { |
1864 copy(constant.fields); | 1866 copy(constant.fields); |
1865 copy(constant); | 1867 copy(constant); |
1866 } | 1868 } |
1867 } | 1869 } |
OLD | NEW |