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

Unified Diff: runtime/vm/object.h

Issue 575663002: Eliminate 99% of allocated ExceptionHandler objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 40287)
+++ runtime/vm/object.h (working copy)
@@ -398,6 +398,11 @@
return *empty_var_descriptors_;
}
+ static const ExceptionHandlers& empty_exception_handlers() {
+ ASSERT(empty_exception_handlers_ != NULL);
+ return *empty_exception_handlers_;
+ }
+
// The sentinel is a value that cannot be produced by Dart code.
// It can be used to mark special values, for example to distinguish
// "uninitialized" fields.
@@ -676,6 +681,7 @@
static Array* zero_array_;
static PcDescriptors* empty_descriptors_;
static LocalVarDescriptors* empty_var_descriptors_;
+ static ExceptionHandlers* empty_exception_handlers_;
static Instance* sentinel_;
static Instance* transition_sentinel_;
static Instance* unknown_constant_;
@@ -3309,7 +3315,7 @@
class ExceptionHandlers : public Object {
public:
- intptr_t Length() const;
+ intptr_t num_entries() const;
void GetHandlerInfo(intptr_t try_index,
RawExceptionHandlers::HandlerInfo* info) const;
@@ -3354,6 +3360,7 @@
FINAL_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers, Object);
friend class Class;
+ friend class Object;
};
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698