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

Unified Diff: runtime/vm/object.h

Issue 11883023: Collect debugging info for catch clauses (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 17032)
+++ runtime/vm/object.h (working copy)
@@ -2391,29 +2391,22 @@
class ExceptionHandlers : public Object {
- private:
- // Describes the layout of exception handler data.
- enum {
- kTryIndexEntry = 0, // Try block index associated with handler.
- kHandlerPcEntry, // PC value of handler.
- kNumberOfEntries
- };
-
public:
intptr_t Length() const;
+ void GetHandlerInfo(intptr_t index,
+ RawExceptionHandlers::HandlerInfo* info) const;
+
intptr_t TryIndex(intptr_t index) const;
intptr_t HandlerPC(intptr_t index) const;
- void SetHandlerEntry(intptr_t index,
- intptr_t try_index,
- intptr_t handler_pc) const {
- SetTryIndex(index, try_index);
- SetHandlerPC(index, handler_pc);
- }
+ void SetHandlerInfo(intptr_t index,
+ intptr_t try_index,
+ intptr_t outer_try_index,
+ intptr_t handler_pc) const;
siva 2013/01/15 22:04:12 I think you still need the kMaxElements constant t
hausner 2013/01/15 22:44:52 Done. Picked a large but otherwise arbitrary numbe
- static const intptr_t kBytesPerElement = (kNumberOfEntries * kWordSize);
- static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
+ RawArray* GetHandledTypes(intptr_t index) const;
+ void SetHandledTypes(intptr_t index, const Array& handled_types) const;
static intptr_t InstanceSize() {
ASSERT(sizeof(RawExceptionHandlers) == OFFSET_OF(RawExceptionHandlers,
@@ -2421,9 +2414,9 @@
return 0;
}
static intptr_t InstanceSize(intptr_t len) {
- ASSERT(0 <= len && len <= kMaxElements);
return RoundedAllocationSize(
- sizeof(RawExceptionHandlers) + (len * kBytesPerElement));
+ sizeof(RawExceptionHandlers) +
+ (len * sizeof(RawExceptionHandlers::HandlerInfo)));
}
static RawExceptionHandlers* New(intptr_t num_handlers);
@@ -2432,17 +2425,7 @@
// exception handler table to visit objects if any in the table.
private:
- void SetTryIndex(intptr_t index, intptr_t value) const;
- void SetHandlerPC(intptr_t index, intptr_t value) const;
-
- void SetLength(intptr_t value) const;
-
- intptr_t* EntryAddr(intptr_t index, intptr_t entry_offset) const {
- ASSERT((index >=0) && (index < Length()));
- intptr_t data_index = (index * kNumberOfEntries) + entry_offset;
- return &raw_ptr()->data_[data_index];
- }
-
+ void set_handled_types_data(const Array& value) const;
HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers, Object);
friend class Class;
};
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698