Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 2af7f1567392d7058943a38fb81dec35226f3006..def93f4649c2a3c4e362e8bd1b8762276c012a24 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -426,6 +426,18 @@ class CodeStub BASE_EMBEDDED { |
void GenerateAssembly(CodeStubAssembler* assembler) const override; \ |
DEFINE_CODE_STUB(NAME, SUPER) |
+#define DEFINE_TURBOFAN_TERNARY_OP_CODE_STUB(NAME, SUPER) \ |
+ public: \ |
+ static compiler::Node* Generate( \ |
+ CodeStubAssembler* assembler, compiler::Node* first, \ |
+ compiler::Node* second, compiler::Node* third, compiler::Node* context); \ |
+ void GenerateAssembly(CodeStubAssembler* assembler) const override { \ |
+ assembler->Return( \ |
+ Generate(assembler, assembler->Parameter(0), assembler->Parameter(1), \ |
+ assembler->Parameter(2), assembler->Parameter(3))); \ |
+ } \ |
+ DEFINE_CODE_STUB(NAME, SUPER) |
+ |
#define DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(NAME, SUPER) \ |
public: \ |
static compiler::Node* Generate(CodeStubAssembler* assembler, \ |
@@ -3121,13 +3133,12 @@ class StoreBufferOverflowStub : public PlatformCodeStub { |
DEFINE_PLATFORM_CODE_STUB(StoreBufferOverflow, PlatformCodeStub); |
}; |
- |
-class SubStringStub : public PlatformCodeStub { |
+class SubStringStub : public TurboFanCodeStub { |
public: |
- explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
+ explicit SubStringStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
DEFINE_ON_STACK_CALL_INTERFACE_DESCRIPTOR(3); |
- DEFINE_PLATFORM_CODE_STUB(SubString, PlatformCodeStub); |
+ DEFINE_TURBOFAN_TERNARY_OP_CODE_STUB(SubString, TurboFanCodeStub); |
Igor Sheludko
2016/09/22 12:23:37
I don't think it's a ternary operation. It's just
jgruber
2016/09/22 13:22:41
Done.
|
}; |
class ToStringStub final : public PlatformCodeStub { |