| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library dev_compiler.src.codegen.js_codegen; | 5 library dev_compiler.src.codegen.js_codegen; |
| 6 | 6 |
| 7 import 'dart:collection' show HashSet, HashMap; | 7 import 'dart:collection' show HashSet, HashMap; |
| 8 | 8 |
| 9 import 'package:analyzer/analyzer.dart' hide ConstantEvaluator; | 9 import 'package:analyzer/analyzer.dart' hide ConstantEvaluator; |
| 10 import 'package:analyzer/src/generated/ast.dart' hide ConstantEvaluator; | 10 import 'package:analyzer/src/generated/ast.dart' hide ConstantEvaluator; |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 classElem.lookUpInheritedConcreteMethod(name, currentLibrary); | 596 classElem.lookUpInheritedConcreteMethod(name, currentLibrary); |
| 597 if (inheritedElement != null && | 597 if (inheritedElement != null && |
| 598 inheritedElement.type == element.type) continue; | 598 inheritedElement.type == element.type) continue; |
| 599 var unary = node.parameters.parameters.isEmpty; | 599 var unary = node.parameters.parameters.isEmpty; |
| 600 var memberName = _emitMemberName(name, | 600 var memberName = _emitMemberName(name, |
| 601 type: cType, unary: unary, isStatic: node.isStatic); | 601 type: cType, unary: unary, isStatic: node.isStatic); |
| 602 var parts = | 602 var parts = |
| 603 _emitFunctionTypeParts(element.type, dynamicIsBottom: false); | 603 _emitFunctionTypeParts(element.type, dynamicIsBottom: false); |
| 604 var property = | 604 var property = |
| 605 new JS.Property(memberName, new JS.ArrayInitializer(parts)); | 605 new JS.Property(memberName, new JS.ArrayInitializer(parts)); |
| 606 if (node.isStatic) { | 606 if (node.isStatic) { |
| 607 tStatics.add(property); | 607 tStatics.add(property); |
| 608 sNames.add(memberName); | 608 sNames.add(memberName); |
| 609 } else tMethods.add(property); | 609 } else tMethods.add(property); |
| 610 } | 610 } |
| 611 } | 611 } |
| 612 build(name, elements) { | 612 build(name, elements) { |
| 613 var o = | 613 var o = |
| 614 new JS.ObjectInitializer(elements, vertical: elements.length > 1); | 614 new JS.ObjectInitializer(elements, vertical: elements.length > 1); |
| 615 var e = js.call('() => #', o); | 615 var e = js.call('() => #', o); |
| 616 var p = new JS.Property(_propertyName(name), e); | 616 var p = new JS.Property(_propertyName(name), e); |
| (...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2602 | 2602 |
| 2603 /// A special kind of element created by the compiler, signifying a temporary | 2603 /// A special kind of element created by the compiler, signifying a temporary |
| 2604 /// variable. These objects use instance equality, and should be shared | 2604 /// variable. These objects use instance equality, and should be shared |
| 2605 /// everywhere in the tree where they are treated as the same variable. | 2605 /// everywhere in the tree where they are treated as the same variable. |
| 2606 class TemporaryVariableElement extends LocalVariableElementImpl { | 2606 class TemporaryVariableElement extends LocalVariableElementImpl { |
| 2607 TemporaryVariableElement.forNode(Identifier name) : super.forNode(name); | 2607 TemporaryVariableElement.forNode(Identifier name) : super.forNode(name); |
| 2608 | 2608 |
| 2609 int get hashCode => identityHashCode(this); | 2609 int get hashCode => identityHashCode(this); |
| 2610 bool operator ==(Object other) => identical(this, other); | 2610 bool operator ==(Object other) => identical(this, other); |
| 2611 } | 2611 } |
| OLD | NEW |