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

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

Issue 2042013003: [builtins] Properly optimize TypedArray/DataView accessors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Yang's comments. Created 4 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-hydrogen.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 V(StringLessThanOrEqual) \ 135 V(StringLessThanOrEqual) \
136 V(StringGreaterThan) \ 136 V(StringGreaterThan) \
137 V(StringGreaterThanOrEqual) \ 137 V(StringGreaterThanOrEqual) \
138 V(ToBoolean) \ 138 V(ToBoolean) \
139 V(ToInteger) \ 139 V(ToInteger) \
140 V(ToLength) \ 140 V(ToLength) \
141 V(HasProperty) \ 141 V(HasProperty) \
142 V(LoadICTrampolineTF) \ 142 V(LoadICTrampolineTF) \
143 V(LoadICTF) \ 143 V(LoadICTF) \
144 /* IC Handler stubs */ \ 144 /* IC Handler stubs */ \
145 V(ArrayBufferViewLoadField) \
146 V(KeyedLoadSloppyArguments) \ 145 V(KeyedLoadSloppyArguments) \
147 V(KeyedStoreSloppyArguments) \ 146 V(KeyedStoreSloppyArguments) \
148 V(LoadApiGetter) \ 147 V(LoadApiGetter) \
149 V(LoadConstant) \ 148 V(LoadConstant) \
150 V(LoadFastElement) \ 149 V(LoadFastElement) \
151 V(LoadField) \ 150 V(LoadField) \
152 V(LoadIndexedInterceptor) \ 151 V(LoadIndexedInterceptor) \
153 V(StoreField) \ 152 V(StoreField) \
154 V(StoreGlobal) \ 153 V(StoreGlobal) \
155 V(StoreInterceptor) \ 154 V(StoreInterceptor) \
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 protected: 1447 protected:
1449 Code::Kind kind() const override { return Code::LOAD_IC; } 1448 Code::Kind kind() const override { return Code::LOAD_IC; }
1450 1449
1451 private: 1450 private:
1452 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; 1451 class LoadFieldByIndexBits : public BitField<int, 0, 13> {};
1453 1452
1454 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); 1453 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub);
1455 }; 1454 };
1456 1455
1457 1456
1458 class ArrayBufferViewLoadFieldStub : public HandlerStub {
1459 public:
1460 ArrayBufferViewLoadFieldStub(Isolate* isolate, FieldIndex index)
1461 : HandlerStub(isolate) {
1462 int property_index_key = index.GetFieldAccessStubKey();
1463 set_sub_minor_key(
1464 ArrayBufferViewLoadFieldByIndexBits::encode(property_index_key));
1465 }
1466
1467 FieldIndex index() const {
1468 int property_index_key =
1469 ArrayBufferViewLoadFieldByIndexBits::decode(sub_minor_key());
1470 return FieldIndex::FromFieldAccessStubKey(property_index_key);
1471 }
1472
1473 protected:
1474 Code::Kind kind() const override { return Code::LOAD_IC; }
1475
1476 private:
1477 class ArrayBufferViewLoadFieldByIndexBits : public BitField<int, 0, 13> {};
1478
1479 DEFINE_HANDLER_CODE_STUB(ArrayBufferViewLoadField, HandlerStub);
1480 };
1481
1482
1483 class KeyedLoadSloppyArgumentsStub : public HandlerStub { 1457 class KeyedLoadSloppyArgumentsStub : public HandlerStub {
1484 public: 1458 public:
1485 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) 1459 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate)
1486 : HandlerStub(isolate) {} 1460 : HandlerStub(isolate) {}
1487 1461
1488 protected: 1462 protected:
1489 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } 1463 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; }
1490 1464
1491 private: 1465 private:
1492 DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub); 1466 DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub);
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 #undef DEFINE_HYDROGEN_CODE_STUB 3265 #undef DEFINE_HYDROGEN_CODE_STUB
3292 #undef DEFINE_CODE_STUB 3266 #undef DEFINE_CODE_STUB
3293 #undef DEFINE_CODE_STUB_BASE 3267 #undef DEFINE_CODE_STUB_BASE
3294 3268
3295 extern Representation RepresentationFromType(Type* type); 3269 extern Representation RepresentationFromType(Type* type);
3296 3270
3297 } // namespace internal 3271 } // namespace internal
3298 } // namespace v8 3272 } // namespace v8
3299 3273
3300 #endif // V8_CODE_STUBS_H_ 3274 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698