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

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

Issue 2975933002: Check emitter constants and fix tearOffName for JConstructorBody (Closed)
Patch Set: Created 3 years, 5 months 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/elements.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library dart2js.new_js_emitter.model; 5 library dart2js.new_js_emitter.model;
6 6
7 import '../constants/values.dart' show ConstantValue; 7 import '../constants/values.dart' show ConstantValue;
8 import '../deferred_load.dart' show OutputUnit; 8 import '../deferred_load.dart' show OutputUnit;
9 import '../elements/entities.dart'; 9 import '../elements/entities.dart';
10 import '../js/js.dart' as js show Expression, Name, Statement, TokenFinalizer; 10 import '../js/js.dart' as js show Expression, Name, Statement, TokenFinalizer;
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 /// Uses indicate missing information in the model. 385 /// Uses indicate missing information in the model.
386 final MemberEntity element; 386 final MemberEntity element;
387 387
388 /// The name of the method. If the method is a [ParameterStubMethod] for a 388 /// The name of the method. If the method is a [ParameterStubMethod] for a
389 /// static function, then the name can be `null`. In that case, only the 389 /// static function, then the name can be `null`. In that case, only the
390 /// [ParameterStubMethod.callName] should be used. 390 /// [ParameterStubMethod.callName] should be used.
391 final js.Name name; 391 final js.Name name;
392 final js.Expression code; 392 final js.Expression code;
393 393
394 Method(this.element, this.name, this.code); 394 Method(this.element, this.name, this.code);
395
396 String toString() {
397 return 'method[name=${name},element=${element}'
sra1 2017/07/11 18:24:05 FWIW I prefer these debug-oriented strings to have
Johnni Winther 2017/07/12 10:03:24 Will change in a follow-up CL.
398 ',code=${js.nodeToString(code)}]';
399 }
395 } 400 }
396 401
397 /// A method that corresponds to a method in the original Dart program. 402 /// A method that corresponds to a method in the original Dart program.
398 abstract class DartMethod extends Method { 403 abstract class DartMethod extends Method {
399 final bool needsTearOff; 404 final bool needsTearOff;
400 final js.Name tearOffName; 405 final js.Name tearOffName;
401 final List<ParameterStubMethod> parameterStubs; 406 final List<ParameterStubMethod> parameterStubs;
402 final bool canBeApplied; 407 final bool canBeApplied;
403 final bool canBeReflected; 408 final bool canBeReflected;
404 409
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 String toString() { 551 String toString() {
547 return 'static_method[name=${name},element=${element}}]'; 552 return 'static_method[name=${name},element=${element}}]';
548 } 553 }
549 } 554 }
550 555
551 class StaticStubMethod extends StubMethod implements StaticMethod { 556 class StaticStubMethod extends StubMethod implements StaticMethod {
552 Holder holder; 557 Holder holder;
553 StaticStubMethod(js.Name name, this.holder, js.Expression code) 558 StaticStubMethod(js.Name name, this.holder, js.Expression code)
554 : super(name, code); 559 : super(name, code);
555 } 560 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698