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

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

Issue 2279563002: AOT: Single target stub. (Closed)
Patch Set: add offset assertions 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
« 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 532 }
533 static RawClass* deopt_info_class() { return deopt_info_class_; } 533 static RawClass* deopt_info_class() { return deopt_info_class_; }
534 static RawClass* context_class() { return context_class_; } 534 static RawClass* context_class() { return context_class_; }
535 static RawClass* context_scope_class() { return context_scope_class_; } 535 static RawClass* context_scope_class() { return context_scope_class_; }
536 static RawClass* api_error_class() { return api_error_class_; } 536 static RawClass* api_error_class() { return api_error_class_; }
537 static RawClass* language_error_class() { return language_error_class_; } 537 static RawClass* language_error_class() { return language_error_class_; }
538 static RawClass* unhandled_exception_class() { 538 static RawClass* unhandled_exception_class() {
539 return unhandled_exception_class_; 539 return unhandled_exception_class_;
540 } 540 }
541 static RawClass* unwind_error_class() { return unwind_error_class_; } 541 static RawClass* unwind_error_class() { return unwind_error_class_; }
542 static RawClass* singletargetcache_class() {
543 return singletargetcache_class_;
544 }
542 static RawClass* icdata_class() { return icdata_class_; } 545 static RawClass* icdata_class() { return icdata_class_; }
543 static RawClass* megamorphic_cache_class() { 546 static RawClass* megamorphic_cache_class() {
544 return megamorphic_cache_class_; 547 return megamorphic_cache_class_;
545 } 548 }
546 static RawClass* subtypetestcache_class() { return subtypetestcache_class_; } 549 static RawClass* subtypetestcache_class() { return subtypetestcache_class_; }
547 550
548 // Initialize the VM isolate. 551 // Initialize the VM isolate.
549 static void InitNull(Isolate* isolate); 552 static void InitNull(Isolate* isolate);
550 static void InitOnce(Isolate* isolate); 553 static void InitOnce(Isolate* isolate);
551 static void FinalizeVMIsolate(Isolate* isolate); 554 static void FinalizeVMIsolate(Isolate* isolate);
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 static RawClass* instructions_class_; // Class of the Instructions vm object. 786 static RawClass* instructions_class_; // Class of the Instructions vm object.
784 static RawClass* object_pool_class_; // Class of the ObjectPool vm object. 787 static RawClass* object_pool_class_; // Class of the ObjectPool vm object.
785 static RawClass* pc_descriptors_class_; // Class of PcDescriptors vm object. 788 static RawClass* pc_descriptors_class_; // Class of PcDescriptors vm object.
786 static RawClass* code_source_map_class_; // Class of CodeSourceMap vm object. 789 static RawClass* code_source_map_class_; // Class of CodeSourceMap vm object.
787 static RawClass* stackmap_class_; // Class of Stackmap vm object. 790 static RawClass* stackmap_class_; // Class of Stackmap vm object.
788 static RawClass* var_descriptors_class_; // Class of LocalVarDescriptors. 791 static RawClass* var_descriptors_class_; // Class of LocalVarDescriptors.
789 static RawClass* exception_handlers_class_; // Class of ExceptionHandlers. 792 static RawClass* exception_handlers_class_; // Class of ExceptionHandlers.
790 static RawClass* deopt_info_class_; // Class of DeoptInfo. 793 static RawClass* deopt_info_class_; // Class of DeoptInfo.
791 static RawClass* context_class_; // Class of the Context vm object. 794 static RawClass* context_class_; // Class of the Context vm object.
792 static RawClass* context_scope_class_; // Class of ContextScope vm object. 795 static RawClass* context_scope_class_; // Class of ContextScope vm object.
796 static RawClass* singletargetcache_class_; // Class of SingleTargetCache.
793 static RawClass* icdata_class_; // Class of ICData. 797 static RawClass* icdata_class_; // Class of ICData.
794 static RawClass* megamorphic_cache_class_; // Class of MegamorphiCache. 798 static RawClass* megamorphic_cache_class_; // Class of MegamorphiCache.
795 static RawClass* subtypetestcache_class_; // Class of SubtypeTestCache. 799 static RawClass* subtypetestcache_class_; // Class of SubtypeTestCache.
796 static RawClass* api_error_class_; // Class of ApiError. 800 static RawClass* api_error_class_; // Class of ApiError.
797 static RawClass* language_error_class_; // Class of LanguageError. 801 static RawClass* language_error_class_; // Class of LanguageError.
798 static RawClass* unhandled_exception_class_; // Class of UnhandledException. 802 static RawClass* unhandled_exception_class_; // Class of UnhandledException.
799 static RawClass* unwind_error_class_; // Class of UnwindError. 803 static RawClass* unwind_error_class_; // Class of UnwindError.
800 804
801 // The static values below are read-only handle pointers for singleton 805 // The static values below are read-only handle pointers for singleton
802 // objects that are shared between the different isolates. 806 // objects that are shared between the different isolates.
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 void set_origin_class(const Class& value) const; 1817 void set_origin_class(const Class& value) const;
1814 void set_script(const Script& value) const; 1818 void set_script(const Script& value) const;
1815 1819
1816 static RawPatchClass* New(); 1820 static RawPatchClass* New();
1817 1821
1818 FINAL_HEAP_OBJECT_IMPLEMENTATION(PatchClass, Object); 1822 FINAL_HEAP_OBJECT_IMPLEMENTATION(PatchClass, Object);
1819 friend class Class; 1823 friend class Class;
1820 }; 1824 };
1821 1825
1822 1826
1827 class SingleTargetCache : public Object {
1828 public:
1829 RawCode* target() const { return raw_ptr()->target_; }
1830 void set_target(const Code& target) const;
1831 static intptr_t target_offset() {
1832 return OFFSET_OF(RawSingleTargetCache, target_);
1833 }
1834
1835 #define DEFINE_NON_POINTER_FIELD_ACCESSORS(type, name) \
1836 type name() const { return raw_ptr()->name##_; } \
1837 void set_##name(type value) const { \
1838 StoreNonPointer(&raw_ptr()->name##_, value); \
1839 } \
1840 static intptr_t name##_offset() { \
1841 return OFFSET_OF(RawSingleTargetCache, name##_); \
1842 } \
1843
1844 DEFINE_NON_POINTER_FIELD_ACCESSORS(uword, entry_point);
1845 DEFINE_NON_POINTER_FIELD_ACCESSORS(intptr_t, lower_limit);
1846 DEFINE_NON_POINTER_FIELD_ACCESSORS(intptr_t, upper_limit);
1847 #undef DEFINE_NON_POINTER_FIELD_ACCESSORS
1848
1849 static intptr_t InstanceSize() {
1850 return RoundedAllocationSize(sizeof(RawSingleTargetCache));
1851 }
1852
1853 static RawSingleTargetCache* New();
1854
1855 private:
1856 FINAL_HEAP_OBJECT_IMPLEMENTATION(SingleTargetCache, Object);
1857 friend class Class;
1858 };
1859
1860
1823 // Object holding information about an IC: test classes and their 1861 // Object holding information about an IC: test classes and their
1824 // corresponding targets. The owner of the ICData can be either the function 1862 // corresponding targets. The owner of the ICData can be either the function
1825 // or the original ICData object. In case of background compilation we 1863 // or the original ICData object. In case of background compilation we
1826 // copy the ICData in a child object, thus freezing it during background 1864 // copy the ICData in a child object, thus freezing it during background
1827 // compilation. Code may contain only original ICData objects. 1865 // compilation. Code may contain only original ICData objects.
1828 class ICData : public Object { 1866 class ICData : public Object {
1829 public: 1867 public:
1830 RawFunction* Owner() const; 1868 RawFunction* Owner() const;
1831 1869
1832 RawICData* Original() const; 1870 RawICData* Original() const;
(...skipping 6946 matching lines...) Expand 10 before | Expand all | Expand 10 after
8779 8817
8780 inline void TypeArguments::SetHash(intptr_t value) const { 8818 inline void TypeArguments::SetHash(intptr_t value) const {
8781 // This is only safe because we create a new Smi, which does not cause 8819 // This is only safe because we create a new Smi, which does not cause
8782 // heap allocation. 8820 // heap allocation.
8783 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 8821 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
8784 } 8822 }
8785 8823
8786 } // namespace dart 8824 } // namespace dart
8787 8825
8788 #endif // VM_OBJECT_H_ 8826 #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