Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: src/snapshot.h

Issue 1041743002: Serializer: move to a subfolder and clean up includes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: removed OWNERS Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/serialize.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot.h
diff --git a/src/snapshot.h b/src/snapshot.h
deleted file mode 100644
index dc26a11d46bcb52b4ab6d21e0d085722f1fc14b3..0000000000000000000000000000000000000000
--- a/src/snapshot.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "src/isolate.h"
-#include "src/serialize.h"
-
-#ifndef V8_SNAPSHOT_H_
-#define V8_SNAPSHOT_H_
-
-namespace v8 {
-namespace internal {
-
-class Snapshot : public AllStatic {
- public:
- class Metadata {
- public:
- explicit Metadata(uint32_t data = 0) : data_(data) {}
- bool embeds_script() { return EmbedsScriptBits::decode(data_); }
- void set_embeds_script(bool v) {
- data_ = EmbedsScriptBits::update(data_, v);
- }
-
- uint32_t& RawValue() { return data_; }
-
- private:
- class EmbedsScriptBits : public BitField<bool, 0, 1> {};
- uint32_t data_;
- };
-
- // Initialize the Isolate from the internal snapshot. Returns false if no
- // snapshot could be found.
- static bool Initialize(Isolate* isolate);
- // Create a new context using the internal partial snapshot.
- static MaybeHandle<Context> NewContextFromSnapshot(
- Isolate* isolate, Handle<JSGlobalProxy> global_proxy,
- Handle<FixedArray>* outdated_contexts_out);
-
- static bool HaveASnapshotToStartFrom(Isolate* isolate) {
- // Do not use snapshots if the isolate is used to create snapshots.
- return isolate->snapshot_blob() != NULL;
- }
-
- static bool EmbedsScript(Isolate* isolate);
-
- static uint32_t SizeOfFirstPage(Isolate* isolate, AllocationSpace space);
-
-
- // To be implemented by the snapshot source.
- static const v8::StartupData* DefaultSnapshotBlob();
-
- static v8::StartupData CreateSnapshotBlob(
- const StartupSerializer& startup_ser,
- const PartialSerializer& context_ser, Snapshot::Metadata metadata);
-
-#ifdef DEBUG
- static bool SnapshotIsValid(v8::StartupData* snapshot_blob);
-#endif // DEBUG
-
- private:
- static Vector<const byte> ExtractStartupData(const v8::StartupData* data);
- static Vector<const byte> ExtractContextData(const v8::StartupData* data);
- static Metadata ExtractMetadata(const v8::StartupData* data);
-
- // Snapshot blob layout:
- // [0] metadata
- // [1 - 6] pre-calculated first page sizes for paged spaces
- // [7] serialized start up data length
- // ... serialized start up data
- // ... serialized context data
-
- static const int kNumPagedSpaces = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1;
-
- static const int kMetadataOffset = 0;
- static const int kFirstPageSizesOffset = kMetadataOffset + kInt32Size;
- static const int kStartupLengthOffset =
- kFirstPageSizesOffset + kNumPagedSpaces * kInt32Size;
- static const int kStartupDataOffset = kStartupLengthOffset + kInt32Size;
-
- static int ContextOffset(int startup_length) {
- return kStartupDataOffset + startup_length;
- }
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot);
-};
-
-#ifdef V8_USE_EXTERNAL_STARTUP_DATA
-void SetSnapshotFromFile(StartupData* snapshot_blob);
-#endif
-
-} } // namespace v8::internal
-
-#endif // V8_SNAPSHOT_H_
« no previous file with comments | « src/serialize.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698