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

Unified Diff: src/isolate.h

Issue 2493002: - Remove [static] from methods in Zone and associated helpers. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/data-flow.h ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
===================================================================
--- src/isolate.h (revision 4781)
+++ src/isolate.h (working copy)
@@ -29,6 +29,7 @@
#define V8_ISOLATE_H_
#include "heap.h"
+#include "zone.h"
namespace v8 {
namespace internal {
@@ -37,6 +38,9 @@
class Deserializer;
class StubCache;
+#define ISOLATE_INIT_LIST(V) \
+ V(bool, zone_allow_allocation, true) /* AssertNoZoneAllocation */
+
class Isolate {
public:
// Returns the single global isolate.
@@ -51,17 +55,24 @@
// Initialize process-wide state.
static void InitOnce();
-
+
~Isolate();
Vitaly Repeshko 2010/06/02 15:30:40 BTW, according to the style guide this should be t
-
- // Accessors.
+
+#define GLOBAL_ACCESSOR(type, name, initialvalue) \
+ type name() const { return name##_; } \
+ void set_##name(type value) { name##_ = value; }
+ ISOLATE_INIT_LIST(GLOBAL_ACCESSOR)
+#undef GLOBAL_ACCESSOR
+
+
Bootstrapper* bootstrapper() { return bootstrapper_; }
Heap* heap() { return &heap_; }
StubCache* stub_cache() { return stub_cache_; }
-
+ Zone* zone() { return &zone_; }
+
private:
Isolate();
-
+
static Isolate* global_isolate;
bool Init(Deserializer* des);
@@ -69,12 +80,20 @@
Bootstrapper* bootstrapper_;
Heap heap_;
StubCache* stub_cache_;
+ Zone zone_;
+
+#define GLOBAL_BACKING_STORE(type, name, initialvalue) \
+ type name##_;
+ ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE)
+#undef GLOBAL_BACKING_STORE
DISALLOW_COPY_AND_ASSIGN(Isolate);
};
-// Temporary macros for accessing fields off the global isolate.
+// Temporary macros for accessing fields off the global isolate. Define these
+// when reformatting code would become burdensome.
#define HEAP (v8::internal::Isolate::Current()->heap())
+#define ZONE (v8::internal::Isolate::Current()->zone())
// Temporary macro to be used to flag definitions that are indeed static
@@ -82,6 +101,10 @@
#define RLYSTC static
+// Temporary macro to be used to flag classes that should be static.
+#define STATIC_CLASS class
Vitaly Repeshko 2010/06/02 15:30:40 Do we really need this?
+
+
} } // namespace v8::internal
#endif // V8_ISOLATE_H_
« no previous file with comments | « src/data-flow.h ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698