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

Side by Side Diff: src/compiler/access-builder.cc

Issue 2604393002: [turbofan] Utilize maps from field type tracking to eliminate map checks. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | src/compiler/js-create-lowering.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/compiler/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 6
7 #include "src/compiler/type-cache.h" 7 #include "src/compiler/type-cache.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/frames.h" 9 #include "src/frames.h"
10 #include "src/handles-inl.h" 10 #include "src/handles-inl.h"
11 #include "src/heap/heap.h" 11 #include "src/heap/heap.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 namespace compiler { 15 namespace compiler {
16 16
17 // static 17 // static
18 FieldAccess AccessBuilder::ForExternalDoubleValue() { 18 FieldAccess AccessBuilder::ForExternalDoubleValue() {
19 FieldAccess access = {kUntaggedBase, 0, 19 FieldAccess access = {kUntaggedBase, 0,
20 MaybeHandle<Name>(), Type::Number(), 20 MaybeHandle<Name>(), MaybeHandle<Map>(),
21 MachineType::Float64(), kNoWriteBarrier}; 21 Type::Number(), MachineType::Float64(),
22 kNoWriteBarrier};
22 return access; 23 return access;
23 } 24 }
24 25
25 // static 26 // static
26 FieldAccess AccessBuilder::ForExternalUint8Value() { 27 FieldAccess AccessBuilder::ForExternalUint8Value() {
27 FieldAccess access = {kUntaggedBase, 0, 28 FieldAccess access = {kUntaggedBase, 0,
28 MaybeHandle<Name>(), TypeCache::Get().kUint8, 29 MaybeHandle<Name>(), MaybeHandle<Map>(),
29 MachineType::Uint8(), kNoWriteBarrier}; 30 TypeCache::Get().kUint8, MachineType::Uint8(),
31 kNoWriteBarrier};
30 return access; 32 return access;
31 } 33 }
32 34
33 // static 35 // static
34 FieldAccess AccessBuilder::ForMap() { 36 FieldAccess AccessBuilder::ForMap() {
35 FieldAccess access = { 37 FieldAccess access = {kTaggedBase, HeapObject::kMapOffset,
36 kTaggedBase, HeapObject::kMapOffset, MaybeHandle<Name>(), 38 MaybeHandle<Name>(), MaybeHandle<Map>(),
37 Type::OtherInternal(), MachineType::TaggedPointer(), kMapWriteBarrier}; 39 Type::OtherInternal(), MachineType::TaggedPointer(),
40 kMapWriteBarrier};
38 return access; 41 return access;
39 } 42 }
40 43
41 44
42 // static 45 // static
43 FieldAccess AccessBuilder::ForHeapNumberValue() { 46 FieldAccess AccessBuilder::ForHeapNumberValue() {
44 FieldAccess access = {kTaggedBase, 47 FieldAccess access = {
45 HeapNumber::kValueOffset, 48 kTaggedBase, HeapNumber::kValueOffset, MaybeHandle<Name>(),
46 MaybeHandle<Name>(), 49 MaybeHandle<Map>(), TypeCache::Get().kFloat64, MachineType::Float64(),
47 TypeCache::Get().kFloat64, 50 kNoWriteBarrier};
48 MachineType::Float64(),
49 kNoWriteBarrier};
50 return access; 51 return access;
51 } 52 }
52 53
53 54
54 // static 55 // static
55 FieldAccess AccessBuilder::ForJSObjectProperties() { 56 FieldAccess AccessBuilder::ForJSObjectProperties() {
56 FieldAccess access = { 57 FieldAccess access = {kTaggedBase, JSObject::kPropertiesOffset,
57 kTaggedBase, JSObject::kPropertiesOffset, MaybeHandle<Name>(), 58 MaybeHandle<Name>(), MaybeHandle<Map>(),
58 Type::Internal(), MachineType::TaggedPointer(), kPointerWriteBarrier}; 59 Type::Internal(), MachineType::TaggedPointer(),
60 kPointerWriteBarrier};
59 return access; 61 return access;
60 } 62 }
61 63
62 64
63 // static 65 // static
64 FieldAccess AccessBuilder::ForJSObjectElements() { 66 FieldAccess AccessBuilder::ForJSObjectElements() {
65 FieldAccess access = { 67 FieldAccess access = {kTaggedBase, JSObject::kElementsOffset,
66 kTaggedBase, JSObject::kElementsOffset, MaybeHandle<Name>(), 68 MaybeHandle<Name>(), MaybeHandle<Map>(),
67 Type::Internal(), MachineType::TaggedPointer(), kPointerWriteBarrier}; 69 Type::Internal(), MachineType::TaggedPointer(),
70 kPointerWriteBarrier};
68 return access; 71 return access;
69 } 72 }
70 73
71 74
72 // static 75 // static
73 FieldAccess AccessBuilder::ForJSObjectInObjectProperty(Handle<Map> map, 76 FieldAccess AccessBuilder::ForJSObjectInObjectProperty(Handle<Map> map,
74 int index) { 77 int index) {
75 int const offset = map->GetInObjectPropertyOffset(index); 78 int const offset = map->GetInObjectPropertyOffset(index);
76 FieldAccess access = {kTaggedBase, 79 FieldAccess access = {kTaggedBase, offset,
77 offset, 80 MaybeHandle<Name>(), MaybeHandle<Map>(),
78 MaybeHandle<Name>(), 81 Type::NonInternal(), MachineType::AnyTagged(),
79 Type::NonInternal(),
80 MachineType::AnyTagged(),
81 kFullWriteBarrier}; 82 kFullWriteBarrier};
82 return access; 83 return access;
83 } 84 }
84 85
85 86
86 // static 87 // static
87 FieldAccess AccessBuilder::ForJSFunctionPrototypeOrInitialMap() { 88 FieldAccess AccessBuilder::ForJSFunctionPrototypeOrInitialMap() {
88 FieldAccess access = {kTaggedBase, 89 FieldAccess access = {
89 JSFunction::kPrototypeOrInitialMapOffset, 90 kTaggedBase, JSFunction::kPrototypeOrInitialMapOffset,
90 MaybeHandle<Name>(), 91 MaybeHandle<Name>(), MaybeHandle<Map>(),
91 Type::Any(), 92 Type::Any(), MachineType::AnyTagged(),
92 MachineType::AnyTagged(), 93 kFullWriteBarrier};
93 kFullWriteBarrier};
94 return access; 94 return access;
95 } 95 }
96 96
97 // static 97 // static
98 FieldAccess AccessBuilder::ForJSFunctionContext() { 98 FieldAccess AccessBuilder::ForJSFunctionContext() {
99 FieldAccess access = { 99 FieldAccess access = {kTaggedBase, JSFunction::kContextOffset,
100 kTaggedBase, JSFunction::kContextOffset, MaybeHandle<Name>(), 100 MaybeHandle<Name>(), MaybeHandle<Map>(),
101 Type::Internal(), MachineType::AnyTagged(), kPointerWriteBarrier}; 101 Type::Internal(), MachineType::AnyTagged(),
102 kPointerWriteBarrier};
102 return access; 103 return access;
103 } 104 }
104 105
105 106
106 // static 107 // static
107 FieldAccess AccessBuilder::ForJSFunctionSharedFunctionInfo() { 108 FieldAccess AccessBuilder::ForJSFunctionSharedFunctionInfo() {
108 FieldAccess access = {kTaggedBase, 109 FieldAccess access = {
109 JSFunction::kSharedFunctionInfoOffset, 110 kTaggedBase, JSFunction::kSharedFunctionInfoOffset,
110 Handle<Name>(), 111 Handle<Name>(), MaybeHandle<Map>(),
111 Type::OtherInternal(), 112 Type::OtherInternal(), MachineType::TaggedPointer(),
112 MachineType::TaggedPointer(), 113 kPointerWriteBarrier};
114 return access;
115 }
116
117 // static
118 FieldAccess AccessBuilder::ForJSFunctionLiterals() {
119 FieldAccess access = {kTaggedBase, JSFunction::kLiteralsOffset,
120 Handle<Name>(), MaybeHandle<Map>(),
121 Type::Internal(), MachineType::TaggedPointer(),
113 kPointerWriteBarrier}; 122 kPointerWriteBarrier};
114 return access; 123 return access;
115 } 124 }
116 125
117 // static 126 // static
118 FieldAccess AccessBuilder::ForJSFunctionLiterals() {
119 FieldAccess access = {
120 kTaggedBase, JSFunction::kLiteralsOffset, Handle<Name>(),
121 Type::Internal(), MachineType::TaggedPointer(), kPointerWriteBarrier};
122 return access;
123 }
124
125 // static
126 FieldAccess AccessBuilder::ForJSFunctionCodeEntry() { 127 FieldAccess AccessBuilder::ForJSFunctionCodeEntry() {
127 FieldAccess access = { 128 FieldAccess access = {kTaggedBase, JSFunction::kCodeEntryOffset,
128 kTaggedBase, JSFunction::kCodeEntryOffset, Handle<Name>(), 129 Handle<Name>(), MaybeHandle<Map>(),
129 Type::OtherInternal(), MachineType::Pointer(), kNoWriteBarrier}; 130 Type::OtherInternal(), MachineType::Pointer(),
131 kNoWriteBarrier};
130 return access; 132 return access;
131 } 133 }
132 134
133 // static 135 // static
134 FieldAccess AccessBuilder::ForJSFunctionNextFunctionLink() { 136 FieldAccess AccessBuilder::ForJSFunctionNextFunctionLink() {
135 FieldAccess access = {kTaggedBase, 137 FieldAccess access = {
136 JSFunction::kNextFunctionLinkOffset, 138 kTaggedBase, JSFunction::kNextFunctionLinkOffset,
137 Handle<Name>(), 139 Handle<Name>(), MaybeHandle<Map>(),
138 Type::Any(), 140 Type::Any(), MachineType::AnyTagged(),
139 MachineType::AnyTagged(), 141 kPointerWriteBarrier};
140 kPointerWriteBarrier};
141 return access; 142 return access;
142 } 143 }
143 144
144 // static 145 // static
145 FieldAccess AccessBuilder::ForJSGeneratorObjectContext() { 146 FieldAccess AccessBuilder::ForJSGeneratorObjectContext() {
146 FieldAccess access = {kTaggedBase, 147 FieldAccess access = {kTaggedBase, JSGeneratorObject::kContextOffset,
147 JSGeneratorObject::kContextOffset, 148 Handle<Name>(), MaybeHandle<Map>(),
148 Handle<Name>(), 149 Type::Internal(), MachineType::TaggedPointer(),
149 Type::Internal(),
150 MachineType::TaggedPointer(),
151 kPointerWriteBarrier}; 150 kPointerWriteBarrier};
152 return access; 151 return access;
153 } 152 }
154 153
155 // static 154 // static
156 FieldAccess AccessBuilder::ForJSGeneratorObjectContinuation() { 155 FieldAccess AccessBuilder::ForJSGeneratorObjectContinuation() {
157 FieldAccess access = {kTaggedBase, 156 FieldAccess access = {
158 JSGeneratorObject::kContinuationOffset, 157 kTaggedBase, JSGeneratorObject::kContinuationOffset,
159 Handle<Name>(), 158 Handle<Name>(), MaybeHandle<Map>(),
160 Type::SignedSmall(), 159 Type::SignedSmall(), MachineType::TaggedSigned(),
161 MachineType::TaggedSigned(), 160 kNoWriteBarrier};
162 kNoWriteBarrier};
163 return access; 161 return access;
164 } 162 }
165 163
166 // static 164 // static
167 FieldAccess AccessBuilder::ForJSGeneratorObjectInputOrDebugPos() { 165 FieldAccess AccessBuilder::ForJSGeneratorObjectInputOrDebugPos() {
168 FieldAccess access = {kTaggedBase, 166 FieldAccess access = {
169 JSGeneratorObject::kInputOrDebugPosOffset, 167 kTaggedBase, JSGeneratorObject::kInputOrDebugPosOffset,
170 Handle<Name>(), 168 Handle<Name>(), MaybeHandle<Map>(),
171 Type::NonInternal(), 169 Type::NonInternal(), MachineType::AnyTagged(),
172 MachineType::AnyTagged(), 170 kFullWriteBarrier};
173 kFullWriteBarrier};
174 return access; 171 return access;
175 } 172 }
176 173
177 // static 174 // static
178 FieldAccess AccessBuilder::ForJSGeneratorObjectRegisterFile() { 175 FieldAccess AccessBuilder::ForJSGeneratorObjectRegisterFile() {
179 FieldAccess access = {kTaggedBase, 176 FieldAccess access = {
180 JSGeneratorObject::kRegisterFileOffset, 177 kTaggedBase, JSGeneratorObject::kRegisterFileOffset,
181 Handle<Name>(), 178 Handle<Name>(), MaybeHandle<Map>(),
182 Type::Internal(), 179 Type::Internal(), MachineType::AnyTagged(),
183 MachineType::AnyTagged(), 180 kPointerWriteBarrier};
184 kPointerWriteBarrier};
185 return access; 181 return access;
186 } 182 }
187 183
188 // static 184 // static
189 FieldAccess AccessBuilder::ForJSGeneratorObjectResumeMode() { 185 FieldAccess AccessBuilder::ForJSGeneratorObjectResumeMode() {
190 FieldAccess access = {kTaggedBase, 186 FieldAccess access = {
191 JSGeneratorObject::kResumeModeOffset, 187 kTaggedBase, JSGeneratorObject::kResumeModeOffset,
192 Handle<Name>(), 188 Handle<Name>(), MaybeHandle<Map>(),
193 Type::SignedSmall(), 189 Type::SignedSmall(), MachineType::TaggedSigned(),
194 MachineType::TaggedSigned(), 190 kNoWriteBarrier};
195 kNoWriteBarrier};
196 return access; 191 return access;
197 } 192 }
198 193
199 // static 194 // static
200 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) { 195 FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) {
201 TypeCache const& type_cache = TypeCache::Get(); 196 TypeCache const& type_cache = TypeCache::Get();
202 FieldAccess access = {kTaggedBase, 197 FieldAccess access = {kTaggedBase,
203 JSArray::kLengthOffset, 198 JSArray::kLengthOffset,
204 Handle<Name>(), 199 Handle<Name>(),
200 MaybeHandle<Map>(),
205 type_cache.kJSArrayLengthType, 201 type_cache.kJSArrayLengthType,
206 MachineType::TaggedSigned(), 202 MachineType::TaggedSigned(),
207 kFullWriteBarrier}; 203 kFullWriteBarrier};
208 if (IsFastDoubleElementsKind(elements_kind)) { 204 if (IsFastDoubleElementsKind(elements_kind)) {
209 access.type = type_cache.kFixedDoubleArrayLengthType; 205 access.type = type_cache.kFixedDoubleArrayLengthType;
210 access.write_barrier_kind = kNoWriteBarrier; 206 access.write_barrier_kind = kNoWriteBarrier;
211 } else if (IsFastElementsKind(elements_kind)) { 207 } else if (IsFastElementsKind(elements_kind)) {
212 access.type = type_cache.kFixedArrayLengthType; 208 access.type = type_cache.kFixedArrayLengthType;
213 access.write_barrier_kind = kNoWriteBarrier; 209 access.write_barrier_kind = kNoWriteBarrier;
214 } 210 }
215 return access; 211 return access;
216 } 212 }
217 213
218 214
219 // static 215 // static
220 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() { 216 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() {
221 FieldAccess access = {kTaggedBase, 217 FieldAccess access = {
222 JSArrayBuffer::kBackingStoreOffset, 218 kTaggedBase, JSArrayBuffer::kBackingStoreOffset,
223 MaybeHandle<Name>(), 219 MaybeHandle<Name>(), MaybeHandle<Map>(),
224 Type::OtherInternal(), 220 Type::OtherInternal(), MachineType::Pointer(),
225 MachineType::Pointer(), 221 kNoWriteBarrier};
226 kNoWriteBarrier};
227 return access; 222 return access;
228 } 223 }
229 224
230 // static 225 // static
231 FieldAccess AccessBuilder::ForJSArrayBufferBitField() { 226 FieldAccess AccessBuilder::ForJSArrayBufferBitField() {
232 FieldAccess access = {kTaggedBase, JSArrayBuffer::kBitFieldOffset, 227 FieldAccess access = {
233 MaybeHandle<Name>(), TypeCache::Get().kUint8, 228 kTaggedBase, JSArrayBuffer::kBitFieldOffset, MaybeHandle<Name>(),
234 MachineType::Uint32(), kNoWriteBarrier}; 229 MaybeHandle<Map>(), TypeCache::Get().kUint8, MachineType::Uint32(),
230 kNoWriteBarrier};
235 return access; 231 return access;
236 } 232 }
237 233
238 // static 234 // static
239 FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() { 235 FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() {
240 FieldAccess access = {kTaggedBase, 236 FieldAccess access = {kTaggedBase, JSArrayBufferView::kBufferOffset,
241 JSArrayBufferView::kBufferOffset, 237 MaybeHandle<Name>(), MaybeHandle<Map>(),
242 MaybeHandle<Name>(), 238 Type::OtherInternal(), MachineType::TaggedPointer(),
243 Type::OtherInternal(),
244 MachineType::TaggedPointer(),
245 kPointerWriteBarrier}; 239 kPointerWriteBarrier};
246 return access; 240 return access;
247 } 241 }
248 242
249 // static 243 // static
250 FieldAccess AccessBuilder::ForJSArrayBufferViewByteLength() { 244 FieldAccess AccessBuilder::ForJSArrayBufferViewByteLength() {
251 FieldAccess access = {kTaggedBase, 245 FieldAccess access = {kTaggedBase,
252 JSArrayBufferView::kByteLengthOffset, 246 JSArrayBufferView::kByteLengthOffset,
253 MaybeHandle<Name>(), 247 MaybeHandle<Name>(),
248 MaybeHandle<Map>(),
254 TypeCache::Get().kPositiveInteger, 249 TypeCache::Get().kPositiveInteger,
255 MachineType::AnyTagged(), 250 MachineType::AnyTagged(),
256 kFullWriteBarrier}; 251 kFullWriteBarrier};
257 return access; 252 return access;
258 } 253 }
259 254
260 // static 255 // static
261 FieldAccess AccessBuilder::ForJSArrayBufferViewByteOffset() { 256 FieldAccess AccessBuilder::ForJSArrayBufferViewByteOffset() {
262 FieldAccess access = {kTaggedBase, 257 FieldAccess access = {kTaggedBase,
263 JSArrayBufferView::kByteOffsetOffset, 258 JSArrayBufferView::kByteOffsetOffset,
264 MaybeHandle<Name>(), 259 MaybeHandle<Name>(),
260 MaybeHandle<Map>(),
265 TypeCache::Get().kPositiveInteger, 261 TypeCache::Get().kPositiveInteger,
266 MachineType::AnyTagged(), 262 MachineType::AnyTagged(),
267 kFullWriteBarrier}; 263 kFullWriteBarrier};
268 return access; 264 return access;
269 } 265 }
270 266
271 // static 267 // static
272 FieldAccess AccessBuilder::ForJSTypedArrayLength() { 268 FieldAccess AccessBuilder::ForJSTypedArrayLength() {
273 FieldAccess access = {kTaggedBase, 269 FieldAccess access = {kTaggedBase,
274 JSTypedArray::kLengthOffset, 270 JSTypedArray::kLengthOffset,
275 MaybeHandle<Name>(), 271 MaybeHandle<Name>(),
272 MaybeHandle<Map>(),
276 TypeCache::Get().kJSTypedArrayLengthType, 273 TypeCache::Get().kJSTypedArrayLengthType,
277 MachineType::TaggedSigned(), 274 MachineType::TaggedSigned(),
278 kNoWriteBarrier}; 275 kNoWriteBarrier};
279 return access; 276 return access;
280 } 277 }
281 278
282 // static 279 // static
283 FieldAccess AccessBuilder::ForJSDateValue() { 280 FieldAccess AccessBuilder::ForJSDateValue() {
284 FieldAccess access = {kTaggedBase, 281 FieldAccess access = {kTaggedBase,
285 JSDate::kValueOffset, 282 JSDate::kValueOffset,
286 MaybeHandle<Name>(), 283 MaybeHandle<Name>(),
284 MaybeHandle<Map>(),
287 TypeCache::Get().kJSDateValueType, 285 TypeCache::Get().kJSDateValueType,
288 MachineType::AnyTagged(), 286 MachineType::AnyTagged(),
289 kFullWriteBarrier}; 287 kFullWriteBarrier};
290 return access; 288 return access;
291 } 289 }
292 290
293 // static 291 // static
294 FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) { 292 FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) {
295 FieldAccess access = {kTaggedBase, 293 FieldAccess access = {
296 JSDate::kValueOffset + index * kPointerSize, 294 kTaggedBase, JSDate::kValueOffset + index * kPointerSize,
297 MaybeHandle<Name>(), 295 MaybeHandle<Name>(), MaybeHandle<Map>(),
298 Type::Number(), 296 Type::Number(), MachineType::AnyTagged(),
299 MachineType::AnyTagged(), 297 kFullWriteBarrier};
298 return access;
299 }
300
301
302 // static
303 FieldAccess AccessBuilder::ForJSIteratorResultDone() {
304 FieldAccess access = {kTaggedBase, JSIteratorResult::kDoneOffset,
305 MaybeHandle<Name>(), MaybeHandle<Map>(),
306 Type::NonInternal(), MachineType::AnyTagged(),
300 kFullWriteBarrier}; 307 kFullWriteBarrier};
301 return access; 308 return access;
302 } 309 }
303 310
304 311
305 // static 312 // static
306 FieldAccess AccessBuilder::ForJSIteratorResultDone() {
307 FieldAccess access = {
308 kTaggedBase, JSIteratorResult::kDoneOffset, MaybeHandle<Name>(),
309 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier};
310 return access;
311 }
312
313
314 // static
315 FieldAccess AccessBuilder::ForJSIteratorResultValue() { 313 FieldAccess AccessBuilder::ForJSIteratorResultValue() {
316 FieldAccess access = { 314 FieldAccess access = {kTaggedBase, JSIteratorResult::kValueOffset,
317 kTaggedBase, JSIteratorResult::kValueOffset, MaybeHandle<Name>(), 315 MaybeHandle<Name>(), MaybeHandle<Map>(),
318 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier}; 316 Type::NonInternal(), MachineType::AnyTagged(),
317 kFullWriteBarrier};
319 return access; 318 return access;
320 } 319 }
321 320
322 321
323 // static 322 // static
324 FieldAccess AccessBuilder::ForJSRegExpFlags() { 323 FieldAccess AccessBuilder::ForJSRegExpFlags() {
325 FieldAccess access = { 324 FieldAccess access = {kTaggedBase, JSRegExp::kFlagsOffset,
326 kTaggedBase, JSRegExp::kFlagsOffset, MaybeHandle<Name>(), 325 MaybeHandle<Name>(), MaybeHandle<Map>(),
327 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier}; 326 Type::NonInternal(), MachineType::AnyTagged(),
327 kFullWriteBarrier};
328 return access; 328 return access;
329 } 329 }
330 330
331 331
332 // static 332 // static
333 FieldAccess AccessBuilder::ForJSRegExpSource() { 333 FieldAccess AccessBuilder::ForJSRegExpSource() {
334 FieldAccess access = { 334 FieldAccess access = {kTaggedBase, JSRegExp::kSourceOffset,
335 kTaggedBase, JSRegExp::kSourceOffset, MaybeHandle<Name>(), 335 MaybeHandle<Name>(), MaybeHandle<Map>(),
336 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier}; 336 Type::NonInternal(), MachineType::AnyTagged(),
337 kFullWriteBarrier};
337 return access; 338 return access;
338 } 339 }
339 340
340 341
341 // static 342 // static
342 FieldAccess AccessBuilder::ForFixedArrayLength() { 343 FieldAccess AccessBuilder::ForFixedArrayLength() {
343 FieldAccess access = {kTaggedBase, 344 FieldAccess access = {kTaggedBase,
344 FixedArray::kLengthOffset, 345 FixedArray::kLengthOffset,
345 MaybeHandle<Name>(), 346 MaybeHandle<Name>(),
347 MaybeHandle<Map>(),
346 TypeCache::Get().kFixedArrayLengthType, 348 TypeCache::Get().kFixedArrayLengthType,
347 MachineType::TaggedSigned(), 349 MachineType::TaggedSigned(),
348 kNoWriteBarrier}; 350 kNoWriteBarrier};
349 return access; 351 return access;
350 } 352 }
351 353
352 // static 354 // static
353 FieldAccess AccessBuilder::ForFixedTypedArrayBaseBasePointer() { 355 FieldAccess AccessBuilder::ForFixedTypedArrayBaseBasePointer() {
354 FieldAccess access = {kTaggedBase, 356 FieldAccess access = {
355 FixedTypedArrayBase::kBasePointerOffset, 357 kTaggedBase, FixedTypedArrayBase::kBasePointerOffset,
356 MaybeHandle<Name>(), 358 MaybeHandle<Name>(), MaybeHandle<Map>(),
357 Type::OtherInternal(), 359 Type::OtherInternal(), MachineType::AnyTagged(),
358 MachineType::AnyTagged(), 360 kPointerWriteBarrier};
359 kPointerWriteBarrier};
360 return access; 361 return access;
361 } 362 }
362 363
363 // static 364 // static
364 FieldAccess AccessBuilder::ForFixedTypedArrayBaseExternalPointer() { 365 FieldAccess AccessBuilder::ForFixedTypedArrayBaseExternalPointer() {
365 FieldAccess access = {kTaggedBase, 366 FieldAccess access = {kTaggedBase,
366 FixedTypedArrayBase::kExternalPointerOffset, 367 FixedTypedArrayBase::kExternalPointerOffset,
367 MaybeHandle<Name>(), 368 MaybeHandle<Name>(),
369 MaybeHandle<Map>(),
368 Type::ExternalPointer(), 370 Type::ExternalPointer(),
369 MachineType::Pointer(), 371 MachineType::Pointer(),
370 kNoWriteBarrier}; 372 kNoWriteBarrier};
371 return access; 373 return access;
372 } 374 }
373 375
374 // static 376 // static
375 FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() { 377 FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() {
376 FieldAccess access = {kTaggedBase, 378 FieldAccess access = {
377 DescriptorArray::kEnumCacheOffset, 379 kTaggedBase, DescriptorArray::kEnumCacheOffset,
378 Handle<Name>(), 380 Handle<Name>(), MaybeHandle<Map>(),
379 Type::OtherInternal(), 381 Type::OtherInternal(), MachineType::TaggedPointer(),
380 MachineType::TaggedPointer(), 382 kPointerWriteBarrier};
381 kPointerWriteBarrier};
382 return access; 383 return access;
383 } 384 }
384 385
385 386
386 // static 387 // static
387 FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() { 388 FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() {
388 FieldAccess access = {kTaggedBase, 389 FieldAccess access = {
389 DescriptorArray::kEnumCacheBridgeCacheOffset, 390 kTaggedBase, DescriptorArray::kEnumCacheBridgeCacheOffset,
390 Handle<Name>(), 391 Handle<Name>(), MaybeHandle<Map>(),
391 Type::OtherInternal(), 392 Type::OtherInternal(), MachineType::TaggedPointer(),
392 MachineType::TaggedPointer(), 393 kPointerWriteBarrier};
393 kPointerWriteBarrier};
394 return access; 394 return access;
395 } 395 }
396 396
397 397
398 // static 398 // static
399 FieldAccess AccessBuilder::ForMapBitField() { 399 FieldAccess AccessBuilder::ForMapBitField() {
400 FieldAccess access = {kTaggedBase, Map::kBitFieldOffset, 400 FieldAccess access = {
401 Handle<Name>(), TypeCache::Get().kUint8, 401 kTaggedBase, Map::kBitFieldOffset, Handle<Name>(),
402 MachineType::Uint8(), kNoWriteBarrier}; 402 MaybeHandle<Map>(), TypeCache::Get().kUint8, MachineType::Uint8(),
403 kNoWriteBarrier};
403 return access; 404 return access;
404 } 405 }
405 406
406 407
407 // static 408 // static
408 FieldAccess AccessBuilder::ForMapBitField3() { 409 FieldAccess AccessBuilder::ForMapBitField3() {
409 FieldAccess access = {kTaggedBase, Map::kBitField3Offset, 410 FieldAccess access = {
410 Handle<Name>(), TypeCache::Get().kInt32, 411 kTaggedBase, Map::kBitField3Offset, Handle<Name>(),
411 MachineType::Int32(), kNoWriteBarrier}; 412 MaybeHandle<Map>(), TypeCache::Get().kInt32, MachineType::Int32(),
413 kNoWriteBarrier};
412 return access; 414 return access;
413 } 415 }
414 416
415 417
416 // static 418 // static
417 FieldAccess AccessBuilder::ForMapDescriptors() { 419 FieldAccess AccessBuilder::ForMapDescriptors() {
418 FieldAccess access = {kTaggedBase, 420 FieldAccess access = {kTaggedBase, Map::kDescriptorsOffset,
419 Map::kDescriptorsOffset, 421 Handle<Name>(), MaybeHandle<Map>(),
420 Handle<Name>(), 422 Type::OtherInternal(), MachineType::TaggedPointer(),
421 Type::OtherInternal(),
422 MachineType::TaggedPointer(),
423 kPointerWriteBarrier}; 423 kPointerWriteBarrier};
424 return access; 424 return access;
425 } 425 }
426 426
427 427
428 // static 428 // static
429 FieldAccess AccessBuilder::ForMapInstanceType() { 429 FieldAccess AccessBuilder::ForMapInstanceType() {
430 FieldAccess access = {kTaggedBase, Map::kInstanceTypeOffset, 430 FieldAccess access = {
431 Handle<Name>(), TypeCache::Get().kUint8, 431 kTaggedBase, Map::kInstanceTypeOffset, Handle<Name>(),
432 MachineType::Uint8(), kNoWriteBarrier}; 432 MaybeHandle<Map>(), TypeCache::Get().kUint8, MachineType::Uint8(),
433 kNoWriteBarrier};
433 return access; 434 return access;
434 } 435 }
435 436
436 437
437 // static 438 // static
438 FieldAccess AccessBuilder::ForMapPrototype() { 439 FieldAccess AccessBuilder::ForMapPrototype() {
439 FieldAccess access = { 440 FieldAccess access = {kTaggedBase, Map::kPrototypeOffset,
440 kTaggedBase, Map::kPrototypeOffset, Handle<Name>(), 441 Handle<Name>(), MaybeHandle<Map>(),
441 Type::Any(), MachineType::TaggedPointer(), kPointerWriteBarrier}; 442 Type::Any(), MachineType::TaggedPointer(),
443 kPointerWriteBarrier};
442 return access; 444 return access;
443 } 445 }
444 446
445 // static 447 // static
446 FieldAccess AccessBuilder::ForModuleRegularExports() { 448 FieldAccess AccessBuilder::ForModuleRegularExports() {
447 FieldAccess access = {kTaggedBase, 449 FieldAccess access = {kTaggedBase, Module::kRegularExportsOffset,
448 Module::kRegularExportsOffset, 450 Handle<Name>(), MaybeHandle<Map>(),
449 Handle<Name>(), 451 Type::OtherInternal(), MachineType::TaggedPointer(),
450 Type::OtherInternal(),
451 MachineType::TaggedPointer(),
452 kPointerWriteBarrier}; 452 kPointerWriteBarrier};
453 return access; 453 return access;
454 } 454 }
455 455
456 // static 456 // static
457 FieldAccess AccessBuilder::ForModuleRegularImports() { 457 FieldAccess AccessBuilder::ForModuleRegularImports() {
458 FieldAccess access = {kTaggedBase, 458 FieldAccess access = {kTaggedBase, Module::kRegularImportsOffset,
459 Module::kRegularImportsOffset, 459 Handle<Name>(), MaybeHandle<Map>(),
460 Handle<Name>(), 460 Type::OtherInternal(), MachineType::TaggedPointer(),
461 Type::OtherInternal(),
462 MachineType::TaggedPointer(),
463 kPointerWriteBarrier}; 461 kPointerWriteBarrier};
464 return access; 462 return access;
465 } 463 }
466 464
467 // static 465 // static
468 FieldAccess AccessBuilder::ForNameHashField() { 466 FieldAccess AccessBuilder::ForNameHashField() {
469 FieldAccess access = {kTaggedBase, Name::kHashFieldOffset, 467 FieldAccess access = {kTaggedBase, Name::kHashFieldOffset,
470 Handle<Name>(), Type::Internal(), 468 Handle<Name>(), MaybeHandle<Map>(),
471 MachineType::Uint32(), kNoWriteBarrier}; 469 Type::Internal(), MachineType::Uint32(),
470 kNoWriteBarrier};
472 return access; 471 return access;
473 } 472 }
474 473
475 // static 474 // static
476 FieldAccess AccessBuilder::ForStringLength() { 475 FieldAccess AccessBuilder::ForStringLength() {
477 FieldAccess access = {kTaggedBase, 476 FieldAccess access = {kTaggedBase,
478 String::kLengthOffset, 477 String::kLengthOffset,
479 Handle<Name>(), 478 Handle<Name>(),
479 MaybeHandle<Map>(),
480 TypeCache::Get().kStringLengthType, 480 TypeCache::Get().kStringLengthType,
481 MachineType::TaggedSigned(), 481 MachineType::TaggedSigned(),
482 kNoWriteBarrier}; 482 kNoWriteBarrier};
483 return access; 483 return access;
484 } 484 }
485 485
486 // static 486 // static
487 FieldAccess AccessBuilder::ForConsStringFirst() { 487 FieldAccess AccessBuilder::ForConsStringFirst() {
488 FieldAccess access = { 488 FieldAccess access = {kTaggedBase, ConsString::kFirstOffset,
489 kTaggedBase, ConsString::kFirstOffset, Handle<Name>(), 489 Handle<Name>(), MaybeHandle<Map>(),
490 Type::String(), MachineType::TaggedPointer(), kPointerWriteBarrier}; 490 Type::String(), MachineType::TaggedPointer(),
491 kPointerWriteBarrier};
491 return access; 492 return access;
492 } 493 }
493 494
494 // static 495 // static
495 FieldAccess AccessBuilder::ForConsStringSecond() { 496 FieldAccess AccessBuilder::ForConsStringSecond() {
496 FieldAccess access = { 497 FieldAccess access = {kTaggedBase, ConsString::kSecondOffset,
497 kTaggedBase, ConsString::kSecondOffset, Handle<Name>(), 498 Handle<Name>(), MaybeHandle<Map>(),
498 Type::String(), MachineType::TaggedPointer(), kPointerWriteBarrier}; 499 Type::String(), MachineType::TaggedPointer(),
500 kPointerWriteBarrier};
499 return access; 501 return access;
500 } 502 }
501 503
502 // static 504 // static
503 FieldAccess AccessBuilder::ForSlicedStringOffset() { 505 FieldAccess AccessBuilder::ForSlicedStringOffset() {
504 FieldAccess access = { 506 FieldAccess access = {kTaggedBase, SlicedString::kOffsetOffset,
505 kTaggedBase, SlicedString::kOffsetOffset, Handle<Name>(), 507 Handle<Name>(), MaybeHandle<Map>(),
506 Type::SignedSmall(), MachineType::TaggedSigned(), kNoWriteBarrier}; 508 Type::SignedSmall(), MachineType::TaggedSigned(),
509 kNoWriteBarrier};
507 return access; 510 return access;
508 } 511 }
509 512
510 // static 513 // static
511 FieldAccess AccessBuilder::ForSlicedStringParent() { 514 FieldAccess AccessBuilder::ForSlicedStringParent() {
512 FieldAccess access = { 515 FieldAccess access = {kTaggedBase, SlicedString::kParentOffset,
513 kTaggedBase, SlicedString::kParentOffset, Handle<Name>(), 516 Handle<Name>(), MaybeHandle<Map>(),
514 Type::String(), MachineType::TaggedPointer(), kPointerWriteBarrier}; 517 Type::String(), MachineType::TaggedPointer(),
518 kPointerWriteBarrier};
515 return access; 519 return access;
516 } 520 }
517 521
518 // static 522 // static
519 FieldAccess AccessBuilder::ForExternalStringResourceData() { 523 FieldAccess AccessBuilder::ForExternalStringResourceData() {
520 FieldAccess access = {kTaggedBase, 524 FieldAccess access = {kTaggedBase,
521 ExternalString::kResourceDataOffset, 525 ExternalString::kResourceDataOffset,
522 Handle<Name>(), 526 Handle<Name>(),
527 MaybeHandle<Map>(),
523 Type::ExternalPointer(), 528 Type::ExternalPointer(),
524 MachineType::Pointer(), 529 MachineType::Pointer(),
525 kNoWriteBarrier}; 530 kNoWriteBarrier};
526 return access; 531 return access;
527 } 532 }
528 533
529 // static 534 // static
530 ElementAccess AccessBuilder::ForExternalOneByteStringCharacter() { 535 ElementAccess AccessBuilder::ForExternalOneByteStringCharacter() {
531 ElementAccess access = {kUntaggedBase, 0, TypeCache::Get().kUint8, 536 ElementAccess access = {kUntaggedBase, 0, TypeCache::Get().kUint8,
532 MachineType::Uint8(), kNoWriteBarrier}; 537 MachineType::Uint8(), kNoWriteBarrier};
(...skipping 18 matching lines...) Expand all
551 // static 556 // static
552 ElementAccess AccessBuilder::ForSeqTwoByteStringCharacter() { 557 ElementAccess AccessBuilder::ForSeqTwoByteStringCharacter() {
553 ElementAccess access = {kTaggedBase, SeqTwoByteString::kHeaderSize, 558 ElementAccess access = {kTaggedBase, SeqTwoByteString::kHeaderSize,
554 TypeCache::Get().kUint16, MachineType::Uint16(), 559 TypeCache::Get().kUint16, MachineType::Uint16(),
555 kNoWriteBarrier}; 560 kNoWriteBarrier};
556 return access; 561 return access;
557 } 562 }
558 563
559 // static 564 // static
560 FieldAccess AccessBuilder::ForJSGlobalObjectGlobalProxy() { 565 FieldAccess AccessBuilder::ForJSGlobalObjectGlobalProxy() {
561 FieldAccess access = {kTaggedBase, 566 FieldAccess access = {kTaggedBase, JSGlobalObject::kGlobalProxyOffset,
562 JSGlobalObject::kGlobalProxyOffset, 567 Handle<Name>(), MaybeHandle<Map>(),
563 Handle<Name>(), 568 Type::Receiver(), MachineType::TaggedPointer(),
564 Type::Receiver(),
565 MachineType::TaggedPointer(),
566 kPointerWriteBarrier}; 569 kPointerWriteBarrier};
567 return access; 570 return access;
568 } 571 }
569 572
570 // static 573 // static
571 FieldAccess AccessBuilder::ForJSGlobalObjectNativeContext() { 574 FieldAccess AccessBuilder::ForJSGlobalObjectNativeContext() {
572 FieldAccess access = {kTaggedBase, 575 FieldAccess access = {
573 JSGlobalObject::kNativeContextOffset, 576 kTaggedBase, JSGlobalObject::kNativeContextOffset,
574 Handle<Name>(), 577 Handle<Name>(), MaybeHandle<Map>(),
575 Type::Internal(), 578 Type::Internal(), MachineType::TaggedPointer(),
576 MachineType::TaggedPointer(), 579 kPointerWriteBarrier};
577 kPointerWriteBarrier};
578 return access; 580 return access;
579 } 581 }
580 582
581 // static 583 // static
582 FieldAccess AccessBuilder::ForJSArrayIteratorObject() { 584 FieldAccess AccessBuilder::ForJSArrayIteratorObject() {
583 FieldAccess access = {kTaggedBase, 585 FieldAccess access = {kTaggedBase,
584 JSArrayIterator::kIteratedObjectOffset, 586 JSArrayIterator::kIteratedObjectOffset,
585 Handle<Name>(), 587 Handle<Name>(),
588 MaybeHandle<Map>(),
586 Type::ReceiverOrUndefined(), 589 Type::ReceiverOrUndefined(),
587 MachineType::TaggedPointer(), 590 MachineType::TaggedPointer(),
588 kPointerWriteBarrier}; 591 kPointerWriteBarrier};
589 return access; 592 return access;
590 } 593 }
591 594
592 // static 595 // static
593 FieldAccess AccessBuilder::ForJSArrayIteratorIndex(InstanceType instance_type, 596 FieldAccess AccessBuilder::ForJSArrayIteratorIndex(InstanceType instance_type,
594 ElementsKind elements_kind) { 597 ElementsKind elements_kind) {
595 // In generic case, cap to 2^53-1 (per ToLength() in spec) via 598 // In generic case, cap to 2^53-1 (per ToLength() in spec) via
596 // kPositiveSafeInteger 599 // kPositiveSafeInteger
597 FieldAccess access = {kTaggedBase, 600 FieldAccess access = {kTaggedBase,
598 JSArrayIterator::kNextIndexOffset, 601 JSArrayIterator::kNextIndexOffset,
599 Handle<Name>(), 602 Handle<Name>(),
603 MaybeHandle<Map>(),
600 TypeCache::Get().kPositiveSafeInteger, 604 TypeCache::Get().kPositiveSafeInteger,
601 MachineType::AnyTagged(), 605 MachineType::AnyTagged(),
602 kFullWriteBarrier}; 606 kFullWriteBarrier};
603 if (instance_type == JS_ARRAY_TYPE) { 607 if (instance_type == JS_ARRAY_TYPE) {
604 if (IsFastDoubleElementsKind(elements_kind)) { 608 if (IsFastDoubleElementsKind(elements_kind)) {
605 access.type = TypeCache::Get().kFixedDoubleArrayLengthType; 609 access.type = TypeCache::Get().kFixedDoubleArrayLengthType;
606 access.machine_type = MachineType::TaggedSigned(); 610 access.machine_type = MachineType::TaggedSigned();
607 access.write_barrier_kind = kNoWriteBarrier; 611 access.write_barrier_kind = kNoWriteBarrier;
608 } else if (IsFastElementsKind(elements_kind)) { 612 } else if (IsFastElementsKind(elements_kind)) {
609 access.type = TypeCache::Get().kFixedArrayLengthType; 613 access.type = TypeCache::Get().kFixedArrayLengthType;
610 access.machine_type = MachineType::TaggedSigned(); 614 access.machine_type = MachineType::TaggedSigned();
611 access.write_barrier_kind = kNoWriteBarrier; 615 access.write_barrier_kind = kNoWriteBarrier;
612 } else { 616 } else {
613 access.type = TypeCache::Get().kJSArrayLengthType; 617 access.type = TypeCache::Get().kJSArrayLengthType;
614 } 618 }
615 } else if (instance_type == JS_TYPED_ARRAY_TYPE) { 619 } else if (instance_type == JS_TYPED_ARRAY_TYPE) {
616 access.type = TypeCache::Get().kJSTypedArrayLengthType; 620 access.type = TypeCache::Get().kJSTypedArrayLengthType;
617 access.machine_type = MachineType::TaggedSigned(); 621 access.machine_type = MachineType::TaggedSigned();
618 access.write_barrier_kind = kNoWriteBarrier; 622 access.write_barrier_kind = kNoWriteBarrier;
619 } 623 }
620 return access; 624 return access;
621 } 625 }
622 626
623 // static 627 // static
624 FieldAccess AccessBuilder::ForJSArrayIteratorObjectMap() { 628 FieldAccess AccessBuilder::ForJSArrayIteratorObjectMap() {
625 FieldAccess access = {kTaggedBase, 629 FieldAccess access = {
626 JSArrayIterator::kIteratedObjectMapOffset, 630 kTaggedBase, JSArrayIterator::kIteratedObjectMapOffset,
627 Handle<Name>(), 631 Handle<Name>(), MaybeHandle<Map>(),
628 Type::OtherInternal(), 632 Type::OtherInternal(), MachineType::TaggedPointer(),
629 MachineType::TaggedPointer(), 633 kPointerWriteBarrier};
630 kPointerWriteBarrier};
631 return access; 634 return access;
632 } 635 }
633 636
634 // static 637 // static
635 FieldAccess AccessBuilder::ForJSStringIteratorString() { 638 FieldAccess AccessBuilder::ForJSStringIteratorString() {
636 FieldAccess access = { 639 FieldAccess access = {kTaggedBase, JSStringIterator::kStringOffset,
637 kTaggedBase, JSStringIterator::kStringOffset, Handle<Name>(), 640 Handle<Name>(), MaybeHandle<Map>(),
638 Type::String(), MachineType::TaggedPointer(), kPointerWriteBarrier}; 641 Type::String(), MachineType::TaggedPointer(),
642 kPointerWriteBarrier};
639 return access; 643 return access;
640 } 644 }
641 645
642 // static 646 // static
643 FieldAccess AccessBuilder::ForJSStringIteratorIndex() { 647 FieldAccess AccessBuilder::ForJSStringIteratorIndex() {
644 FieldAccess access = {kTaggedBase, 648 FieldAccess access = {kTaggedBase,
645 JSStringIterator::kNextIndexOffset, 649 JSStringIterator::kNextIndexOffset,
646 Handle<Name>(), 650 Handle<Name>(),
651 MaybeHandle<Map>(),
647 TypeCache::Get().kStringLengthType, 652 TypeCache::Get().kStringLengthType,
648 MachineType::TaggedSigned(), 653 MachineType::TaggedSigned(),
649 kNoWriteBarrier}; 654 kNoWriteBarrier};
650 return access; 655 return access;
651 } 656 }
652 657
653 // static 658 // static
654 FieldAccess AccessBuilder::ForValue() { 659 FieldAccess AccessBuilder::ForValue() {
655 FieldAccess access = { 660 FieldAccess access = {kTaggedBase, JSValue::kValueOffset,
656 kTaggedBase, JSValue::kValueOffset, Handle<Name>(), 661 Handle<Name>(), MaybeHandle<Map>(),
657 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier}; 662 Type::NonInternal(), MachineType::AnyTagged(),
663 kFullWriteBarrier};
658 return access; 664 return access;
659 } 665 }
660 666
661 667
662 // static 668 // static
663 FieldAccess AccessBuilder::ForArgumentsLength() { 669 FieldAccess AccessBuilder::ForArgumentsLength() {
664 FieldAccess access = { 670 FieldAccess access = {kTaggedBase, JSArgumentsObject::kLengthOffset,
665 kTaggedBase, JSArgumentsObject::kLengthOffset, Handle<Name>(), 671 Handle<Name>(), MaybeHandle<Map>(),
666 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier}; 672 Type::NonInternal(), MachineType::AnyTagged(),
673 kFullWriteBarrier};
667 return access; 674 return access;
668 } 675 }
669 676
670 677
671 // static 678 // static
672 FieldAccess AccessBuilder::ForArgumentsCallee() { 679 FieldAccess AccessBuilder::ForArgumentsCallee() {
673 FieldAccess access = {kTaggedBase, 680 FieldAccess access = {
674 JSSloppyArgumentsObject::kCalleeOffset, 681 kTaggedBase, JSSloppyArgumentsObject::kCalleeOffset,
675 Handle<Name>(), 682 Handle<Name>(), MaybeHandle<Map>(),
676 Type::NonInternal(), 683 Type::NonInternal(), MachineType::AnyTagged(),
677 MachineType::AnyTagged(), 684 kPointerWriteBarrier};
678 kPointerWriteBarrier};
679 return access; 685 return access;
680 } 686 }
681 687
682 688
683 // static 689 // static
684 FieldAccess AccessBuilder::ForFixedArraySlot(size_t index) { 690 FieldAccess AccessBuilder::ForFixedArraySlot(size_t index) {
685 int offset = FixedArray::OffsetOfElementAt(static_cast<int>(index)); 691 int offset = FixedArray::OffsetOfElementAt(static_cast<int>(index));
686 FieldAccess access = {kTaggedBase, 692 FieldAccess access = {kTaggedBase, offset,
687 offset, 693 Handle<Name>(), MaybeHandle<Map>(),
688 Handle<Name>(), 694 Type::NonInternal(), MachineType::AnyTagged(),
689 Type::NonInternal(),
690 MachineType::AnyTagged(),
691 kFullWriteBarrier}; 695 kFullWriteBarrier};
692 return access; 696 return access;
693 } 697 }
694 698
695 699
696 // static 700 // static
697 FieldAccess AccessBuilder::ForCellValue() { 701 FieldAccess AccessBuilder::ForCellValue() {
698 FieldAccess access = { 702 FieldAccess access = {kTaggedBase, Cell::kValueOffset,
699 kTaggedBase, Cell::kValueOffset, Handle<Name>(), 703 Handle<Name>(), MaybeHandle<Map>(),
700 Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier}; 704 Type::Any(), MachineType::AnyTagged(),
705 kFullWriteBarrier};
701 return access; 706 return access;
702 } 707 }
703 708
704 // static 709 // static
705 FieldAccess AccessBuilder::ForContextSlot(size_t index) { 710 FieldAccess AccessBuilder::ForContextSlot(size_t index) {
706 int offset = Context::kHeaderSize + static_cast<int>(index) * kPointerSize; 711 int offset = Context::kHeaderSize + static_cast<int>(index) * kPointerSize;
707 DCHECK_EQ(offset, 712 DCHECK_EQ(offset,
708 Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag); 713 Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag);
709 FieldAccess access = {kTaggedBase, 714 FieldAccess access = {kTaggedBase, offset,
710 offset, 715 Handle<Name>(), MaybeHandle<Map>(),
711 Handle<Name>(), 716 Type::Any(), MachineType::AnyTagged(),
712 Type::Any(),
713 MachineType::AnyTagged(),
714 kFullWriteBarrier}; 717 kFullWriteBarrier};
715 return access; 718 return access;
716 } 719 }
717 720
718 // static 721 // static
719 FieldAccess AccessBuilder::ForContextExtensionScopeInfo() { 722 FieldAccess AccessBuilder::ForContextExtensionScopeInfo() {
720 FieldAccess access = {kTaggedBase, 723 FieldAccess access = {
721 ContextExtension::kScopeInfoOffset, 724 kTaggedBase, ContextExtension::kScopeInfoOffset,
722 Handle<Name>(), 725 Handle<Name>(), MaybeHandle<Map>(),
723 Type::OtherInternal(), 726 Type::OtherInternal(), MachineType::AnyTagged(),
724 MachineType::AnyTagged(), 727 kFullWriteBarrier};
725 kFullWriteBarrier};
726 return access; 728 return access;
727 } 729 }
728 730
729 // static 731 // static
730 FieldAccess AccessBuilder::ForContextExtensionExtension() { 732 FieldAccess AccessBuilder::ForContextExtensionExtension() {
731 FieldAccess access = { 733 FieldAccess access = {kTaggedBase, ContextExtension::kExtensionOffset,
732 kTaggedBase, ContextExtension::kExtensionOffset, Handle<Name>(), 734 Handle<Name>(), MaybeHandle<Map>(),
733 Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier}; 735 Type::Any(), MachineType::AnyTagged(),
736 kFullWriteBarrier};
734 return access; 737 return access;
735 } 738 }
736 739
737 // static 740 // static
738 ElementAccess AccessBuilder::ForFixedArrayElement() { 741 ElementAccess AccessBuilder::ForFixedArrayElement() {
739 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), 742 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
740 MachineType::AnyTagged(), kFullWriteBarrier}; 743 MachineType::AnyTagged(), kFullWriteBarrier};
741 return access; 744 return access;
742 } 745 }
743 746
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 } 838 }
836 UNREACHABLE(); 839 UNREACHABLE();
837 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), 840 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(),
838 kNoWriteBarrier}; 841 kNoWriteBarrier};
839 return access; 842 return access;
840 } 843 }
841 844
842 } // namespace compiler 845 } // namespace compiler
843 } // namespace internal 846 } // namespace internal
844 } // namespace v8 847 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698