| 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 part of dart2js.js_emitter; | 5 part of dart2js.js_emitter; |
| 6 | 6 |
| 7 class ClassStubGenerator { | 7 class ClassStubGenerator { |
| 8 final Namer namer; | 8 final Namer namer; |
| 9 final Compiler compiler; | 9 final Compiler compiler; |
| 10 final JavaScriptBackend backend; | 10 final JavaScriptBackend backend; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 js('''this.#noSuchMethodName(#receiver, | 160 js('''this.#noSuchMethodName(#receiver, |
| 161 #createInvocationMirror(#methodName, | 161 #createInvocationMirror(#methodName, |
| 162 #internalName, | 162 #internalName, |
| 163 #type, | 163 #type, |
| 164 #arguments, | 164 #arguments, |
| 165 #namedArguments))''', | 165 #namedArguments))''', |
| 166 {'receiver': isIntercepted ? r'$receiver' : 'this', | 166 {'receiver': isIntercepted ? r'$receiver' : 'this', |
| 167 'noSuchMethodName': namer.noSuchMethodName, | 167 'noSuchMethodName': namer.noSuchMethodName, |
| 168 'createInvocationMirror': | 168 'createInvocationMirror': |
| 169 backend.emitter.staticFunctionAccess( | 169 backend.emitter.staticFunctionAccess( |
| 170 backend.getCreateInvocationMirror()), | 170 backend.helpers.createInvocationMirror), |
| 171 'methodName': | 171 'methodName': |
| 172 js.quoteName(compiler.enableMinification | 172 js.quoteName(compiler.enableMinification |
| 173 ? internalName : methodName), | 173 ? internalName : methodName), |
| 174 'internalName': js.quoteName(internalName), | 174 'internalName': js.quoteName(internalName), |
| 175 'type': js.number(type), | 175 'type': js.number(type), |
| 176 'arguments': | 176 'arguments': |
| 177 new jsAst.ArrayInitializer(parameterNames.map(js).toList()), | 177 new jsAst.ArrayInitializer(parameterNames.map(js).toList()), |
| 178 'namedArguments': new jsAst.ArrayInitializer(argNames)}); | 178 'namedArguments': new jsAst.ArrayInitializer(argNames)}); |
| 179 | 179 |
| 180 jsAst.Expression function; | 180 jsAst.Expression function; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 ? function() { | 275 ? function() { |
| 276 if (cache === void 0) cache = #tearOff( | 276 if (cache === void 0) cache = #tearOff( |
| 277 this, funcs, reflectionInfo, true, [], name).prototype; | 277 this, funcs, reflectionInfo, true, [], name).prototype; |
| 278 return cache; | 278 return cache; |
| 279 } | 279 } |
| 280 : tearOffGetter(funcs, reflectionInfo, name, isIntercepted); | 280 : tearOffGetter(funcs, reflectionInfo, name, isIntercepted); |
| 281 }''', {'tearOff': tearOffAccessExpression}); | 281 }''', {'tearOff': tearOffAccessExpression}); |
| 282 | 282 |
| 283 return <jsAst.Statement>[tearOffGetter, tearOff]; | 283 return <jsAst.Statement>[tearOffGetter, tearOff]; |
| 284 } | 284 } |
| OLD | NEW |