1618 // we inline both the stack-locking fast-path and the inflated fast path. |
1618 // we inline both the stack-locking fast-path and the inflated fast path. |
1619 // |
1619 // |
1620 // See also: cmpFastLock and cmpFastUnlock. |
1620 // See also: cmpFastLock and cmpFastUnlock. |
1621 // |
1621 // |
1622 // What follows is a specialized inline transliteration of the code |
1622 // What follows is a specialized inline transliteration of the code |
1623 // in slow_enter() and slow_exit(). If we're concerned about I$ bloat |
1623 // in enter() and exit(). If we're concerned about I$ bloat another |
1624 // another option would be to emit TrySlowEnter and TrySlowExit methods |
1624 // option would be to emit TrySlowEnter and TrySlowExit methods |
1625 // at startup-time. These methods would accept arguments as |
1625 // at startup-time. These methods would accept arguments as |
1626 // (rax,=Obj, rbx=Self, rcx=box, rdx=Scratch) and return success-failure |
1626 // (rax,=Obj, rbx=Self, rcx=box, rdx=Scratch) and return success-failure |
1627 // indications in the icc.ZFlag. Fast_Lock and Fast_Unlock would simply |
1627 // indications in the icc.ZFlag. Fast_Lock and Fast_Unlock would simply |
1628 // marshal the arguments and emit calls to TrySlowEnter and TrySlowExit. |
1628 // marshal the arguments and emit calls to TrySlowEnter and TrySlowExit. |
1629 // In practice, however, the # of lock sites is bounded and is usually small. |
1629 // In practice, however, the # of lock sites is bounded and is usually small. |