Commit 2f9aad53 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[turbofan] Set builtin index from optimized compilation info

Bug: v8:6666
Change-Id: I5940e957452d47edac243898fa7cddf772b54e72
Reviewed-on: https://chromium-review.googlesource.com/1127057
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54327}
parent 44ca9863
......@@ -43,7 +43,8 @@ CodeGenerator::CodeGenerator(
InstructionSequence* code, OptimizedCompilationInfo* info, Isolate* isolate,
base::Optional<OsrHelper> osr_helper, int start_source_position,
JumpOptimizationInfo* jump_opt, WasmCompilationData* wasm_compilation_data,
PoisoningMitigationLevel poisoning_level, const AssemblerOptions& options)
PoisoningMitigationLevel poisoning_level, const AssemblerOptions& options,
int32_t builtin_index)
: zone_(codegen_zone),
isolate_(isolate),
frame_access_state_(nullptr),
......@@ -91,6 +92,7 @@ CodeGenerator::CodeGenerator(
code_kind == Code::WASM_INTERPRETER_ENTRY) {
tasm_.set_trap_on_abort(true);
}
tasm_.set_builtin_index(builtin_index);
}
bool CodeGenerator::wasm_runtime_exception_support() const {
......
......@@ -85,7 +85,8 @@ class CodeGenerator final : public GapResolver::Assembler {
JumpOptimizationInfo* jump_opt,
WasmCompilationData* wasm_compilation_data,
PoisoningMitigationLevel poisoning_level,
const AssemblerOptions& options);
const AssemblerOptions& options,
int32_t builtin_index);
// Generate native code. After calling AssembleCode, call FinalizeCode to
// produce the actual code object. If an error occurs during either phase,
......
......@@ -381,7 +381,7 @@ class PipelineData {
codegen_zone(), frame(), linkage, sequence(), info(), isolate(),
osr_helper_, start_source_position_, jump_optimization_info_,
wasm_compilation_data_, info()->GetPoisoningMitigationLevel(),
assembler_options_);
assembler_options_, info_->builtin_index());
}
void BeginPhaseKind(const char* phase_kind_name) {
......
......@@ -997,7 +997,8 @@ class CodeGeneratorTester {
&info_, environment->main_isolate(), base::Optional<OsrHelper>(),
kNoSourcePosition, nullptr, nullptr,
PoisoningMitigationLevel::kDontPoison,
AssemblerOptions::Default(environment->main_isolate()));
AssemblerOptions::Default(environment->main_isolate()),
Builtins::kNoBuiltinId);
// Force a frame to be created.
generator_->frame_access_state()->MarkHasFrame(true);
......
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