| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 Label ok; | 140 Label ok; |
| 141 __ test(ecx, Operand(ecx)); | 141 __ test(ecx, Operand(ecx)); |
| 142 __ j(zero, &ok, Label::kNear); | 142 __ j(zero, &ok, Label::kNear); |
| 143 // +1 for return address. | 143 // +1 for return address. |
| 144 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; | 144 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; |
| 145 __ mov(Operand(esp, receiver_offset), | 145 __ mov(Operand(esp, receiver_offset), |
| 146 Immediate(isolate()->factory()->undefined_value())); | 146 Immediate(isolate()->factory()->undefined_value())); |
| 147 __ bind(&ok); | 147 __ bind(&ok); |
| 148 } | 148 } |
| 149 | 149 |
| 150 // Open a frame scope to indicate that there is a frame on the stack. The |
| 151 // MANUAL indicates that the scope shouldn't actually generate code to set up |
| 152 // the frame (that is done below). |
| 153 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
| 154 |
| 150 __ push(ebp); // Caller's frame pointer. | 155 __ push(ebp); // Caller's frame pointer. |
| 151 __ mov(ebp, esp); | 156 __ mov(ebp, esp); |
| 152 __ push(esi); // Callee's context. | 157 __ push(esi); // Callee's context. |
| 153 __ push(edi); // Callee's JS Function. | 158 __ push(edi); // Callee's JS Function. |
| 154 | 159 |
| 155 { Comment cmnt(masm_, "[ Allocate locals"); | 160 { Comment cmnt(masm_, "[ Allocate locals"); |
| 156 int locals_count = info->scope()->num_stack_slots(); | 161 int locals_count = info->scope()->num_stack_slots(); |
| 157 if (locals_count == 1) { | 162 if (locals_count == 1) { |
| 158 __ push(Immediate(isolate()->factory()->undefined_value())); | 163 __ push(Immediate(isolate()->factory()->undefined_value())); |
| 159 } else if (locals_count > 1) { | 164 } else if (locals_count > 1) { |
| (...skipping 4116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4276 *context_length = 0; | 4281 *context_length = 0; |
| 4277 return previous_; | 4282 return previous_; |
| 4278 } | 4283 } |
| 4279 | 4284 |
| 4280 | 4285 |
| 4281 #undef __ | 4286 #undef __ |
| 4282 | 4287 |
| 4283 } } // namespace v8::internal | 4288 } } // namespace v8::internal |
| 4284 | 4289 |
| 4285 #endif // V8_TARGET_ARCH_IA32 | 4290 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |