v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <signal.h>
#include "sys/stat.h"
#include "v8.h"
#include "debug.h"
#include "ic-inl.h"
#include "runtime.h"
#include "serialize.h"
#include "scopeinfo.h"
#include "snapshot.h"
#include "cctest.h"
#include "spaces.h"
#include "objects.h"
#include "natives.h"
#include "bootstrapper.h"
Go to the source code of this file.
Data Structures | |
class | FileByteSink |
Functions | |
TEST (ExternalReferenceEncoder) | |
TEST (ExternalReferenceDecoder) | |
TEST (Serialize) | |
TEST (SerializeTwice) | |
DEPENDENT_TEST (Deserialize, Serialize) | |
DEPENDENT_TEST (DeserializeFromSecondSerialization, SerializeTwice) | |
DEPENDENT_TEST (DeserializeAndRunScript2, Serialize) | |
DEPENDENT_TEST (DeserializeFromSecondSerializationAndRunScript2, SerializeTwice) | |
TEST (PartialSerialization) | |
DEPENDENT_TEST (PartialDeserialization, PartialSerialization) | |
TEST (ContextSerialization) | |
DEPENDENT_TEST (ContextDeserialization, ContextSerialization) | |
TEST (TestThatAlwaysSucceeds) | |
TEST (TestThatAlwaysFails) | |
DEPENDENT_TEST (DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) | |
DEPENDENT_TEST | ( | Deserialize | , |
Serialize | |||
) |
Definition at line 309 of file test-serialize.cc.
References Context::Enter(), Snapshot::HaveASnapshotToStartFrom(), CcTest::isolate(), and Context::New().
DEPENDENT_TEST | ( | DeserializeFromSecondSerialization | , |
SerializeTwice | |||
) |
Definition at line 326 of file test-serialize.cc.
References Context::Enter(), Snapshot::HaveASnapshotToStartFrom(), CcTest::isolate(), and Context::New().
DEPENDENT_TEST | ( | DeserializeAndRunScript2 | , |
Serialize | |||
) |
Definition at line 340 of file test-serialize.cc.
References CHECK_EQ, Script::Compile(), Context::Enter(), Snapshot::HaveASnapshotToStartFrom(), CcTest::isolate(), Context::New(), String::NewFromUtf8(), and Script::Run().
DEPENDENT_TEST | ( | DeserializeFromSecondSerializationAndRunScript2 | , |
SerializeTwice | |||
) |
Definition at line 357 of file test-serialize.cc.
References CHECK_EQ, Script::Compile(), Context::Enter(), Snapshot::HaveASnapshotToStartFrom(), CcTest::isolate(), Context::New(), String::NewFromUtf8(), and Script::Run().
DEPENDENT_TEST | ( | PartialDeserialization | , |
PartialSerialization | |||
) |
Definition at line 486 of file test-serialize.cc.
References CHECK, Deserializer::DeserializePartial(), Vector< T >::Dispose(), CcTest::i_isolate(), Snapshot::Initialize(), Snapshot::IsEnabled(), Vector< T >::New(), v8::internal::ReadBytes(), OS::SNPrintF(), Vector< T >::start(), and v8::internal::StrLength().
DEPENDENT_TEST | ( | ContextDeserialization | , |
ContextSerialization | |||
) |
Definition at line 598 of file test-serialize.cc.
References CHECK, Deserializer::DeserializePartial(), Vector< T >::Dispose(), Snapshot::HaveASnapshotToStartFrom(), CcTest::i_isolate(), Snapshot::Initialize(), Vector< T >::New(), v8::internal::ReadBytes(), OS::SNPrintF(), Vector< T >::start(), and v8::internal::StrLength().
DEPENDENT_TEST | ( | DependentTestThatAlwaysFails | , |
TestThatAlwaysSucceeds | |||
) |
Definition at line 648 of file test-serialize.cc.
References CHECK.
TEST | ( | ExternalReferenceEncoder | ) |
Definition at line 102 of file test-serialize.cc.
References v8::internal::BUILTIN, CHECK_EQ, Isolate::counters(), ExternalReferenceEncoder::Encode(), CcTest::i_isolate(), V8::Initialize(), v8::internal::kArrayCode, v8::internal::RUNTIME_FUNCTION, StatsTable::SetCounterFunction(), v8::internal::STATS_COUNTER, Isolate::stats_table(), and v8::internal::UNCLASSIFIED.
TEST | ( | ExternalReferenceDecoder | ) |
Definition at line 139 of file test-serialize.cc.
References v8::internal::BUILTIN, CHECK_EQ, Isolate::counters(), ExternalReferenceDecoder::Decode(), CcTest::i_isolate(), V8::Initialize(), v8::internal::kArrayCode, v8::internal::RUNTIME_FUNCTION, StatsTable::SetCounterFunction(), v8::internal::STATS_COUNTER, Isolate::stats_table(), and v8::internal::UNCLASSIFIED.
TEST | ( | Serialize | ) |
Definition at line 267 of file test-serialize.cc.
References Serializer::Enable(), Snapshot::HaveASnapshotToStartFrom(), CcTest::i_isolate(), and V8::Initialize().
TEST | ( | SerializeTwice | ) |
Definition at line 277 of file test-serialize.cc.
References Serializer::Enable(), Snapshot::HaveASnapshotToStartFrom(), CcTest::i_isolate(), and V8::Initialize().
TEST | ( | PartialSerialization | ) |
Definition at line 375 of file test-serialize.cc.
References ASSERT, Isolate::bootstrapper(), v8::internal::CELL_SPACE, v8::internal::CODE_SPACE, Heap::CollectAllGarbage(), Serializer::CurrentAllocationAddress(), Vector< T >::Dispose(), Serializer::Enable(), foo, NativesCollection< type >::GetBuiltinsCount(), Snapshot::HaveASnapshotToStartFrom(), Isolate::heap(), CcTest::i_isolate(), V8::Initialize(), Handle< T >::IsEmpty(), PersistentBase< T >::IsEmpty(), Heap::kNoGCFlags, v8::internal::MAP_SPACE, Bootstrapper::NativesSourceLookup(), Local< T >::New(), Vector< T >::New(), Context::New(), v8::internal::NEW_SPACE, String::NewFromUtf8(), v8::internal::OLD_DATA_SPACE, v8::internal::OLD_POINTER_SPACE, Utils::OpenHandle(), v8::internal::PROPERTY_CELL_SPACE, PersistentBase< T >::Reset(), PartialSerializer::Serialize(), OS::SNPrintF(), Vector< T >::start(), v8::internal::StrLength(), and FileByteSink::WriteSpaceUsed().
TEST | ( | ContextSerialization | ) |
Definition at line 526 of file test-serialize.cc.
References ASSERT, Isolate::bootstrapper(), v8::internal::CELL_SPACE, v8::internal::CODE_SPACE, Heap::CollectAllGarbage(), Serializer::CurrentAllocationAddress(), Vector< T >::Dispose(), Serializer::Enable(), NativesCollection< type >::GetBuiltinsCount(), Snapshot::HaveASnapshotToStartFrom(), Isolate::heap(), CcTest::i_isolate(), V8::Initialize(), PersistentBase< T >::IsEmpty(), Heap::kNoGCFlags, v8::internal::MAP_SPACE, Bootstrapper::NativesSourceLookup(), Local< T >::New(), Vector< T >::New(), Context::New(), v8::internal::NEW_SPACE, v8::internal::OLD_DATA_SPACE, v8::internal::OLD_POINTER_SPACE, Utils::OpenPersistent(), v8::internal::PROPERTY_CELL_SPACE, PersistentBase< T >::Reset(), PartialSerializer::Serialize(), OS::SNPrintF(), Vector< T >::start(), v8::internal::StrLength(), and FileByteSink::WriteSpaceUsed().
TEST | ( | TestThatAlwaysSucceeds | ) |
Definition at line 638 of file test-serialize.cc.
TEST | ( | TestThatAlwaysFails | ) |
Definition at line 642 of file test-serialize.cc.
References CHECK.