| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MACRO_ASSEMBLER_X64_H_ | 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ | 
| 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 
| 7 | 7 | 
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" | 
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" | 
| 10 #include "src/base/flags.h" | 10 #include "src/base/flags.h" | 
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 229     InNewSpace(object, scratch, equal, branch, distance); | 229     InNewSpace(object, scratch, equal, branch, distance); | 
| 230   } | 230   } | 
| 231 | 231 | 
| 232   // Check if an object has the black incremental marking color.  Also uses rcx! | 232   // Check if an object has the black incremental marking color.  Also uses rcx! | 
| 233   void JumpIfBlack(Register object, | 233   void JumpIfBlack(Register object, | 
| 234                    Register scratch0, | 234                    Register scratch0, | 
| 235                    Register scratch1, | 235                    Register scratch1, | 
| 236                    Label* on_black, | 236                    Label* on_black, | 
| 237                    Label::Distance on_black_distance = Label::kFar); | 237                    Label::Distance on_black_distance = Label::kFar); | 
| 238 | 238 | 
| 239   // Detects conservatively whether an object is data-only, i.e. it does need to | 239   // Checks the color of an object.  If the object is white we jump to the | 
| 240   // be scanned by the garbage collector. | 240   // incremental marker. | 
| 241   void JumpIfDataObject(Register value, | 241   void JumpIfWhite(Register value, Register scratch1, Register scratch2, | 
| 242                         Register scratch, | 242                    Label* value_is_white, Label::Distance distance); | 
| 243                         Label* not_data_object, |  | 
| 244                         Label::Distance not_data_object_distance); |  | 
| 245 |  | 
| 246   // Checks the color of an object.  If the object is already grey or black |  | 
| 247   // then we just fall through, since it is already live.  If it is white and |  | 
| 248   // we can determine that it doesn't need to be scanned, then we just mark it |  | 
| 249   // black and fall through.  For the rest we jump to the label so the |  | 
| 250   // incremental marker can fix its assumptions. |  | 
| 251   void EnsureNotWhite(Register object, |  | 
| 252                       Register scratch1, |  | 
| 253                       Register scratch2, |  | 
| 254                       Label* object_is_white_and_not_data, |  | 
| 255                       Label::Distance distance); |  | 
| 256 | 243 | 
| 257   // Notify the garbage collector that we wrote a pointer into an object. | 244   // Notify the garbage collector that we wrote a pointer into an object. | 
| 258   // |object| is the object being stored into, |value| is the object being | 245   // |object| is the object being stored into, |value| is the object being | 
| 259   // stored.  value and scratch registers are clobbered by the operation. | 246   // stored.  value and scratch registers are clobbered by the operation. | 
| 260   // The offset is the offset from the start of the object, not the offset from | 247   // The offset is the offset from the start of the object, not the offset from | 
| 261   // the tagged HeapObject pointer.  For use with FieldOperand(reg, off). | 248   // the tagged HeapObject pointer.  For use with FieldOperand(reg, off). | 
| 262   void RecordWriteField( | 249   void RecordWriteField( | 
| 263       Register object, | 250       Register object, | 
| 264       int offset, | 251       int offset, | 
| 265       Register value, | 252       Register value, | 
| (...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1748   }                                                                          \ | 1735   }                                                                          \ | 
| 1749   masm-> | 1736   masm-> | 
| 1750 #else | 1737 #else | 
| 1751 #define ACCESS_MASM(masm) masm-> | 1738 #define ACCESS_MASM(masm) masm-> | 
| 1752 #endif | 1739 #endif | 
| 1753 | 1740 | 
| 1754 }  // namespace internal | 1741 }  // namespace internal | 
| 1755 }  // namespace v8 | 1742 }  // namespace v8 | 
| 1756 | 1743 | 
| 1757 #endif  // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1744 #endif  // V8_X64_MACRO_ASSEMBLER_X64_H_ | 
| OLD | NEW | 
|---|