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

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

Issue 781203005: Allow Symbols in switch and maps (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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
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_OBJECT_STORE_H_ 5 #ifndef VM_OBJECT_STORE_H_
6 #define VM_OBJECT_STORE_H_ 6 #define VM_OBJECT_STORE_H_
7 7
8 #include "vm/object.h" 8 #include "vm/object.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 RawClass* completer_class() const { return completer_class_; } 122 RawClass* completer_class() const { return completer_class_; }
123 void set_completer_class(const Class& value) { 123 void set_completer_class(const Class& value) {
124 completer_class_ = value.raw(); 124 completer_class_ = value.raw();
125 } 125 }
126 126
127 RawClass* stream_iterator_class() const { return stream_iterator_class_; } 127 RawClass* stream_iterator_class() const { return stream_iterator_class_; }
128 void set_stream_iterator_class(const Class& value) { 128 void set_stream_iterator_class(const Class& value) {
129 stream_iterator_class_ = value.raw(); 129 stream_iterator_class_ = value.raw();
130 } 130 }
131 131
132 RawClass* symbol_class() { return symbol_class_; }
133 void set_symbol_class(const Class& value) {
134 symbol_class_ = value.raw();
135 }
136
132 RawClass* one_byte_string_class() const { return one_byte_string_class_; } 137 RawClass* one_byte_string_class() const { return one_byte_string_class_; }
133 void set_one_byte_string_class(const Class& value) { 138 void set_one_byte_string_class(const Class& value) {
134 one_byte_string_class_ = value.raw(); 139 one_byte_string_class_ = value.raw();
135 } 140 }
136 141
137 RawClass* two_byte_string_class() const { return two_byte_string_class_; } 142 RawClass* two_byte_string_class() const { return two_byte_string_class_; }
138 void set_two_byte_string_class(const Class& value) { 143 void set_two_byte_string_class(const Class& value) {
139 two_byte_string_class_ = value.raw(); 144 two_byte_string_class_ = value.raw();
140 } 145 }
141 146
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 420 }
416 421
417 // Visit all object pointers. 422 // Visit all object pointers.
418 void VisitObjectPointers(ObjectPointerVisitor* visitor); 423 void VisitObjectPointers(ObjectPointerVisitor* visitor);
419 424
420 // Called to initialize objects required by the vm but which invoke 425 // Called to initialize objects required by the vm but which invoke
421 // dart code. If an error occurs then false is returned and error 426 // dart code. If an error occurs then false is returned and error
422 // information is stored in sticky_error(). 427 // information is stored in sticky_error().
423 bool PreallocateObjects(); 428 bool PreallocateObjects();
424 429
425 void InitAsyncObjects(); 430 void InitKnownObjects();
426 431
427 static void Init(Isolate* isolate); 432 static void Init(Isolate* isolate);
428 433
429 private: 434 private:
430 ObjectStore(); 435 ObjectStore();
431 436
432 RawObject** from() { return reinterpret_cast<RawObject**>(&object_class_); } 437 RawObject** from() { return reinterpret_cast<RawObject**>(&object_class_); }
433 RawClass* object_class_; 438 RawClass* object_class_;
434 RawType* object_type_; 439 RawType* object_type_;
435 RawClass* null_class_; 440 RawClass* null_class_;
(...skipping 10 matching lines...) Expand all
446 RawClass* bigint_class_; 451 RawClass* bigint_class_;
447 RawClass* double_class_; 452 RawClass* double_class_;
448 RawType* double_type_; 453 RawType* double_type_;
449 RawType* float32x4_type_; 454 RawType* float32x4_type_;
450 RawType* int32x4_type_; 455 RawType* int32x4_type_;
451 RawType* float64x2_type_; 456 RawType* float64x2_type_;
452 RawType* string_type_; 457 RawType* string_type_;
453 RawClass* future_class_; 458 RawClass* future_class_;
454 RawClass* completer_class_; 459 RawClass* completer_class_;
455 RawClass* stream_iterator_class_; 460 RawClass* stream_iterator_class_;
461 RawClass* symbol_class_;
456 RawClass* one_byte_string_class_; 462 RawClass* one_byte_string_class_;
457 RawClass* two_byte_string_class_; 463 RawClass* two_byte_string_class_;
458 RawClass* external_one_byte_string_class_; 464 RawClass* external_one_byte_string_class_;
459 RawClass* external_two_byte_string_class_; 465 RawClass* external_two_byte_string_class_;
460 RawType* bool_type_; 466 RawType* bool_type_;
461 RawClass* bool_class_; 467 RawClass* bool_class_;
462 RawClass* array_class_; 468 RawClass* array_class_;
463 RawType* array_type_; 469 RawType* array_type_;
464 RawClass* immutable_array_class_; 470 RawClass* immutable_array_class_;
465 RawClass* growable_object_array_class_; 471 RawClass* growable_object_array_class_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 511 }
506 512
507 friend class SnapshotReader; 513 friend class SnapshotReader;
508 514
509 DISALLOW_COPY_AND_ASSIGN(ObjectStore); 515 DISALLOW_COPY_AND_ASSIGN(ObjectStore);
510 }; 516 };
511 517
512 } // namespace dart 518 } // namespace dart
513 519
514 #endif // VM_OBJECT_STORE_H_ 520 #endif // VM_OBJECT_STORE_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_store.cc » ('j') | runtime/vm/object_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698