Reviewers: Yang,
Description:
Add a PLACEHOLDER code kind.
The PLACEHOLDER code kind is used when compiling a code object that has
direct calls to other code objects, but those other code objects do not
yet exist because they have not yet been compiled. It serves as a
placeholder to break the cycle, e.g. in WASM.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/1308393003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+8, -1 lines):
M src/log.cc
M src/objects.h
M src/snapshot/serialize.cc
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index
2bf27da14db92f3046c0edd9a0c80f68f18b02df..0e932cfadd37c01416263e0e78dc90336641b270
100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -1643,6 +1643,10 @@ void Logger::LogCodeObject(Object* object) {
description = "A keyed store IC from the snapshot";
tag = Logger::KEYED_STORE_IC_TAG;
break;
+ case Code::PLACEHOLDER:
+ description = "A placeholder for linking later code";
+ tag = Logger::STUB_TAG;
+ break;
case Code::NUMBER_OF_KINDS:
break;
}
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index
4fe42cdc81c6c0aa30317c96daf47d843bc54faa..bd05ae3df298edb12b46404b0181a200b0cef41c
100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4461,7 +4461,8 @@ class Code: public HeapObject {
V(STUB) \
V(HANDLER) \
V(BUILTIN) \
- V(REGEXP)
+ V(REGEXP) \
+ V(PLACEHOLDER)
#define IC_KIND_LIST(V) \
V(LOAD_IC) \
Index: src/snapshot/serialize.cc
diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc
index
0e672760b6848136e03a1adccae32de0455aec38..9097dba2cc23385fd66662c07589e9aa3dbdd78a
100644
--- a/src/snapshot/serialize.cc
+++ b/src/snapshot/serialize.cc
@@ -2478,6 +2478,8 @@ void CodeSerializer::SerializeObject(HeapObject* obj,
HowToCode how_to_code,
SerializeGeneric(code_object, how_to_code, where_to_point);
}
return;
+ case Code::PLACEHOLDER:
+ UNREACHABLE();
}
UNREACHABLE();
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.