Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart

Issue 1413213004: Move remaining helpers to BackendHelpers (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // We need to pay attention if this stub is for a function that has been 183 // We need to pay attention if this stub is for a function that has been
184 // invoked from a subclass. Then we cannot just redirect, since that 184 // invoked from a subclass. Then we cannot just redirect, since that
185 // would invoke the methods of the subclass. We have to compile to: 185 // would invoke the methods of the subclass. We have to compile to:
186 // (1) foo$2(a, b) => MyClass.foo$4$c$d.call(this, a, b, null, null) 186 // (1) foo$2(a, b) => MyClass.foo$4$c$d.call(this, a, b, null, null)
187 // (2) foo$3$c(a, b, c) => MyClass.foo$4$c$d(this, a, b, c, null); 187 // (2) foo$3$c(a, b, c) => MyClass.foo$4$c$d(this, a, b, c, null);
188 // (3) foo$3$d(a, b, d) => MyClass.foo$4$c$d(this, a, b, null, d); 188 // (3) foo$3$d(a, b, d) => MyClass.foo$4$c$d(this, a, b, null, d);
189 List<ParameterStubMethod> generateParameterStubs(MethodElement member, 189 List<ParameterStubMethod> generateParameterStubs(MethodElement member,
190 {bool canTearOff: true}) { 190 {bool canTearOff: true}) {
191 if (member.enclosingElement.isClosure) { 191 if (member.enclosingElement.isClosure) {
192 ClosureClassElement cls = member.enclosingElement; 192 ClosureClassElement cls = member.enclosingElement;
193 if (cls.supertype.element == backend.boundClosureClass) { 193 if (cls.supertype.element == backend.helpers.boundClosureClass) {
194 reporter.internalError(cls.methodElement, 'Bound closure1.'); 194 reporter.internalError(cls.methodElement, 'Bound closure1.');
195 } 195 }
196 if (cls.methodElement.isInstanceMember) { 196 if (cls.methodElement.isInstanceMember) {
197 reporter.internalError(cls.methodElement, 'Bound closure2.'); 197 reporter.internalError(cls.methodElement, 'Bound closure2.');
198 } 198 }
199 } 199 }
200 200
201 // The set of selectors that apply to `member`. For example, for 201 // The set of selectors that apply to `member`. For example, for
202 // a member `foo(x, [y])` the following selectors may apply: 202 // a member `foo(x, [y])` the following selectors may apply:
203 // `foo(x)`, and `foo(x, y)`. 203 // `foo(x)`, and `foo(x, y)`.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/native_emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/program_builder/collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698