| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/code-stub-assembler.h" | 5 #include "src/compiler/code-stub-assembler.h" |
| 6 | 6 |
| 7 #include <ostream> | 7 #include <ostream> |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 MachineType rep) { | 236 MachineType rep) { |
| 237 return raw_assembler_->Load(rep, object, | 237 return raw_assembler_->Load(rep, object, |
| 238 IntPtrConstant(offset - kHeapObjectTag)); | 238 IntPtrConstant(offset - kHeapObjectTag)); |
| 239 } | 239 } |
| 240 | 240 |
| 241 Node* CodeStubAssembler::LoadHeapNumberValue(Node* object) { | 241 Node* CodeStubAssembler::LoadHeapNumberValue(Node* object) { |
| 242 return Load(MachineType::Float64(), object, | 242 return Load(MachineType::Float64(), object, |
| 243 IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag)); | 243 IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag)); |
| 244 } | 244 } |
| 245 | 245 |
| 246 Node* CodeStubAssembler::StoreHeapNumberValue(Node* object, Node* value) { |
| 247 return StoreNoWriteBarrier( |
| 248 MachineRepresentation::kFloat64, object, |
| 249 IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag), value); |
| 250 } |
| 251 |
| 246 Node* CodeStubAssembler::LoadMapBitField(Node* map) { | 252 Node* CodeStubAssembler::LoadMapBitField(Node* map) { |
| 247 return Load(MachineType::Uint8(), map, | 253 return Load(MachineType::Uint8(), map, |
| 248 IntPtrConstant(Map::kBitFieldOffset - kHeapObjectTag)); | 254 IntPtrConstant(Map::kBitFieldOffset - kHeapObjectTag)); |
| 249 } | 255 } |
| 250 | 256 |
| 251 Node* CodeStubAssembler::LoadMapInstanceType(Node* map) { | 257 Node* CodeStubAssembler::LoadMapInstanceType(Node* map) { |
| 252 return Load(MachineType::Uint8(), map, | 258 return Load(MachineType::Uint8(), map, |
| 253 IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag)); | 259 IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag)); |
| 254 } | 260 } |
| 255 | 261 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 } | 458 } |
| 453 | 459 |
| 454 Node* CodeStubAssembler::Projection(int index, Node* value) { | 460 Node* CodeStubAssembler::Projection(int index, Node* value) { |
| 455 return raw_assembler_->Projection(index, value); | 461 return raw_assembler_->Projection(index, value); |
| 456 } | 462 } |
| 457 | 463 |
| 458 Node* CodeStubAssembler::LoadMap(Node* object) { | 464 Node* CodeStubAssembler::LoadMap(Node* object) { |
| 459 return LoadObjectField(object, HeapObject::kMapOffset); | 465 return LoadObjectField(object, HeapObject::kMapOffset); |
| 460 } | 466 } |
| 461 | 467 |
| 468 Node* CodeStubAssembler::StoreMapNoWriteBarrier(Node* object, Node* map) { |
| 469 return StoreNoWriteBarrier( |
| 470 MachineRepresentation::kTagged, object, |
| 471 IntPtrConstant(HeapNumber::kMapOffset - kHeapObjectTag), map); |
| 472 } |
| 473 |
| 462 Node* CodeStubAssembler::LoadInstanceType(Node* object) { | 474 Node* CodeStubAssembler::LoadInstanceType(Node* object) { |
| 463 return LoadMapInstanceType(LoadMap(object)); | 475 return LoadMapInstanceType(LoadMap(object)); |
| 464 } | 476 } |
| 465 | 477 |
| 466 Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift, | 478 Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift, |
| 467 uint32_t mask) { | 479 uint32_t mask) { |
| 468 return raw_assembler_->Word32Shr( | 480 return raw_assembler_->Word32Shr( |
| 469 raw_assembler_->Word32And(word32, raw_assembler_->Int32Constant(mask)), | 481 raw_assembler_->Word32And(word32, raw_assembler_->Int32Constant(mask)), |
| 470 raw_assembler_->Int32Constant(shift)); | 482 raw_assembler_->Int32Constant(shift)); |
| 471 } | 483 } |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 } | 893 } |
| 882 } | 894 } |
| 883 } | 895 } |
| 884 | 896 |
| 885 bound_ = true; | 897 bound_ = true; |
| 886 } | 898 } |
| 887 | 899 |
| 888 } // namespace compiler | 900 } // namespace compiler |
| 889 } // namespace internal | 901 } // namespace internal |
| 890 } // namespace v8 | 902 } // namespace v8 |
| OLD | NEW |