| Index: src/x64/codegen-x64.cc
|
| diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc
|
| index 247c7a234a6943ecc9492101a3cdcb981ad1120d..8ef577fea4848807cd4d8b44044ecf7147fd24c2 100644
|
| --- a/src/x64/codegen-x64.cc
|
| +++ b/src/x64/codegen-x64.cc
|
| @@ -263,8 +263,7 @@ void ElementsTransitionGenerator::GenerateMapChangeElementsTransition(
|
| // -----------------------------------
|
| if (mode == TRACK_ALLOCATION_SITE) {
|
| ASSERT(allocation_memento_found != NULL);
|
| - __ TestJSArrayForAllocationMemento(rdx, rdi);
|
| - __ j(equal, allocation_memento_found);
|
| + __ JumpIfJSArrayHasAllocationMemento(rdx, rdi, allocation_memento_found);
|
| }
|
|
|
| // Set transitioned map.
|
| @@ -292,8 +291,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
|
| Label allocated, new_backing_store, only_change_map, done;
|
|
|
| if (mode == TRACK_ALLOCATION_SITE) {
|
| - __ TestJSArrayForAllocationMemento(rdx, rdi);
|
| - __ j(equal, fail);
|
| + __ JumpIfJSArrayHasAllocationMemento(rdx, rdi, fail);
|
| }
|
|
|
| // Check for empty arrays, which only require a map transition and no changes
|
| @@ -418,8 +416,7 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
|
| Label loop, entry, convert_hole, gc_required, only_change_map;
|
|
|
| if (mode == TRACK_ALLOCATION_SITE) {
|
| - __ TestJSArrayForAllocationMemento(rdx, rdi);
|
| - __ j(equal, fail);
|
| + __ JumpIfJSArrayHasAllocationMemento(rdx, rdi, fail);
|
| }
|
|
|
| // Check for empty arrays, which only require a map transition and no changes
|
| @@ -678,8 +675,6 @@ void MathExpGenerator::EmitMathExp(MacroAssembler* masm,
|
| #undef __
|
|
|
|
|
| -static const int kNoCodeAgeSequenceLength = 6;
|
| -
|
| static byte* GetNoCodeAgeSequence(uint32_t* length) {
|
| static bool initialized = false;
|
| static byte sequence[kNoCodeAgeSequenceLength];
|
| @@ -711,7 +706,7 @@ bool Code::IsYoungSequence(byte* sequence) {
|
| void Code::GetCodeAgeAndParity(byte* sequence, Age* age,
|
| MarkingParity* parity) {
|
| if (IsYoungSequence(sequence)) {
|
| - *age = kNoAge;
|
| + *age = kNoAgeCodeAge;
|
| *parity = NO_MARKING_PARITY;
|
| } else {
|
| sequence++; // Skip the kCallOpcode byte
|
| @@ -729,18 +724,15 @@ void Code::PatchPlatformCodeAge(Isolate* isolate,
|
| MarkingParity parity) {
|
| uint32_t young_length;
|
| byte* young_sequence = GetNoCodeAgeSequence(&young_length);
|
| - if (age == kNoAge) {
|
| + if (age == kNoAgeCodeAge) {
|
| CopyBytes(sequence, young_sequence, young_length);
|
| CPU::FlushICache(sequence, young_length);
|
| } else {
|
| Code* stub = GetCodeAgeStub(isolate, age, parity);
|
| CodePatcher patcher(sequence, young_length);
|
| patcher.masm()->call(stub->instruction_start());
|
| - for (int i = 0;
|
| - i < kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength;
|
| - i++) {
|
| - patcher.masm()->nop();
|
| - }
|
| + patcher.masm()->Nop(
|
| + kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength);
|
| }
|
| }
|
|
|
|
|