Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 16676202cf08b02c1dd65011a4c4e774ab3b7e3d..8d71a8333cd2d00e814881ea6ada4bd8fb5345b6 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -4890,6 +4890,16 @@ bool Code::IsCodeStubOrIC() { |
} |
+bool Code::IsJavaScriptCode() { |
+ if (kind() == FUNCTION || kind() == OPTIMIZED_FUNCTION) { |
+ return true; |
+ } |
+ Handle<Code> interpreter_entry = |
+ GetIsolate()->builtins()->InterpreterEntryTrampoline(); |
+ return interpreter_entry.location() != nullptr && *interpreter_entry == this; |
+} |
+ |
+ |
InlineCacheState Code::ic_state() { |
InlineCacheState result = ExtractICStateFromFlags(flags()); |
// Only allow uninitialized or debugger states for non-IC code |