Commit ab37324c authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[embed handlers] Avoid jump tables in bytecode handlers

Since jump tables cannot be embedded, prevent their generation for
bytecode handlers. This allows the remaining 7 bytecode handlers to be
marked isolate independent.

Bug: v8:8068
Change-Id: I3a4a6e6530fd1c585558a0d44bd429f572318b57
Reviewed-on: https://chromium-review.googlesource.com/1196509Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55523}
parent 2616df73
...@@ -316,18 +316,6 @@ bool Builtins::IsIsolateIndependent(int index) { ...@@ -316,18 +316,6 @@ bool Builtins::IsIsolateIndependent(int index) {
DCHECK(IsBuiltinId(index)); DCHECK(IsBuiltinId(index));
#ifndef V8_TARGET_ARCH_IA32 #ifndef V8_TARGET_ARCH_IA32
switch (index) { switch (index) {
// The following bytecode handlers do not yet support being embedded as they
// use internal references.
#ifdef V8_EMBEDDED_BYTECODE_HANDLERS
case kInvokeIntrinsicHandler:
case kInvokeIntrinsicWideHandler:
case kInvokeIntrinsicExtraWideHandler:
case kTestInHandler:
case kTestInWideHandler:
case kTestInExtraWideHandler:
case kTestTypeOfHandler:
#endif // V8_EMBEDDED_BYTECODE_HANDLERS
// TODO(jgruber): There's currently two blockers for moving // TODO(jgruber): There's currently two blockers for moving
// InterpreterEntryTrampoline into the binary: // InterpreterEntryTrampoline into the binary:
// 1. InterpreterEnterBytecode calculates a pointer into the middle of // 1. InterpreterEnterBytecode calculates a pointer into the middle of
......
...@@ -61,7 +61,7 @@ OptimizedCompilationInfo::OptimizedCompilationInfo( ...@@ -61,7 +61,7 @@ OptimizedCompilationInfo::OptimizedCompilationInfo(
PassesFilter(debug_name, CStrVector(FLAG_trace_turbo_filter))); PassesFilter(debug_name, CStrVector(FLAG_trace_turbo_filter)));
// Embedded builtins don't support embedded absolute code addresses, so we // Embedded builtins don't support embedded absolute code addresses, so we
// cannot use jump tables. // cannot use jump tables.
if (code_kind != Code::BUILTIN) { if (code_kind != Code::BUILTIN && code_kind != Code::BYTECODE_HANDLER) {
SetFlag(kSwitchJumpTableEnabled); SetFlag(kSwitchJumpTableEnabled);
} }
} }
......
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