Commit 8f61fbc6 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[compiler] Don't create a handle for a builtin.

Bug: v8:6048
Change-Id: I1fbea87f6b7cb48c8f57532238475f2c17c863fb
Reviewed-on: https://chromium-review.googlesource.com/519267Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45627}
parent 2bed5a29
......@@ -91,6 +91,10 @@ Handle<Code> Builtins::OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint) {
UNREACHABLE();
}
Handle<Code> Builtins::builtin_handle(Name name) {
return Handle<Code>(reinterpret_cast<Code**>(builtin_address(name)));
}
// static
int Builtins::GetBuiltinParameterCount(Name name) {
switch (name) {
......
......@@ -76,6 +76,8 @@ class Builtins {
return reinterpret_cast<Address>(&builtins_[name]);
}
Handle<Code> builtin_handle(Name name);
static int GetBuiltinParameterCount(Name name);
static Callable CallableFor(Isolate* isolate, Name name);
......
......@@ -2672,7 +2672,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
__ Ret();
} else {
gen_->AssembleSourcePosition(instr_);
__ Call(handle(isolate()->builtins()->builtin(trap_id), isolate()),
__ Call(isolate()->builtins()->builtin_handle(trap_id),
RelocInfo::CODE_TARGET);
ReferenceMap* reference_map =
new (gen_->zone()) ReferenceMap(gen_->zone());
......
......@@ -1848,7 +1848,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
// Initialize the jssp because it is required for the runtime call.
__ Mov(jssp, csp);
gen_->AssembleSourcePosition(instr_);
__ Call(handle(isolate()->builtins()->builtin(trap_id), isolate()),
__ Call(isolate()->builtins()->builtin_handle(trap_id),
RelocInfo::CODE_TARGET);
ReferenceMap* reference_map =
new (gen_->zone()) ReferenceMap(gen_->zone());
......
......@@ -2177,7 +2177,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
__ Ret();
} else {
gen_->AssembleSourcePosition(instr_);
__ Call(handle(isolate()->builtins()->builtin(trap_id), isolate()),
__ Call(isolate()->builtins()->builtin_handle(trap_id),
RelocInfo::CODE_TARGET);
ReferenceMap* reference_map =
new (gen_->zone()) ReferenceMap(gen_->zone());
......
......@@ -2694,7 +2694,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
__ Ret();
} else {
gen_->AssembleSourcePosition(instr_);
__ Call(handle(isolate()->builtins()->builtin(trap_id), isolate()),
__ Call(isolate()->builtins()->builtin_handle(trap_id),
RelocInfo::CODE_TARGET);
ReferenceMap* reference_map =
new (gen_->zone()) ReferenceMap(gen_->zone());
......
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