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

Unified Diff: src/serialize.h

Issue 917583004: Reduce the number of #includes of compiler.h. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/ia32/assembler-ia32.h ('k') | src/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.h
diff --git a/src/serialize.h b/src/serialize.h
index 2b7f2ade9d79f6bbd02444feb0a40b4424cd4cec..ede57df5cc05d2015eb0b321199f33186851fdee 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -5,7 +5,6 @@
#ifndef V8_SERIALIZE_H_
#define V8_SERIALIZE_H_
-#include "src/compiler.h"
#include "src/hashmap.h"
#include "src/heap-profiler.h"
#include "src/isolate.h"
@@ -14,6 +13,8 @@
namespace v8 {
namespace internal {
+class ScriptData;
+
// A TypeCode is used to distinguish different kinds of external reference.
// It is a single bit to make testing for types easy.
enum TypeCode {
@@ -931,14 +932,7 @@ class SerializedCodeData : public SerializedData {
public:
// Used when consuming.
static SerializedCodeData* FromCachedData(ScriptData* cached_data,
- String* source) {
- DisallowHeapAllocation no_gc;
- SerializedCodeData* scd = new SerializedCodeData(cached_data);
- if (scd->IsSane(source)) return scd;
- cached_data->Reject();
- delete scd;
- return NULL;
- }
+ String* source);
// Used when producing.
SerializedCodeData(const List<byte>& payload, const CodeSerializer& cs);
@@ -953,8 +947,7 @@ class SerializedCodeData : public SerializedData {
Vector<const uint32_t> CodeStubKeys() const;
private:
- explicit SerializedCodeData(ScriptData* data)
- : SerializedData(const_cast<byte*>(data->data()), data->length()) {}
+ explicit SerializedCodeData(ScriptData* data);
bool IsSane(String* source) const;
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698