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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/accessors.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index f832f40dd450eb89a3cadba194df13c630ea800f..c40bc857cad53b1d03778940c7615c3cc67c2a38 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -88,6 +88,7 @@ namespace internal {
V(VectorRawKeyedLoad) \
V(VectorRawLoad) \
/* IC Handler stubs */ \
+ V(ArrayBufferViewLoadField) \
V(LoadConstant) \
V(LoadField) \
V(KeyedLoadSloppyArguments) \
@@ -973,6 +974,32 @@ class LoadFieldStub: public HandlerStub {
};
+class ArrayBufferViewLoadFieldStub : public HandlerStub {
+ public:
+ ArrayBufferViewLoadFieldStub(Isolate* isolate, FieldIndex index)
+ : HandlerStub(isolate) {
+ int property_index_key = index.GetFieldAccessStubKey();
+ set_sub_minor_key(
+ ArrayBufferViewLoadFieldByIndexBits::encode(property_index_key));
+ }
+
+ FieldIndex index() const {
+ int property_index_key =
+ ArrayBufferViewLoadFieldByIndexBits::decode(sub_minor_key());
+ return FieldIndex::FromFieldAccessStubKey(property_index_key);
+ }
+
+ protected:
+ Code::Kind kind() const override { return Code::LOAD_IC; }
+ Code::StubType GetStubType() const override { return Code::FAST; }
+
+ private:
+ class ArrayBufferViewLoadFieldByIndexBits : public BitField<int, 0, 13> {};
+
+ DEFINE_HANDLER_CODE_STUB(ArrayBufferViewLoadField, HandlerStub);
+};
+
+
class KeyedLoadSloppyArgumentsStub : public HandlerStub {
public:
explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate)
« 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