OLD | NEW |
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 #include "src/code-stub-assembler.h" | 5 #include "src/code-stub-assembler.h" |
6 #include "src/code-factory.h" | 6 #include "src/code-factory.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 423 } |
424 #endif | 424 #endif |
425 | 425 |
426 return AllocateRawUnaligned(size_in_bytes, flags, top_address, limit_address); | 426 return AllocateRawUnaligned(size_in_bytes, flags, top_address, limit_address); |
427 } | 427 } |
428 | 428 |
429 Node* CodeStubAssembler::Allocate(int size_in_bytes, AllocationFlags flags) { | 429 Node* CodeStubAssembler::Allocate(int size_in_bytes, AllocationFlags flags) { |
430 return CodeStubAssembler::Allocate(IntPtrConstant(size_in_bytes), flags); | 430 return CodeStubAssembler::Allocate(IntPtrConstant(size_in_bytes), flags); |
431 } | 431 } |
432 | 432 |
| 433 Node* CodeStubAssembler::InnerAllocate(Node* previous, Node* offset) { |
| 434 return BitcastWordToTagged(IntPtrAdd(previous, offset)); |
| 435 } |
| 436 |
433 Node* CodeStubAssembler::InnerAllocate(Node* previous, int offset) { | 437 Node* CodeStubAssembler::InnerAllocate(Node* previous, int offset) { |
434 return BitcastWordToTagged(IntPtrAdd(previous, IntPtrConstant(offset))); | 438 return InnerAllocate(previous, IntPtrConstant(offset)); |
435 } | 439 } |
436 | 440 |
437 Node* CodeStubAssembler::LoadBufferObject(Node* buffer, int offset, | 441 Node* CodeStubAssembler::LoadBufferObject(Node* buffer, int offset, |
438 MachineType rep) { | 442 MachineType rep) { |
439 return Load(rep, buffer, IntPtrConstant(offset)); | 443 return Load(rep, buffer, IntPtrConstant(offset)); |
440 } | 444 } |
441 | 445 |
442 Node* CodeStubAssembler::LoadObjectField(Node* object, int offset, | 446 Node* CodeStubAssembler::LoadObjectField(Node* object, int offset, |
443 MachineType rep) { | 447 MachineType rep) { |
444 return Load(rep, object, IntPtrConstant(offset - kHeapObjectTag)); | 448 return Load(rep, object, IntPtrConstant(offset - kHeapObjectTag)); |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 } | 1138 } |
1135 | 1139 |
1136 Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift, | 1140 Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift, |
1137 uint32_t mask) { | 1141 uint32_t mask) { |
1138 return Word32Shr(Word32And(word32, Int32Constant(mask)), | 1142 return Word32Shr(Word32And(word32, Int32Constant(mask)), |
1139 Int32Constant(shift)); | 1143 Int32Constant(shift)); |
1140 } | 1144 } |
1141 | 1145 |
1142 } // namespace internal | 1146 } // namespace internal |
1143 } // namespace v8 | 1147 } // namespace v8 |
OLD | NEW |