| 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_MIPS_CODE_STUBS_ARM_H_ | 5 #ifndef V8_MIPS_CODE_STUBS_ARM_H_ |
| 6 #define V8_MIPS_CODE_STUBS_ARM_H_ | 6 #define V8_MIPS_CODE_STUBS_ARM_H_ |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 RecordWriteStub(uint32_t key, Isolate* isolate) | 96 RecordWriteStub(uint32_t key, Isolate* isolate) |
| 97 : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} | 97 : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} |
| 98 | 98 |
| 99 enum Mode { | 99 enum Mode { |
| 100 STORE_BUFFER_ONLY, | 100 STORE_BUFFER_ONLY, |
| 101 INCREMENTAL, | 101 INCREMENTAL, |
| 102 INCREMENTAL_COMPACTION | 102 INCREMENTAL_COMPACTION |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 bool SometimesSetsUpAFrame() OVERRIDE { return false; } | 105 bool SometimesSetsUpAFrame() override { return false; } |
| 106 | 106 |
| 107 static void PatchBranchIntoNop(MacroAssembler* masm, int pos) { | 107 static void PatchBranchIntoNop(MacroAssembler* masm, int pos) { |
| 108 const unsigned offset = masm->instr_at(pos) & kImm16Mask; | 108 const unsigned offset = masm->instr_at(pos) & kImm16Mask; |
| 109 masm->instr_at_put(pos, BNE | (zero_reg.code() << kRsShift) | | 109 masm->instr_at_put(pos, BNE | (zero_reg.code() << kRsShift) | |
| 110 (zero_reg.code() << kRtShift) | (offset & kImm16Mask)); | 110 (zero_reg.code() << kRtShift) | (offset & kImm16Mask)); |
| 111 DCHECK(Assembler::IsBne(masm->instr_at(pos))); | 111 DCHECK(Assembler::IsBne(masm->instr_at(pos))); |
| 112 } | 112 } |
| 113 | 113 |
| 114 static void PatchNopIntoBranch(MacroAssembler* masm, int pos) { | 114 static void PatchNopIntoBranch(MacroAssembler* masm, int pos) { |
| 115 const unsigned offset = masm->instr_at(pos) & kImm16Mask; | 115 const unsigned offset = masm->instr_at(pos) & kImm16Mask; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 Register scratch1_; | 222 Register scratch1_; |
| 223 | 223 |
| 224 friend class RecordWriteStub; | 224 friend class RecordWriteStub; |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 enum OnNoNeedToInformIncrementalMarker { | 227 enum OnNoNeedToInformIncrementalMarker { |
| 228 kReturnOnNoNeedToInformIncrementalMarker, | 228 kReturnOnNoNeedToInformIncrementalMarker, |
| 229 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker | 229 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker |
| 230 }; | 230 }; |
| 231 | 231 |
| 232 inline Major MajorKey() const FINAL { return RecordWrite; } | 232 inline Major MajorKey() const final { return RecordWrite; } |
| 233 | 233 |
| 234 void Generate(MacroAssembler* masm) OVERRIDE; | 234 void Generate(MacroAssembler* masm) override; |
| 235 void GenerateIncremental(MacroAssembler* masm, Mode mode); | 235 void GenerateIncremental(MacroAssembler* masm, Mode mode); |
| 236 void CheckNeedsToInformIncrementalMarker( | 236 void CheckNeedsToInformIncrementalMarker( |
| 237 MacroAssembler* masm, | 237 MacroAssembler* masm, |
| 238 OnNoNeedToInformIncrementalMarker on_no_need, | 238 OnNoNeedToInformIncrementalMarker on_no_need, |
| 239 Mode mode); | 239 Mode mode); |
| 240 void InformIncrementalMarker(MacroAssembler* masm); | 240 void InformIncrementalMarker(MacroAssembler* masm); |
| 241 | 241 |
| 242 void Activate(Code* code) OVERRIDE { | 242 void Activate(Code* code) override { |
| 243 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); | 243 code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); |
| 244 } | 244 } |
| 245 | 245 |
| 246 Register object() const { | 246 Register object() const { |
| 247 return Register::from_code(ObjectBits::decode(minor_key_)); | 247 return Register::from_code(ObjectBits::decode(minor_key_)); |
| 248 } | 248 } |
| 249 | 249 |
| 250 Register value() const { | 250 Register value() const { |
| 251 return Register::from_code(ValueBits::decode(minor_key_)); | 251 return Register::from_code(ValueBits::decode(minor_key_)); |
| 252 } | 252 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 280 // in the presence of compacting GC (which can move code objects) we need to | 280 // in the presence of compacting GC (which can move code objects) we need to |
| 281 // keep the code which called into native pinned in the memory. Currently the | 281 // keep the code which called into native pinned in the memory. Currently the |
| 282 // simplest approach is to generate such stub early enough so it can never be | 282 // simplest approach is to generate such stub early enough so it can never be |
| 283 // moved by GC | 283 // moved by GC |
| 284 class DirectCEntryStub: public PlatformCodeStub { | 284 class DirectCEntryStub: public PlatformCodeStub { |
| 285 public: | 285 public: |
| 286 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 286 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 287 void GenerateCall(MacroAssembler* masm, Register target); | 287 void GenerateCall(MacroAssembler* masm, Register target); |
| 288 | 288 |
| 289 private: | 289 private: |
| 290 bool NeedsImmovableCode() OVERRIDE { return true; } | 290 bool NeedsImmovableCode() override { return true; } |
| 291 | 291 |
| 292 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 292 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 293 DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub); | 293 DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub); |
| 294 }; | 294 }; |
| 295 | 295 |
| 296 | 296 |
| 297 class NameDictionaryLookupStub: public PlatformCodeStub { | 297 class NameDictionaryLookupStub: public PlatformCodeStub { |
| 298 public: | 298 public: |
| 299 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 299 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
| 300 | 300 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 312 Register scratch0); | 312 Register scratch0); |
| 313 | 313 |
| 314 static void GeneratePositiveLookup(MacroAssembler* masm, | 314 static void GeneratePositiveLookup(MacroAssembler* masm, |
| 315 Label* miss, | 315 Label* miss, |
| 316 Label* done, | 316 Label* done, |
| 317 Register elements, | 317 Register elements, |
| 318 Register name, | 318 Register name, |
| 319 Register r0, | 319 Register r0, |
| 320 Register r1); | 320 Register r1); |
| 321 | 321 |
| 322 bool SometimesSetsUpAFrame() OVERRIDE { return false; } | 322 bool SometimesSetsUpAFrame() override { return false; } |
| 323 | 323 |
| 324 private: | 324 private: |
| 325 static const int kInlinedProbes = 4; | 325 static const int kInlinedProbes = 4; |
| 326 static const int kTotalProbes = 20; | 326 static const int kTotalProbes = 20; |
| 327 | 327 |
| 328 static const int kCapacityOffset = | 328 static const int kCapacityOffset = |
| 329 NameDictionary::kHeaderSize + | 329 NameDictionary::kHeaderSize + |
| 330 NameDictionary::kCapacityIndex * kPointerSize; | 330 NameDictionary::kCapacityIndex * kPointerSize; |
| 331 | 331 |
| 332 static const int kElementsStartOffset = | 332 static const int kElementsStartOffset = |
| 333 NameDictionary::kHeaderSize + | 333 NameDictionary::kHeaderSize + |
| 334 NameDictionary::kElementsStartIndex * kPointerSize; | 334 NameDictionary::kElementsStartIndex * kPointerSize; |
| 335 | 335 |
| 336 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } | 336 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } |
| 337 | 337 |
| 338 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 338 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
| 339 | 339 |
| 340 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 340 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 341 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 341 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
| 342 }; | 342 }; |
| 343 | 343 |
| 344 | 344 |
| 345 } } // namespace v8::internal | 345 } } // namespace v8::internal |
| 346 | 346 |
| 347 #endif // V8_MIPS_CODE_STUBS_ARM_H_ | 347 #endif // V8_MIPS_CODE_STUBS_ARM_H_ |
| OLD | NEW |