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

Side by Side Diff: src/compiler/code-stub-assembler.cc

Issue 1868173002: Version 5.1.294.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.1.294
Patch Set: Created 4 years, 8 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 | « src/compiler/code-stub-assembler.h ('k') | src/full-codegen/arm/full-codegen-arm.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 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 MachineType rep) { 429 MachineType rep) {
430 return raw_assembler_->Load(rep, buffer, IntPtrConstant(offset)); 430 return raw_assembler_->Load(rep, buffer, IntPtrConstant(offset));
431 } 431 }
432 432
433 Node* CodeStubAssembler::LoadObjectField(Node* object, int offset, 433 Node* CodeStubAssembler::LoadObjectField(Node* object, int offset,
434 MachineType rep) { 434 MachineType rep) {
435 return raw_assembler_->Load(rep, object, 435 return raw_assembler_->Load(rep, object,
436 IntPtrConstant(offset - kHeapObjectTag)); 436 IntPtrConstant(offset - kHeapObjectTag));
437 } 437 }
438 438
439 Node* CodeStubAssembler::StoreObjectFieldNoWriteBarrier(
440 Node* object, int offset, Node* value, MachineRepresentation rep) {
441 return StoreNoWriteBarrier(rep, object,
442 IntPtrConstant(offset - kHeapObjectTag), value);
443 }
444
445 Node* CodeStubAssembler::LoadHeapNumberValue(Node* object) { 439 Node* CodeStubAssembler::LoadHeapNumberValue(Node* object) {
446 return Load(MachineType::Float64(), object, 440 return Load(MachineType::Float64(), object,
447 IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag)); 441 IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag));
448 } 442 }
449 443
450 Node* CodeStubAssembler::StoreHeapNumberValue(Node* object, Node* value) { 444 Node* CodeStubAssembler::StoreHeapNumberValue(Node* object, Node* value) {
451 return StoreNoWriteBarrier( 445 return StoreNoWriteBarrier(
452 MachineRepresentation::kFloat64, object, 446 MachineRepresentation::kFloat64, object,
453 IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag), value); 447 IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag), value);
454 } 448 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 484
491 Node* CodeStubAssembler::LoadFixedArrayElementInt32Index( 485 Node* CodeStubAssembler::LoadFixedArrayElementInt32Index(
492 Node* object, Node* int32_index, int additional_offset) { 486 Node* object, Node* int32_index, int additional_offset) {
493 Node* header_size = IntPtrConstant(additional_offset + 487 Node* header_size = IntPtrConstant(additional_offset +
494 FixedArray::kHeaderSize - kHeapObjectTag); 488 FixedArray::kHeaderSize - kHeapObjectTag);
495 Node* scaled_index = WordShl(int32_index, IntPtrConstant(kPointerSizeLog2)); 489 Node* scaled_index = WordShl(int32_index, IntPtrConstant(kPointerSizeLog2));
496 Node* offset = IntPtrAdd(scaled_index, header_size); 490 Node* offset = IntPtrAdd(scaled_index, header_size);
497 return Load(MachineType::AnyTagged(), object, offset); 491 return Load(MachineType::AnyTagged(), object, offset);
498 } 492 }
499 493
500 Node* CodeStubAssembler::LoadMapInstanceSize(Node* map) {
501 return Load(MachineType::Uint8(), map,
502 IntPtrConstant(Map::kInstanceSizeOffset - kHeapObjectTag));
503 }
504
505 Node* CodeStubAssembler::LoadFixedArrayElementSmiIndex(Node* object, 494 Node* CodeStubAssembler::LoadFixedArrayElementSmiIndex(Node* object,
506 Node* smi_index, 495 Node* smi_index,
507 int additional_offset) { 496 int additional_offset) {
508 int const kSmiShiftBits = kSmiShiftSize + kSmiTagSize; 497 int const kSmiShiftBits = kSmiShiftSize + kSmiTagSize;
509 Node* header_size = IntPtrConstant(additional_offset + 498 Node* header_size = IntPtrConstant(additional_offset +
510 FixedArray::kHeaderSize - kHeapObjectTag); 499 FixedArray::kHeaderSize - kHeapObjectTag);
511 Node* scaled_index = 500 Node* scaled_index =
512 (kSmiShiftBits > kPointerSizeLog2) 501 (kSmiShiftBits > kPointerSizeLog2)
513 ? WordSar(smi_index, IntPtrConstant(kSmiShiftBits - kPointerSizeLog2)) 502 ? WordSar(smi_index, IntPtrConstant(kSmiShiftBits - kPointerSizeLog2))
514 : WordShl(smi_index, 503 : WordShl(smi_index,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 if (flags & kDoubleAlignment) { 653 if (flags & kDoubleAlignment) {
665 return AllocateRawAligned(IntPtrConstant(size_in_bytes), flags, top_address, 654 return AllocateRawAligned(IntPtrConstant(size_in_bytes), flags, top_address,
666 limit_address); 655 limit_address);
667 } 656 }
668 #endif 657 #endif
669 658
670 return AllocateRawUnaligned(IntPtrConstant(size_in_bytes), flags, top_address, 659 return AllocateRawUnaligned(IntPtrConstant(size_in_bytes), flags, top_address,
671 limit_address); 660 limit_address);
672 } 661 }
673 662
674 Node* CodeStubAssembler::InnerAllocate(Node* previous, int offset) {
675 return IntPtrAdd(previous, IntPtrConstant(offset));
676 }
677
678 Node* CodeStubAssembler::AllocateHeapNumber() { 663 Node* CodeStubAssembler::AllocateHeapNumber() {
679 Node* result = Allocate(HeapNumber::kSize, kNone); 664 Node* result = Allocate(HeapNumber::kSize, kNone);
680 StoreMapNoWriteBarrier(result, HeapNumberMapConstant()); 665 StoreMapNoWriteBarrier(result, HeapNumberMapConstant());
681 return result; 666 return result;
682 } 667 }
683 668
684 Node* CodeStubAssembler::AllocateHeapNumberWithValue(Node* value) { 669 Node* CodeStubAssembler::AllocateHeapNumberWithValue(Node* value) {
685 Node* result = AllocateHeapNumber(); 670 Node* result = AllocateHeapNumber();
686 StoreHeapNumberValue(result, value); 671 StoreHeapNumberValue(result, value);
687 return result; 672 return result;
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 } 1359 }
1375 } 1360 }
1376 } 1361 }
1377 1362
1378 bound_ = true; 1363 bound_ = true;
1379 } 1364 }
1380 1365
1381 } // namespace compiler 1366 } // namespace compiler
1382 } // namespace internal 1367 } // namespace internal
1383 } // namespace v8 1368 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698