Commit 8b37b698 authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC/s390: [stubs] General stub cleanup (includes & platform-independent code)

Port c52b7af5

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

Change-Id: I75ec0305f618336ce63fb664ae356dfcf48948c4
Reviewed-on: https://chromium-review.googlesource.com/1075468Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53417}
parent 9ef4df2f
...@@ -27,11 +27,6 @@ namespace internal { ...@@ -27,11 +27,6 @@ namespace internal {
#define __ ACCESS_MASM(masm) #define __ ACCESS_MASM(masm)
void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
CommonArrayConstructorStub::GenerateStubsAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}
void JSEntryStub::Generate(MacroAssembler* masm) { void JSEntryStub::Generate(MacroAssembler* masm) {
// r3: code entry // r3: code entry
// r4: function // r4: function
...@@ -329,34 +324,6 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) { ...@@ -329,34 +324,6 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
__ Ret(); __ Ret();
} }
template <class T>
static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
int to_index =
GetSequenceIndexFromFastElementsKind(TERMINAL_FAST_ELEMENTS_KIND);
for (int i = 0; i <= to_index; ++i) {
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
T stub(isolate, kind);
stub.GetCode();
if (AllocationSite::ShouldTrack(kind)) {
T stub1(isolate, kind, DISABLE_ALLOCATION_SITES);
stub1.GetCode();
}
}
}
void CommonArrayConstructorStub::GenerateStubsAheadOfTime(Isolate* isolate) {
ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>(
isolate);
ElementsKind kinds[2] = {PACKED_ELEMENTS, HOLEY_ELEMENTS};
for (int i = 0; i < 2; i++) {
// For internal arrays we only need a few things
InternalArrayNoArgumentConstructorStub stubh1(isolate, kinds[i]);
stubh1.GetCode();
InternalArraySingleArgumentConstructorStub stubh2(isolate, kinds[i]);
stubh2.GetCode();
}
}
static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
return ref0.address() - ref1.address(); return ref0.address() - ref1.address();
} }
......
...@@ -26,11 +26,6 @@ namespace internal { ...@@ -26,11 +26,6 @@ namespace internal {
#define __ ACCESS_MASM(masm) #define __ ACCESS_MASM(masm)
void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
CommonArrayConstructorStub::GenerateStubsAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}
void JSEntryStub::Generate(MacroAssembler* masm) { void JSEntryStub::Generate(MacroAssembler* masm) {
// r2: code entry // r2: code entry
// r3: function // r3: function
...@@ -370,34 +365,6 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) { ...@@ -370,34 +365,6 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
__ Ret(); __ Ret();
} }
template <class T>
static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
int to_index =
GetSequenceIndexFromFastElementsKind(TERMINAL_FAST_ELEMENTS_KIND);
for (int i = 0; i <= to_index; ++i) {
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
T stub(isolate, kind);
stub.GetCode();
if (AllocationSite::ShouldTrack(kind)) {
T stub1(isolate, kind, DISABLE_ALLOCATION_SITES);
stub1.GetCode();
}
}
}
void CommonArrayConstructorStub::GenerateStubsAheadOfTime(Isolate* isolate) {
ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>(
isolate);
ElementsKind kinds[2] = {PACKED_ELEMENTS, HOLEY_ELEMENTS};
for (int i = 0; i < 2; i++) {
// For internal arrays we only need a few things
InternalArrayNoArgumentConstructorStub stubh1(isolate, kinds[i]);
stubh1.GetCode();
InternalArraySingleArgumentConstructorStub stubh2(isolate, kinds[i]);
stubh2.GetCode();
}
}
static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
return ref0.address() - ref1.address(); return ref0.address() - ref1.address();
} }
......
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