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

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

Issue 12335111: Resubmit change 19074. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/exceptions.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 6268 matching lines...) Expand 10 before | Expand all | Expand 10 after
6279 closure.StorePointer(ContextAddr(closure), value.raw()); 6279 closure.StorePointer(ContextAddr(closure), value.raw());
6280 } 6280 }
6281 6281
6282 friend class Class; 6282 friend class Class;
6283 }; 6283 };
6284 6284
6285 6285
6286 // Internal stacktrace object used in exceptions for printing stack traces. 6286 // Internal stacktrace object used in exceptions for printing stack traces.
6287 class Stacktrace : public Instance { 6287 class Stacktrace : public Instance {
6288 public: 6288 public:
6289 static const int kPreallocatedStackdepth = 10;
6290
6289 intptr_t Length() const; 6291 intptr_t Length() const;
6292
6290 RawFunction* FunctionAtFrame(intptr_t frame_index) const; 6293 RawFunction* FunctionAtFrame(intptr_t frame_index) const;
6294 void SetFunctionAtFrame(intptr_t frame_index, const Function& func) const;
6295
6291 RawCode* CodeAtFrame(intptr_t frame_index) const; 6296 RawCode* CodeAtFrame(intptr_t frame_index) const;
6297 void SetCodeAtFrame(intptr_t frame_index, const Code& code) const;
6298
6292 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; 6299 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const;
6293 void Append(const GrowableObjectArray& func_list, 6300 void SetPcOffsetAtFrame(intptr_t frame_index, const Smi& pc_offset) const;
6294 const GrowableObjectArray& code_list, 6301
6295 const GrowableObjectArray& pc_offset_list) const; 6302 void Append(const Array& func_list,
6303 const Array& code_list,
6304 const Array& pc_offset_list) const;
6296 6305
6297 static intptr_t InstanceSize() { 6306 static intptr_t InstanceSize() {
6298 return RoundedAllocationSize(sizeof(RawStacktrace)); 6307 return RoundedAllocationSize(sizeof(RawStacktrace));
6299 } 6308 }
6300 static RawStacktrace* New(const GrowableObjectArray& func_list, 6309 static RawStacktrace* New(const Array& func_array,
6301 const GrowableObjectArray& code_list, 6310 const Array& code_array,
6302 const GrowableObjectArray& pc_offset_list, 6311 const Array& pc_offset_array,
6303 Heap::Space space = Heap::kNew); 6312 Heap::Space space = Heap::kNew);
6304 6313
6305 const char* ToCStringInternal(bool verbose) const; 6314 const char* ToCStringInternal(bool verbose) const;
6306 6315
6307 private: 6316 private:
6308 void set_function_array(const Array& function_array) const; 6317 void set_function_array(const Array& function_array) const;
6309 void set_code_array(const Array& code_array) const; 6318 void set_code_array(const Array& code_array) const;
6310 void set_pc_offset_array(const Array& pc_offset_array) const; 6319 void set_pc_offset_array(const Array& pc_offset_array) const;
6311 6320
6312 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance); 6321 FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
6546 6555
6547 6556
6548 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6557 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6549 intptr_t index) { 6558 intptr_t index) {
6550 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6559 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6551 } 6560 }
6552 6561
6553 } // namespace dart 6562 } // namespace dart
6554 6563
6555 #endif // VM_OBJECT_H_ 6564 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698