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

Side by Side Diff: src/ic/handler-configuration.h

Issue 2449463002: [ic] Load IC data handlers now support prototype chain checks with global and dictionary objects. (Closed)
Patch Set: Addressing comments and fixing the handlers in new space issue Created 4 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 unified diff | Download patch
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/ia32/handler-compiler-ia32.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_IC_HANDLER_CONFIGURATION_H_ 5 #ifndef V8_IC_HANDLER_CONFIGURATION_H_
6 #define V8_IC_HANDLER_CONFIGURATION_H_ 6 #define V8_IC_HANDLER_CONFIGURATION_H_
7 7
8 #include "src/elements-kind.h" 8 #include "src/elements-kind.h"
9 #include "src/field-index.h" 9 #include "src/field-index.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // 52 //
53 // Encoding when KindBits contains kForElements. 53 // Encoding when KindBits contains kForElements.
54 // 54 //
55 class IsJsArrayBits : public BitField<bool, KindBits::kNext, 1> {}; 55 class IsJsArrayBits : public BitField<bool, KindBits::kNext, 1> {};
56 class ConvertHoleBits : public BitField<bool, IsJsArrayBits::kNext, 1> {}; 56 class ConvertHoleBits : public BitField<bool, IsJsArrayBits::kNext, 1> {};
57 class ElementsKindBits 57 class ElementsKindBits
58 : public BitField<ElementsKind, ConvertHoleBits::kNext, 8> {}; 58 : public BitField<ElementsKind, ConvertHoleBits::kNext, 8> {};
59 // Make sure we don't overflow the smi. 59 // Make sure we don't overflow the smi.
60 STATIC_ASSERT(ElementsKindBits::kNext <= kSmiValueSize); 60 STATIC_ASSERT(ElementsKindBits::kNext <= kSmiValueSize);
61 61
62 // The layout of an Tuple3 handler representing a load of a field from
63 // prototype when prototype chain checks do not include non-existing lookups
64 // or access checks.
65 static const int kHolderCellOffset = Tuple3::kValue1Offset;
66 static const int kSmiHandlerOffset = Tuple3::kValue2Offset;
67 static const int kValidityCellOffset = Tuple3::kValue3Offset;
68
69 // The layout of an array handler representing a load of a field from
70 // prototype when prototype chain checks include non-existing lookups and
71 // access checks.
72 static const int kSmiHandlerIndex = 0;
73 static const int kValidityCellIndex = 1;
74 static const int kHolderCellIndex = 2;
75 static const int kFirstPrototypeIndex = 3;
76
62 // Creates a Smi-handler for loading a field from fast object. 77 // Creates a Smi-handler for loading a field from fast object.
63 static inline Handle<Object> LoadField(Isolate* isolate, 78 static inline Handle<Object> LoadField(Isolate* isolate,
64 FieldIndex field_index); 79 FieldIndex field_index);
65 80
66 // Creates a Smi-handler for loading a constant from fast object. 81 // Creates a Smi-handler for loading a constant from fast object.
67 static inline Handle<Object> LoadConstant(Isolate* isolate, int descriptor); 82 static inline Handle<Object> LoadConstant(Isolate* isolate, int descriptor);
68 83
69 // Sets DoNegativeLookupOnReceiverBits in given Smi-handler. The receiver 84 // Sets DoNegativeLookupOnReceiverBits in given Smi-handler. The receiver
70 // check is a part of a prototype chain check. 85 // check is a part of a prototype chain check.
71 static inline Handle<Object> EnableNegativeLookupOnReceiver( 86 static inline Handle<Object> EnableNegativeLookupOnReceiver(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Creates a Smi-handler for storing a field to fast object. 121 // Creates a Smi-handler for storing a field to fast object.
107 static inline Handle<Object> StoreField(Isolate* isolate, int descriptor, 122 static inline Handle<Object> StoreField(Isolate* isolate, int descriptor,
108 FieldIndex field_index, 123 FieldIndex field_index,
109 Representation representation); 124 Representation representation);
110 }; 125 };
111 126
112 } // namespace internal 127 } // namespace internal
113 } // namespace v8 128 } // namespace v8
114 129
115 #endif // V8_IC_HANDLER_CONFIGURATION_H_ 130 #endif // V8_IC_HANDLER_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698