Commit 4af9ec6a authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC/s390: Reland "[nojit] Remove code stubs"

Port 24e76616

Original Commit Message:

    This is a reland of f849396c

    Original change's description:
    > [nojit] Remove code stubs
    >
    > All stubs have been migrated to builtins. This CL removes most related
    > code.
    >
    > Bug: v8:7777, v8:5784
    > Change-Id: I4470cfef34788e6c8e0fd5fd09e40e250d088dad
    > Reviewed-on: https://chromium-review.googlesource.com/c/1365284
    > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
    > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
    > Reviewed-by: Yang Guo <yangguo@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#58093}

R=jgruber@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ie05463245c24975804a8bb7ffdf902c70e042127
Reviewed-on: https://chromium-review.googlesource.com/c/1393302Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58504}
parent 65c11d39
......@@ -6,7 +6,6 @@
#include "src/api-arguments.h"
#include "src/code-factory.h"
#include "src/code-stubs.h"
#include "src/counters.h"
#include "src/debug/debug.h"
#include "src/deoptimizer.h"
......
......@@ -6,7 +6,6 @@
#include "src/api-arguments.h"
#include "src/code-factory.h"
#include "src/code-stubs.h"
#include "src/counters.h"
#include "src/debug/debug.h"
#include "src/deoptimizer.h"
......
......@@ -40,7 +40,6 @@
#include "src/base/bits.h"
#include "src/base/cpu.h"
#include "src/code-stubs.h"
#include "src/deoptimizer.h"
#include "src/macro-assembler.h"
#include "src/ppc/assembler-ppc-inl.h"
......@@ -193,13 +192,6 @@ Operand Operand::EmbeddedNumber(double value) {
return result;
}
Operand Operand::EmbeddedCode(CodeStub* stub) {
Operand result(0, RelocInfo::CODE_TARGET);
result.is_heap_object_request_ = true;
result.value_.heap_object_request = HeapObjectRequest(stub);
return result;
}
Operand Operand::EmbeddedStringConstant(const StringConstantBase* str) {
Operand result(0, RelocInfo::EMBEDDED_OBJECT);
result.is_heap_object_request_ = true;
......@@ -223,11 +215,6 @@ void Assembler::AllocateAndInstallRequestedHeapObjects(Isolate* isolate) {
isolate->factory()->NewHeapNumber(request.heap_number(), TENURED);
break;
}
case HeapObjectRequest::kCodeStub: {
request.code_stub()->set_isolate(isolate);
object = request.code_stub()->GetCode();
break;
}
case HeapObjectRequest::kStringConstant: {
const StringConstantBase* str = request.string();
CHECK_NOT_NULL(str);
......
......@@ -83,7 +83,6 @@ class Operand {
static Operand EmbeddedNumber(double number); // Smi or HeapNumber.
static Operand EmbeddedStringConstant(const StringConstantBase* str);
static Operand EmbeddedCode(CodeStub* stub);
// Return true if this is a register operand.
V8_INLINE bool is_reg() const { return rm_.is_valid(); }
......
......@@ -12,7 +12,6 @@
#include "src/bootstrapper.h"
#include "src/callable.h"
#include "src/code-factory.h"
#include "src/code-stubs.h"
#include "src/counters.h"
#include "src/debug/debug.h"
#include "src/external-reference-table.h"
......@@ -1556,19 +1555,6 @@ void TurboAssembler::SubAndCheckForOverflow(Register dst, Register left,
}
void MacroAssembler::CallStub(CodeStub* stub, Condition cond) {
DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs.
Call(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
}
void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) {
Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
}
bool TurboAssembler::AllowThisStubCall(CodeStub* stub) {
return has_frame_ || !stub->SometimesSetsUpAFrame();
}
void MacroAssembler::TryDoubleToInt32Exact(Register result,
DoubleRegister double_input,
Register scratch,
......
......@@ -378,7 +378,6 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// Print a message to stdout and abort execution.
void Abort(AbortReason reason);
inline bool AllowThisStubCall(CodeStub* stub);
#if !V8_TARGET_ARCH_PPC64
void ShiftLeftPair(Register dst_low, Register dst_high, Register src_low,
Register src_high, Register scratch, Register shift);
......@@ -607,8 +606,6 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// the JS bitwise operations. See ECMA-262 9.5: ToInt32. Goes to 'done' if it
// succeeds, otherwise falls through if result is saturated. On return
// 'result' either holds answer, or is clobbered on fall through.
//
// Only public for the test code in test-code-stubs-arm.cc.
void TryInlineTruncateDoubleToI(Register result, DoubleRegister input,
Label* done);
void TruncateDoubleToI(Isolate* isolate, Zone* zone, Register result,
......@@ -866,10 +863,6 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
Condition cond = al);
void CallJSEntry(Register target);
// Call a code stub.
void CallStub(CodeStub* stub, Condition cond = al);
void TailCallStub(CodeStub* stub, Condition cond = al);
// Call a runtime routine.
void CallRuntime(const Runtime::Function* f, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs);
......
......@@ -8,7 +8,6 @@
#include "src/assembler-inl.h"
#include "src/base/bits.h"
#include "src/code-stubs.h"
#include "src/log.h"
#include "src/macro-assembler.h"
#include "src/regexp/regexp-macro-assembler.h"
......
......@@ -8,7 +8,6 @@
#include "src/assembler-inl.h"
#include "src/base/bits.h"
#include "src/code-stubs.h"
#include "src/log.h"
#include "src/macro-assembler.h"
#include "src/regexp/regexp-macro-assembler.h"
......
......@@ -47,7 +47,6 @@
#include "src/base/bits.h"
#include "src/base/cpu.h"
#include "src/code-stubs.h"
#include "src/deoptimizer.h"
#include "src/macro-assembler.h"
#include "src/s390/assembler-s390-inl.h"
......@@ -332,14 +331,6 @@ void Assembler::AllocateAndInstallRequestedHeapObjects(Isolate* isolate) {
SKIP_ICACHE_FLUSH);
break;
}
case HeapObjectRequest::kCodeStub: {
request.code_stub()->set_isolate(isolate);
SixByteInstr instr =
Instruction::InstructionBits(reinterpret_cast<const byte*>(pc));
int index = instr & 0xFFFFFFFF;
UpdateCodeTarget(index, request.code_stub()->GetCode());
break;
}
case HeapObjectRequest::kStringConstant: {
const StringConstantBase* str = request.string();
CHECK_NOT_NULL(str);
......@@ -685,14 +676,6 @@ void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) {
brasl(r14, Operand(target_index));
}
void Assembler::call(CodeStub* stub) {
EnsureSpace ensure_space(this);
RequestHeapObject(HeapObjectRequest(stub));
RecordRelocInfo(RelocInfo::CODE_TARGET);
int32_t target_index = AddCodeTarget(Handle<Code>());
brasl(r14, Operand(target_index));
}
void Assembler::jump(Handle<Code> target, RelocInfo::Mode rmode,
Condition cond) {
DCHECK(RelocInfo::IsCodeTarget(rmode));
......
......@@ -1134,7 +1134,6 @@ inline void ss_a_format(Opcode op, int f1, int f2, int f3, int f4, int f5) {
}
void call(Handle<Code> target, RelocInfo::Mode rmode);
void call(CodeStub* stub);
void jump(Handle<Code> target, RelocInfo::Mode rmode, Condition cond);
// S390 instruction generation
......
......@@ -12,7 +12,6 @@
#include "src/bootstrapper.h"
#include "src/callable.h"
#include "src/code-factory.h"
#include "src/code-stubs.h"
#include "src/counters.h"
#include "src/debug/debug.h"
#include "src/external-reference-table.h"
......@@ -1535,19 +1534,6 @@ void MacroAssembler::CompareRoot(Register obj, RootIndex index) {
CmpP(obj, MemOperand(kRootRegister, RootRegisterOffsetForRootIndex(index)));
}
void MacroAssembler::CallStub(CodeStub* stub, Condition cond) {
DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs.
Call(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
}
void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) {
Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
}
bool TurboAssembler::AllowThisStubCall(CodeStub* stub) {
return has_frame_ || !stub->SometimesSetsUpAFrame();
}
void MacroAssembler::TryDoubleToInt32Exact(Register result,
DoubleRegister double_input,
Register scratch,
......
......@@ -854,8 +854,6 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// Print a message to stdout and abort execution.
void Abort(AbortReason reason);
inline bool AllowThisStubCall(CodeStub* stub);
// ---------------------------------------------------------------------------
// Bit testing/extraction
//
......@@ -1017,10 +1015,6 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
MacroAssembler(Isolate* isolate, const AssemblerOptions& options,
void* buffer, int size, CodeObjectRequired create_code_object);
// Call a code stub.
void TailCallStub(CodeStub* stub, Condition cond = al);
void CallStub(CodeStub* stub, Condition cond = al);
void CallRuntime(const Runtime::Function* f, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs);
void CallRuntimeSaveDoubles(Runtime::FunctionId fid) {
......
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