Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: src/code-stubs.h

Issue 2304573004: Port FastCloneShallowArrayStub to Turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: break live range of allocation_site so instruction selection uses nice addressing modes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 9b6cfaa9c2982660a25d3819556629b7c5effa64..acaaee75ae6ecfe6803d27c448dbab35613ffe02 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -67,7 +67,6 @@ class ObjectLiteral;
V(KeyedStoreICTrampoline) \
V(StoreICTrampoline) \
/* --- HydrogenCodeStubs --- */ \
- V(FastCloneShallowArray) \
V(NumberToString) \
V(StringAdd) \
V(ToObject) \
@@ -133,8 +132,9 @@ class ObjectLiteral;
V(InternalArraySingleArgumentConstructor) \
V(Dec) \
V(ElementsTransitionAndStore) \
- V(FastCloneShallowObject) \
V(FastCloneRegExp) \
+ V(FastCloneShallowArray) \
+ V(FastCloneShallowObject) \
V(FastNewClosure) \
V(FastNewFunctionContext) \
V(InstanceOf) \
@@ -1263,24 +1263,30 @@ class FastCloneRegExpStub final : public TurboFanCodeStub {
DEFINE_TURBOFAN_CODE_STUB(FastCloneRegExp, TurboFanCodeStub);
};
-
-class FastCloneShallowArrayStub : public HydrogenCodeStub {
+class FastCloneShallowArrayStub : public TurboFanCodeStub {
public:
FastCloneShallowArrayStub(Isolate* isolate,
AllocationSiteMode allocation_site_mode)
- : HydrogenCodeStub(isolate) {
- set_sub_minor_key(AllocationSiteModeBits::encode(allocation_site_mode));
+ : TurboFanCodeStub(isolate) {
+ minor_key_ = AllocationSiteModeBits::encode(allocation_site_mode);
}
+ static compiler::Node* Generate(CodeStubAssembler* assembler,
+ compiler::Node* closure,
+ compiler::Node* literal_index,
+ compiler::Node* constant_elements,
+ compiler::Node* context,
+ AllocationSiteMode allocation_site_mode);
+
AllocationSiteMode allocation_site_mode() const {
- return AllocationSiteModeBits::decode(sub_minor_key());
+ return AllocationSiteModeBits::decode(minor_key_);
}
private:
class AllocationSiteModeBits: public BitField<AllocationSiteMode, 0, 1> {};
DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowArray);
- DEFINE_HYDROGEN_CODE_STUB(FastCloneShallowArray, HydrogenCodeStub);
+ DEFINE_TURBOFAN_CODE_STUB(FastCloneShallowArray, TurboFanCodeStub);
};
class FastCloneShallowObjectStub : public TurboFanCodeStub {
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/code-stubs.cc » ('j') | src/code-stubs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698