Generate common StoreFastElementStubs ahead of time

BUG=

Review URL: https://codereview.chromium.org/1040183004

Cr-Commit-Position: refs/heads/master@{#27536}
This commit is contained in:
verwaest 2015-03-31 05:25:12 -07:00 committed by Commit bot
parent 11c4e2f2f7
commit 16ee55097a
9 changed files with 24 additions and 0 deletions

View File

@ -920,6 +920,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
CreateWeakCellStub::GenerateAheadOfTime(isolate);
BinaryOpICStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}

View File

@ -979,6 +979,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}

View File

@ -752,6 +752,21 @@ void StoreElementStub::Generate(MacroAssembler* masm) {
}
// static
void StoreFastElementStub::GenerateAheadOfTime(Isolate* isolate) {
StoreFastElementStub(isolate, false, FAST_HOLEY_ELEMENTS, STANDARD_STORE)
.GetCode();
StoreFastElementStub(isolate, false, FAST_HOLEY_ELEMENTS,
STORE_AND_GROW_NO_TRANSITION).GetCode();
for (int i = FIRST_FAST_ELEMENTS_KIND; i <= LAST_FAST_ELEMENTS_KIND; i++) {
ElementsKind kind = static_cast<ElementsKind>(i);
StoreFastElementStub(isolate, true, kind, STANDARD_STORE).GetCode();
StoreFastElementStub(isolate, true, kind, STORE_AND_GROW_NO_TRANSITION)
.GetCode();
}
}
void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
switch (type()) {
case READ_ELEMENT:

View File

@ -2264,6 +2264,8 @@ class StoreFastElementStub : public HydrogenCodeStub {
StoreModeBits::encode(mode));
}
static void GenerateAheadOfTime(Isolate* isolate);
bool is_js_array() const { return IsJSArrayBits::decode(sub_minor_key()); }
ElementsKind elements_kind() const {

View File

@ -2439,6 +2439,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
CreateWeakCellStub::GenerateAheadOfTime(isolate);
BinaryOpICStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}

View File

@ -1007,6 +1007,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}

View File

@ -1003,6 +1003,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}

View File

@ -966,6 +966,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}

View File

@ -2318,6 +2318,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
CreateWeakCellStub::GenerateAheadOfTime(isolate);
BinaryOpICStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}