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

Unified Diff: src/code-stubs.h

Issue 1877323002: [turbofan] Generalize AllocateStub to allow old space allocation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Go for minor key and AllocateStub Created 4 years, 8 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
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 2bf86d4b9c13b6ff9ebe98838f25d0fbe5f55c5d..1a80a5b7bc764d581a7dbd8f2a23915a6e45ecdb 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -57,7 +57,7 @@ namespace internal {
V(VectorStoreIC) \
V(VectorKeyedStoreIC) \
/* HydrogenCodeStubs */ \
- V(AllocateInNewSpace) \
+ V(Allocate) \
V(ArrayNArgumentsConstructor) \
V(ArrayNoArgumentConstructor) \
V(ArraySingleArgumentConstructor) \
@@ -2683,17 +2683,23 @@ class AllocateMutableHeapNumberStub : public TurboFanCodeStub {
SIMD128_TYPES(SIMD128_ALLOC_STUB)
#undef SIMD128_ALLOC_STUB
-class AllocateInNewSpaceStub final : public HydrogenCodeStub {
+class AllocateStub final : public HydrogenCodeStub {
public:
- explicit AllocateInNewSpaceStub(Isolate* isolate)
- : HydrogenCodeStub(isolate) {}
+ AllocateStub(Isolate* isolate, PretenureFlag pretenure_flag)
+ : HydrogenCodeStub(isolate) {
+ set_sub_minor_key(PretenureFlagBits::encode(pretenure_flag));
+ }
+
+ PretenureFlag pretenure_flag() const {
+ return PretenureFlagBits::decode(sub_minor_key());
+ }
private:
- DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateInNewSpace);
- DEFINE_HYDROGEN_CODE_STUB(AllocateInNewSpace, HydrogenCodeStub);
+ typedef BitField<PretenureFlag, 0, 1> PretenureFlagBits;
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(Allocate);
+ DEFINE_HYDROGEN_CODE_STUB(Allocate, HydrogenCodeStub);
};
-
class ArrayConstructorStubBase : public HydrogenCodeStub {
public:
ArrayConstructorStubBase(Isolate* isolate,
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698