| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 return Register::from_code(IndexBits::decode(minor_key_)); | 97 return Register::from_code(IndexBits::decode(minor_key_)); |
| 98 } | 98 } |
| 99 | 99 |
| 100 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } | 100 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } |
| 101 | 101 |
| 102 class DictionaryBits: public BitField<int, 0, 4> {}; | 102 class DictionaryBits: public BitField<int, 0, 4> {}; |
| 103 class ResultBits: public BitField<int, 4, 4> {}; | 103 class ResultBits: public BitField<int, 4, 4> {}; |
| 104 class IndexBits: public BitField<int, 8, 4> {}; | 104 class IndexBits: public BitField<int, 8, 4> {}; |
| 105 class LookupModeBits: public BitField<LookupMode, 12, 1> {}; | 105 class LookupModeBits: public BitField<LookupMode, 12, 1> {}; |
| 106 | 106 |
| 107 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 107 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 108 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 | 111 |
| 111 class RecordWriteStub: public PlatformCodeStub { | 112 class RecordWriteStub: public PlatformCodeStub { |
| 112 public: | 113 public: |
| 113 RecordWriteStub(Isolate* isolate, Register object, Register value, | 114 RecordWriteStub(Isolate* isolate, Register object, Register value, |
| 114 Register address, RememberedSetAction remembered_set_action, | 115 Register address, RememberedSetAction remembered_set_action, |
| 115 SaveFPRegsMode fp_mode) | 116 SaveFPRegsMode fp_mode) |
| 116 : PlatformCodeStub(isolate), | 117 : PlatformCodeStub(isolate), |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 case INCREMENTAL_COMPACTION: | 176 case INCREMENTAL_COMPACTION: |
| 176 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); | 177 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); |
| 177 stub->instruction_start()[0] = kTwoByteNopInstruction; | 178 stub->instruction_start()[0] = kTwoByteNopInstruction; |
| 178 stub->instruction_start()[2] = kFiveByteJumpInstruction; | 179 stub->instruction_start()[2] = kFiveByteJumpInstruction; |
| 179 break; | 180 break; |
| 180 } | 181 } |
| 181 DCHECK(GetMode(stub) == mode); | 182 DCHECK(GetMode(stub) == mode); |
| 182 CpuFeatures::FlushICache(stub->instruction_start(), 7); | 183 CpuFeatures::FlushICache(stub->instruction_start(), 7); |
| 183 } | 184 } |
| 184 | 185 |
| 186 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 187 |
| 185 private: | 188 private: |
| 186 // This is a helper class for freeing up 3 scratch registers, where the third | 189 // This is a helper class for freeing up 3 scratch registers, where the third |
| 187 // is always rcx (needed for shift operations). The input is two registers | 190 // is always rcx (needed for shift operations). The input is two registers |
| 188 // that must be preserved and one scratch register provided by the caller. | 191 // that must be preserved and one scratch register provided by the caller. |
| 189 class RegisterAllocation { | 192 class RegisterAllocation { |
| 190 public: | 193 public: |
| 191 RegisterAllocation(Register object, | 194 RegisterAllocation(Register object, |
| 192 Register address, | 195 Register address, |
| 193 Register scratch0) | 196 Register scratch0) |
| 194 : object_orig_(object), | 197 : object_orig_(object), |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 Label slow_; | 356 Label slow_; |
| 354 RegisterAllocation regs_; | 357 RegisterAllocation regs_; |
| 355 | 358 |
| 356 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); | 359 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); |
| 357 }; | 360 }; |
| 358 | 361 |
| 359 | 362 |
| 360 } } // namespace v8::internal | 363 } } // namespace v8::internal |
| 361 | 364 |
| 362 #endif // V8_X64_CODE_STUBS_X64_H_ | 365 #endif // V8_X64_CODE_STUBS_X64_H_ |
| OLD | NEW |