![]() |
v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <stdlib.h>
#include "v8.h"
#include "execution.h"
#include "factory.h"
#include "macro-assembler.h"
#include "global-handles.h"
#include "cctest.h"
Go to the source code of this file.
Macros | |
#define | __ assm. |
#define | TRANSITION_COUNT 256 |
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) | |
TEST (TestInternalWeakLists) | |
TEST (TestInternalWeakListsTraverseWithGC) | |
TEST (TestSizeOfObjects) | |
TEST (TestSizeOfObjectsVsHeapIteratorPrecision) | |
TEST (GrowAndShrinkNewSpace) | |
TEST (CollectingAllAvailableGarbageShrinksNewSpace) | |
TEST (LeakGlobalContextViaMap) | |
TEST (LeakGlobalContextViaFunction) | |
TEST (LeakGlobalContextViaMapKeyed) | |
TEST (LeakGlobalContextViaMapProto) | |
TEST (InstanceOfStubWriteBarrier) | |
TEST (PrototypeTransitionClearing) | |
TEST (ResetSharedFunctionInfoCountersDuringIncrementalMarking) | |
TEST (ResetSharedFunctionInfoCountersDuringMarkSweep) | |
TEST (OptimizedAllocationAlwaysInNewSpace) | |
TEST (Regress1465) | |
TEST (Regress2143a) | |
TEST (Regress2143b) | |
#define __ assm. |
#define TRANSITION_COUNT 256 |
Referenced by TEST().
TEST | ( | HeapMaps | ) |
Definition at line 35 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 105 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 180 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 196 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 272 of file test-heap.cc.
TEST | ( | LocalHandles | ) |
Definition at line 283 of file test-heap.cc.
References CHECK_EQ, v8::internal::CStrVector(), FACTORY, and v8::internal::StrLength().
TEST | ( | GlobalHandles | ) |
Definition at line 293 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 341 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 379 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 418 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 528 of file test-heap.cc.
TEST | ( | FunctionAllocation | ) |
Definition at line 536 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 559 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 632 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 656 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 703 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 751 of file test-heap.cc.
References CHECK_EQ, v8::internal::DeleteArray(), and FACTORY.
TEST | ( | Iteration | ) |
Definition at line 803 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 841 of file test-heap.cc.
References CHECK, Handle< T >::EscapeFrom(), and Handle< T >::is_null().
TEST | ( | Regression39128 | ) |
Definition at line 862 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 937 of file test-heap.cc.
References JSFunction::cast(), CHECK, FACTORY, v8::internal::GetProperty(), HEAP, and Heap::kAbortIncrementalMarkingMask.
TEST | ( | TestInternalWeakLists | ) |
Definition at line 1012 of file test-heap.cc.
References CHECK_EQ, Handle< T >::Clear(), Persistent< T >::Dispose(), HEAP, V8::Initialize(), Heap::kNoGCFlags, Context::New(), and V8::UseCrankshaft().
TEST | ( | TestInternalWeakListsTraverseWithGC | ) |
Definition at line 1142 of file test-heap.cc.
References CHECK_EQ, V8::Initialize(), Context::New(), and V8::UseCrankshaft().
TEST | ( | TestSizeOfObjects | ) |
Definition at line 1192 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 1232 of file test-heap.cc.
References CHECK_GT, HEAP, v8::internal::NULL, v8::internal::PrintF(), and V8_PTR_PREFIX.
TEST | ( | GrowAndShrinkNewSpace | ) |
Definition at line 1278 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 1327 of file test-heap.cc.
References NewSpace::Capacity(), CHECK, NewSpace::Grow(), and HEAP.
TEST | ( | LeakGlobalContextViaMap | ) |
Definition at line 1363 of file test-heap.cc.
References CHECK_EQ, Persistent< T >::Dispose(), HEAP, Value::Int32Value(), Integer::New(), and Context::New().
TEST | ( | LeakGlobalContextViaFunction | ) |
Definition at line 1400 of file test-heap.cc.
References CHECK_EQ, Persistent< T >::Dispose(), HEAP, Value::Int32Value(), Integer::New(), and Context::New().
TEST | ( | LeakGlobalContextViaMapKeyed | ) |
Definition at line 1435 of file test-heap.cc.
References CHECK_EQ, Persistent< T >::Dispose(), HEAP, Value::Int32Value(), Integer::New(), and Context::New().
TEST | ( | LeakGlobalContextViaMapProto | ) |
Definition at line 1470 of file test-heap.cc.
References CHECK_EQ, Persistent< T >::Dispose(), HEAP, Value::Int32Value(), Integer::New(), and Context::New().
TEST | ( | InstanceOfStubWriteBarrier | ) |
Definition at line 1509 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, Utils::OpenHandle(), IncrementalMarking::Start(), IncrementalMarking::Step(), and V8::UseCrankshaft().
TEST | ( | PrototypeTransitionClearing | ) |
Definition at line 1563 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(), HEAP, v8::internal::KB, Heap::kNoGCFlags, Map::kProtoTransitionElementsPerEntry, Map::kProtoTransitionHeaderSize, Map::kProtoTransitionMapOffset, Map::kProtoTransitionPrototypeOffset, PagedSpace::LastPage(), Utils::OpenHandle(), and v8::internal::TENURED.
TEST | ( | ResetSharedFunctionInfoCountersDuringIncrementalMarking | ) |
Definition at line 1622 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, Utils::OpenHandle(), and V8::UseCrankshaft().
TEST | ( | ResetSharedFunctionInfoCountersDuringMarkSweep | ) |
Definition at line 1677 of file test-heap.cc.
References CHECK, CHECK_EQ, V8::ContextDisposedNotification(), Context::GetCurrent(), HEAP, V8::IdleNotification(), Utils::OpenHandle(), and V8::UseCrankshaft().
TEST | ( | OptimizedAllocationAlwaysInNewSpace | ) |
Definition at line 1719 of file test-heap.cc.
References CHECK, CHECK_EQ, HEAP, Utils::OpenHandle(), Value::ToObject(), and V8::UseCrankshaft().
TEST | ( | Regress1465 | ) |
Definition at line 1761 of file test-heap.cc.
References CHECK, CHECK_EQ, Context::GetCurrent(), HEAP, IncrementalMarking::IsComplete(), IncrementalMarking::IsStopped(), Heap::kNoGCFlags, v8::internal::MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD, Utils::OpenHandle(), OS::SNPrintF(), IncrementalMarking::Start(), Vector< T >::start(), IncrementalMarking::Step(), and TRANSITION_COUNT.
TEST | ( | Regress2143a | ) |
Definition at line 1804 of file test-heap.cc.
References CHECK, Context::GetCurrent(), HEAP, IncrementalMarking::IsComplete(), IncrementalMarking::IsStopped(), Heap::kNoGCFlags, v8::internal::MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD, Utils::OpenHandle(), IncrementalMarking::Start(), and IncrementalMarking::Step().
TEST | ( | Regress2143b | ) |
Definition at line 1853 of file test-heap.cc.
References CHECK, Context::GetCurrent(), HEAP, IncrementalMarking::IsComplete(), IncrementalMarking::IsStopped(), Heap::kNoGCFlags, v8::internal::MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD, Utils::OpenHandle(), IncrementalMarking::Start(), and IncrementalMarking::Step().