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

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

Issue 1149053004: Make KeyedStores from a sloppy arguments array use a handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code comments. Created 5 years, 6 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/builtins.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/codegen.h" 10 #include "src/codegen.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 /* TurboFanCodeStubs */ \ 94 /* TurboFanCodeStubs */ \
95 V(StringLengthTF) \ 95 V(StringLengthTF) \
96 V(StringAddTF) \ 96 V(StringAddTF) \
97 V(MathFloor) \ 97 V(MathFloor) \
98 /* IC Handler stubs */ \ 98 /* IC Handler stubs */ \
99 V(ArrayBufferViewLoadField) \ 99 V(ArrayBufferViewLoadField) \
100 V(LoadConstant) \ 100 V(LoadConstant) \
101 V(LoadFastElement) \ 101 V(LoadFastElement) \
102 V(LoadField) \ 102 V(LoadField) \
103 V(KeyedLoadSloppyArguments) \ 103 V(KeyedLoadSloppyArguments) \
104 V(KeyedStoreSloppyArguments) \
104 V(StoreField) \ 105 V(StoreField) \
105 V(StoreGlobal) \ 106 V(StoreGlobal) \
106 V(StoreTransition) \ 107 V(StoreTransition) \
107 V(StringLength) \ 108 V(StringLength) \
108 V(RestParamAccess) 109 V(RestParamAccess)
109 110
110 // List of code stubs only used on ARM 32 bits platforms. 111 // List of code stubs only used on ARM 32 bits platforms.
111 #if V8_TARGET_ARCH_ARM 112 #if V8_TARGET_ARCH_ARM
112 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry) 113 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry)
113 114
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 1131
1131 protected: 1132 protected:
1132 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } 1133 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; }
1133 Code::StubType GetStubType() const override { return Code::FAST; } 1134 Code::StubType GetStubType() const override { return Code::FAST; }
1134 1135
1135 private: 1136 private:
1136 DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub); 1137 DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub);
1137 }; 1138 };
1138 1139
1139 1140
1141 class KeyedStoreSloppyArgumentsStub : public HandlerStub {
1142 public:
1143 explicit KeyedStoreSloppyArgumentsStub(Isolate* isolate)
1144 : HandlerStub(isolate) {}
1145
1146 protected:
1147 Code::Kind kind() const override { return Code::KEYED_STORE_IC; }
1148 Code::StubType GetStubType() const override { return Code::FAST; }
1149
1150 private:
1151 DEFINE_HANDLER_CODE_STUB(KeyedStoreSloppyArguments, HandlerStub);
1152 };
1153
1154
1140 class LoadConstantStub : public HandlerStub { 1155 class LoadConstantStub : public HandlerStub {
1141 public: 1156 public:
1142 LoadConstantStub(Isolate* isolate, int constant_index) 1157 LoadConstantStub(Isolate* isolate, int constant_index)
1143 : HandlerStub(isolate) { 1158 : HandlerStub(isolate) {
1144 set_sub_minor_key(ConstantIndexBits::encode(constant_index)); 1159 set_sub_minor_key(ConstantIndexBits::encode(constant_index));
1145 } 1160 }
1146 1161
1147 int constant_index() const { 1162 int constant_index() const {
1148 return ConstantIndexBits::decode(sub_minor_key()); 1163 return ConstantIndexBits::decode(sub_minor_key());
1149 } 1164 }
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2951 2966
2952 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR 2967 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR
2953 #undef DEFINE_PLATFORM_CODE_STUB 2968 #undef DEFINE_PLATFORM_CODE_STUB
2954 #undef DEFINE_HANDLER_CODE_STUB 2969 #undef DEFINE_HANDLER_CODE_STUB
2955 #undef DEFINE_HYDROGEN_CODE_STUB 2970 #undef DEFINE_HYDROGEN_CODE_STUB
2956 #undef DEFINE_CODE_STUB 2971 #undef DEFINE_CODE_STUB
2957 #undef DEFINE_CODE_STUB_BASE 2972 #undef DEFINE_CODE_STUB_BASE
2958 } } // namespace v8::internal 2973 } } // namespace v8::internal
2959 2974
2960 #endif // V8_CODE_STUBS_H_ 2975 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698