| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 ParameterStubGenerator { | 7 class ParameterStubGenerator { |
| 8 static final Set<Selector> emptySelectorSet = new Set<Selector>(); | 8 static final Set<Selector> emptySelectorSet = new Set<Selector>(); |
| 9 | 9 |
| 10 final Namer namer; | 10 final Namer namer; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 indexOfLastOptionalArgumentInParameters = count; | 111 indexOfLastOptionalArgumentInParameters = count; |
| 112 } | 112 } |
| 113 argumentsBuffer[count] = emitter.constantReference(value); | 113 argumentsBuffer[count] = emitter.constantReference(value); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 count++; | 117 count++; |
| 118 }); | 118 }); |
| 119 | 119 |
| 120 var body; // List or jsAst.Statement. | 120 var body; // List or jsAst.Statement. |
| 121 if (backend.hasFixedBackendName(member)) { | 121 if (backend.nativeData.hasFixedBackendName(member)) { |
| 122 body = emitterTask.nativeEmitter.generateParameterStubStatements( | 122 body = emitterTask.nativeEmitter.generateParameterStubStatements( |
| 123 member, isInterceptedMethod, namer.invocationName(selector), | 123 member, isInterceptedMethod, namer.invocationName(selector), |
| 124 parametersBuffer, argumentsBuffer, | 124 parametersBuffer, argumentsBuffer, |
| 125 indexOfLastOptionalArgumentInParameters); | 125 indexOfLastOptionalArgumentInParameters); |
| 126 } else if (member.isInstanceMember) { | 126 } else if (member.isInstanceMember) { |
| 127 if (needsSuperGetter(member)) { | 127 if (needsSuperGetter(member)) { |
| 128 ClassElement superClass = member.enclosingClass; | 128 ClassElement superClass = member.enclosingClass; |
| 129 jsAst.Name methodName = namer.instanceMethodName(member); | 129 jsAst.Name methodName = namer.instanceMethodName(member); |
| 130 // When redirecting, we must ensure that we don't end up in a subclass. | 130 // When redirecting, we must ensure that we don't end up in a subclass. |
| 131 // We thus can't just invoke `this.foo$1.call(filledInArguments)`. | 131 // We thus can't just invoke `this.foo$1.call(filledInArguments)`. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 generateParameterStub(member, selector, null); | 275 generateParameterStub(member, selector, null); |
| 276 if (stub != null) { | 276 if (stub != null) { |
| 277 stubs.add(stub); | 277 stubs.add(stub); |
| 278 } | 278 } |
| 279 } | 279 } |
| 280 } | 280 } |
| 281 | 281 |
| 282 return stubs; | 282 return stubs; |
| 283 } | 283 } |
| 284 } | 284 } |
| OLD | NEW |