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

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

Issue 664593002: - Add a separate step to finalize the VM isolate explicitly. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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/dart.cc ('k') | runtime/vm/object.cc » ('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) 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_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 static const LocalVarDescriptors& empty_var_descriptors() { 397 static const LocalVarDescriptors& empty_var_descriptors() {
398 ASSERT(empty_var_descriptors_ != NULL); 398 ASSERT(empty_var_descriptors_ != NULL);
399 return *empty_var_descriptors_; 399 return *empty_var_descriptors_;
400 } 400 }
401 401
402 static const ExceptionHandlers& empty_exception_handlers() { 402 static const ExceptionHandlers& empty_exception_handlers() {
403 ASSERT(empty_exception_handlers_ != NULL); 403 ASSERT(empty_exception_handlers_ != NULL);
404 return *empty_exception_handlers_; 404 return *empty_exception_handlers_;
405 } 405 }
406 406
407 static const Array& extractor_parameter_types() {
408 ASSERT(extractor_parameter_types_ != NULL);
409 return *extractor_parameter_types_;
410 }
411
412 static const Array& extractor_parameter_names() {
413 ASSERT(extractor_parameter_names_ != NULL);
414 return *extractor_parameter_names_;
415 }
416
407 // The sentinel is a value that cannot be produced by Dart code. 417 // The sentinel is a value that cannot be produced by Dart code.
408 // It can be used to mark special values, for example to distinguish 418 // It can be used to mark special values, for example to distinguish
409 // "uninitialized" fields. 419 // "uninitialized" fields.
410 static const Instance& sentinel() { 420 static const Instance& sentinel() {
411 ASSERT(sentinel_ != NULL); 421 ASSERT(sentinel_ != NULL);
412 return *sentinel_; 422 return *sentinel_;
413 } 423 }
414 // Value marking that we are transitioning from sentinel, e.g., computing 424 // Value marking that we are transitioning from sentinel, e.g., computing
415 // a field value. Used to detect circular initialization. 425 // a field value. Used to detect circular initialization.
416 static const Instance& transition_sentinel() { 426 static const Instance& transition_sentinel() {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 static RawClass* unhandled_exception_class() { 494 static RawClass* unhandled_exception_class() {
485 return unhandled_exception_class_; 495 return unhandled_exception_class_;
486 } 496 }
487 static RawClass* unwind_error_class() { return unwind_error_class_; } 497 static RawClass* unwind_error_class() { return unwind_error_class_; }
488 static RawClass* icdata_class() { return icdata_class_; } 498 static RawClass* icdata_class() { return icdata_class_; }
489 static RawClass* megamorphic_cache_class() { 499 static RawClass* megamorphic_cache_class() {
490 return megamorphic_cache_class_; 500 return megamorphic_cache_class_;
491 } 501 }
492 static RawClass* subtypetestcache_class() { return subtypetestcache_class_; } 502 static RawClass* subtypetestcache_class() { return subtypetestcache_class_; }
493 503
504 // Initialize the VM isolate.
505 static void InitOnce(Isolate* isolate);
506 static void FinalizeVMIsolate(Isolate* isolate);
507
508 // Initialize a new isolate either from source or from a snapshot.
494 static RawError* Init(Isolate* isolate); 509 static RawError* Init(Isolate* isolate);
495 static void InitFromSnapshot(Isolate* isolate); 510 static void InitFromSnapshot(Isolate* isolate);
496 static void InitOnce(); 511
497 static void RegisterSingletonClassNames();
498 static void MakeUnusedSpaceTraversable(const Object& obj, 512 static void MakeUnusedSpaceTraversable(const Object& obj,
499 intptr_t original_size, 513 intptr_t original_size,
500 intptr_t used_size); 514 intptr_t used_size);
501 515
502 static intptr_t InstanceSize() { 516 static intptr_t InstanceSize() {
503 return RoundedAllocationSize(sizeof(RawObject)); 517 return RoundedAllocationSize(sizeof(RawObject));
504 } 518 }
505 519
506 static void VerifyBuiltinVtables(); 520 static void VerifyBuiltinVtables();
507 521
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 static Object* null_object_; 768 static Object* null_object_;
755 static Array* null_array_; 769 static Array* null_array_;
756 static String* null_string_; 770 static String* null_string_;
757 static Instance* null_instance_; 771 static Instance* null_instance_;
758 static TypeArguments* null_type_arguments_; 772 static TypeArguments* null_type_arguments_;
759 static Array* empty_array_; 773 static Array* empty_array_;
760 static Array* zero_array_; 774 static Array* zero_array_;
761 static PcDescriptors* empty_descriptors_; 775 static PcDescriptors* empty_descriptors_;
762 static LocalVarDescriptors* empty_var_descriptors_; 776 static LocalVarDescriptors* empty_var_descriptors_;
763 static ExceptionHandlers* empty_exception_handlers_; 777 static ExceptionHandlers* empty_exception_handlers_;
778 static Array* extractor_parameter_types_;
779 static Array* extractor_parameter_names_;
764 static Instance* sentinel_; 780 static Instance* sentinel_;
765 static Instance* transition_sentinel_; 781 static Instance* transition_sentinel_;
766 static Instance* unknown_constant_; 782 static Instance* unknown_constant_;
767 static Instance* non_constant_; 783 static Instance* non_constant_;
768 static Bool* bool_true_; 784 static Bool* bool_true_;
769 static Bool* bool_false_; 785 static Bool* bool_false_;
770 static Smi* smi_illegal_cid_; 786 static Smi* smi_illegal_cid_;
771 static LanguageError* snapshot_writer_error_; 787 static LanguageError* snapshot_writer_error_;
772 static LanguageError* branch_offset_error_; 788 static LanguageError* branch_offset_error_;
773 789
(...skipping 6767 matching lines...) Expand 10 before | Expand all | Expand 10 after
7541 7557
7542 7558
7543 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7559 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7544 intptr_t index) { 7560 intptr_t index) {
7545 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7561 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7546 } 7562 }
7547 7563
7548 } // namespace dart 7564 } // namespace dart
7549 7565
7550 #endif // VM_OBJECT_H_ 7566 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698