| 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, Emitter; | 7 import '../js_emitter.dart' show computeMixinClass, Emitter; |
| 8 import '../model.dart'; | 8 import '../model.dart'; |
| 9 | 9 |
| 10 import '../../common.dart'; | 10 import '../../common.dart'; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 } | 415 } |
| 416 noSuchMethodStubs | 416 noSuchMethodStubs |
| 417 .add(classStubGenerator.generateStubForNoSuchMethod(name, | 417 .add(classStubGenerator.generateStubForNoSuchMethod(name, |
| 418 selector)); | 418 selector)); |
| 419 }); | 419 }); |
| 420 } | 420 } |
| 421 | 421 |
| 422 if (element == backend.closureClass) { | 422 if (element == backend.closureClass) { |
| 423 // We add a special getter here to allow for tearing off a closure from | 423 // We add a special getter here to allow for tearing off a closure from |
| 424 // itself. | 424 // itself. |
| 425 js.Name name = namer.getterForMember(Selector.CALL_NAME); | 425 js.Name name = namer.getterForMember(Names.call); |
| 426 js.Fun function = js.js('function() { return this; }'); | 426 js.Fun function = js.js('function() { return this; }'); |
| 427 callStubs.add(_buildStubMethod(name, function)); | 427 callStubs.add(_buildStubMethod(name, function)); |
| 428 } | 428 } |
| 429 | 429 |
| 430 ClassElement implementation = element.implementation; | 430 ClassElement implementation = element.implementation; |
| 431 | 431 |
| 432 // MixinApplications run through the members of their mixin. Here, we are | 432 // MixinApplications run through the members of their mixin. Here, we are |
| 433 // only interested in direct members. | 433 // only interested in direct members. |
| 434 if (!onlyForRti && !element.isMixinApplication) { | 434 if (!onlyForRti && !element.isMixinApplication) { |
| 435 implementation.forEachMember(visitMember, includeBackendMembers: true); | 435 implementation.forEachMember(visitMember, includeBackendMembers: true); |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 Constant constant = new Constant(name, holder, constantValue); | 829 Constant constant = new Constant(name, holder, constantValue); |
| 830 _constants[constantValue] = constant; | 830 _constants[constantValue] = constant; |
| 831 } | 831 } |
| 832 } | 832 } |
| 833 | 833 |
| 834 Holder _registerStaticStateHolder() { | 834 Holder _registerStaticStateHolder() { |
| 835 return _registry.registerHolder( | 835 return _registry.registerHolder( |
| 836 namer.staticStateHolder, isStaticStateHolder: true); | 836 namer.staticStateHolder, isStaticStateHolder: true); |
| 837 } | 837 } |
| 838 } | 838 } |
| OLD | NEW |