summaryrefslogtreecommitdiff
path: root/deps/v8/src/snapshot/serializer.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/snapshot/serializer.h')
-rw-r--r--deps/v8/src/snapshot/serializer.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/deps/v8/src/snapshot/serializer.h b/deps/v8/src/snapshot/serializer.h
index 1fe607b530..eda25fbd35 100644
--- a/deps/v8/src/snapshot/serializer.h
+++ b/deps/v8/src/snapshot/serializer.h
@@ -44,7 +44,7 @@ class CodeAddressMap : public CodeEventLogger {
NameMap() : impl_() {}
~NameMap() {
- for (base::HashMap::Entry* p = impl_.Start(); p != NULL;
+ for (base::HashMap::Entry* p = impl_.Start(); p != nullptr;
p = impl_.Next(p)) {
DeleteArray(static_cast<const char*>(p->value));
}
@@ -52,19 +52,20 @@ class CodeAddressMap : public CodeEventLogger {
void Insert(Address code_address, const char* name, int name_size) {
base::HashMap::Entry* entry = FindOrCreateEntry(code_address);
- if (entry->value == NULL) {
+ if (entry->value == nullptr) {
entry->value = CopyName(name, name_size);
}
}
const char* Lookup(Address code_address) {
base::HashMap::Entry* entry = FindEntry(code_address);
- return (entry != NULL) ? static_cast<const char*>(entry->value) : NULL;
+ return (entry != nullptr) ? static_cast<const char*>(entry->value)
+ : nullptr;
}
void Remove(Address code_address) {
base::HashMap::Entry* entry = FindEntry(code_address);
- if (entry != NULL) {
+ if (entry != nullptr) {
DeleteArray(static_cast<char*>(entry->value));
RemoveEntry(entry);
}
@@ -73,11 +74,11 @@ class CodeAddressMap : public CodeEventLogger {
void Move(Address from, Address to) {
if (from == to) return;
base::HashMap::Entry* from_entry = FindEntry(from);
- DCHECK(from_entry != NULL);
+ DCHECK_NOT_NULL(from_entry);
void* value = from_entry->value;
RemoveEntry(from_entry);
base::HashMap::Entry* to_entry = FindOrCreateEntry(to);
- DCHECK(to_entry->value == NULL);
+ DCHECK_NULL(to_entry->value);
to_entry->value = value;
}
@@ -193,6 +194,9 @@ class Serializer : public SerializerDeserializer {
HeapObject* obj, HowToCode how_to_code, WhereToPoint where_to_point,
int skip, BuiltinReferenceSerializationMode mode = kDefault);
+ // Returns true if the given heap object is a bytecode handler code object.
+ bool ObjectIsBytecodeHandler(HeapObject* obj) const;
+
inline void FlushSkip(int skip) {
if (skip != 0) {
sink_.Put(kSkip, "SkipFromSerializeObject");
@@ -303,9 +307,8 @@ class Serializer<AllocatorT>::ObjectSerializer : public ObjectVisitor {
void OutputCode(int size);
int SkipTo(Address to);
int32_t SerializeBackingStore(void* backing_store, int32_t byte_length);
- void FixupIfNeutered();
+ void SerializeJSTypedArray();
void SerializeJSArrayBuffer();
- void SerializeFixedTypedArray();
void SerializeExternalString();
void SerializeExternalStringAsSequentialString();