| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_emitter.program_builder; | 5 library dart2js.js_emitter.program_builder; |
| 6 | 6 |
| 7 import 'js_emitter.dart' show computeMixinClass; | 7 import 'js_emitter.dart' show computeMixinClass; |
| 8 import 'model.dart'; | 8 import 'model.dart'; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 callStubs.add(_buildStubMethod(name, code, element: member)); | 349 callStubs.add(_buildStubMethod(name, code, element: member)); |
| 350 }); | 350 }); |
| 351 } | 351 } |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 | 354 |
| 355 List<StubMethod> typeVariableReaderStubs = | 355 List<StubMethod> typeVariableReaderStubs = |
| 356 runtimeTypeGenerator.generateTypeVariableReaderStubs(element); | 356 runtimeTypeGenerator.generateTypeVariableReaderStubs(element); |
| 357 | 357 |
| 358 List<StubMethod> noSuchMethodStubs = <StubMethod>[]; | 358 List<StubMethod> noSuchMethodStubs = <StubMethod>[]; |
| 359 if (element == _compiler.objectClass) { | 359 if (_compiler.enabledNoSuchMethod && element == _compiler.objectClass) { |
| 360 Map<String, Selector> selectors = | 360 Map<String, Selector> selectors = |
| 361 classStubGenerator.computeSelectorsForNsmHandlers(); | 361 classStubGenerator.computeSelectorsForNsmHandlers(); |
| 362 selectors.forEach((String name, Selector selector) { | 362 selectors.forEach((String name, Selector selector) { |
| 363 noSuchMethodStubs | 363 noSuchMethodStubs |
| 364 .add(classStubGenerator.generateStubForNoSuchMethod(name, | 364 .add(classStubGenerator.generateStubForNoSuchMethod(name, |
| 365 selector)); | 365 selector)); |
| 366 }); | 366 }); |
| 367 } | 367 } |
| 368 | 368 |
| 369 if (element == backend.closureClass) { | 369 if (element == backend.closureClass) { |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 _registry.registerConstant(outputUnit, constantValue); | 753 _registry.registerConstant(outputUnit, constantValue); |
| 754 assert(!_constants.containsKey(constantValue)); | 754 assert(!_constants.containsKey(constantValue)); |
| 755 String name = namer.constantName(constantValue); | 755 String name = namer.constantName(constantValue); |
| 756 String constantObject = namer.globalObjectForConstant(constantValue); | 756 String constantObject = namer.globalObjectForConstant(constantValue); |
| 757 Holder holder = _registry.registerHolder(constantObject); | 757 Holder holder = _registry.registerHolder(constantObject); |
| 758 Constant constant = new Constant(name, holder, constantValue); | 758 Constant constant = new Constant(name, holder, constantValue); |
| 759 _constants[constantValue] = constant; | 759 _constants[constantValue] = constant; |
| 760 } | 760 } |
| 761 } | 761 } |
| 762 } | 762 } |
| OLD | NEW |