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

Side by Side Diff: vm/object.h

Issue 10409038: Remove the special stub code region as we don't need it anymore. With the new frame layout conventi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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 | « vm/heap.cc ('k') | 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 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 raw_ptr()->size_ = size; 1901 raw_ptr()->size_ = size;
1902 } 1902 }
1903 void set_code(RawCode* code) { 1903 void set_code(RawCode* code) {
1904 raw_ptr()->code_ = code; 1904 raw_ptr()->code_ = code;
1905 } 1905 }
1906 1906
1907 // New is a private method as RawInstruction and RawCode objects should 1907 // New is a private method as RawInstruction and RawCode objects should
1908 // only be created using the Code::FinalizeCode method. This method creates 1908 // only be created using the Code::FinalizeCode method. This method creates
1909 // the RawInstruction and RawCode objects, sets up the pointer offsets 1909 // the RawInstruction and RawCode objects, sets up the pointer offsets
1910 // and links the two in a GC safe manner. 1910 // and links the two in a GC safe manner.
1911 static RawInstructions* New(intptr_t size, Heap::Space space); 1911 static RawInstructions* New(intptr_t size);
1912 1912
1913 HEAP_OBJECT_IMPLEMENTATION(Instructions, Object); 1913 HEAP_OBJECT_IMPLEMENTATION(Instructions, Object);
1914 friend class Code; 1914 friend class Code;
1915 friend class Class; 1915 friend class Class;
1916 }; 1916 };
1917 1917
1918 1918
1919 class LocalVarDescriptors : public Object { 1919 class LocalVarDescriptors : public Object {
1920 public: 1920 public:
1921 intptr_t Length() const; 1921 intptr_t Length() const;
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
2239 2239
2240 static intptr_t InstanceSize() { 2240 static intptr_t InstanceSize() {
2241 ASSERT(sizeof(RawCode) == OFFSET_OF(RawCode, data_)); 2241 ASSERT(sizeof(RawCode) == OFFSET_OF(RawCode, data_));
2242 return 0; 2242 return 0;
2243 } 2243 }
2244 static intptr_t InstanceSize(intptr_t pointer_offsets_length) { 2244 static intptr_t InstanceSize(intptr_t pointer_offsets_length) {
2245 return RoundedAllocationSize( 2245 return RoundedAllocationSize(
2246 sizeof(RawCode) + (pointer_offsets_length * kEntrySize)); 2246 sizeof(RawCode) + (pointer_offsets_length * kEntrySize));
2247 } 2247 }
2248 static RawCode* FinalizeCode(const Function& function, Assembler* assembler); 2248 static RawCode* FinalizeCode(const Function& function, Assembler* assembler);
2249 static RawCode* FinalizeStubCode(const char* name, Assembler* assembler); 2249 static RawCode* FinalizeCode(const char* name, Assembler* assembler);
2250 static RawCode* LookupCode(uword pc); 2250 static RawCode* LookupCode(uword pc);
2251 2251
2252 int32_t GetPointerOffsetAt(int index) const { 2252 int32_t GetPointerOffsetAt(int index) const {
2253 return *PointerOffsetAddrAt(index); 2253 return *PointerOffsetAddrAt(index);
2254 } 2254 }
2255 intptr_t GetTokenIndexOfPC(uword pc) const; 2255 intptr_t GetTokenIndexOfPC(uword pc) const;
2256 2256
2257 // Find pc of patch code buffer. Return 0 if not found. 2257 // Find pc of patch code buffer. Return 0 if not found.
2258 uword GetPatchCodePc() const; 2258 uword GetPatchCodePc() const;
2259 2259
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 void SetPointerOffsetAt(int index, int32_t offset_in_instructions) { 2304 void SetPointerOffsetAt(int index, int32_t offset_in_instructions) {
2305 *PointerOffsetAddrAt(index) = offset_in_instructions; 2305 *PointerOffsetAddrAt(index) = offset_in_instructions;
2306 } 2306 }
2307 2307
2308 // New is a private method as RawInstruction and RawCode objects should 2308 // New is a private method as RawInstruction and RawCode objects should
2309 // only be created using the Code::FinalizeCode method. This method creates 2309 // only be created using the Code::FinalizeCode method. This method creates
2310 // the RawInstruction and RawCode objects, sets up the pointer offsets 2310 // the RawInstruction and RawCode objects, sets up the pointer offsets
2311 // and links the two in a GC safe manner. 2311 // and links the two in a GC safe manner.
2312 static RawCode* New(int pointer_offsets_length); 2312 static RawCode* New(int pointer_offsets_length);
2313 2313
2314 static RawCode* FinalizeCode(const char* name,
2315 Assembler* assembler,
2316 Heap::Space space);
2317
2318 HEAP_OBJECT_IMPLEMENTATION(Code, Object); 2314 HEAP_OBJECT_IMPLEMENTATION(Code, Object);
2319 friend class Class; 2315 friend class Class;
2320 }; 2316 };
2321 2317
2322 2318
2323 class Context : public Object { 2319 class Context : public Object {
2324 public: 2320 public:
2325 RawContext* parent() const { return raw_ptr()->parent_; } 2321 RawContext* parent() const { return raw_ptr()->parent_; }
2326 void set_parent(const Context& parent) const { 2322 void set_parent(const Context& parent) const {
2327 ASSERT(parent.IsNull() || parent.isolate() == Isolate::Current()); 2323 ASSERT(parent.IsNull() || parent.isolate() == Isolate::Current());
(...skipping 2621 matching lines...) Expand 10 before | Expand all | Expand 10 after
4949 } 4945 }
4950 4946
4951 4947
4952 intptr_t Stackmap::SizeInBits() const { 4948 intptr_t Stackmap::SizeInBits() const {
4953 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 4949 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
4954 } 4950 }
4955 4951
4956 } // namespace dart 4952 } // namespace dart
4957 4953
4958 #endif // VM_OBJECT_H_ 4954 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « vm/heap.cc ('k') | vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698