OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 7315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7326 } else { | 7326 } else { |
7327 // If the count operation didn't overflow and the result is a valid | 7327 // If the count operation didn't overflow and the result is a valid |
7328 // smi, we're done. Otherwise, we jump to the deferred slow-case | 7328 // smi, we're done. Otherwise, we jump to the deferred slow-case |
7329 // code. | 7329 // code. |
7330 // We combine the overflow and the smi tag check if we could | 7330 // We combine the overflow and the smi tag check if we could |
7331 // successfully allocate a temporary byte register. | 7331 // successfully allocate a temporary byte register. |
7332 if (tmp.is_valid()) { | 7332 if (tmp.is_valid()) { |
7333 __ setcc(overflow, tmp.reg()); | 7333 __ setcc(overflow, tmp.reg()); |
7334 __ or_(Operand(tmp.reg()), new_value.reg()); | 7334 __ or_(Operand(tmp.reg()), new_value.reg()); |
7335 __ test(tmp.reg(), Immediate(kSmiTagMask)); | 7335 __ test(tmp.reg(), Immediate(kSmiTagMask)); |
7336 tmp.Unusec(); | 7336 tmp.Unuse(); |
7337 deferred->Branch(not_zero); | 7337 deferred->Branch(not_zero); |
7338 } else { | 7338 } else { |
7339 // Otherwise we test separately for overflow and smi tag. | 7339 // Otherwise we test separately for overflow and smi tag. |
7340 deferred->Branch(overflow); | 7340 deferred->Branch(overflow); |
7341 __ test(new_value.reg(), Immediate(kSmiTagMask)); | 7341 __ test(new_value.reg(), Immediate(kSmiTagMask)); |
7342 deferred->Branch(not_zero); | 7342 deferred->Branch(not_zero); |
7343 } | 7343 } |
7344 } | 7344 } |
7345 deferred->BindExit(); | 7345 deferred->BindExit(); |
7346 | 7346 |
(...skipping 5574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12921 | 12921 |
12922 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 12922 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
12923 // tagged as a small integer. | 12923 // tagged as a small integer. |
12924 __ bind(&runtime); | 12924 __ bind(&runtime); |
12925 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 12925 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
12926 } | 12926 } |
12927 | 12927 |
12928 #undef __ | 12928 #undef __ |
12929 | 12929 |
12930 } } // namespace v8::internal | 12930 } } // namespace v8::internal |
OLD | NEW |