v8
3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
|
#include <stdlib.h>
#include "v8.h"
#include "compilation-cache.h"
#include "execution.h"
#include "factory.h"
#include "macro-assembler.h"
#include "global-handles.h"
#include "stub-cache.h"
#include "cctest.h"
Go to the source code of this file.
Data Structures | |
class | SourceResource |
Macros | |
#define | __ assm. |
Functions | |
TEST (HeapMaps) | |
TEST (HeapObjects) | |
TEST (Tagging) | |
TEST (GarbageCollection) | |
TEST (String) | |
TEST (LocalHandles) | |
TEST (GlobalHandles) | |
TEST (WeakGlobalHandlesScavenge) | |
TEST (WeakGlobalHandlesMark) | |
TEST (DeleteWeakGlobalHandle) | |
TEST (SymbolTable) | |
TEST (FunctionAllocation) | |
TEST (ObjectProperties) | |
TEST (JSObjectMaps) | |
TEST (JSArray) | |
TEST (JSObjectCopy) | |
TEST (StringAllocation) | |
TEST (Iteration) | |
TEST (EmptyHandleEscapeFrom) | |
TEST (Regression39128) | |
TEST (TestCodeFlushing) | |
int | CountNativeContexts () |
TEST (TestInternalWeakLists) | |
TEST (TestInternalWeakListsTraverseWithGC) | |
TEST (TestSizeOfObjects) | |
TEST (TestSizeOfObjectsVsHeapIteratorPrecision) | |
TEST (GrowAndShrinkNewSpace) | |
TEST (CollectingAllAvailableGarbageShrinksNewSpace) | |
TEST (LeakNativeContextViaMap) | |
TEST (LeakNativeContextViaFunction) | |
TEST (LeakNativeContextViaMapKeyed) | |
TEST (LeakNativeContextViaMapProto) | |
TEST (InstanceOfStubWriteBarrier) | |
TEST (PrototypeTransitionClearing) | |
TEST (ResetSharedFunctionInfoCountersDuringIncrementalMarking) | |
TEST (ResetSharedFunctionInfoCountersDuringMarkSweep) | |
TEST (OptimizedAllocationAlwaysInNewSpace) | |
TEST (Regress1465) | |
TEST (Regress2143a) | |
TEST (Regress2143b) | |
void | SimulateFullSpace (PagedSpace *space) |
TEST (ReleaseOverReservedPages) | |
TEST (Regress2237) | |
TEST (Regress2211) | |
TEST (IncrementalMarkingClearsTypeFeedbackCells) | |
TEST (IncrementalMarkingPreservesMonomorhpicIC) | |
TEST (IncrementalMarkingClearsMonomorhpicIC) | |
TEST (IncrementalMarkingClearsPolymorhpicIC) | |
TEST (ReleaseStackTraceData) | |
TEST (Regression144230) | |
#define __ assm. |
int CountNativeContexts | ( | ) |
Definition at line 994 of file test-heap.cc.
References Context::cast(), FixedArray::get(), HEAP, and Context::NEXT_CONTEXT_LINK.
Referenced by TEST().
void SimulateFullSpace | ( | PagedSpace * | space | ) |
Definition at line 38 of file test-alloc.cc.
References PagedSpace::ClearStats(), PagedSpace::Free(), PagedSpace::limit(), PagedSpace::ResetFreeList(), PagedSpace::SetTop(), and PagedSpace::top().
Referenced by TEST().
TEST | ( | HeapMaps | ) |
Definition at line 37 of file test-heap.cc.
References v8::internal::FIXED_ARRAY_TYPE, HEAP, v8::internal::HEAP_NUMBER_TYPE, HeapNumber::kSize, Map::kSize, v8::internal::kVariableSizeSentinel, v8::internal::MAP_TYPE, and v8::internal::STRING_TYPE.
TEST | ( | HeapObjects | ) |
Definition at line 107 of file test-heap.cc.
References Smi::cast(), String::cast(), CHECK, CHECK_EQ, v8::internal::CStrVector(), FACTORY, HEAP, isnan(), Smi::kMaxValue, Smi::kMinValue, and Object::Number().
TEST | ( | Tagging | ) |
Definition at line 183 of file test-heap.cc.
References CHECK, CHECK_EQ, Failure::Exception(), Smi::FromInt(), Smi::kMaxValue, Smi::kMinValue, v8::internal::NEW_SPACE, OBJECT_POINTER_ALIGN, v8::internal::OLD_POINTER_SPACE, and Failure::RetryAfterGC().
TEST | ( | GarbageCollection | ) |
Definition at line 199 of file test-heap.cc.
References JSObject::cast(), JSFunction::cast(), CHECK, CHECK_EQ, FACTORY, Smi::FromInt(), v8::internal::GetProperty(), Object::GetProperty(), HEAP, v8::internal::JS_OBJECT_TYPE, JSObject::kHeaderSize, v8::internal::kNonStrictMode, v8::internal::NEW_SPACE, and NONE.
TEST | ( | String | ) |
Definition at line 277 of file test-heap.cc.
TEST | ( | LocalHandles | ) |
Definition at line 288 of file test-heap.cc.
References CHECK_EQ, v8::internal::CStrVector(), FACTORY, and v8::internal::StrLength().
TEST | ( | GlobalHandles | ) |
Definition at line 298 of file test-heap.cc.
References CHECK, CHECK_EQ, GlobalHandles::Create(), v8::internal::CStrVector(), GlobalHandles::Destroy(), FACTORY, HEAP, Handle< T >::location(), and v8::internal::NEW_SPACE.
TEST | ( | WeakGlobalHandlesScavenge | ) |
Definition at line 346 of file test-heap.cc.
References CHECK, GlobalHandles::Create(), v8::internal::CStrVector(), GlobalHandles::Destroy(), FACTORY, HEAP, GlobalHandles::IsNearDeath(), Handle< T >::location(), and GlobalHandles::MakeWeak().
TEST | ( | WeakGlobalHandlesMark | ) |
Definition at line 384 of file test-heap.cc.
References CHECK, GlobalHandles::Create(), v8::internal::CStrVector(), GlobalHandles::Destroy(), FACTORY, HEAP, GlobalHandles::IsNearDeath(), Handle< T >::location(), GlobalHandles::MakeWeak(), v8::internal::NEW_SPACE, and v8::internal::OLD_POINTER_SPACE.
TEST | ( | DeleteWeakGlobalHandle | ) |
Definition at line 424 of file test-heap.cc.
References CHECK, GlobalHandles::Create(), v8::internal::CStrVector(), FACTORY, HEAP, Handle< T >::location(), GlobalHandles::MakeWeak(), and v8::internal::OLD_POINTER_SPACE.
TEST | ( | SymbolTable | ) |
Definition at line 535 of file test-heap.cc.
TEST | ( | FunctionAllocation | ) |
Definition at line 543 of file test-heap.cc.
References CHECK_EQ, FACTORY, Smi::FromInt(), Object::GetProperty(), v8::internal::JS_OBJECT_TYPE, JSObject::kHeaderSize, v8::internal::kNonStrictMode, and NONE.
TEST | ( | ObjectProperties | ) |
Definition at line 566 of file test-heap.cc.
References JSFunction::cast(), String::cast(), CHECK, v8::internal::CStrVector(), FACTORY, Smi::FromInt(), v8::internal::GetProperty(), HEAP, v8::internal::kNonStrictMode, NONE, JSReceiver::NORMAL_DELETION, v8::internal::s1, and v8::internal::s2.
TEST | ( | JSObjectMaps | ) |
Definition at line 639 of file test-heap.cc.
References CHECK, CHECK_EQ, FACTORY, Smi::FromInt(), v8::internal::JS_OBJECT_TYPE, JSObject::kHeaderSize, v8::internal::kNonStrictMode, and NONE.
TEST | ( | JSArray | ) |
Definition at line 663 of file test-heap.cc.
References Handle< T >::cast(), JSFunction::cast(), CHECK, CHECK_EQ, FACTORY, Smi::FromInt(), v8::internal::GetProperty(), Smi::kMaxValue, v8::internal::kNonStrictMode, and NONE.
TEST | ( | JSObjectCopy | ) |
Definition at line 710 of file test-heap.cc.
References JSFunction::cast(), String::cast(), CHECK, CHECK_EQ, v8::internal::Copy(), FACTORY, Smi::FromInt(), v8::internal::GetProperty(), HEAP, Handle< T >::is_identical_to(), v8::internal::kNonStrictMode, and NONE.
TEST | ( | StringAllocation | ) |
Definition at line 758 of file test-heap.cc.
References CHECK_EQ, v8::internal::DeleteArray(), and FACTORY.
TEST | ( | Iteration | ) |
Definition at line 810 of file test-heap.cc.
References HeapObject::cast(), CHECK_EQ, v8::internal::CStrVector(), FACTORY, v8::internal::FAST_HOLEY_ELEMENTS, Page::kMaxNonCodeHeapObjectSize, HeapObject::map(), and v8::internal::TENURED.
TEST | ( | EmptyHandleEscapeFrom | ) |
Definition at line 848 of file test-heap.cc.
References CHECK, Handle< T >::EscapeFrom(), and Handle< T >::is_null().
TEST | ( | Regression39128 | ) |
Definition at line 869 of file test-heap.cc.
References HeapObject::address(), NewSpace::allocation_limit_address(), NewSpace::allocation_top_address(), JSObject::cast(), FixedArray::cast(), CHECK, CHECK_EQ, CHECK_GT, NewSpace::Contains(), FACTORY, HEAP, FixedArray::kMaxLength, FixedArray::kMaxSize, Heap::kNoGCFlags, and v8::internal::Min().
TEST | ( | TestCodeFlushing | ) |
Definition at line 944 of file test-heap.cc.
References JSFunction::cast(), CHECK, FACTORY, v8::internal::GetProperty(), HEAP, and Heap::kAbortIncrementalMarkingMask.
TEST | ( | TestInternalWeakLists | ) |
Definition at line 1019 of file test-heap.cc.
References CHECK_EQ, Handle< T >::Clear(), CountNativeContexts(), Persistent< T >::Dispose(), HEAP, V8::Initialize(), ISOLATE, Heap::kNoGCFlags, Context::New(), and V8::UseCrankshaft().
TEST | ( | TestInternalWeakListsTraverseWithGC | ) |
Definition at line 1150 of file test-heap.cc.
References CHECK_EQ, CountNativeContexts(), V8::Initialize(), Context::New(), and V8::UseCrankshaft().
TEST | ( | TestSizeOfObjects | ) |
Definition at line 1200 of file test-heap.cc.
References CHECK, CHECK_EQ, HEAP, V8::Initialize(), v8::internal::KB, Heap::kNoGCFlags, FixedArray::SizeFor(), and v8::internal::TENURED.
TEST | ( | TestSizeOfObjectsVsHeapIteratorPrecision | ) |
Definition at line 1241 of file test-heap.cc.
References CHECK_GT, HEAP, v8::internal::NULL, v8::internal::PrintF(), and V8_PTR_PREFIX.
TEST | ( | GrowAndShrinkNewSpace | ) |
Definition at line 1289 of file test-heap.cc.
References NewSpace::Capacity(), CHECK, CHECK_LE, NewSpace::Grow(), HEAP, v8::internal::NEW_SPACE, NewSpace::Shrink(), and NewSpace::Size().
TEST | ( | CollectingAllAvailableGarbageShrinksNewSpace | ) |
Definition at line 1339 of file test-heap.cc.
References NewSpace::Capacity(), CHECK, NewSpace::Grow(), and HEAP.
TEST | ( | LeakNativeContextViaMap | ) |
Definition at line 1376 of file test-heap.cc.
References CHECK_EQ, V8::ContextDisposedNotification(), Persistent< T >::Dispose(), HEAP, Value::Int32Value(), Integer::New(), and Context::New().
TEST | ( | LeakNativeContextViaFunction | ) |
Definition at line 1414 of file test-heap.cc.
References CHECK_EQ, V8::ContextDisposedNotification(), Persistent< T >::Dispose(), HEAP, Value::Int32Value(), Integer::New(), and Context::New().
TEST | ( | LeakNativeContextViaMapKeyed | ) |
Definition at line 1450 of file test-heap.cc.
References CHECK_EQ, V8::ContextDisposedNotification(), Persistent< T >::Dispose(), HEAP, Value::Int32Value(), Integer::New(), and Context::New().
TEST | ( | LeakNativeContextViaMapProto | ) |
Definition at line 1486 of file test-heap.cc.
References CHECK_EQ, V8::ContextDisposedNotification(), Persistent< T >::Dispose(), HEAP, Value::Int32Value(), Integer::New(), and Context::New().
TEST | ( | InstanceOfStubWriteBarrier | ) |
Definition at line 1526 of file test-heap.cc.
References IncrementalMarking::Abort(), Function::Call(), Handle< T >::Cast(), CHECK, Object::Get(), Context::GetCurrent(), HEAP, Marking::IsBlack(), IncrementalMarking::IsStopped(), Marking::MarkBitFrom(), v8::internal::MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD, v8::internal::NULL, v8::internal::OLD_POINTER_SPACE, IncrementalMarking::Start(), IncrementalMarking::Step(), and V8::UseCrankshaft().
TEST | ( | PrototypeTransitionClearing | ) |
Definition at line 1581 of file test-heap.cc.
References HeapObject::address(), CHECK, CHECK_EQ, MemoryChunk::Contains(), FACTORY, v8::internal::FAST_HOLEY_ELEMENTS, PagedSpace::FirstPage(), Context::GetCurrent(), Map::GetPrototypeTransition(), Map::GetPrototypeTransitions(), HEAP, v8::internal::KB, Heap::kNoGCFlags, Map::kProtoTransitionElementsPerEntry, Map::kProtoTransitionHeaderSize, Map::kProtoTransitionMapOffset, Map::kProtoTransitionPrototypeOffset, PagedSpace::LastPage(), and v8::internal::TENURED.
TEST | ( | ResetSharedFunctionInfoCountersDuringIncrementalMarking | ) |
Definition at line 1638 of file test-heap.cc.
References CHECK, CHECK_EQ, V8::ContextDisposedNotification(), Context::GetCurrent(), HEAP, V8::IdleNotification(), Heap::kNoGCFlags, v8::internal::MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD, and V8::UseCrankshaft().
TEST | ( | ResetSharedFunctionInfoCountersDuringMarkSweep | ) |
Definition at line 1694 of file test-heap.cc.
References CHECK, CHECK_EQ, V8::ContextDisposedNotification(), Context::GetCurrent(), HEAP, V8::IdleNotification(), and V8::UseCrankshaft().
TEST | ( | OptimizedAllocationAlwaysInNewSpace | ) |
Definition at line 1737 of file test-heap.cc.
References CHECK, CHECK_EQ, HEAP, Value::ToObject(), and V8::UseCrankshaft().
TEST | ( | Regress1465 | ) |
Definition at line 1785 of file test-heap.cc.
References CHECK_EQ, Context::GetCurrent(), HEAP, Heap::kNoGCFlags, OS::SNPrintF(), and Vector< T >::start().
TEST | ( | Regress2143a | ) |
Definition at line 1823 of file test-heap.cc.
References CHECK, Context::GetCurrent(), HEAP, and Heap::kNoGCFlags.
TEST | ( | Regress2143b | ) |
Definition at line 1863 of file test-heap.cc.
References CHECK, Context::GetCurrent(), HEAP, and Heap::kNoGCFlags.
TEST | ( | ReleaseOverReservedPages | ) |
Definition at line 1911 of file test-heap.cc.
References CHECK_EQ, CHECK_GE, PagedSpace::CountTotalPages(), FACTORY, HEAP, Heap::kNoGCFlags, SimulateFullSpace(), and v8::internal::TENURED.
TEST | ( | Regress2237 | ) |
Definition at line 1954 of file test-heap.cc.
References SlicedString::cast(), CHECK, v8::internal::CStrVector(), FACTORY, HEAP, Heap::kNoGCFlags, Handle< T >::location(), and SlicedString::parent().
TEST | ( | Regress2211 | ) |
Definition at line 2006 of file test-heap.cc.
References v8::internal::ALLOW_CREATION, ObjectHashTable::cast(), CHECK, CHECK_EQ, CHECK_LE, Value::Equals(), Smi::FromInt(), DescriptorArray::GetFieldIndex(), Object::GetHiddenValue(), v8::internal::kPointerSize, FixedArrayBase::length(), Object::New(), Object::SetHiddenValue(), and FixedArray::SizeFor().
TEST | ( | IncrementalMarkingClearsTypeFeedbackCells | ) |
Definition at line 2043 of file test-heap.cc.
References TypeFeedbackInfo::cast(), CHECK, CHECK_EQ, Context::GetCurrent(), Context::Global(), HEAP, and Heap::kNoGCFlags.
TEST | ( | IncrementalMarkingPreservesMonomorhpicIC | ) |
Definition at line 2102 of file test-heap.cc.
References CHECK, Context::GetCurrent(), HEAP, Code::ic_state(), Heap::kNoGCFlags, and v8::internal::MONOMORPHIC.
TEST | ( | IncrementalMarkingClearsMonomorhpicIC | ) |
Definition at line 2127 of file test-heap.cc.
References CHECK, V8::ContextDisposedNotification(), Context::GetCurrent(), Context::Global(), HEAP, Code::ic_state(), Heap::kNoGCFlags, v8::internal::MONOMORPHIC, and v8::internal::UNINITIALIZED.
TEST | ( | IncrementalMarkingClearsPolymorhpicIC | ) |
Definition at line 2161 of file test-heap.cc.
References CHECK, V8::ContextDisposedNotification(), Context::GetCurrent(), Context::Global(), HEAP, Code::ic_state(), Heap::kNoGCFlags, v8::internal::MEGAMORPHIC, and v8::internal::UNINITIALIZED.
TEST | ( | ReleaseStackTraceData | ) |
Definition at line 2224 of file test-heap.cc.
References CHECK, Script::Compile(), HEAP, SourceResource::IsDisposed(), String::NewExternal(), and v8::internal::StrDup().
TEST | ( | Regression144230 | ) |
Definition at line 2257 of file test-heap.cc.
References JSFunction::cast(), JSFunction::code(), FACTORY, Smi::FromInt(), HEAP, ISOLATE, Heap::kNoGCFlags, v8::internal::kNonStrictMode, Heap::kReduceMemoryFootprintMask, NONE, SimulateFullSpace(), and v8::internal::USE().