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

Unified Diff: src/code-stubs.h

Issue 1980463003: [Interpreter] Inline Inc/Dec code stubs into bytecode handlers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 7 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 | « no previous file | 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 3fb9edd1956636eded902db8f4b55dfbd6c9a98d..7bccaa9c12ba8979cb4c4f234091afcf8b31c40e 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -414,6 +414,17 @@ class CodeStub BASE_EMBEDDED {
} \
DEFINE_CODE_STUB(NAME, SUPER)
+#define DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(NAME, SUPER) \
+ public: \
+ static compiler::Node* Generate(CodeStubAssembler* assembler, \
+ compiler::Node* value, \
+ compiler::Node* context); \
+ void GenerateAssembly(CodeStubAssembler* assembler) const override { \
+ assembler->Return(Generate(assembler, assembler->Parameter(0), \
+ assembler->Parameter(1))); \
+ } \
+ DEFINE_CODE_STUB(NAME, SUPER)
+
#define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \
public: \
Handle<Code> GenerateCode() override; \
@@ -782,7 +793,7 @@ class IncStub final : public TurboFanCodeStub {
explicit IncStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp);
- DEFINE_TURBOFAN_CODE_STUB(Inc, TurboFanCodeStub);
+ DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(Inc, TurboFanCodeStub);
};
class DecStub final : public TurboFanCodeStub {
@@ -790,7 +801,7 @@ class DecStub final : public TurboFanCodeStub {
explicit DecStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp);
- DEFINE_TURBOFAN_CODE_STUB(Dec, TurboFanCodeStub);
+ DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(Dec, TurboFanCodeStub);
};
class InstanceOfStub final : public TurboFanCodeStub {
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698