OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 js_backend; | 5 part of js_backend; |
6 | 6 |
7 class NativeEmitter { | 7 class NativeEmitter { |
8 | 8 |
9 CodeEmitterTask emitter; | 9 CodeEmitterTask emitter; |
10 CodeBuffer nativeBuffer; | 10 CodeBuffer nativeBuffer; |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 | 536 |
537 if (emitter.compiler.enableMinification) targetBuffer.add(';'); | 537 if (emitter.compiler.enableMinification) targetBuffer.add(';'); |
538 targetBuffer.add(jsAst.prettyPrint( | 538 targetBuffer.add(jsAst.prettyPrint( |
539 new jsAst.ExpressionStatement(init), compiler)); | 539 new jsAst.ExpressionStatement(init), compiler)); |
540 targetBuffer.add('\n'); | 540 targetBuffer.add('\n'); |
541 } | 541 } |
542 | 542 |
543 targetBuffer.add(nativeBuffer); | 543 targetBuffer.add(nativeBuffer); |
544 targetBuffer.add('\n'); | 544 targetBuffer.add('\n'); |
545 } | 545 } |
| 546 |
| 547 String get objectToPutNoSuchMethodHandlersOn { |
| 548 if (handleNoSuchMethod) return "Object.prototype"; |
| 549 return emitter.objectToPutNoSuchMethodHandlersOn; |
| 550 } |
546 } | 551 } |
OLD | NEW |