Commit e4bcc336 authored by titzer's avatar titzer Committed by Commit bot

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.

R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1308393003

Cr-Commit-Position: refs/heads/master@{#30348}
parent bf6764e6
...@@ -1643,6 +1643,10 @@ void Logger::LogCodeObject(Object* object) { ...@@ -1643,6 +1643,10 @@ void Logger::LogCodeObject(Object* object) {
description = "A keyed store IC from the snapshot"; description = "A keyed store IC from the snapshot";
tag = Logger::KEYED_STORE_IC_TAG; tag = Logger::KEYED_STORE_IC_TAG;
break; break;
case Code::PLACEHOLDER:
description = "A placeholder for linking later code";
tag = Logger::STUB_TAG;
break;
case Code::NUMBER_OF_KINDS: case Code::NUMBER_OF_KINDS:
break; break;
} }
......
...@@ -4461,7 +4461,8 @@ class Code: public HeapObject { ...@@ -4461,7 +4461,8 @@ class Code: public HeapObject {
V(STUB) \ V(STUB) \
V(HANDLER) \ V(HANDLER) \
V(BUILTIN) \ V(BUILTIN) \
V(REGEXP) V(REGEXP) \
V(PLACEHOLDER)
#define IC_KIND_LIST(V) \ #define IC_KIND_LIST(V) \
V(LOAD_IC) \ V(LOAD_IC) \
......
...@@ -2478,6 +2478,8 @@ void CodeSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code, ...@@ -2478,6 +2478,8 @@ void CodeSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
SerializeGeneric(code_object, how_to_code, where_to_point); SerializeGeneric(code_object, how_to_code, where_to_point);
} }
return; return;
case Code::PLACEHOLDER:
UNREACHABLE();
} }
UNREACHABLE(); UNREACHABLE();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment