| 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 dart2js.js_backend.helpers; | 5 library dart2js.js_backend.helpers; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart' show Identifiers, Uris; | 8 import '../common/names.dart' show Identifiers, Uris; |
| 9 import '../common/resolution.dart' show Resolution; | 9 import '../common/resolution.dart' show Resolution; |
| 10 import '../compiler.dart' show Compiler; | 10 import '../compiler.dart' show Compiler; |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 void initializeHelperClasses(DiagnosticReporter reporter) { | 239 void initializeHelperClasses(DiagnosticReporter reporter) { |
| 240 final List missingHelperClasses = []; | 240 final List missingHelperClasses = []; |
| 241 ClassElement lookupHelperClass(String name) { | 241 ClassElement lookupHelperClass(String name) { |
| 242 ClassElement result = findHelper(name); | 242 ClassElement result = findHelper(name); |
| 243 if (result == null) { | 243 if (result == null) { |
| 244 missingHelperClasses.add(name); | 244 missingHelperClasses.add(name); |
| 245 } | 245 } |
| 246 return result; | 246 return result; |
| 247 } | 247 } |
| 248 |
| 248 jsInvocationMirrorClass = lookupHelperClass('JSInvocationMirror'); | 249 jsInvocationMirrorClass = lookupHelperClass('JSInvocationMirror'); |
| 249 boundClosureClass = lookupHelperClass('BoundClosure'); | 250 boundClosureClass = lookupHelperClass('BoundClosure'); |
| 250 closureClass = lookupHelperClass('Closure'); | 251 closureClass = lookupHelperClass('Closure'); |
| 251 if (!missingHelperClasses.isEmpty) { | 252 if (!missingHelperClasses.isEmpty) { |
| 252 reporter.internalError( | 253 reporter.internalError( |
| 253 jsHelperLibrary, | 254 jsHelperLibrary, |
| 254 'dart:_js_helper library does not contain required classes: ' | 255 'dart:_js_helper library does not contain required classes: ' |
| 255 '$missingHelperClasses'); | 256 '$missingHelperClasses'); |
| 256 } | 257 } |
| 257 } | 258 } |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 MethodElement _objectNoSuchMethod; | 706 MethodElement _objectNoSuchMethod; |
| 706 | 707 |
| 707 MethodElement get objectNoSuchMethod { | 708 MethodElement get objectNoSuchMethod { |
| 708 if (_objectNoSuchMethod == null) { | 709 if (_objectNoSuchMethod == null) { |
| 709 _objectNoSuchMethod = | 710 _objectNoSuchMethod = |
| 710 coreClasses.objectClass.lookupLocalMember(Identifiers.noSuchMethod_); | 711 coreClasses.objectClass.lookupLocalMember(Identifiers.noSuchMethod_); |
| 711 } | 712 } |
| 712 return _objectNoSuchMethod; | 713 return _objectNoSuchMethod; |
| 713 } | 714 } |
| 714 } | 715 } |
| OLD | NEW |