| 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 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 deferred = new DeferredInlineSmiAdd(this, smi_value, overwrite_mode); | 1023 deferred = new DeferredInlineSmiAdd(this, smi_value, overwrite_mode); |
| 1024 } else { | 1024 } else { |
| 1025 deferred = new DeferredInlineSmiAddReversed(this, smi_value, | 1025 deferred = new DeferredInlineSmiAddReversed(this, smi_value, |
| 1026 overwrite_mode); | 1026 overwrite_mode); |
| 1027 } | 1027 } |
| 1028 Result operand = frame_->Pop(); | 1028 Result operand = frame_->Pop(); |
| 1029 operand.ToRegister(); | 1029 operand.ToRegister(); |
| 1030 frame_->Spill(operand.reg()); | 1030 frame_->Spill(operand.reg()); |
| 1031 __ add(Operand(operand.reg()), Immediate(value)); | 1031 __ add(Operand(operand.reg()), Immediate(value)); |
| 1032 deferred->enter()->Branch(overflow, &operand, not_taken); | 1032 deferred->enter()->Branch(overflow, &operand, not_taken); |
| 1033 __ test(Operand(operand.reg()), Immediate(kSmiTagMask)); | 1033 __ test(operand.reg(), Immediate(kSmiTagMask)); |
| 1034 deferred->enter()->Branch(not_zero, &operand, not_taken); | 1034 deferred->enter()->Branch(not_zero, &operand, not_taken); |
| 1035 deferred->BindExit(&operand); | 1035 deferred->BindExit(&operand); |
| 1036 frame_->Push(&operand); | 1036 frame_->Push(&operand); |
| 1037 break; | 1037 break; |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 case Token::SUB: { | 1040 case Token::SUB: { |
| 1041 DeferredCode* deferred = NULL; | 1041 DeferredCode* deferred = NULL; |
| 1042 Result operand = frame_->Pop(); | 1042 Result operand = frame_->Pop(); |
| 1043 Result answer(this); // Only allocated a new register if reversed. | 1043 Result answer(this); // Only allocated a new register if reversed. |
| (...skipping 5499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6543 | 6543 |
| 6544 // Slow-case: Go through the JavaScript implementation. | 6544 // Slow-case: Go through the JavaScript implementation. |
| 6545 __ bind(&slow); | 6545 __ bind(&slow); |
| 6546 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 6546 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 6547 } | 6547 } |
| 6548 | 6548 |
| 6549 | 6549 |
| 6550 #undef __ | 6550 #undef __ |
| 6551 | 6551 |
| 6552 } } // namespace v8::internal | 6552 } } // namespace v8::internal |
| OLD | NEW |