| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3965 __ CallRuntime(Runtime::kTypeof, 1); | 3965 __ CallRuntime(Runtime::kTypeof, 1); |
| 3966 context()->Plug(eax); | 3966 context()->Plug(eax); |
| 3967 break; | 3967 break; |
| 3968 } | 3968 } |
| 3969 | 3969 |
| 3970 case Token::ADD: { | 3970 case Token::ADD: { |
| 3971 Comment cmt(masm_, "[ UnaryOperation (ADD)"); | 3971 Comment cmt(masm_, "[ UnaryOperation (ADD)"); |
| 3972 VisitForAccumulatorValue(expr->expression()); | 3972 VisitForAccumulatorValue(expr->expression()); |
| 3973 Label no_conversion; | 3973 Label no_conversion; |
| 3974 __ JumpIfSmi(result_register(), &no_conversion); | 3974 __ JumpIfSmi(result_register(), &no_conversion); |
| 3975 ToNumberStub convert_stub; | 3975 __ mov(edx, Immediate(Smi::FromInt(1))); |
| 3976 __ CallStub(&convert_stub); | 3976 OverwriteMode mode = expr->expression()->ResultOverwriteAllowed() |
| 3977 ? OVERWRITE_RIGHT : NO_OVERWRITE; |
| 3978 BinaryOpStub stub(Token::MUL, mode); |
| 3979 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
| 3980 CallIC(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, |
| 3981 expr->UnaryOperationFeedbackId()); |
| 3982 patch_site.EmitPatchInfo(); |
| 3977 __ bind(&no_conversion); | 3983 __ bind(&no_conversion); |
| 3978 context()->Plug(result_register()); | 3984 context()->Plug(result_register()); |
| 3979 break; | 3985 break; |
| 3980 } | 3986 } |
| 3981 | 3987 |
| 3982 case Token::SUB: | 3988 case Token::SUB: |
| 3983 EmitUnaryOperation(expr, "[ UnaryOperation (SUB)"); | 3989 EmitUnaryOperation(expr, "[ UnaryOperation (SUB)"); |
| 3984 break; | 3990 break; |
| 3985 | 3991 |
| 3986 case Token::BIT_NOT: | 3992 case Token::BIT_NOT: |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4558 *stack_depth = 0; | 4564 *stack_depth = 0; |
| 4559 *context_length = 0; | 4565 *context_length = 0; |
| 4560 return previous_; | 4566 return previous_; |
| 4561 } | 4567 } |
| 4562 | 4568 |
| 4563 #undef __ | 4569 #undef __ |
| 4564 | 4570 |
| 4565 } } // namespace v8::internal | 4571 } } // namespace v8::internal |
| 4566 | 4572 |
| 4567 #endif // V8_TARGET_ARCH_IA32 | 4573 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |