| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef V8_X64_CODE_STUBS_X64_H_ | 5 #ifndef V8_X64_CODE_STUBS_X64_H_ |
| 6 #define V8_X64_CODE_STUBS_X64_H_ | 6 #define V8_X64_CODE_STUBS_X64_H_ |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 Register r0); | 64 Register r0); |
| 65 | 65 |
| 66 static void GeneratePositiveLookup(MacroAssembler* masm, | 66 static void GeneratePositiveLookup(MacroAssembler* masm, |
| 67 Label* miss, | 67 Label* miss, |
| 68 Label* done, | 68 Label* done, |
| 69 Register elements, | 69 Register elements, |
| 70 Register name, | 70 Register name, |
| 71 Register r0, | 71 Register r0, |
| 72 Register r1); | 72 Register r1); |
| 73 | 73 |
| 74 bool SometimesSetsUpAFrame() OVERRIDE { return false; } | 74 bool SometimesSetsUpAFrame() override { return false; } |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 static const int kInlinedProbes = 4; | 77 static const int kInlinedProbes = 4; |
| 78 static const int kTotalProbes = 20; | 78 static const int kTotalProbes = 20; |
| 79 | 79 |
| 80 static const int kCapacityOffset = | 80 static const int kCapacityOffset = |
| 81 NameDictionary::kHeaderSize + | 81 NameDictionary::kHeaderSize + |
| 82 NameDictionary::kCapacityIndex * kPointerSize; | 82 NameDictionary::kCapacityIndex * kPointerSize; |
| 83 | 83 |
| 84 static const int kElementsStartOffset = | 84 static const int kElementsStartOffset = |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 RecordWriteStub(uint32_t key, Isolate* isolate) | 128 RecordWriteStub(uint32_t key, Isolate* isolate) |
| 129 : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} | 129 : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} |
| 130 | 130 |
| 131 enum Mode { | 131 enum Mode { |
| 132 STORE_BUFFER_ONLY, | 132 STORE_BUFFER_ONLY, |
| 133 INCREMENTAL, | 133 INCREMENTAL, |
| 134 INCREMENTAL_COMPACTION | 134 INCREMENTAL_COMPACTION |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 bool SometimesSetsUpAFrame() OVERRIDE { return false; } | 137 bool SometimesSetsUpAFrame() override { return false; } |
| 138 | 138 |
| 139 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 139 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
| 140 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. | 140 static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. |
| 141 | 141 |
| 142 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. | 142 static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. |
| 143 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. | 143 static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. |
| 144 | 144 |
| 145 static Mode GetMode(Code* stub) { | 145 static Mode GetMode(Code* stub) { |
| 146 byte first_instruction = stub->instruction_start()[0]; | 146 byte first_instruction = stub->instruction_start()[0]; |
| 147 byte second_instruction = stub->instruction_start()[2]; | 147 byte second_instruction = stub->instruction_start()[2]; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 return no_reg; | 306 return no_reg; |
| 307 } | 307 } |
| 308 friend class RecordWriteStub; | 308 friend class RecordWriteStub; |
| 309 }; | 309 }; |
| 310 | 310 |
| 311 enum OnNoNeedToInformIncrementalMarker { | 311 enum OnNoNeedToInformIncrementalMarker { |
| 312 kReturnOnNoNeedToInformIncrementalMarker, | 312 kReturnOnNoNeedToInformIncrementalMarker, |
| 313 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker | 313 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker |
| 314 }; | 314 }; |
| 315 | 315 |
| 316 Major MajorKey() const FINAL { return RecordWrite; } | 316 Major MajorKey() const final { return RecordWrite; } |
| 317 | 317 |
| 318 void Generate(MacroAssembler* masm) OVERRIDE; | 318 void Generate(MacroAssembler* masm) override; |
| 319 void GenerateIncremental(MacroAssembler* masm, Mode mode); | 319 void GenerateIncremental(MacroAssembler* masm, Mode mode); |
| 320 void CheckNeedsToInformIncrementalMarker( | 320 void CheckNeedsToInformIncrementalMarker( |
| 321 MacroAssembler* masm, | 321 MacroAssembler* masm, |
| 322 OnNoNeedToInformIncrementalMarker on_no_need, | 322 OnNoNeedToInformIncrementalMarker on_no_need, |
| 323 Mode mode); | 323 Mode mode); |
| 324 void InformIncrementalMarker(MacroAssembler* masm); | 324 void InformIncrementalMarker(MacroAssembler* masm); |
| 325 | 325 |
| 326 void Activate(Code* code) OVERRIDE { | 326 void Activate(Code* code) override { |
| 327 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); | 327 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); |
| 328 } | 328 } |
| 329 | 329 |
| 330 Register object() const { | 330 Register object() const { |
| 331 return Register::from_code(ObjectBits::decode(minor_key_)); | 331 return Register::from_code(ObjectBits::decode(minor_key_)); |
| 332 } | 332 } |
| 333 | 333 |
| 334 Register value() const { | 334 Register value() const { |
| 335 return Register::from_code(ValueBits::decode(minor_key_)); | 335 return Register::from_code(ValueBits::decode(minor_key_)); |
| 336 } | 336 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 356 Label slow_; | 356 Label slow_; |
| 357 RegisterAllocation regs_; | 357 RegisterAllocation regs_; |
| 358 | 358 |
| 359 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); | 359 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); |
| 360 }; | 360 }; |
| 361 | 361 |
| 362 | 362 |
| 363 } } // namespace v8::internal | 363 } } // namespace v8::internal |
| 364 | 364 |
| 365 #endif // V8_X64_CODE_STUBS_X64_H_ | 365 #endif // V8_X64_CODE_STUBS_X64_H_ |
| OLD | NEW |