| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 Label* allocation_memento_found) { | 138 Label* allocation_memento_found) { |
| 139 // ----------- S t a t e ------------- | 139 // ----------- S t a t e ------------- |
| 140 // -- x2 : receiver | 140 // -- x2 : receiver |
| 141 // -- x3 : target map | 141 // -- x3 : target map |
| 142 // ----------------------------------- | 142 // ----------------------------------- |
| 143 Register receiver = x2; | 143 Register receiver = x2; |
| 144 Register map = x3; | 144 Register map = x3; |
| 145 | 145 |
| 146 if (mode == TRACK_ALLOCATION_SITE) { | 146 if (mode == TRACK_ALLOCATION_SITE) { |
| 147 ASSERT(allocation_memento_found != NULL); | 147 ASSERT(allocation_memento_found != NULL); |
| 148 __ TestJSArrayForAllocationMemento(receiver, x10, x11); | 148 __ JumpIfJSArrayHasAllocationMemento(receiver, x10, x11, |
| 149 __ B(eq, allocation_memento_found); | 149 allocation_memento_found); |
| 150 } | 150 } |
| 151 | 151 |
| 152 // Set transitioned map. | 152 // Set transitioned map. |
| 153 __ Str(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 153 __ Str(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
| 154 __ RecordWriteField(receiver, | 154 __ RecordWriteField(receiver, |
| 155 HeapObject::kMapOffset, | 155 HeapObject::kMapOffset, |
| 156 map, | 156 map, |
| 157 x10, | 157 x10, |
| 158 kLRHasNotBeenSaved, | 158 kLRHasNotBeenSaved, |
| 159 kDontSaveFPRegs, | 159 kDontSaveFPRegs, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 171 // -- x1 : key | 171 // -- x1 : key |
| 172 // -- x2 : receiver | 172 // -- x2 : receiver |
| 173 // -- x3 : target map, scratch for subsequent call | 173 // -- x3 : target map, scratch for subsequent call |
| 174 // ----------------------------------- | 174 // ----------------------------------- |
| 175 Register receiver = x2; | 175 Register receiver = x2; |
| 176 Register target_map = x3; | 176 Register target_map = x3; |
| 177 | 177 |
| 178 Label gc_required, only_change_map; | 178 Label gc_required, only_change_map; |
| 179 | 179 |
| 180 if (mode == TRACK_ALLOCATION_SITE) { | 180 if (mode == TRACK_ALLOCATION_SITE) { |
| 181 __ TestJSArrayForAllocationMemento(receiver, x10, x11); | 181 __ JumpIfJSArrayHasAllocationMemento(receiver, x10, x11, fail); |
| 182 __ B(eq, fail); | |
| 183 } | 182 } |
| 184 | 183 |
| 185 // Check for empty arrays, which only require a map transition and no changes | 184 // Check for empty arrays, which only require a map transition and no changes |
| 186 // to the backing store. | 185 // to the backing store. |
| 187 Register elements = x4; | 186 Register elements = x4; |
| 188 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 187 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
| 189 __ JumpIfRoot(elements, Heap::kEmptyFixedArrayRootIndex, &only_change_map); | 188 __ JumpIfRoot(elements, Heap::kEmptyFixedArrayRootIndex, &only_change_map); |
| 190 | 189 |
| 191 __ Push(lr); | 190 __ Push(lr); |
| 192 Register length = x5; | 191 Register length = x5; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // -- lr : return address | 276 // -- lr : return address |
| 278 // -- x3 : target map, scratch for subsequent call | 277 // -- x3 : target map, scratch for subsequent call |
| 279 // -- x4 : scratch (elements) | 278 // -- x4 : scratch (elements) |
| 280 // ----------------------------------- | 279 // ----------------------------------- |
| 281 Register value = x0; | 280 Register value = x0; |
| 282 Register key = x1; | 281 Register key = x1; |
| 283 Register receiver = x2; | 282 Register receiver = x2; |
| 284 Register target_map = x3; | 283 Register target_map = x3; |
| 285 | 284 |
| 286 if (mode == TRACK_ALLOCATION_SITE) { | 285 if (mode == TRACK_ALLOCATION_SITE) { |
| 287 __ TestJSArrayForAllocationMemento(receiver, x10, x11); | 286 __ JumpIfJSArrayHasAllocationMemento(receiver, x10, x11, fail); |
| 288 __ B(eq, fail); | |
| 289 } | 287 } |
| 290 | 288 |
| 291 // Check for empty arrays, which only require a map transition and no changes | 289 // Check for empty arrays, which only require a map transition and no changes |
| 292 // to the backing store. | 290 // to the backing store. |
| 293 Label only_change_map; | 291 Label only_change_map; |
| 294 Register elements = x4; | 292 Register elements = x4; |
| 295 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 293 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
| 296 __ JumpIfRoot(elements, Heap::kEmptyFixedArrayRootIndex, &only_change_map); | 294 __ JumpIfRoot(elements, Heap::kEmptyFixedArrayRootIndex, &only_change_map); |
| 297 | 295 |
| 298 __ Push(lr); | 296 __ Push(lr); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 384 |
| 387 | 385 |
| 388 bool Code::IsYoungSequence(byte* sequence) { | 386 bool Code::IsYoungSequence(byte* sequence) { |
| 389 return MacroAssembler::IsYoungSequence(sequence); | 387 return MacroAssembler::IsYoungSequence(sequence); |
| 390 } | 388 } |
| 391 | 389 |
| 392 | 390 |
| 393 void Code::GetCodeAgeAndParity(byte* sequence, Age* age, | 391 void Code::GetCodeAgeAndParity(byte* sequence, Age* age, |
| 394 MarkingParity* parity) { | 392 MarkingParity* parity) { |
| 395 if (IsYoungSequence(sequence)) { | 393 if (IsYoungSequence(sequence)) { |
| 396 *age = kNoAge; | 394 *age = kNoAgeCodeAge; |
| 397 *parity = NO_MARKING_PARITY; | 395 *parity = NO_MARKING_PARITY; |
| 398 } else { | 396 } else { |
| 399 byte* target = sequence + kCodeAgeStubEntryOffset; | 397 byte* target = sequence + kCodeAgeStubEntryOffset; |
| 400 Code* stub = GetCodeFromTargetAddress(Memory::Address_at(target)); | 398 Code* stub = GetCodeFromTargetAddress(Memory::Address_at(target)); |
| 401 GetCodeAgeAndParity(stub, age, parity); | 399 GetCodeAgeAndParity(stub, age, parity); |
| 402 } | 400 } |
| 403 } | 401 } |
| 404 | 402 |
| 405 | 403 |
| 406 void Code::PatchPlatformCodeAge(Isolate* isolate, | 404 void Code::PatchPlatformCodeAge(Isolate* isolate, |
| 407 byte* sequence, | 405 byte* sequence, |
| 408 Code::Age age, | 406 Code::Age age, |
| 409 MarkingParity parity) { | 407 MarkingParity parity) { |
| 410 PatchingAssembler patcher(sequence, kCodeAgeSequenceSize / kInstructionSize); | 408 PatchingAssembler patcher(sequence, kCodeAgeSequenceSize / kInstructionSize); |
| 411 if (age == kNoAge) { | 409 if (age == kNoAgeCodeAge) { |
| 412 MacroAssembler::EmitFrameSetupForCodeAgePatching(&patcher); | 410 MacroAssembler::EmitFrameSetupForCodeAgePatching(&patcher); |
| 413 } else { | 411 } else { |
| 414 Code * stub = GetCodeAgeStub(isolate, age, parity); | 412 Code * stub = GetCodeAgeStub(isolate, age, parity); |
| 415 MacroAssembler::EmitCodeAgeSequence(&patcher, stub); | 413 MacroAssembler::EmitCodeAgeSequence(&patcher, stub); |
| 416 } | 414 } |
| 417 } | 415 } |
| 418 | 416 |
| 419 | 417 |
| 420 void StringCharLoadGenerator::Generate(MacroAssembler* masm, | 418 void StringCharLoadGenerator::Generate(MacroAssembler* masm, |
| 421 Register string, | 419 Register string, |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 __ Fmul(result, double_temp3, double_temp1); | 617 __ Fmul(result, double_temp3, double_temp1); |
| 620 | 618 |
| 621 __ Bind(&done); | 619 __ Bind(&done); |
| 622 } | 620 } |
| 623 | 621 |
| 624 #undef __ | 622 #undef __ |
| 625 | 623 |
| 626 } } // namespace v8::internal | 624 } } // namespace v8::internal |
| 627 | 625 |
| 628 #endif // V8_TARGET_ARCH_A64 | 626 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |