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 /** | 7 /** |
8 * A function element that represents a closure call. The signature is copied | 8 * A function element that represents a closure call. The signature is copied |
9 * from the given element. | 9 * from the given element. |
10 */ | 10 */ |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 nativeEmitter = new NativeEmitter(this); | 135 nativeEmitter = new NativeEmitter(this); |
136 } | 136 } |
137 | 137 |
138 void addComment(String comment, CodeBuffer buffer) { | 138 void addComment(String comment, CodeBuffer buffer) { |
139 buffer.write(jsAst.prettyPrint(js.comment(comment), compiler)); | 139 buffer.write(jsAst.prettyPrint(js.comment(comment), compiler)); |
140 } | 140 } |
141 | 141 |
142 void computeRequiredTypeChecks() { | 142 void computeRequiredTypeChecks() { |
143 assert(checkedClasses == null && checkedTypedefs == null); | 143 assert(checkedClasses == null && checkedTypedefs == null); |
144 | 144 |
145 compiler.codegenWorld.addImplicitChecks(classesUsingTypeVariableTests); | 145 backend.rti.addImplicitChecks(compiler.codegenWorld, |
| 146 classesUsingTypeVariableTests); |
146 | 147 |
147 checkedClasses = new Set<ClassElement>(); | 148 checkedClasses = new Set<ClassElement>(); |
148 checkedTypedefs = new Set<TypedefElement>(); | 149 checkedTypedefs = new Set<TypedefElement>(); |
149 compiler.codegenWorld.isChecks.forEach((DartType t) { | 150 compiler.codegenWorld.isChecks.forEach((DartType t) { |
150 if (t is InterfaceType) { | 151 if (t is InterfaceType) { |
151 checkedClasses.add(t.element); | 152 checkedClasses.add(t.element); |
152 } else if (t is TypedefType) { | 153 } else if (t is TypedefType) { |
153 checkedTypedefs.add(t.element); | 154 checkedTypedefs.add(t.element); |
154 } | 155 } |
155 }); | 156 }); |
(...skipping 2963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3119 """; | 3120 """; |
3120 const String HOOKS_API_USAGE = """ | 3121 const String HOOKS_API_USAGE = """ |
3121 // The code supports the following hooks: | 3122 // The code supports the following hooks: |
3122 // dartPrint(message) - if this function is defined it is called | 3123 // dartPrint(message) - if this function is defined it is called |
3123 // instead of the Dart [print] method. | 3124 // instead of the Dart [print] method. |
3124 // dartMainRunner(main) - if this function is defined, the Dart [main] | 3125 // dartMainRunner(main) - if this function is defined, the Dart [main] |
3125 // method will not be invoked directly. | 3126 // method will not be invoked directly. |
3126 // Instead, a closure that will invoke [main] is | 3127 // Instead, a closure that will invoke [main] is |
3127 // passed to [dartMainRunner]. | 3128 // passed to [dartMainRunner]. |
3128 """; | 3129 """; |
OLD | NEW |