| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart2js.js_emitter.full_emitter; | 5 library dart2js.js_emitter.full_emitter.nsm_emitter; |
| 6 |
| 7 import '../../elements/elements.dart' |
| 8 show |
| 9 ClassElement, |
| 10 MemberElement; |
| 11 import '../../js/js.dart' as jsAst; |
| 12 import '../../js/js.dart' show js; |
| 13 import '../../js_backend/js_backend.dart' |
| 14 show |
| 15 GetterName, |
| 16 SetterName; |
| 17 import '../../universe/selector.dart' show Selector; |
| 18 import '../../util/characters.dart' show $$, $A, $HASH, $Z, $a, $z; |
| 19 import '../../world.dart' show ClosedWorld; |
| 20 import '../js_emitter.dart' hide Emitter, EmitterFactory; |
| 21 import '../model.dart'; |
| 22 import 'emitter.dart'; |
| 6 | 23 |
| 7 class NsmEmitter extends CodeEmitterHelper { | 24 class NsmEmitter extends CodeEmitterHelper { |
| 8 final ClosedWorld closedWorld; | 25 final ClosedWorld closedWorld; |
| 9 final List<Selector> trivialNsmHandlers = <Selector>[]; | 26 final List<Selector> trivialNsmHandlers = <Selector>[]; |
| 10 | 27 |
| 11 NsmEmitter(this.closedWorld); | 28 NsmEmitter(this.closedWorld); |
| 12 | 29 |
| 13 /// If this is true then we can generate the noSuchMethod handlers at startup | 30 /// If this is true then we can generate the noSuchMethod handlers at startup |
| 14 /// time, instead of them being emitted as part of the Object class. | 31 /// time, instead of them being emitted as part of the Object class. |
| 15 bool get generateTrivialNsmHandlers => true; | 32 bool get generateTrivialNsmHandlers => true; |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 } | 408 } |
| 392 | 409 |
| 393 String get value { | 410 String get value { |
| 394 if (_cachedValue == null) { | 411 if (_cachedValue == null) { |
| 395 _cachedValue = _computeDiffEncoding(); | 412 _cachedValue = _computeDiffEncoding(); |
| 396 } | 413 } |
| 397 | 414 |
| 398 return _cachedValue; | 415 return _cachedValue; |
| 399 } | 416 } |
| 400 } | 417 } |
| OLD | NEW |