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

Unified Diff: src/code-stubs.h

Issue 1759133002: [compiler] Initial TurboFan code stubs for abstract relational comparison. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 fbed23f84720b6ecb7af42346f844a00ca19fdd4..533641955c5ea9fa37be7a4ba4278d81bb221e7c 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -101,6 +101,10 @@ namespace internal {
V(AllocateHeapNumber) \
V(AllocateMutableHeapNumber) \
V(StringLength) \
+ V(LessThan) \
+ V(LessThanOrEqual) \
+ V(GreaterThan) \
+ V(GreaterThanOrEqual) \
V(StrictEqual) \
V(StrictNotEqual) \
V(StringEqual) \
@@ -351,11 +355,10 @@ class CodeStub BASE_EMBEDDED {
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 DEFINE_TURBOFAN_CODE_STUB(NAME, SUPER) \
+ public: \
+ void GenerateAssembly(compiler::CodeStubAssembler* assembler) \
+ const override; \
DEFINE_CODE_STUB(NAME, SUPER)
#define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \
@@ -629,60 +632,81 @@ class StringLengthStub : public TurboFanCodeStub {
InlineCacheState GetICState() const override { return MONOMORPHIC; }
ExtraICState GetExtraICState() const override { return Code::LOAD_IC; }
- void GenerateAssembly(compiler::CodeStubAssembler* assembler) const override;
-
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
- DEFINE_CODE_STUB(StringLength, TurboFanCodeStub);
+ DEFINE_TURBOFAN_CODE_STUB(StringLength, TurboFanCodeStub);
+};
+
+class LessThanStub final : public TurboFanCodeStub {
+ public:
+ explicit LessThanStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare);
+ DEFINE_TURBOFAN_CODE_STUB(LessThan, TurboFanCodeStub);
+};
+
+class LessThanOrEqualStub final : public TurboFanCodeStub {
+ public:
+ explicit LessThanOrEqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare);
+ DEFINE_TURBOFAN_CODE_STUB(LessThanOrEqual, TurboFanCodeStub);
+};
+
+class GreaterThanStub final : public TurboFanCodeStub {
+ public:
+ explicit GreaterThanStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare);
+ DEFINE_TURBOFAN_CODE_STUB(GreaterThan, TurboFanCodeStub);
+};
+
+class GreaterThanOrEqualStub final : public TurboFanCodeStub {
+ public:
+ explicit GreaterThanOrEqualStub(Isolate* isolate)
+ : TurboFanCodeStub(isolate) {}
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare);
+ DEFINE_TURBOFAN_CODE_STUB(GreaterThanOrEqual, TurboFanCodeStub);
};
class StrictEqualStub final : public TurboFanCodeStub {
public:
explicit StrictEqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
- void GenerateAssembly(compiler::CodeStubAssembler* assembler) const final;
-
DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare);
- DEFINE_CODE_STUB(StrictEqual, TurboFanCodeStub);
+ DEFINE_TURBOFAN_CODE_STUB(StrictEqual, TurboFanCodeStub);
};
class StrictNotEqualStub final : public TurboFanCodeStub {
public:
explicit StrictNotEqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
- void GenerateAssembly(compiler::CodeStubAssembler* assembler) const final;
-
DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare);
- DEFINE_CODE_STUB(StrictNotEqual, TurboFanCodeStub);
+ DEFINE_TURBOFAN_CODE_STUB(StrictNotEqual, TurboFanCodeStub);
};
class StringEqualStub final : public TurboFanCodeStub {
public:
explicit StringEqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
- void GenerateAssembly(compiler::CodeStubAssembler* assembler) const final;
-
DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare);
- DEFINE_CODE_STUB(StringEqual, TurboFanCodeStub);
+ DEFINE_TURBOFAN_CODE_STUB(StringEqual, TurboFanCodeStub);
};
class StringNotEqualStub final : public TurboFanCodeStub {
public:
explicit StringNotEqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
- void GenerateAssembly(compiler::CodeStubAssembler* assembler) const final;
-
DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare);
- DEFINE_CODE_STUB(StringNotEqual, TurboFanCodeStub);
+ DEFINE_TURBOFAN_CODE_STUB(StringNotEqual, TurboFanCodeStub);
};
class ToBooleanStub final : public TurboFanCodeStub {
public:
explicit ToBooleanStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
- void GenerateAssembly(compiler::CodeStubAssembler* assembler) const final;
-
DEFINE_CALL_INTERFACE_DESCRIPTOR(ToBoolean);
- DEFINE_CODE_STUB(ToBoolean, TurboFanCodeStub);
+ DEFINE_TURBOFAN_CODE_STUB(ToBoolean, TurboFanCodeStub);
};
enum StringAddFlags {
« 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