| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 3753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3764 | 3764 |
| 3765 // Add a label for checking the size of the code used for returning. | 3765 // Add a label for checking the size of the code used for returning. |
| 3766 #ifdef DEBUG | 3766 #ifdef DEBUG |
| 3767 Label check_exit_codesize; | 3767 Label check_exit_codesize; |
| 3768 masm_->bind(&check_exit_codesize); | 3768 masm_->bind(&check_exit_codesize); |
| 3769 #endif | 3769 #endif |
| 3770 | 3770 |
| 3771 // Leave the frame and return popping the arguments and the | 3771 // Leave the frame and return popping the arguments and the |
| 3772 // receiver. | 3772 // receiver. |
| 3773 frame_->Exit(); | 3773 frame_->Exit(); |
| 3774 masm_->ret((scope()->num_parameters() + 1) * kPointerSize); | 3774 int arguments_bytes = (scope()->num_parameters() + 1) * kPointerSize; |
| 3775 if (is_uint16(arguments_bytes)) { |
| 3776 __ ret(arguments_bytes); |
| 3777 } else { |
| 3778 __ pop(ecx); |
| 3779 __ add(Operand(esp), Immediate(arguments_bytes)); |
| 3780 __ push(ecx); |
| 3781 __ ret(0); |
| 3782 } |
| 3775 DeleteFrame(); | 3783 DeleteFrame(); |
| 3776 | 3784 |
| 3777 #ifdef ENABLE_DEBUGGER_SUPPORT | 3785 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 3778 // Check that the size of the code used for returning matches what is | 3786 // Check that the size of the code used for returning matches what is |
| 3779 // expected by the debugger. | 3787 // expected by the debugger. |
| 3780 ASSERT_EQ(Assembler::kJSReturnSequenceLength, | 3788 ASSERT(Assembler::kJSReturnSequenceLength <= |
| 3781 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize)); | 3789 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize)); |
| 3782 #endif | 3790 #endif |
| 3783 } | 3791 } |
| 3784 | 3792 |
| 3785 | 3793 |
| 3786 void CodeGenerator::VisitWithEnterStatement(WithEnterStatement* node) { | 3794 void CodeGenerator::VisitWithEnterStatement(WithEnterStatement* node) { |
| 3787 ASSERT(!in_spilled_code()); | 3795 ASSERT(!in_spilled_code()); |
| 3788 Comment cmnt(masm_, "[ WithEnterStatement"); | 3796 Comment cmnt(masm_, "[ WithEnterStatement"); |
| 3789 CodeForStatementPosition(node); | 3797 CodeForStatementPosition(node); |
| 3790 Load(node->expression()); | 3798 Load(node->expression()); |
| 3791 Result context; | 3799 Result context; |
| (...skipping 6528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10320 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); | 10328 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); |
| 10321 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); | 10329 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); |
| 10322 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); | 10330 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); |
| 10323 } | 10331 } |
| 10324 | 10332 |
| 10325 #undef __ | 10333 #undef __ |
| 10326 | 10334 |
| 10327 } } // namespace v8::internal | 10335 } } // namespace v8::internal |
| 10328 | 10336 |
| 10329 #endif // V8_TARGET_ARCH_IA32 | 10337 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |