OLD | NEW |
---|---|
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/contexts.h" | 7 #include "src/contexts.h" |
8 #include "src/frames.h" | 8 #include "src/frames.h" |
9 #include "src/handles-inl.h" | 9 #include "src/handles-inl.h" |
10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 JSFunction::kSharedFunctionInfoOffset, | 93 JSFunction::kSharedFunctionInfoOffset, |
94 Handle<Name>(), | 94 Handle<Name>(), |
95 Type::Any(), | 95 Type::Any(), |
96 MachineType::AnyTagged(), | 96 MachineType::AnyTagged(), |
97 kPointerWriteBarrier}; | 97 kPointerWriteBarrier}; |
98 return access; | 98 return access; |
99 } | 99 } |
100 | 100 |
101 | 101 |
102 // static | 102 // static |
103 FieldAccess AccessBuilder::ForJSFunctionLiterals() { | |
104 FieldAccess access = { | |
105 kTaggedBase, JSFunction::kLiteralsOffset, Handle<Name>(), | |
106 Type::Internal(), MachineType::AnyTagged(), kPointerWriteBarrier}; | |
107 return access; | |
108 } | |
109 | |
110 // static | |
111 FieldAccess AccessBuilder::ForJSFunctionCodeEntry() { | 103 FieldAccess AccessBuilder::ForJSFunctionCodeEntry() { |
112 FieldAccess access = {kTaggedBase, | 104 FieldAccess access = {kTaggedBase, |
113 JSFunction::kCodeEntryOffset, | 105 JSFunction::kCodeEntryOffset, |
114 Handle<Name>(), | 106 Handle<Name>(), |
115 Type::UntaggedPointer(), | 107 Type::UntaggedPointer(), |
116 MachineType::Pointer(), | 108 MachineType::Pointer(), |
117 kNoWriteBarrier}; | 109 kNoWriteBarrier}; |
118 return access; | 110 return access; |
119 } | 111 } |
120 | 112 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
412 | 404 |
413 | 405 |
414 // static | 406 // static |
415 FieldAccess AccessBuilder::ForPropertyCellValue(Type* type) { | 407 FieldAccess AccessBuilder::ForPropertyCellValue(Type* type) { |
416 FieldAccess access = { | 408 FieldAccess access = { |
417 kTaggedBase, PropertyCell::kValueOffset, Handle<Name>(), | 409 kTaggedBase, PropertyCell::kValueOffset, Handle<Name>(), |
418 type, MachineType::AnyTagged(), kFullWriteBarrier}; | 410 type, MachineType::AnyTagged(), kFullWriteBarrier}; |
419 return access; | 411 return access; |
420 } | 412 } |
421 | 413 |
414 // static | |
415 FieldAccess AccessBuilder::ForJSFunctionLiterals() { | |
Michael Starzinger
2016/05/10 13:47:20
nit: Please keep these in the same order as in the
mvstanton
2016/05/24 16:31:49
Done.
| |
416 FieldAccess access = { | |
417 kTaggedBase, JSFunction::kLiteralsOffset, Handle<Name>(), | |
418 Type::Internal(), MachineType::AnyTagged(), kPointerWriteBarrier}; | |
419 return access; | |
420 } | |
422 | 421 |
423 // static | 422 // static |
424 FieldAccess AccessBuilder::ForSharedFunctionInfoTypeFeedbackVector() { | 423 FieldAccess AccessBuilder::ForLiteralsTypeFeedbackVector() { |
425 FieldAccess access = {kTaggedBase, | 424 FieldAccess access = {kTaggedBase, LiteralsArray::kFeedbackVectorOffset, |
426 SharedFunctionInfo::kFeedbackVectorOffset, | 425 Handle<Name>(), Type::Any(), MachineType::AnyTagged(), |
427 Handle<Name>(), | |
428 Type::Any(), | |
429 MachineType::AnyTagged(), | |
430 kPointerWriteBarrier}; | 426 kPointerWriteBarrier}; |
431 return access; | 427 return access; |
432 } | 428 } |
433 | 429 |
434 | |
435 // static | 430 // static |
436 ElementAccess AccessBuilder::ForFixedArrayElement() { | 431 ElementAccess AccessBuilder::ForFixedArrayElement() { |
437 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Tagged(), | 432 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Tagged(), |
438 MachineType::AnyTagged(), kFullWriteBarrier}; | 433 MachineType::AnyTagged(), kFullWriteBarrier}; |
439 return access; | 434 return access; |
440 } | 435 } |
441 | 436 |
442 | 437 |
443 // static | 438 // static |
444 ElementAccess AccessBuilder::ForFixedDoubleArrayElement() { | 439 ElementAccess AccessBuilder::ForFixedDoubleArrayElement() { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
499 } | 494 } |
500 UNREACHABLE(); | 495 UNREACHABLE(); |
501 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), | 496 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), |
502 kNoWriteBarrier}; | 497 kNoWriteBarrier}; |
503 return access; | 498 return access; |
504 } | 499 } |
505 | 500 |
506 } // namespace compiler | 501 } // namespace compiler |
507 } // namespace internal | 502 } // namespace internal |
508 } // namespace v8 | 503 } // namespace v8 |
OLD | NEW |