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

Side by Side Diff: src/code-stubs.h

Issue 2355793003: [stubs] Port SubStringStub to TurboFan (Closed)
Patch Set: Address comments Created 4 years, 2 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 | « src/code-stub-assembler.cc ('k') | 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 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 3087
3088 private: 3088 private:
3089 bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); } 3089 bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
3090 3090
3091 class SaveDoublesBits : public BitField<bool, 0, 1> {}; 3091 class SaveDoublesBits : public BitField<bool, 0, 1> {};
3092 3092
3093 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); 3093 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
3094 DEFINE_PLATFORM_CODE_STUB(StoreBufferOverflow, PlatformCodeStub); 3094 DEFINE_PLATFORM_CODE_STUB(StoreBufferOverflow, PlatformCodeStub);
3095 }; 3095 };
3096 3096
3097 class SubStringStub : public TurboFanCodeStub {
3098 public:
3099 explicit SubStringStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
3097 3100
3098 class SubStringStub : public PlatformCodeStub { 3101 static compiler::Node* Generate(CodeStubAssembler* assembler,
3099 public: 3102 compiler::Node* string, compiler::Node* from,
3100 explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 3103 compiler::Node* to, compiler::Node* context);
3104
3105 void GenerateAssembly(CodeStubAssembler* assembler) const override {
3106 assembler->Return(Generate(assembler,
3107 assembler->Parameter(Descriptor::kString),
3108 assembler->Parameter(Descriptor::kFrom),
3109 assembler->Parameter(Descriptor::kTo),
3110 assembler->Parameter(Descriptor::kContext)));
3111 }
3101 3112
3102 DEFINE_CALL_INTERFACE_DESCRIPTOR(SubString); 3113 DEFINE_CALL_INTERFACE_DESCRIPTOR(SubString);
3103 DEFINE_PLATFORM_CODE_STUB(SubString, PlatformCodeStub); 3114 DEFINE_CODE_STUB(SubString, TurboFanCodeStub);
3104 }; 3115 };
3105 3116
3106 class ToStringStub final : public PlatformCodeStub { 3117 class ToStringStub final : public PlatformCodeStub {
3107 public: 3118 public:
3108 explicit ToStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 3119 explicit ToStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
3109 3120
3110 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); 3121 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion);
3111 DEFINE_PLATFORM_CODE_STUB(ToString, PlatformCodeStub); 3122 DEFINE_PLATFORM_CODE_STUB(ToString, PlatformCodeStub);
3112 }; 3123 };
3113 3124
(...skipping 11 matching lines...) Expand all
3125 #undef DEFINE_HYDROGEN_CODE_STUB 3136 #undef DEFINE_HYDROGEN_CODE_STUB
3126 #undef DEFINE_CODE_STUB 3137 #undef DEFINE_CODE_STUB
3127 #undef DEFINE_CODE_STUB_BASE 3138 #undef DEFINE_CODE_STUB_BASE
3128 3139
3129 extern Representation RepresentationFromMachineType(MachineType type); 3140 extern Representation RepresentationFromMachineType(MachineType type);
3130 3141
3131 } // namespace internal 3142 } // namespace internal
3132 } // namespace v8 3143 } // namespace v8
3133 3144
3134 #endif // V8_CODE_STUBS_H_ 3145 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698