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

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

Issue 2305573003: [Turbofan] Remove more Type representation dimension data. (Closed)
Patch Set: Missed one. Created 4 years, 3 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 | no next file » | 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"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 63
64 // static 64 // static
65 FieldAccess AccessBuilder::ForJSObjectInObjectProperty(Handle<Map> map, 65 FieldAccess AccessBuilder::ForJSObjectInObjectProperty(Handle<Map> map,
66 int index) { 66 int index) {
67 int const offset = map->GetInObjectPropertyOffset(index); 67 int const offset = map->GetInObjectPropertyOffset(index);
68 FieldAccess access = {kTaggedBase, 68 FieldAccess access = {kTaggedBase,
69 offset, 69 offset,
70 MaybeHandle<Name>(), 70 MaybeHandle<Name>(),
71 Type::Tagged(), 71 Type::NonInternal(),
72 MachineType::AnyTagged(), 72 MachineType::AnyTagged(),
73 kFullWriteBarrier}; 73 kFullWriteBarrier};
74 return access; 74 return access;
75 } 75 }
76 76
77 77
78 // static 78 // static
79 FieldAccess AccessBuilder::ForJSFunctionPrototypeOrInitialMap() { 79 FieldAccess AccessBuilder::ForJSFunctionPrototypeOrInitialMap() {
80 FieldAccess access = {kTaggedBase, 80 FieldAccess access = {kTaggedBase,
81 JSFunction::kPrototypeOrInitialMapOffset, 81 JSFunction::kPrototypeOrInitialMapOffset,
(...skipping 27 matching lines...) Expand all
109 // static 109 // static
110 FieldAccess AccessBuilder::ForJSFunctionLiterals() { 110 FieldAccess AccessBuilder::ForJSFunctionLiterals() {
111 FieldAccess access = { 111 FieldAccess access = {
112 kTaggedBase, JSFunction::kLiteralsOffset, Handle<Name>(), 112 kTaggedBase, JSFunction::kLiteralsOffset, Handle<Name>(),
113 Type::Internal(), MachineType::AnyTagged(), kPointerWriteBarrier}; 113 Type::Internal(), MachineType::AnyTagged(), kPointerWriteBarrier};
114 return access; 114 return access;
115 } 115 }
116 116
117 // static 117 // static
118 FieldAccess AccessBuilder::ForJSFunctionCodeEntry() { 118 FieldAccess AccessBuilder::ForJSFunctionCodeEntry() {
119 FieldAccess access = {kTaggedBase, 119 FieldAccess access = {
120 JSFunction::kCodeEntryOffset, 120 kTaggedBase, JSFunction::kCodeEntryOffset, Handle<Name>(),
121 Handle<Name>(), 121 Type::OtherInternal(), MachineType::Pointer(), kNoWriteBarrier};
122 Type::UntaggedPointer(),
123 MachineType::Pointer(),
124 kNoWriteBarrier};
125 return access; 122 return access;
126 } 123 }
127 124
128 // static 125 // static
129 FieldAccess AccessBuilder::ForJSFunctionNextFunctionLink() { 126 FieldAccess AccessBuilder::ForJSFunctionNextFunctionLink() {
130 FieldAccess access = {kTaggedBase, 127 FieldAccess access = {kTaggedBase,
131 JSFunction::kNextFunctionLinkOffset, 128 JSFunction::kNextFunctionLinkOffset,
132 Handle<Name>(), 129 Handle<Name>(),
133 Type::Any(), 130 Type::Any(),
134 MachineType::AnyTagged(), 131 MachineType::AnyTagged(),
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 208 }
212 return access; 209 return access;
213 } 210 }
214 211
215 212
216 // static 213 // static
217 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() { 214 FieldAccess AccessBuilder::ForJSArrayBufferBackingStore() {
218 FieldAccess access = {kTaggedBase, 215 FieldAccess access = {kTaggedBase,
219 JSArrayBuffer::kBackingStoreOffset, 216 JSArrayBuffer::kBackingStoreOffset,
220 MaybeHandle<Name>(), 217 MaybeHandle<Name>(),
221 Type::UntaggedPointer(), 218 Type::OtherInternal(),
222 MachineType::Pointer(), 219 MachineType::Pointer(),
223 kNoWriteBarrier}; 220 kNoWriteBarrier};
224 return access; 221 return access;
225 } 222 }
226 223
227 // static 224 // static
228 FieldAccess AccessBuilder::ForJSArrayBufferBitField() { 225 FieldAccess AccessBuilder::ForJSArrayBufferBitField() {
229 FieldAccess access = {kTaggedBase, JSArrayBuffer::kBitFieldOffset, 226 FieldAccess access = {kTaggedBase, JSArrayBuffer::kBitFieldOffset,
230 MaybeHandle<Name>(), TypeCache::Get().kUint8, 227 MaybeHandle<Name>(), TypeCache::Get().kUint8,
231 MachineType::Uint32(), kNoWriteBarrier}; 228 MachineType::Uint32(), kNoWriteBarrier};
232 return access; 229 return access;
233 } 230 }
234 231
235 // static 232 // static
236 FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() { 233 FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() {
237 FieldAccess access = {kTaggedBase, 234 FieldAccess access = {kTaggedBase,
238 JSArrayBufferView::kBufferOffset, 235 JSArrayBufferView::kBufferOffset,
239 MaybeHandle<Name>(), 236 MaybeHandle<Name>(),
240 Type::TaggedPointer(), 237 Type::OtherInternal(),
241 MachineType::TaggedPointer(), 238 MachineType::TaggedPointer(),
242 kPointerWriteBarrier}; 239 kPointerWriteBarrier};
243 return access; 240 return access;
244 } 241 }
245 242
246 // static 243 // static
247 FieldAccess AccessBuilder::ForJSArrayBufferViewByteLength() { 244 FieldAccess AccessBuilder::ForJSArrayBufferViewByteLength() {
248 FieldAccess access = {kTaggedBase, 245 FieldAccess access = {kTaggedBase,
249 JSArrayBufferView::kByteLengthOffset, 246 JSArrayBufferView::kByteLengthOffset,
250 MaybeHandle<Name>(), 247 MaybeHandle<Name>(),
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 FieldAccess access = { 310 FieldAccess access = {
314 kTaggedBase, JSIteratorResult::kValueOffset, MaybeHandle<Name>(), 311 kTaggedBase, JSIteratorResult::kValueOffset, MaybeHandle<Name>(),
315 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier}; 312 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier};
316 return access; 313 return access;
317 } 314 }
318 315
319 316
320 // static 317 // static
321 FieldAccess AccessBuilder::ForJSRegExpFlags() { 318 FieldAccess AccessBuilder::ForJSRegExpFlags() {
322 FieldAccess access = { 319 FieldAccess access = {
323 kTaggedBase, JSRegExp::kFlagsOffset, MaybeHandle<Name>(), 320 kTaggedBase, JSRegExp::kFlagsOffset, MaybeHandle<Name>(),
324 Type::Tagged(), MachineType::AnyTagged(), kFullWriteBarrier}; 321 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier};
325 return access; 322 return access;
326 } 323 }
327 324
328 325
329 // static 326 // static
330 FieldAccess AccessBuilder::ForJSRegExpSource() { 327 FieldAccess AccessBuilder::ForJSRegExpSource() {
331 FieldAccess access = { 328 FieldAccess access = {
332 kTaggedBase, JSRegExp::kSourceOffset, MaybeHandle<Name>(), 329 kTaggedBase, JSRegExp::kSourceOffset, MaybeHandle<Name>(),
333 Type::Tagged(), MachineType::AnyTagged(), kFullWriteBarrier}; 330 Type::NonInternal(), MachineType::AnyTagged(), kFullWriteBarrier};
334 return access; 331 return access;
335 } 332 }
336 333
337 334
338 // static 335 // static
339 FieldAccess AccessBuilder::ForFixedArrayLength() { 336 FieldAccess AccessBuilder::ForFixedArrayLength() {
340 FieldAccess access = {kTaggedBase, 337 FieldAccess access = {kTaggedBase,
341 FixedArray::kLengthOffset, 338 FixedArray::kLengthOffset,
342 MaybeHandle<Name>(), 339 MaybeHandle<Name>(),
343 TypeCache::Get().kFixedArrayLengthType, 340 TypeCache::Get().kFixedArrayLengthType,
344 MachineType::TaggedSigned(), 341 MachineType::TaggedSigned(),
345 kNoWriteBarrier}; 342 kNoWriteBarrier};
346 return access; 343 return access;
347 } 344 }
348 345
349 // static 346 // static
350 FieldAccess AccessBuilder::ForFixedTypedArrayBaseBasePointer() { 347 FieldAccess AccessBuilder::ForFixedTypedArrayBaseBasePointer() {
351 FieldAccess access = {kTaggedBase, 348 FieldAccess access = {kTaggedBase,
352 FixedTypedArrayBase::kBasePointerOffset, 349 FixedTypedArrayBase::kBasePointerOffset,
353 MaybeHandle<Name>(), 350 MaybeHandle<Name>(),
354 Type::Tagged(), 351 Type::OtherInternal(),
355 MachineType::AnyTagged(), 352 MachineType::AnyTagged(),
356 kPointerWriteBarrier}; 353 kPointerWriteBarrier};
357 return access; 354 return access;
358 } 355 }
359 356
360 // static 357 // static
361 FieldAccess AccessBuilder::ForFixedTypedArrayBaseExternalPointer() { 358 FieldAccess AccessBuilder::ForFixedTypedArrayBaseExternalPointer() {
362 FieldAccess access = {kTaggedBase, 359 FieldAccess access = {kTaggedBase,
363 FixedTypedArrayBase::kExternalPointerOffset, 360 FixedTypedArrayBase::kExternalPointerOffset,
364 MaybeHandle<Name>(), 361 MaybeHandle<Name>(),
365 Type::UntaggedPointer(), 362 Type::OtherInternal(),
366 MachineType::Pointer(), 363 MachineType::Pointer(),
367 kNoWriteBarrier}; 364 kNoWriteBarrier};
368 return access; 365 return access;
369 } 366 }
370 367
371 // static 368 // static
372 FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() { 369 FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() {
373 FieldAccess access = {kTaggedBase, 370 FieldAccess access = {kTaggedBase,
374 DescriptorArray::kEnumCacheOffset, 371 DescriptorArray::kEnumCacheOffset,
375 Handle<Name>(), 372 Handle<Name>(),
376 Type::TaggedPointer(), 373 Type::OtherInternal(),
377 MachineType::TaggedPointer(), 374 MachineType::TaggedPointer(),
378 kPointerWriteBarrier}; 375 kPointerWriteBarrier};
379 return access; 376 return access;
380 } 377 }
381 378
382 379
383 // static 380 // static
384 FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() { 381 FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() {
385 FieldAccess access = {kTaggedBase, 382 FieldAccess access = {kTaggedBase,
386 DescriptorArray::kEnumCacheBridgeCacheOffset, 383 DescriptorArray::kEnumCacheBridgeCacheOffset,
387 Handle<Name>(), 384 Handle<Name>(),
388 Type::TaggedPointer(), 385 Type::OtherInternal(),
389 MachineType::TaggedPointer(), 386 MachineType::TaggedPointer(),
390 kPointerWriteBarrier}; 387 kPointerWriteBarrier};
391 return access; 388 return access;
392 } 389 }
393 390
394 391
395 // static 392 // static
396 FieldAccess AccessBuilder::ForMapBitField() { 393 FieldAccess AccessBuilder::ForMapBitField() {
397 FieldAccess access = {kTaggedBase, Map::kBitFieldOffset, 394 FieldAccess access = {kTaggedBase, Map::kBitFieldOffset,
398 Handle<Name>(), TypeCache::Get().kUint8, 395 Handle<Name>(), TypeCache::Get().kUint8,
399 MachineType::Uint8(), kNoWriteBarrier}; 396 MachineType::Uint8(), kNoWriteBarrier};
400 return access; 397 return access;
401 } 398 }
402 399
403 400
404 // static 401 // static
405 FieldAccess AccessBuilder::ForMapBitField3() { 402 FieldAccess AccessBuilder::ForMapBitField3() {
406 FieldAccess access = {kTaggedBase, Map::kBitField3Offset, 403 FieldAccess access = {kTaggedBase, Map::kBitField3Offset,
407 Handle<Name>(), TypeCache::Get().kInt32, 404 Handle<Name>(), TypeCache::Get().kInt32,
408 MachineType::Int32(), kNoWriteBarrier}; 405 MachineType::Int32(), kNoWriteBarrier};
409 return access; 406 return access;
410 } 407 }
411 408
412 409
413 // static 410 // static
414 FieldAccess AccessBuilder::ForMapDescriptors() { 411 FieldAccess AccessBuilder::ForMapDescriptors() {
415 FieldAccess access = {kTaggedBase, 412 FieldAccess access = {kTaggedBase,
416 Map::kDescriptorsOffset, 413 Map::kDescriptorsOffset,
417 Handle<Name>(), 414 Handle<Name>(),
418 Type::TaggedPointer(), 415 Type::OtherInternal(),
419 MachineType::TaggedPointer(), 416 MachineType::TaggedPointer(),
420 kPointerWriteBarrier}; 417 kPointerWriteBarrier};
421 return access; 418 return access;
422 } 419 }
423 420
424 421
425 // static 422 // static
426 FieldAccess AccessBuilder::ForMapInstanceType() { 423 FieldAccess AccessBuilder::ForMapInstanceType() {
427 FieldAccess access = {kTaggedBase, Map::kInstanceTypeOffset, 424 FieldAccess access = {kTaggedBase, Map::kInstanceTypeOffset,
428 Handle<Name>(), TypeCache::Get().kUint8, 425 Handle<Name>(), TypeCache::Get().kUint8,
429 MachineType::Uint8(), kNoWriteBarrier}; 426 MachineType::Uint8(), kNoWriteBarrier};
430 return access; 427 return access;
431 } 428 }
432 429
433 430
434 // static 431 // static
435 FieldAccess AccessBuilder::ForMapPrototype() { 432 FieldAccess AccessBuilder::ForMapPrototype() {
436 FieldAccess access = {kTaggedBase, 433 FieldAccess access = {
437 Map::kPrototypeOffset, 434 kTaggedBase, Map::kPrototypeOffset, Handle<Name>(),
438 Handle<Name>(), 435 Type::Any(), MachineType::TaggedPointer(), kPointerWriteBarrier};
439 Type::TaggedPointer(),
440 MachineType::TaggedPointer(),
441 kPointerWriteBarrier};
442 return access; 436 return access;
443 } 437 }
444 438
445 439
446 // static 440 // static
447 FieldAccess AccessBuilder::ForNameHashField() { 441 FieldAccess AccessBuilder::ForNameHashField() {
448 FieldAccess access = {kTaggedBase, Name::kHashFieldOffset, 442 FieldAccess access = {kTaggedBase, Name::kHashFieldOffset,
449 Handle<Name>(), Type::Internal(), 443 Handle<Name>(), Type::Internal(),
450 MachineType::Uint32(), kNoWriteBarrier}; 444 MachineType::Uint32(), kNoWriteBarrier};
451 return access; 445 return access;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 kTaggedBase, SlicedString::kParentOffset, Handle<Name>(), 486 kTaggedBase, SlicedString::kParentOffset, Handle<Name>(),
493 Type::String(), MachineType::AnyTagged(), kPointerWriteBarrier}; 487 Type::String(), MachineType::AnyTagged(), kPointerWriteBarrier};
494 return access; 488 return access;
495 } 489 }
496 490
497 // static 491 // static
498 FieldAccess AccessBuilder::ForExternalStringResourceData() { 492 FieldAccess AccessBuilder::ForExternalStringResourceData() {
499 FieldAccess access = {kTaggedBase, 493 FieldAccess access = {kTaggedBase,
500 ExternalString::kResourceDataOffset, 494 ExternalString::kResourceDataOffset,
501 Handle<Name>(), 495 Handle<Name>(),
502 Type::UntaggedPointer(), 496 Type::OtherInternal(),
503 MachineType::Pointer(), 497 MachineType::Pointer(),
504 kNoWriteBarrier}; 498 kNoWriteBarrier};
505 return access; 499 return access;
506 } 500 }
507 501
508 // static 502 // static
509 ElementAccess AccessBuilder::ForExternalOneByteStringCharacter() { 503 ElementAccess AccessBuilder::ForExternalOneByteStringCharacter() {
510 ElementAccess access = {kUntaggedBase, 0, TypeCache::Get().kUint8, 504 ElementAccess access = {kUntaggedBase, 0, TypeCache::Get().kUint8,
511 MachineType::Uint8(), kNoWriteBarrier}; 505 MachineType::Uint8(), kNoWriteBarrier};
512 return access; 506 return access;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } 733 }
740 UNREACHABLE(); 734 UNREACHABLE();
741 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), 735 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(),
742 kNoWriteBarrier}; 736 kNoWriteBarrier};
743 return access; 737 return access;
744 } 738 }
745 739
746 } // namespace compiler 740 } // namespace compiler
747 } // namespace internal 741 } // namespace internal
748 } // namespace v8 742 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698