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

Unified Diff: src/code-stubs.h

Issue 2221833002: [Interpreter] Collect type feedback for subtract operation and pass it to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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') | src/code-stubs.cc » ('J')
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 17b193e748e0fbd92537980d8a0305fe46b090e7..bff08a21608683b7b10e9071f1eb4138716b4394 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -14,6 +14,7 @@
#include "src/interface-descriptors.h"
#include "src/macro-assembler.h"
#include "src/ostreams.h"
+#include "src/utils.h"
namespace v8 {
namespace internal {
@@ -432,6 +433,22 @@ class CodeStub BASE_EMBEDDED {
} \
DEFINE_CODE_STUB(NAME, SUPER)
+// TODO(mythria): check where generate assembly is used and if have to pass 6
+// parameters.
+#define DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(NAME, SUPER) \
+ public: \
+ static compiler::Node* Generate(CodeStubAssembler* assembler, \
+ compiler::Node* left, compiler::Node* right, \
+ compiler::Node* context, \
+ compiler::Node* type_feedback_vector = NULL, \
+ compiler::Node* slot_id = NULL); \
+ void GenerateAssembly(CodeStubAssembler* assembler) const override { \
mythria 2016/08/08 04:33:56 I am not sure where GenerateAssembly is used. I di
+ assembler->Return(Generate(assembler, assembler->Parameter(0), \
+ assembler->Parameter(1), \
+ assembler->Parameter(2))); \
+ } \
+ DEFINE_CODE_STUB(NAME, SUPER)
+
#define DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(NAME, SUPER) \
public: \
static compiler::Node* Generate(CodeStubAssembler* assembler, \
@@ -746,7 +763,7 @@ class SubtractStub final : public TurboFanCodeStub {
explicit SubtractStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
- DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Subtract, TurboFanCodeStub);
+ DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(Subtract, TurboFanCodeStub);
mythria 2016/08/08 04:33:56 We can remove this once we migrate all binary ops
};
class MultiplyStub final : public TurboFanCodeStub {
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | src/code-stubs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698