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

Unified Diff: src/compiler/access-info.h

Issue 1453653003: [turbofan] Add support for special JSArrayBufferView accessors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/compiler/access-builder.cc ('k') | src/compiler/access-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-info.h
diff --git a/src/compiler/access-info.h b/src/compiler/access-info.h
index 1556e0ee3838482ddcca8f07d4deaeefa3df7a9f..cae119140a5775c149205ea8aeb18ed8b50cdbc2 100644
--- a/src/compiler/access-info.h
+++ b/src/compiler/access-info.h
@@ -53,6 +53,16 @@ class ElementAccessInfo final {
};
+// Additional checks that need to be perform for data field accesses.
+enum class FieldCheck : uint8_t {
+ // No additional checking needed.
+ kNone,
+ // Check that the [[ViewedArrayBuffer]] of {JSArrayBufferView}s
+ // was not neutered.
+ kJSArrayBufferViewBufferNotNeutered,
+};
+
+
// This class encapsulates all information required to access a certain
// object property, either on the object itself or on the prototype chain.
class PropertyAccessInfo final {
@@ -66,6 +76,7 @@ class PropertyAccessInfo final {
MaybeHandle<JSObject> holder);
static PropertyAccessInfo DataField(
Type* receiver_type, FieldIndex field_index, Type* field_type,
+ FieldCheck field_check = FieldCheck::kNone,
MaybeHandle<JSObject> holder = MaybeHandle<JSObject>(),
MaybeHandle<Map> transition_map = MaybeHandle<Map>());
@@ -81,6 +92,7 @@ class PropertyAccessInfo final {
MaybeHandle<JSObject> holder() const { return holder_; }
MaybeHandle<Map> transition_map() const { return transition_map_; }
Handle<Object> constant() const { return constant_; }
+ FieldCheck field_check() const { return field_check_; }
FieldIndex field_index() const { return field_index_; }
Type* field_type() const { return field_type_; }
Type* receiver_type() const { return receiver_type_; }
@@ -91,7 +103,8 @@ class PropertyAccessInfo final {
Type* receiver_type);
PropertyAccessInfo(MaybeHandle<JSObject> holder,
MaybeHandle<Map> transition_map, FieldIndex field_index,
- Type* field_type, Type* receiver_type);
+ FieldCheck field_check, Type* field_type,
+ Type* receiver_type);
Kind kind_;
Type* receiver_type_;
@@ -99,6 +112,7 @@ class PropertyAccessInfo final {
MaybeHandle<Map> transition_map_;
MaybeHandle<JSObject> holder_;
FieldIndex field_index_;
+ FieldCheck field_check_;
Type* field_type_;
};
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/access-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698