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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 static compiler::Node* Generate(CodeStubAssembler* assembler, \ 407 static compiler::Node* Generate(CodeStubAssembler* assembler, \
408 compiler::Node* left, compiler::Node* right, \ 408 compiler::Node* left, compiler::Node* right, \
409 compiler::Node* context); \ 409 compiler::Node* context); \
410 void GenerateAssembly(CodeStubAssembler* assembler) const override { \ 410 void GenerateAssembly(CodeStubAssembler* assembler) const override { \
411 assembler->Return(Generate(assembler, assembler->Parameter(0), \ 411 assembler->Return(Generate(assembler, assembler->Parameter(0), \
412 assembler->Parameter(1), \ 412 assembler->Parameter(1), \
413 assembler->Parameter(2))); \ 413 assembler->Parameter(2))); \
414 } \ 414 } \
415 DEFINE_CODE_STUB(NAME, SUPER) 415 DEFINE_CODE_STUB(NAME, SUPER)
416 416
417 #define DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(NAME, SUPER) \
418 public: \
419 static compiler::Node* Generate(CodeStubAssembler* assembler, \
420 compiler::Node* value, \
421 compiler::Node* context); \
422 void GenerateAssembly(CodeStubAssembler* assembler) const override { \
423 assembler->Return(Generate(assembler, assembler->Parameter(0), \
424 assembler->Parameter(1))); \
425 } \
426 DEFINE_CODE_STUB(NAME, SUPER)
427
417 #define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \ 428 #define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \
418 public: \ 429 public: \
419 Handle<Code> GenerateCode() override; \ 430 Handle<Code> GenerateCode() override; \
420 DEFINE_CODE_STUB(NAME, SUPER) 431 DEFINE_CODE_STUB(NAME, SUPER)
421 432
422 #define DEFINE_CALL_INTERFACE_DESCRIPTOR(NAME) \ 433 #define DEFINE_CALL_INTERFACE_DESCRIPTOR(NAME) \
423 public: \ 434 public: \
424 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { \ 435 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { \
425 return NAME##Descriptor(isolate()); \ 436 return NAME##Descriptor(isolate()); \
426 } 437 }
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 786
776 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); 787 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp);
777 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(BitwiseXor, TurboFanCodeStub); 788 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(BitwiseXor, TurboFanCodeStub);
778 }; 789 };
779 790
780 class IncStub final : public TurboFanCodeStub { 791 class IncStub final : public TurboFanCodeStub {
781 public: 792 public:
782 explicit IncStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 793 explicit IncStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
783 794
784 DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp); 795 DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp);
785 DEFINE_TURBOFAN_CODE_STUB(Inc, TurboFanCodeStub); 796 DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(Inc, TurboFanCodeStub);
786 }; 797 };
787 798
788 class DecStub final : public TurboFanCodeStub { 799 class DecStub final : public TurboFanCodeStub {
789 public: 800 public:
790 explicit DecStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 801 explicit DecStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
791 802
792 DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp); 803 DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp);
793 DEFINE_TURBOFAN_CODE_STUB(Dec, TurboFanCodeStub); 804 DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(Dec, TurboFanCodeStub);
794 }; 805 };
795 806
796 class InstanceOfStub final : public TurboFanCodeStub { 807 class InstanceOfStub final : public TurboFanCodeStub {
797 public: 808 public:
798 explicit InstanceOfStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 809 explicit InstanceOfStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
799 810
800 private: 811 private:
801 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); 812 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare);
802 DEFINE_TURBOFAN_CODE_STUB(InstanceOf, TurboFanCodeStub); 813 DEFINE_TURBOFAN_CODE_STUB(InstanceOf, TurboFanCodeStub);
803 }; 814 };
(...skipping 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after
3249 #undef DEFINE_HYDROGEN_CODE_STUB 3260 #undef DEFINE_HYDROGEN_CODE_STUB
3250 #undef DEFINE_CODE_STUB 3261 #undef DEFINE_CODE_STUB
3251 #undef DEFINE_CODE_STUB_BASE 3262 #undef DEFINE_CODE_STUB_BASE
3252 3263
3253 extern Representation RepresentationFromType(Type* type); 3264 extern Representation RepresentationFromType(Type* type);
3254 3265
3255 } // namespace internal 3266 } // namespace internal
3256 } // namespace v8 3267 } // namespace v8
3257 3268
3258 #endif // V8_CODE_STUBS_H_ 3269 #endif // V8_CODE_STUBS_H_
OLDNEW
« 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