| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 // where both sides are Smis. | 1298 // where both sides are Smis. |
| 1299 left_side.ToRegister(); | 1299 left_side.ToRegister(); |
| 1300 ASSERT(left_side.is_valid()); | 1300 ASSERT(left_side.is_valid()); |
| 1301 JumpTarget is_smi(this); | 1301 JumpTarget is_smi(this); |
| 1302 __ test(left_side.reg(), Immediate(kSmiTagMask)); | 1302 __ test(left_side.reg(), Immediate(kSmiTagMask)); |
| 1303 is_smi.Branch(zero, &left_side, &right_side, taken); | 1303 is_smi.Branch(zero, &left_side, &right_side, taken); |
| 1304 | 1304 |
| 1305 // Setup and call the compare stub, which expects arguments in edx | 1305 // Setup and call the compare stub, which expects arguments in edx |
| 1306 // and eax. | 1306 // and eax. |
| 1307 CompareStub stub(cc, strict); | 1307 CompareStub stub(cc, strict); |
| 1308 left_side.ToRegister(eax); | 1308 left_side.ToRegister(edx); // Only left_side currently uses a register. |
| 1309 right_side.ToRegister(edx); | 1309 right_side.ToRegister(eax); // left_side is not in eax. eax is free. |
| 1310 Result result = frame_->CallStub(&stub, &left_side, &right_side, 0); | 1310 Result result = frame_->CallStub(&stub, &left_side, &right_side, 0); |
| 1311 result.ToRegister(); | 1311 result.ToRegister(); |
| 1312 __ cmp(result.reg(), 0); | 1312 __ cmp(result.reg(), 0); |
| 1313 result.Unuse(); | 1313 result.Unuse(); |
| 1314 dest->true_target()->Branch(cc); | 1314 dest->true_target()->Branch(cc); |
| 1315 dest->false_target()->Jump(); | 1315 dest->false_target()->Jump(); |
| 1316 | 1316 |
| 1317 is_smi.Bind(&left_side, &right_side); | 1317 is_smi.Bind(&left_side, &right_side); |
| 1318 left_side.ToRegister(); | 1318 left_side.ToRegister(); |
| 1319 // Test smi equality and comparison by signed int comparison. | 1319 // Test smi equality and comparison by signed int comparison. |
| (...skipping 5235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6555 | 6555 |
| 6556 // Slow-case: Go through the JavaScript implementation. | 6556 // Slow-case: Go through the JavaScript implementation. |
| 6557 __ bind(&slow); | 6557 __ bind(&slow); |
| 6558 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 6558 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 6559 } | 6559 } |
| 6560 | 6560 |
| 6561 | 6561 |
| 6562 #undef __ | 6562 #undef __ |
| 6563 | 6563 |
| 6564 } } // namespace v8::internal | 6564 } } // namespace v8::internal |
| OLD | NEW |