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

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

Issue 2319863002: Revert "dart2js: Pass type information to constructor rather than add later." (Closed)
Patch Set: Created 4 years, 3 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
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/elements.dart' show Element; 9 import '../elements/elements.dart' show Element;
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 /// Stub methods for this class that are call stubs for getters. 223 /// Stub methods for this class that are call stubs for getters.
224 final List<StubMethod> callStubs; 224 final List<StubMethod> callStubs;
225 225
226 /// Stub methods for this class handling reads to type variables. 226 /// Stub methods for this class handling reads to type variables.
227 final List<StubMethod> typeVariableReaderStubs; 227 final List<StubMethod> typeVariableReaderStubs;
228 228
229 /// noSuchMethod stubs in the special case that the class is Object. 229 /// noSuchMethod stubs in the special case that the class is Object.
230 final List<StubMethod> noSuchMethodStubs; 230 final List<StubMethod> noSuchMethodStubs;
231 final List<Field> staticFieldsForReflection; 231 final List<Field> staticFieldsForReflection;
232 final bool hasRtiField; // Per-instance runtime type information pseudo-field.
233 final bool onlyForRti; 232 final bool onlyForRti;
234 final bool isDirectlyInstantiated; 233 final bool isDirectlyInstantiated;
235 final bool isNative; 234 final bool isNative;
236 235
237 // If the class implements a function type, and the type is encoded in the 236 // If the class implements a function type, and the type is encoded in the
238 // metatada table, then this field contains the index into that field. 237 // metatada table, then this field contains the index into that field.
239 final js.Expression functionTypeIndex; 238 final js.Expression functionTypeIndex;
240 239
241 /// Whether the class must be evaluated eagerly. 240 /// Whether the class must be evaluated eagerly.
242 bool isEager = false; 241 bool isEager = false;
(...skipping 13 matching lines...) Expand all
256 this.holder, 255 this.holder,
257 this.methods, 256 this.methods,
258 this.fields, 257 this.fields,
259 this.staticFieldsForReflection, 258 this.staticFieldsForReflection,
260 this.callStubs, 259 this.callStubs,
261 this.typeVariableReaderStubs, 260 this.typeVariableReaderStubs,
262 this.noSuchMethodStubs, 261 this.noSuchMethodStubs,
263 this.checkedSetters, 262 this.checkedSetters,
264 this.isChecks, 263 this.isChecks,
265 this.functionTypeIndex, 264 this.functionTypeIndex,
266 {this.hasRtiField, 265 {this.onlyForRti,
267 this.onlyForRti,
268 this.isDirectlyInstantiated, 266 this.isDirectlyInstantiated,
269 this.isNative}) { 267 this.isNative}) {
270 assert(onlyForRti != null); 268 assert(onlyForRti != null);
271 assert(isDirectlyInstantiated != null); 269 assert(isDirectlyInstantiated != null);
272 assert(isNative != null); 270 assert(isNative != null);
273 } 271 }
274 272
275 bool get isMixinApplication => false; 273 bool get isMixinApplication => false;
276 Class get superclass => _superclass; 274 Class get superclass => _superclass;
277 275
(...skipping 14 matching lines...) Expand all
292 Element element, 290 Element element,
293 js.Name name, 291 js.Name name,
294 Holder holder, 292 Holder holder,
295 List<Field> instanceFields, 293 List<Field> instanceFields,
296 List<Field> staticFieldsForReflection, 294 List<Field> staticFieldsForReflection,
297 List<StubMethod> callStubs, 295 List<StubMethod> callStubs,
298 List<StubMethod> typeVariableReaderStubs, 296 List<StubMethod> typeVariableReaderStubs,
299 List<StubMethod> checkedSetters, 297 List<StubMethod> checkedSetters,
300 List<StubMethod> isChecks, 298 List<StubMethod> isChecks,
301 js.Expression functionTypeIndex, 299 js.Expression functionTypeIndex,
302 {bool hasRtiField, 300 {bool onlyForRti,
303 bool onlyForRti,
304 bool isDirectlyInstantiated}) 301 bool isDirectlyInstantiated})
305 : super( 302 : super(
306 element, 303 element,
307 name, 304 name,
308 holder, 305 holder,
309 const <Method>[], 306 const <Method>[],
310 instanceFields, 307 instanceFields,
311 staticFieldsForReflection, 308 staticFieldsForReflection,
312 callStubs, 309 callStubs,
313 typeVariableReaderStubs, 310 typeVariableReaderStubs,
314 const <StubMethod>[], 311 const <StubMethod>[],
315 checkedSetters, 312 checkedSetters,
316 isChecks, 313 isChecks,
317 functionTypeIndex, 314 functionTypeIndex,
318 hasRtiField: hasRtiField,
319 onlyForRti: onlyForRti, 315 onlyForRti: onlyForRti,
320 isDirectlyInstantiated: isDirectlyInstantiated, 316 isDirectlyInstantiated: isDirectlyInstantiated,
321 isNative: false); 317 isNative: false);
322 318
323 bool get isMixinApplication => true; 319 bool get isMixinApplication => true;
324 Class get mixinClass => _mixinClass; 320 Class get mixinClass => _mixinClass;
325 321
326 void setMixinClass(Class mixinClass) { 322 void setMixinClass(Class mixinClass) {
327 _mixinClass = mixinClass; 323 _mixinClass = mixinClass;
328 } 324 }
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 functionType: functionType); 525 functionType: functionType);
530 526
531 bool get isStatic => true; 527 bool get isStatic => true;
532 } 528 }
533 529
534 class StaticStubMethod extends StubMethod implements StaticMethod { 530 class StaticStubMethod extends StubMethod implements StaticMethod {
535 Holder holder; 531 Holder holder;
536 StaticStubMethod(js.Name name, this.holder, js.Expression code) 532 StaticStubMethod(js.Name name, this.holder, js.Expression code)
537 : super(name, code); 533 : super(name, code);
538 } 534 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698