| OLD | NEW | 
|     1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |     1 // Copyright 2006-2009 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 7718 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  7729       __ InvokeBuiltin(Builtins::BIT_NOT, JUMP_FUNCTION); |  7729       __ InvokeBuiltin(Builtins::BIT_NOT, JUMP_FUNCTION); | 
|  7730       break; |  7730       break; | 
|  7731     default: |  7731     default: | 
|  7732       UNREACHABLE(); |  7732       UNREACHABLE(); | 
|  7733   } |  7733   } | 
|  7734 } |  7734 } | 
|  7735  |  7735  | 
|  7736  |  7736  | 
|  7737 void ArgumentsAccessStub::GenerateReadLength(MacroAssembler* masm) { |  7737 void ArgumentsAccessStub::GenerateReadLength(MacroAssembler* masm) { | 
|  7738   // Check if the calling frame is an arguments adaptor frame. |  7738   // Check if the calling frame is an arguments adaptor frame. | 
|  7739   Label adaptor; |  | 
|  7740   __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); |  7739   __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); | 
|  7741   __ mov(ecx, Operand(edx, StandardFrameConstants::kContextOffset)); |  7740   __ mov(ecx, Operand(edx, StandardFrameConstants::kContextOffset)); | 
|  7742   __ cmp(Operand(ecx), Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |  7741   __ cmp(Operand(ecx), Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 
|  7743   __ j(equal, &adaptor); |  | 
|  7744  |  | 
|  7745   // Nothing to do: The formal number of parameters has already been |  | 
|  7746   // passed in register eax by calling function. Just return it. |  | 
|  7747   __ ret(0); |  | 
|  7748  |  7742  | 
|  7749   // Arguments adaptor case: Read the arguments length from the |  7743   // Arguments adaptor case: Read the arguments length from the | 
|  7750   // adaptor frame and return it. |  7744   // adaptor frame and return it. | 
|  7751   __ bind(&adaptor); |  7745   // Otherwise nothing to do: The number of formal parameters has already been | 
|  7752   __ mov(eax, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); |  7746   // passed in register eax by calling function. Just return it. | 
 |  7747   if (CpuFeatures::IsSupported(CMOV)) { | 
 |  7748     CpuFeatures::Scope use_cmov(CMOV); | 
 |  7749     __ cmov(equal, eax, | 
 |  7750             Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 
 |  7751   } else { | 
 |  7752     Label exit; | 
 |  7753     __ j(not_equal, &exit); | 
 |  7754     __ mov(eax, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 
 |  7755     __ bind(&exit); | 
 |  7756   } | 
|  7753   __ ret(0); |  7757   __ ret(0); | 
|  7754 } |  7758 } | 
|  7755  |  7759  | 
|  7756  |  7760  | 
|  7757 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |  7761 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 
|  7758   // The key is in edx and the parameter count is in eax. |  7762   // The key is in edx and the parameter count is in eax. | 
|  7759  |  7763  | 
|  7760   // The displacement is used for skipping the frame pointer on the |  7764   // The displacement is used for skipping the frame pointer on the | 
|  7761   // stack. It is the offset of the last parameter (if any) relative |  7765   // stack. It is the offset of the last parameter (if any) relative | 
|  7762   // to the frame pointer. |  7766   // to the frame pointer. | 
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  8900     __ add(Operand(dest), Immediate(2)); |  8904     __ add(Operand(dest), Immediate(2)); | 
|  8901   } |  8905   } | 
|  8902   __ sub(Operand(count), Immediate(1)); |  8906   __ sub(Operand(count), Immediate(1)); | 
|  8903   __ j(not_zero, &loop); |  8907   __ j(not_zero, &loop); | 
|  8904 } |  8908 } | 
|  8905  |  8909  | 
|  8906  |  8910  | 
|  8907 #undef __ |  8911 #undef __ | 
|  8908  |  8912  | 
|  8909 } }  // namespace v8::internal |  8913 } }  // namespace v8::internal | 
| OLD | NEW |