Commit 16ee5509 authored by verwaest's avatar verwaest Committed by Commit bot

Generate common StoreFastElementStubs ahead of time

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27536}
parent 11c4e2f2
......@@ -920,6 +920,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
CreateWeakCellStub::GenerateAheadOfTime(isolate);
BinaryOpICStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}
......
......@@ -979,6 +979,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}
......
......@@ -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:
......
......@@ -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 {
......
......@@ -2439,6 +2439,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
CreateWeakCellStub::GenerateAheadOfTime(isolate);
BinaryOpICStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}
......
......@@ -1007,6 +1007,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}
......
......@@ -1003,6 +1003,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}
......
......@@ -966,6 +966,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}
......
......@@ -2318,6 +2318,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
CreateWeakCellStub::GenerateAheadOfTime(isolate);
BinaryOpICStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
StoreFastElementStub::GenerateAheadOfTime(isolate);
}
......
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