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

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

Issue 1107843002: Reland "Remove the weak list of views from array buffers" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use bounds check Created 5 years, 8 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/accessors.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/codegen.h" 10 #include "src/codegen.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 V(NumberToString) \ 81 V(NumberToString) \
82 V(RegExpConstructResult) \ 82 V(RegExpConstructResult) \
83 V(StoreFastElement) \ 83 V(StoreFastElement) \
84 V(StoreScriptContextField) \ 84 V(StoreScriptContextField) \
85 V(StringAdd) \ 85 V(StringAdd) \
86 V(ToBoolean) \ 86 V(ToBoolean) \
87 V(TransitionElementsKind) \ 87 V(TransitionElementsKind) \
88 V(VectorRawKeyedLoad) \ 88 V(VectorRawKeyedLoad) \
89 V(VectorRawLoad) \ 89 V(VectorRawLoad) \
90 /* IC Handler stubs */ \ 90 /* IC Handler stubs */ \
91 V(ArrayBufferViewLoadField) \
91 V(LoadConstant) \ 92 V(LoadConstant) \
92 V(LoadField) \ 93 V(LoadField) \
93 V(KeyedLoadSloppyArguments) \ 94 V(KeyedLoadSloppyArguments) \
94 V(StoreField) \ 95 V(StoreField) \
95 V(StoreGlobal) \ 96 V(StoreGlobal) \
96 V(StoreTransition) \ 97 V(StoreTransition) \
97 V(StringLength) \ 98 V(StringLength) \
98 V(RestParamAccess) 99 V(RestParamAccess)
99 100
100 // List of code stubs only used on ARM 32 bits platforms. 101 // List of code stubs only used on ARM 32 bits platforms.
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 Code::Kind kind() const override { return Code::LOAD_IC; } 967 Code::Kind kind() const override { return Code::LOAD_IC; }
967 Code::StubType GetStubType() const override { return Code::FAST; } 968 Code::StubType GetStubType() const override { return Code::FAST; }
968 969
969 private: 970 private:
970 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; 971 class LoadFieldByIndexBits : public BitField<int, 0, 13> {};
971 972
972 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); 973 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub);
973 }; 974 };
974 975
975 976
977 class ArrayBufferViewLoadFieldStub : public HandlerStub {
978 public:
979 ArrayBufferViewLoadFieldStub(Isolate* isolate, FieldIndex index)
980 : HandlerStub(isolate) {
981 int property_index_key = index.GetFieldAccessStubKey();
982 set_sub_minor_key(
983 ArrayBufferViewLoadFieldByIndexBits::encode(property_index_key));
984 }
985
986 FieldIndex index() const {
987 int property_index_key =
988 ArrayBufferViewLoadFieldByIndexBits::decode(sub_minor_key());
989 return FieldIndex::FromFieldAccessStubKey(property_index_key);
990 }
991
992 protected:
993 Code::Kind kind() const override { return Code::LOAD_IC; }
994 Code::StubType GetStubType() const override { return Code::FAST; }
995
996 private:
997 class ArrayBufferViewLoadFieldByIndexBits : public BitField<int, 0, 13> {};
998
999 DEFINE_HANDLER_CODE_STUB(ArrayBufferViewLoadField, HandlerStub);
1000 };
1001
1002
976 class KeyedLoadSloppyArgumentsStub : public HandlerStub { 1003 class KeyedLoadSloppyArgumentsStub : public HandlerStub {
977 public: 1004 public:
978 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) 1005 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate)
979 : HandlerStub(isolate) {} 1006 : HandlerStub(isolate) {}
980 1007
981 protected: 1008 protected:
982 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } 1009 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; }
983 Code::StubType GetStubType() const override { return Code::FAST; } 1010 Code::StubType GetStubType() const override { return Code::FAST; }
984 1011
985 private: 1012 private:
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2762 2789
2763 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR 2790 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR
2764 #undef DEFINE_PLATFORM_CODE_STUB 2791 #undef DEFINE_PLATFORM_CODE_STUB
2765 #undef DEFINE_HANDLER_CODE_STUB 2792 #undef DEFINE_HANDLER_CODE_STUB
2766 #undef DEFINE_HYDROGEN_CODE_STUB 2793 #undef DEFINE_HYDROGEN_CODE_STUB
2767 #undef DEFINE_CODE_STUB 2794 #undef DEFINE_CODE_STUB
2768 #undef DEFINE_CODE_STUB_BASE 2795 #undef DEFINE_CODE_STUB_BASE
2769 } } // namespace v8::internal 2796 } } // namespace v8::internal
2770 2797
2771 #endif // V8_CODE_STUBS_H_ 2798 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698