Commit 6165355e authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[interpreter] Use builtin names for bytecode handlers

... to make them unique. With this fix the --trace-turbo no longer
overwrites bytecode handler graphs and --trace-turbo-filter allows
to select exact bytecode handler version.

Bug: v8:9396
Change-Id: I260edc8872e320aadd5d70aa95cf5bf2cd24b22f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1792904
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63620}
parent 3041f170
......@@ -264,13 +264,12 @@ void SetupIsolateDelegate::ReplacePlaceholders(Isolate* isolate) {
namespace {
Code GenerateBytecodeHandler(Isolate* isolate, int builtin_index,
const char* name,
interpreter::OperandScale operand_scale,
interpreter::Bytecode bytecode) {
DCHECK(interpreter::Bytecodes::BytecodeHasHandler(bytecode, operand_scale));
Handle<Code> code = interpreter::GenerateBytecodeHandler(
isolate, bytecode, operand_scale, builtin_index,
BuiltinAssemblerOptions(isolate, builtin_index));
isolate, Builtins::name(builtin_index), bytecode, operand_scale,
builtin_index, BuiltinAssemblerOptions(isolate, builtin_index));
return *code;
}
......@@ -314,9 +313,8 @@ void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) {
CallDescriptors::InterfaceDescriptor, #Name); \
AddBuiltin(builtins, index++, code);
#define BUILD_BCH(Name, OperandScale, Bytecode) \
code = GenerateBytecodeHandler(isolate, index, Builtins::name(index), \
OperandScale, Bytecode); \
#define BUILD_BCH(Name, OperandScale, Bytecode) \
code = GenerateBytecodeHandler(isolate, index, OperandScale, Bytecode); \
AddBuiltin(builtins, index++, code);
#define BUILD_ASM(Name, InterfaceDescriptor) \
......
......@@ -3351,14 +3351,15 @@ IGNITION_HANDLER(ResumeGenerator, InterpreterAssembler) {
} // namespace
Handle<Code> GenerateBytecodeHandler(Isolate* isolate, Bytecode bytecode,
Handle<Code> GenerateBytecodeHandler(Isolate* isolate, const char* debug_name,
Bytecode bytecode,
OperandScale operand_scale,
int builtin_index,
const AssemblerOptions& options) {
Zone zone(isolate->allocator(), ZONE_NAME);
compiler::CodeAssemblerState state(
isolate, &zone, InterpreterDispatchDescriptor{}, Code::BYTECODE_HANDLER,
Bytecodes::ToString(bytecode),
debug_name,
FLAG_untrusted_code_mitigations
? PoisoningMitigationLevel::kPoisonCriticalOnly
: PoisoningMitigationLevel::kDontPoison,
......
......@@ -15,7 +15,9 @@ struct AssemblerOptions;
namespace interpreter {
extern Handle<Code> GenerateBytecodeHandler(Isolate* isolate, Bytecode bytecode,
extern Handle<Code> GenerateBytecodeHandler(Isolate* isolate,
const char* debug_name,
Bytecode bytecode,
OperandScale operand_scale,
int builtin_index,
const AssemblerOptions& options);
......
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