summaryrefslogtreecommitdiff
path: root/deps/v8/src/heap.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-05-10 09:58:20 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-05-10 09:58:20 -0700
commit615d8906226ffc56238b44141cdb3374f47e805a (patch)
tree3850f314701edf5156ec52f296eac9f38959bbfe /deps/v8/src/heap.h
parent8ab238e7de8429961ce4d6fd9114555e5df90a13 (diff)
downloadnode-new-615d8906226ffc56238b44141cdb3374f47e805a.tar.gz
Upgrade V8 to 2.2.9
Diffstat (limited to 'deps/v8/src/heap.h')
-rw-r--r--deps/v8/src/heap.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/deps/v8/src/heap.h b/deps/v8/src/heap.h
index 902fc77ee6..b4af6d9c22 100644
--- a/deps/v8/src/heap.h
+++ b/deps/v8/src/heap.h
@@ -93,6 +93,9 @@ class ZoneScopeInfo;
V(Map, proxy_map, ProxyMap) \
V(Object, nan_value, NanValue) \
V(Object, minus_zero_value, MinusZeroValue) \
+ V(Object, instanceof_cache_function, InstanceofCacheFunction) \
+ V(Object, instanceof_cache_map, InstanceofCacheMap) \
+ V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \
V(String, empty_string, EmptyString) \
V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \
V(Map, neander_map, NeanderMap) \
@@ -361,6 +364,11 @@ class Heap : public AllStatic {
// Allocates an empty code cache.
static Object* AllocateCodeCache();
+ // Clear the Instanceof cache (used when a prototype changes).
+ static void ClearInstanceofCache() {
+ set_instanceof_cache_function(the_hole_value());
+ }
+
// Allocates and fully initializes a String. There are two String
// encodings: ASCII and two byte. One should choose between the three string
// allocation functions based on the encoding of the string buffer used to
@@ -971,6 +979,8 @@ class Heap : public AllStatic {
static int MaxObjectSizeInNewSpace() { return kMaxObjectSizeInNewSpace; }
+ static void ClearJSFunctionResultCaches();
+
private:
static int reserved_semispace_size_;
static int max_semispace_size_;
@@ -1171,6 +1181,13 @@ class Heap : public AllStatic {
static void MarkCompactPrologue(bool is_compacting);
static void MarkCompactEpilogue(bool is_compacting);
+ // Completely clear the Instanceof cache (to stop it keeping objects alive
+ // around a GC).
+ static void CompletelyClearInstanceofCache() {
+ set_instanceof_cache_map(the_hole_value());
+ set_instanceof_cache_function(the_hole_value());
+ }
+
// Helper function used by CopyObject to copy a source object to an
// allocated target object and update the forwarding pointer in the source
// object. Returns the target object.
@@ -1178,8 +1195,6 @@ class Heap : public AllStatic {
HeapObject* target,
int size);
- static void ClearJSFunctionResultCaches();
-
#if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING)
// Record the copy of an object in the NewSpace's statistics.
static void RecordCopiedObject(HeapObject* obj);