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

Unified Diff: src/objects.h

Issue 8098: - Added conditional write barrier to object accessors.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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/jsregexp.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
===================================================================
--- src/objects.h (revision 564)
+++ src/objects.h (working copy)
@@ -166,6 +166,9 @@
uint32_t value_;
};
+// Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER.
+enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER };
+
// All Maps have a field instance_type containing a InstanceType.
// It describes the type of the instances.
//
@@ -555,9 +558,10 @@
inline void set_##name(bool value); \
-#define DECL_ACCESSORS(name, type) \
- inline type* name(); \
- inline void set_##name(type* value);
+#define DECL_ACCESSORS(name, type) \
+ inline type* name(); \
+ inline void set_##name(type* value, \
+ WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \
class StringStream;
@@ -1041,6 +1045,9 @@
// Casting.
static inline HeapObject* cast(Object* obj);
+ // Return the write barrier mode for this.
+ inline WriteBarrierMode GetWriteBarrierMode();
+
// Dispatched behavior.
void HeapObjectShortPrint(StringStream* accumulator);
#ifdef DEBUG
@@ -1355,6 +1362,11 @@
inline Object* FastPropertyAt(int index);
inline Object* FastPropertyAtPut(int index, Object* value);
+ // Access to set in object properties.
+ inline Object* InObjectPropertyAtPut(int index,
+ Object* value,
+ WriteBarrierMode mode
+ = UPDATE_WRITE_BARRIER);
// initializes the body after properties slot, properties slot is
// initialized by set_properties
@@ -1479,17 +1491,14 @@
inline Object* get(int index);
inline void set(int index, Object* value);
+ // Setter with barrier mode.
+ inline void set(int index, Object* value, WriteBarrierMode mode);
+
// Setters for frequently used oddballs located in old space.
inline void set_undefined(int index);
inline void set_null(int index);
inline void set_the_hole(int index);
- // Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER.
- enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER };
- inline void set(int index, Object* value, WriteBarrierMode mode);
- // Return the write barrier mode for this.
- inline WriteBarrierMode GetWriteBarrierMode();
-
// Copy operations.
inline Object* Copy();
Object* CopySize(int new_length);
« no previous file with comments | « src/jsregexp.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698