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

Unified Diff: src/code-stubs.h

Issue 1220783006: Revert of Add unoptimized/optimized variants of MathFloor TF code stub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/arm64/interface-descriptors-arm64.cc ('k') | src/ia32/interface-descriptors-ia32.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 a798d5e35010e21646886de17de70556188f235f..c06c6c1fe498b1a9daf9314017a54d0dcf89f659 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -94,7 +94,6 @@
/* TurboFanCodeStubs */ \
V(StringLengthTF) \
V(StringAddTF) \
- /* TurboFanICs */ \
V(MathFloor) \
/* IC Handler stubs */ \
V(ArrayBufferViewLoadField) \
@@ -217,9 +216,7 @@
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() const = 0;
- virtual int GetStackParameterCount() const {
- return GetCallInterfaceDescriptor().GetStackParameterCount();
- }
+ virtual int GetStackParameterCount() const { return 0; }
virtual void InitializeDescriptor(CodeStubDescriptor* descriptor) {}
@@ -363,26 +360,6 @@
Handle<Code> GenerateCode() override; \
DEFINE_CODE_STUB(NAME, SUPER)
-#define DEFINE_TURBOFAN_CODE_STUB(NAME, SUPER) \
- public: \
- CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { \
- return DESC##Descriptor(isolate()); \
- }; \
- DEFINE_CODE_STUB(NAME, SUPER)
-
-#define DEFINE_TURBOFAN_IC(NAME, SUPER, DESC) \
- public: \
- CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { \
- if (GetCallMode() == CALL_FROM_OPTIMIZED_CODE) { \
- return DESC##CallFromOptimizedCodeDescriptor(isolate()); \
- } else { \
- return DESC##CallFromUnoptimizedCodeDescriptor(isolate()); \
- } \
- }; \
- \
- protected: \
- DEFINE_CODE_STUB(NAME, SUPER)
-
#define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \
public: \
Handle<Code> GenerateCode() override; \
@@ -564,33 +541,6 @@
private:
DEFINE_CODE_STUB_BASE(TurboFanCodeStub, CodeStub);
-};
-
-
-class TurboFanIC : public TurboFanCodeStub {
- public:
- enum CallMode { CALL_FROM_UNOPTIMIZED_CODE, CALL_FROM_OPTIMIZED_CODE };
-
- protected:
- explicit TurboFanIC(Isolate* isolate, CallMode mode)
- : TurboFanCodeStub(isolate) {
- minor_key_ = CallModeBits::encode(mode);
- }
-
- CallMode GetCallMode() const { return CallModeBits::decode(minor_key_); }
-
- void set_sub_minor_key(uint32_t key) {
- minor_key_ = SubMinorKeyBits::update(minor_key_, key);
- }
-
- uint32_t sub_minor_key() const { return SubMinorKeyBits::decode(minor_key_); }
-
- static const int kSubMinorKeyBits = kStubMinorKeyBits - 1;
-
- private:
- class CallModeBits : public BitField<CallMode, 0, 1> {};
- class SubMinorKeyBits : public BitField<int, 1, kSubMinorKeyBits> {};
- DEFINE_CODE_STUB_BASE(TurboFanIC, TurboFanCodeStub);
};
@@ -660,12 +610,13 @@
};
-class MathFloorStub : public TurboFanIC {
- public:
- explicit MathFloorStub(Isolate* isolate, TurboFanIC::CallMode mode)
- : TurboFanIC(isolate, mode) {}
- Code::Kind GetCodeKind() const override { return Code::CALL_IC; }
- DEFINE_TURBOFAN_IC(MathFloor, TurboFanIC, MathRoundVariant);
+class MathFloorStub : public TurboFanCodeStub {
+ public:
+ explicit MathFloorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
+ int GetStackParameterCount() const override { return 1; }
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(MathRoundVariant);
+ DEFINE_CODE_STUB(MathFloor, TurboFanCodeStub);
};
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698