| 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 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 ASSERT(kSmiTag == 0); // adjust code if not the case | 1159 ASSERT(kSmiTag == 0); // adjust code if not the case |
| 1160 if (shift_value == 0) { | 1160 if (shift_value == 0) { |
| 1161 __ sar(answer.reg(), kSmiTagSize); | 1161 __ sar(answer.reg(), kSmiTagSize); |
| 1162 } else if (shift_value > 1) { | 1162 } else if (shift_value > 1) { |
| 1163 __ shl(answer.reg(), shift_value - 1); | 1163 __ shl(answer.reg(), shift_value - 1); |
| 1164 } // We do no shifts, only the Smi conversion, if shift_value is 1. | 1164 } // We do no shifts, only the Smi conversion, if shift_value is 1. |
| 1165 // Convert int result to Smi, checking that it is in int range. | 1165 // Convert int result to Smi, checking that it is in int range. |
| 1166 ASSERT(kSmiTagSize == times_2); // adjust code if not the case | 1166 ASSERT(kSmiTagSize == times_2); // adjust code if not the case |
| 1167 __ add(answer.reg(), Operand(answer.reg())); | 1167 __ add(answer.reg(), Operand(answer.reg())); |
| 1168 deferred->enter()->Branch(overflow, &operand, not_taken); | 1168 deferred->enter()->Branch(overflow, &operand, not_taken); |
| 1169 operand.Unuse(); |
| 1169 deferred->exit()->Bind(&answer); | 1170 deferred->exit()->Bind(&answer); |
| 1170 frame_->Push(&answer); | 1171 frame_->Push(&answer); |
| 1171 } | 1172 } |
| 1172 break; | 1173 break; |
| 1173 } | 1174 } |
| 1174 | 1175 |
| 1175 case Token::BIT_OR: | 1176 case Token::BIT_OR: |
| 1176 case Token::BIT_XOR: | 1177 case Token::BIT_XOR: |
| 1177 case Token::BIT_AND: { | 1178 case Token::BIT_AND: { |
| 1178 DeferredCode* deferred = NULL; | 1179 DeferredCode* deferred = NULL; |
| (...skipping 5022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6201 | 6202 |
| 6202 // Slow-case: Go through the JavaScript implementation. | 6203 // Slow-case: Go through the JavaScript implementation. |
| 6203 __ bind(&slow); | 6204 __ bind(&slow); |
| 6204 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 6205 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 6205 } | 6206 } |
| 6206 | 6207 |
| 6207 | 6208 |
| 6208 #undef __ | 6209 #undef __ |
| 6209 | 6210 |
| 6210 } } // namespace v8::internal | 6211 } } // namespace v8::internal |
| OLD | NEW |