| Index: src/heap.h
|
| ===================================================================
|
| --- src/heap.h (revision 8618)
|
| +++ src/heap.h (working copy)
|
| @@ -69,6 +69,7 @@
|
| V(Map, global_context_map, GlobalContextMap) \
|
| V(Map, fixed_array_map, FixedArrayMap) \
|
| V(Map, fixed_cow_array_map, FixedCOWArrayMap) \
|
| + V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
|
| V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \
|
| V(Map, meta_map, MetaMap) \
|
| V(Map, hash_table_map, HashTableMap) \
|
| @@ -81,6 +82,7 @@
|
| V(Object, termination_exception, TerminationException) \
|
| V(FixedArray, empty_fixed_array, EmptyFixedArray) \
|
| V(ByteArray, empty_byte_array, EmptyByteArray) \
|
| + V(FixedDoubleArray, empty_fixed_double_array, EmptyFixedDoubleArray) \
|
| V(String, empty_string, EmptyString) \
|
| V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \
|
| V(Map, string_map, StringMap) \
|
| @@ -108,8 +110,10 @@
|
| V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \
|
| V(Map, external_float_array_map, ExternalFloatArrayMap) \
|
| V(Map, external_double_array_map, ExternalDoubleArrayMap) \
|
| - V(Map, context_map, ContextMap) \
|
| + V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \
|
| + V(Map, function_context_map, FunctionContextMap) \
|
| V(Map, catch_context_map, CatchContextMap) \
|
| + V(Map, with_context_map, WithContextMap) \
|
| V(Map, code_map, CodeMap) \
|
| V(Map, oddball_map, OddballMap) \
|
| V(Map, global_property_cell_map, GlobalPropertyCellMap) \
|
| @@ -123,6 +127,7 @@
|
| V(Foreign, prototype_accessors, PrototypeAccessors) \
|
| V(NumberDictionary, code_stubs, CodeStubs) \
|
| V(NumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \
|
| + V(PolymorphicCodeCache, polymorphic_code_cache, PolymorphicCodeCache) \
|
| V(Code, js_entry_code, JsEntryCode) \
|
| V(Code, js_construct_entry_code, JsConstructEntryCode) \
|
| V(FixedArray, natives_source_cache, NativesSourceCache) \
|
| @@ -142,7 +147,6 @@
|
| V(StringImpl_symbol, "StringImpl") \
|
| V(arguments_symbol, "arguments") \
|
| V(Arguments_symbol, "Arguments") \
|
| - V(arguments_shadow_symbol, ".arguments") \
|
| V(call_symbol, "call") \
|
| V(apply_symbol, "apply") \
|
| V(caller_symbol, "caller") \
|
| @@ -158,6 +162,7 @@
|
| V(function_symbol, "function") \
|
| V(length_symbol, "length") \
|
| V(name_symbol, "name") \
|
| + V(native_symbol, "native") \
|
| V(number_symbol, "number") \
|
| V(Number_symbol, "Number") \
|
| V(nan_symbol, "NaN") \
|
| @@ -181,14 +186,14 @@
|
| V(value_of_symbol, "valueOf") \
|
| V(InitializeVarGlobal_symbol, "InitializeVarGlobal") \
|
| V(InitializeConstGlobal_symbol, "InitializeConstGlobal") \
|
| - V(KeyedLoadSpecializedMonomorphic_symbol, \
|
| - "KeyedLoadSpecializedMonomorphic") \
|
| - V(KeyedLoadSpecializedPolymorphic_symbol, \
|
| - "KeyedLoadSpecializedPolymorphic") \
|
| - V(KeyedStoreSpecializedMonomorphic_symbol, \
|
| - "KeyedStoreSpecializedMonomorphic") \
|
| - V(KeyedStoreSpecializedPolymorphic_symbol, \
|
| - "KeyedStoreSpecializedPolymorphic") \
|
| + V(KeyedLoadElementMonomorphic_symbol, \
|
| + "KeyedLoadElementMonomorphic") \
|
| + V(KeyedLoadElementPolymorphic_symbol, \
|
| + "KeyedLoadElementPolymorphic") \
|
| + V(KeyedStoreElementMonomorphic_symbol, \
|
| + "KeyedStoreElementMonomorphic") \
|
| + V(KeyedStoreElementPolymorphic_symbol, \
|
| + "KeyedStoreElementPolymorphic") \
|
| V(stack_overflow_symbol, "kStackOverflowBoilerplate") \
|
| V(illegal_access_symbol, "illegal access") \
|
| V(out_of_memory_symbol, "out-of-memory") \
|
| @@ -216,7 +221,9 @@
|
| V(global_eval_symbol, "GlobalEval") \
|
| V(identity_hash_symbol, "v8::IdentityHash") \
|
| V(closure_symbol, "(closure)") \
|
| - V(use_strict, "use strict")
|
| + V(use_strict, "use strict") \
|
| + V(dot_symbol, ".") \
|
| + V(anonymous_function_symbol, "(anonymous function)")
|
|
|
| // Forward declarations.
|
| class GCTracer;
|
| @@ -516,6 +523,9 @@
|
| // Allocates an empty code cache.
|
| MUST_USE_RESULT MaybeObject* AllocateCodeCache();
|
|
|
| + // Allocates an empty PolymorphicCodeCache.
|
| + MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache();
|
| +
|
| // Clear the Instanceof cache (used when a prototype changes).
|
| inline void ClearInstanceofCache();
|
|
|
| @@ -655,6 +665,17 @@
|
| int length,
|
| PretenureFlag pretenure = NOT_TENURED);
|
|
|
| + MUST_USE_RESULT MaybeObject* AllocateRawFixedDoubleArray(
|
| + int length,
|
| + PretenureFlag pretenure);
|
| +
|
| + // Allocates a fixed double array with uninitialized values. Returns
|
| + // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed.
|
| + // Please note this does not perform a garbage collection.
|
| + MUST_USE_RESULT MaybeObject* AllocateUninitializedFixedDoubleArray(
|
| + int length,
|
| + PretenureFlag pretenure = NOT_TENURED);
|
| +
|
| // AllocateHashTable is identical to AllocateFixedArray except
|
| // that the resulting object has hash_table_map as map.
|
| MUST_USE_RESULT MaybeObject* AllocateHashTable(
|
| @@ -665,12 +686,17 @@
|
|
|
| // Allocate a function context.
|
| MUST_USE_RESULT MaybeObject* AllocateFunctionContext(int length,
|
| - JSFunction* closure);
|
| + JSFunction* function);
|
|
|
| + // Allocate a catch context.
|
| + MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function,
|
| + Context* previous,
|
| + String* name,
|
| + Object* thrown_object);
|
| // Allocate a 'with' context.
|
| - MUST_USE_RESULT MaybeObject* AllocateWithContext(Context* previous,
|
| - JSObject* extension,
|
| - bool is_catch_context);
|
| + MUST_USE_RESULT MaybeObject* AllocateWithContext(JSFunction* function,
|
| + Context* previous,
|
| + JSObject* extension);
|
|
|
| // Allocates a new utility object in the old generation.
|
| MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type);
|
| @@ -1103,6 +1129,8 @@
|
| enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT };
|
| inline HeapState gc_state() { return gc_state_; }
|
|
|
| + inline bool IsInGCPostProcessing() { return gc_post_processing_depth_ > 0; }
|
| +
|
| #ifdef DEBUG
|
| bool IsAllocationAllowed() { return allocation_allowed_; }
|
| inline bool allow_allocation(bool enable);
|
| @@ -1307,6 +1335,11 @@
|
| return &external_string_table_;
|
| }
|
|
|
| + // Returns the current sweep generation.
|
| + int sweep_generation() {
|
| + return sweep_generation_;
|
| + }
|
| +
|
| inline Isolate* isolate();
|
|
|
| inline void CallGlobalGCPrologueCallback() {
|
| @@ -1350,6 +1383,9 @@
|
| // scavenge since last new space expansion.
|
| int survived_since_last_expansion_;
|
|
|
| + // For keeping track on when to flush RegExp code.
|
| + int sweep_generation_;
|
| +
|
| int always_allocate_scope_depth_;
|
| int linear_allocation_scope_depth_;
|
|
|
| @@ -1372,6 +1408,7 @@
|
| CellSpace* cell_space_;
|
| LargeObjectSpace* lo_space_;
|
| HeapState gc_state_;
|
| + int gc_post_processing_depth_;
|
|
|
| // Returns the amount of external memory registered since last global gc.
|
| int PromotedExternalMemorySize();
|
| @@ -1543,6 +1580,9 @@
|
| // Allocate empty fixed array.
|
| MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray();
|
|
|
| + // Allocate empty fixed double array.
|
| + MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray();
|
| +
|
| // Performs a minor collection in new generation.
|
| void Scavenge();
|
|
|
| @@ -1727,7 +1767,7 @@
|
| int* weak_global_handle_count; // 15
|
| int* pending_global_handle_count; // 16
|
| int* near_death_global_handle_count; // 17
|
| - int* destroyed_global_handle_count; // 18
|
| + int* free_global_handle_count; // 18
|
| intptr_t* memory_allocator_size; // 19
|
| intptr_t* memory_allocator_capacity; // 20
|
| int* objects_per_type; // 21
|
| @@ -1963,6 +2003,7 @@
|
| void Clear();
|
|
|
| static const int kAbsent = -2;
|
| +
|
| private:
|
| DescriptorLookupCache() {
|
| for (int i = 0; i < kLength; ++i) {
|
|
|