| 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 /** | 5 /** |
| 6 * A function element that represents a closure call. The signature is copied | 6 * A function element that represents a closure call. The signature is copied |
| 7 * from the given element. | 7 * from the given element. |
| 8 */ | 8 */ |
| 9 class ClosureInvocationElement extends FunctionElement { | 9 class ClosureInvocationElement extends FunctionElement { |
| 10 ClosureInvocationElement(SourceString name, | 10 ClosureInvocationElement(SourceString name, |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 } | 560 } |
| 561 String constructorName = namer.safeName(classElement.name.slowToString()); | 561 String constructorName = namer.safeName(classElement.name.slowToString()); |
| 562 | 562 |
| 563 buffer.add('$classesCollector.$className = {"":\n'); | 563 buffer.add('$classesCollector.$className = {"":\n'); |
| 564 buffer.add(' ['); | 564 buffer.add(' ['); |
| 565 emitClassFields(classElement, buffer); | 565 emitClassFields(classElement, buffer); |
| 566 buffer.add('],\n'); | 566 buffer.add('],\n'); |
| 567 // TODO(floitsch): the emitInstanceMember should simply always emit a ',\n'. | 567 // TODO(floitsch): the emitInstanceMember should simply always emit a ',\n'. |
| 568 // That does currently not work because the native classes have a different | 568 // That does currently not work because the native classes have a different |
| 569 // syntax. | 569 // syntax. |
| 570 buffer.add(' super: "$superName"'); | 570 buffer.add(' "super": "$superName"'); |
| 571 emitInstanceMembers(classElement, buffer, true); | 571 emitInstanceMembers(classElement, buffer, true); |
| 572 buffer.add('\n};\n\n'); | 572 buffer.add('\n};\n\n'); |
| 573 } | 573 } |
| 574 | 574 |
| 575 void generateTypeTests(ClassElement cls, | 575 void generateTypeTests(ClassElement cls, |
| 576 void generateTypeTest(ClassElement element)) { | 576 void generateTypeTest(ClassElement element)) { |
| 577 if (compiler.codegenWorld.isChecks.contains(cls)) { | 577 if (compiler.codegenWorld.isChecks.contains(cls)) { |
| 578 generateTypeTest(cls); | 578 generateTypeTest(cls); |
| 579 } | 579 } |
| 580 generateInterfacesIsTests(cls, generateTypeTest, new Set<Element>()); | 580 generateInterfacesIsTests(cls, generateTypeTest, new Set<Element>()); |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 sourceName = token.slowToString(); | 1167 sourceName = token.slowToString(); |
| 1168 } | 1168 } |
| 1169 int totalOffset = bufferOffset + offset; | 1169 int totalOffset = bufferOffset + offset; |
| 1170 sourceMapBuilder.addMapping( | 1170 sourceMapBuilder.addMapping( |
| 1171 sourceFile, token.charOffset, sourceName, totalOffset); | 1171 sourceFile, token.charOffset, sourceName, totalOffset); |
| 1172 }); | 1172 }); |
| 1173 } | 1173 } |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 typedef void DefineMemberFunction(String invocationName, CodeBuffer definition); | 1176 typedef void DefineMemberFunction(String invocationName, CodeBuffer definition); |
| OLD | NEW |