Revision f230a1cf deps/v8/src/x64/codegen-x64.cc
deps/v8/src/x64/codegen-x64.cc | ||
---|---|---|
263 | 263 |
// ----------------------------------- |
264 | 264 |
if (mode == TRACK_ALLOCATION_SITE) { |
265 | 265 |
ASSERT(allocation_memento_found != NULL); |
266 |
__ TestJSArrayForAllocationMemento(rdx, rdi); |
|
267 |
__ j(equal, allocation_memento_found); |
|
266 |
__ JumpIfJSArrayHasAllocationMemento(rdx, rdi, allocation_memento_found); |
|
268 | 267 |
} |
269 | 268 |
|
270 | 269 |
// Set transitioned map. |
... | ... | |
292 | 291 |
Label allocated, new_backing_store, only_change_map, done; |
293 | 292 |
|
294 | 293 |
if (mode == TRACK_ALLOCATION_SITE) { |
295 |
__ TestJSArrayForAllocationMemento(rdx, rdi); |
|
296 |
__ j(equal, fail); |
|
294 |
__ JumpIfJSArrayHasAllocationMemento(rdx, rdi, fail); |
|
297 | 295 |
} |
298 | 296 |
|
299 | 297 |
// Check for empty arrays, which only require a map transition and no changes |
... | ... | |
386 | 384 |
// rbx: current element (smi-tagged) |
387 | 385 |
__ JumpIfNotSmi(rbx, &convert_hole); |
388 | 386 |
__ SmiToInteger32(rbx, rbx); |
389 |
__ cvtlsi2sd(xmm0, rbx);
|
|
387 |
__ Cvtlsi2sd(xmm0, rbx);
|
|
390 | 388 |
__ movsd(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize), |
391 | 389 |
xmm0); |
392 | 390 |
__ jmp(&entry); |
... | ... | |
418 | 416 |
Label loop, entry, convert_hole, gc_required, only_change_map; |
419 | 417 |
|
420 | 418 |
if (mode == TRACK_ALLOCATION_SITE) { |
421 |
__ TestJSArrayForAllocationMemento(rdx, rdi); |
|
422 |
__ j(equal, fail); |
|
419 |
__ JumpIfJSArrayHasAllocationMemento(rdx, rdi, fail); |
|
423 | 420 |
} |
424 | 421 |
|
425 | 422 |
// Check for empty arrays, which only require a map transition and no changes |
... | ... | |
469 | 466 |
// Non-hole double, copy value into a heap number. |
470 | 467 |
__ AllocateHeapNumber(rax, r15, &gc_required); |
471 | 468 |
// rax: new heap number |
472 |
__ movq(FieldOperand(rax, HeapNumber::kValueOffset), r14);
|
|
469 |
__ MoveDouble(FieldOperand(rax, HeapNumber::kValueOffset), r14);
|
|
473 | 470 |
__ movq(FieldOperand(r11, |
474 | 471 |
r9, |
475 | 472 |
times_pointer_size, |
... | ... | |
678 | 675 |
#undef __ |
679 | 676 |
|
680 | 677 |
|
681 |
static const int kNoCodeAgeSequenceLength = 6; |
|
682 |
|
|
683 | 678 |
static byte* GetNoCodeAgeSequence(uint32_t* length) { |
684 | 679 |
static bool initialized = false; |
685 | 680 |
static byte sequence[kNoCodeAgeSequenceLength]; |
... | ... | |
711 | 706 |
void Code::GetCodeAgeAndParity(byte* sequence, Age* age, |
712 | 707 |
MarkingParity* parity) { |
713 | 708 |
if (IsYoungSequence(sequence)) { |
714 |
*age = kNoAge; |
|
709 |
*age = kNoAgeCodeAge;
|
|
715 | 710 |
*parity = NO_MARKING_PARITY; |
716 | 711 |
} else { |
717 | 712 |
sequence++; // Skip the kCallOpcode byte |
... | ... | |
723 | 718 |
} |
724 | 719 |
|
725 | 720 |
|
726 |
void Code::PatchPlatformCodeAge(byte* sequence, |
|
721 |
void Code::PatchPlatformCodeAge(Isolate* isolate, |
|
722 |
byte* sequence, |
|
727 | 723 |
Code::Age age, |
728 | 724 |
MarkingParity parity) { |
729 | 725 |
uint32_t young_length; |
730 | 726 |
byte* young_sequence = GetNoCodeAgeSequence(&young_length); |
731 |
if (age == kNoAge) { |
|
727 |
if (age == kNoAgeCodeAge) {
|
|
732 | 728 |
CopyBytes(sequence, young_sequence, young_length); |
733 | 729 |
CPU::FlushICache(sequence, young_length); |
734 | 730 |
} else { |
735 |
Code* stub = GetCodeAgeStub(age, parity); |
|
731 |
Code* stub = GetCodeAgeStub(isolate, age, parity);
|
|
736 | 732 |
CodePatcher patcher(sequence, young_length); |
737 | 733 |
patcher.masm()->call(stub->instruction_start()); |
738 |
for (int i = 0; |
|
739 |
i < kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength; |
|
740 |
i++) { |
|
741 |
patcher.masm()->nop(); |
|
742 |
} |
|
734 |
patcher.masm()->Nop( |
|
735 |
kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength); |
|
743 | 736 |
} |
744 | 737 |
} |
745 | 738 |
|
746 | 739 |
|
747 | 740 |
Operand StackArgumentsAccessor::GetArgumentOperand(int index) { |
748 | 741 |
ASSERT(index >= 0); |
749 |
ASSERT(base_reg_.is(rsp) || base_reg_.is(rbp)); |
|
750 | 742 |
int receiver = (receiver_mode_ == ARGUMENTS_CONTAIN_RECEIVER) ? 1 : 0; |
751 | 743 |
int displacement_to_last_argument = base_reg_.is(rsp) ? |
752 | 744 |
kPCOnStackSize : kFPOnStackSize + kPCOnStackSize; |
Also available in: Unified diff