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

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

Issue 1234493003: dart2js: fill in the basic functionality of the startup emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments. Created 5 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_emitter/startup_emitter/fragment_emitter.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 '../js/js.dart' as js show Expression, Statement, Name, Literal, 7 import '../js/js.dart' as js show Expression, Statement, Name, Literal,
8 TokenFinalizer; 8 TokenFinalizer;
9 import '../constants/values.dart' show ConstantValue; 9 import '../constants/values.dart' show ConstantValue;
10 10
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 // TODO(floitsch): support renamed fields. 354 // TODO(floitsch): support renamed fields.
355 Field(this.element, this.name, this.accessorName, 355 Field(this.element, this.name, this.accessorName,
356 this.getterFlags, this.setterFlags, 356 this.getterFlags, this.setterFlags,
357 this.needsCheckedSetter); 357 this.needsCheckedSetter);
358 358
359 bool get needsGetter => getterFlags != 0; 359 bool get needsGetter => getterFlags != 0;
360 bool get needsUncheckedSetter => setterFlags != 0; 360 bool get needsUncheckedSetter => setterFlags != 0;
361 361
362 bool get needsInterceptedGetter => getterFlags > 1; 362 bool get needsInterceptedGetter => getterFlags > 1;
363 bool get needsInterceptedSetter => setterFlags > 1; 363 bool get needsInterceptedSetter => setterFlags > 1;
364
365 bool get needsInterceptedGetterOnReceiver => getterFlags == 2;
366 bool get needsInterceptedSetterOnReceiver => setterFlags == 2;
367
368 bool get needsInterceptedGetterOnThis => getterFlags == 3;
369 bool get needsInterceptedSetterOnThis => setterFlags == 3;
364 } 370 }
365 371
366 abstract class Method { 372 abstract class Method {
367 /// The element should only be used during the transition to the new model. 373 /// The element should only be used during the transition to the new model.
368 /// Uses indicate missing information in the model. 374 /// Uses indicate missing information in the model.
369 final Element element; 375 final Element element;
370 final js.Name name; 376 final js.Name name;
371 final js.Expression code; 377 final js.Expression code;
372 378
373 Method(this.element, this.name, this.code); 379 Method(this.element, this.name, this.code);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 requiredParameterCount: requiredParameterCount, 506 requiredParameterCount: requiredParameterCount,
501 optionalParameterDefaultValues: optionalParameterDefaultValues, 507 optionalParameterDefaultValues: optionalParameterDefaultValues,
502 functionType: functionType); 508 functionType: functionType);
503 } 509 }
504 510
505 class StaticStubMethod extends StubMethod implements StaticMethod { 511 class StaticStubMethod extends StubMethod implements StaticMethod {
506 Holder holder; 512 Holder holder;
507 StaticStubMethod(js.Name name, this.holder, js.Expression code) 513 StaticStubMethod(js.Name name, this.holder, js.Expression code)
508 : super(name, code); 514 : super(name, code);
509 } 515 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698