Reviewers: danno,
Message:
PTAL
Description:
Generate common StoreFastElementStubs ahead of time
BUG=
Please review this at https://codereview.chromium.org/1040183004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+24, -0 lines):
M src/arm/code-stubs-arm.cc
M src/arm64/code-stubs-arm64.cc
M src/code-stubs.h
M src/code-stubs.cc
M src/ia32/code-stubs-ia32.cc
M src/mips/code-stubs-mips.cc
M src/mips64/code-stubs-mips64.cc
M src/ppc/code-stubs-ppc.cc
M src/x64/code-stubs-x64.cc
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index
0d8f3bd916d8b0f3f6e7b018b0eb408776c40258..0eb8295ea14638113d1053fb28045fa75331dee9
100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -920,6 +920,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate*
isolate) {
CreateWeakCellStub::GenerateAheadOfTime(isolate);
BinaryOpICStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
+ StoreFastElementStub::GenerateAheadOfTime(isolate);
}
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index
5060df9b8868db531575a48bc59f451a64444524..abc047a127b64172889b95a0010ac7202bdf9c98
100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -979,6 +979,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate*
isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
+ StoreFastElementStub::GenerateAheadOfTime(isolate);
}
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index
f600cf316d7f2d999eb52f9f1d2e420035c4ffdd..29fbb3c8648a8fff2fbbdcba11ffefee7be3b826
100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -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:
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index
00541133a344f855fc28d051f2e593172f145d5e..01bca16e6abf26ba83878c2f534e408af372be7a
100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -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 {
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index
a98c6d6aca38884ae459b15b2a3581cde9537156..23dca4ec01506ea608d2c5c70dcb1d97a7055acc
100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -2439,6 +2439,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate*
isolate) {
CreateWeakCellStub::GenerateAheadOfTime(isolate);
BinaryOpICStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
+ StoreFastElementStub::GenerateAheadOfTime(isolate);
}
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index
5191e3659631741ffb117c8d2b707a5f46264e6b..6423b836273027feb5f6d30951fae3e2d075a764
100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -1007,6 +1007,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate*
isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
+ StoreFastElementStub::GenerateAheadOfTime(isolate);
}
Index: src/mips64/code-stubs-mips64.cc
diff --git a/src/mips64/code-stubs-mips64.cc
b/src/mips64/code-stubs-mips64.cc
index
0f83a613c162fb93c71d0dee56b2dcbd051a6dd6..27a08cfc96cb45e2c34724b66c06a2e6b06c2d28
100644
--- a/src/mips64/code-stubs-mips64.cc
+++ b/src/mips64/code-stubs-mips64.cc
@@ -1003,6 +1003,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate*
isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
+ StoreFastElementStub::GenerateAheadOfTime(isolate);
}
Index: src/ppc/code-stubs-ppc.cc
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc
index
e03741e5571537b25facaba3e6da6cddb198d374..0bc7c4b2fddb8370f932633b7e4196990a785323
100644
--- a/src/ppc/code-stubs-ppc.cc
+++ b/src/ppc/code-stubs-ppc.cc
@@ -966,6 +966,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate*
isolate) {
StoreRegistersStateStub::GenerateAheadOfTime(isolate);
RestoreRegistersStateStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
+ StoreFastElementStub::GenerateAheadOfTime(isolate);
}
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index
de106cc084ff6b8f701ffc1aa988d8cc692da7f3..6dc9204467165121b8f4d766754437d37b8b7d92
100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2318,6 +2318,7 @@ void CodeStub::GenerateStubsAheadOfTime(Isolate*
isolate) {
CreateWeakCellStub::GenerateAheadOfTime(isolate);
BinaryOpICStub::GenerateAheadOfTime(isolate);
BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
+ StoreFastElementStub::GenerateAheadOfTime(isolate);
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.