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

Side by Side Diff: runtime/vm/raw_object.h

Issue 23453024: Keep track of type parameter processing in mixin application classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 friend class TypedData; 456 friend class TypedData;
457 friend class TypedDataView; 457 friend class TypedDataView;
458 458
459 DISALLOW_ALLOCATION(); 459 DISALLOW_ALLOCATION();
460 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject); 460 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject);
461 }; 461 };
462 462
463 463
464 class RawClass : public RawObject { 464 class RawClass : public RawObject {
465 public: 465 public:
466 enum ClassState { 466 enum ClassFinalizedState {
467 kAllocated = 0, // Initial state. 467 kAllocated = 0, // Initial state.
468 kPreFinalized, // VM classes: size precomputed, but no checks done. 468 kPreFinalized, // VM classes: size precomputed, but no checks done.
469 kFinalized, // Class parsed, finalized and ready for use. 469 kFinalized, // Class parsed, finalized and ready for use.
470 }; 470 };
471 471
472 private: 472 private:
473 RAW_HEAP_OBJECT_IMPLEMENTATION(Class); 473 RAW_HEAP_OBJECT_IMPLEMENTATION(Class);
474 474
475 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 475 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
476 RawString* name_; 476 RawString* name_;
477 RawArray* functions_; 477 RawArray* functions_;
478 RawArray* fields_; 478 RawArray* fields_;
479 RawGrowableObjectArray* closure_functions_; // Local functions and literals. 479 RawGrowableObjectArray* closure_functions_; // Local functions and literals.
(...skipping 14 matching lines...) Expand all
494 return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_); 494 return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_);
495 } 495 }
496 496
497 cpp_vtable handle_vtable_; 497 cpp_vtable handle_vtable_;
498 intptr_t instance_size_in_words_; // Size if fixed len or 0 if variable len. 498 intptr_t instance_size_in_words_; // Size if fixed len or 0 if variable len.
499 intptr_t id_; // Class Id, also index in the class table. 499 intptr_t id_; // Class Id, also index in the class table.
500 intptr_t type_arguments_field_offset_in_words_; // Offset of type args fld. 500 intptr_t type_arguments_field_offset_in_words_; // Offset of type args fld.
501 intptr_t next_field_offset_in_words_; // Offset of the next instance field. 501 intptr_t next_field_offset_in_words_; // Offset of the next instance field.
502 intptr_t num_native_fields_; // Number of native fields in class. 502 intptr_t num_native_fields_; // Number of native fields in class.
503 intptr_t token_pos_; 503 intptr_t token_pos_;
504 uint16_t state_bits_; // state, is_[const|implemented|synthesized|abstract]. 504 uint16_t state_bits_;
505 505
506 friend class Instance; 506 friend class Instance;
507 friend class Object; 507 friend class Object;
508 friend class RawInstance; 508 friend class RawInstance;
509 friend class RawInstructions; 509 friend class RawInstructions;
510 friend class RawType; // TODO(regis): To temporarily print unfinalized types. 510 friend class RawType; // TODO(regis): To temporarily print unfinalized types.
511 friend class RawTypeParameter; // To temporarily print unfinalized types. 511 friend class RawTypeParameter; // To temporarily print unfinalized types.
512 friend class SnapshotReader; 512 friend class SnapshotReader;
513 }; 513 };
514 514
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 // Make sure this is updated when new TypedData types are added. 1712 // Make sure this is updated when new TypedData types are added.
1713 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); 1713 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12);
1714 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); 1714 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13);
1715 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); 1715 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12);
1716 return (kNullCid - kTypedDataInt8ArrayCid); 1716 return (kNullCid - kTypedDataInt8ArrayCid);
1717 } 1717 }
1718 1718
1719 } // namespace dart 1719 } // namespace dart
1720 1720
1721 #endif // VM_RAW_OBJECT_H_ 1721 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698