| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 frame_->Enter(); | 167 frame_->Enter(); |
| 168 | 168 |
| 169 // Allocate space for locals and initialize them. | 169 // Allocate space for locals and initialize them. |
| 170 frame_->AllocateStackSlots(); | 170 frame_->AllocateStackSlots(); |
| 171 // Initialize the function return target after the locals are set | 171 // Initialize the function return target after the locals are set |
| 172 // up, because it needs the expected frame height from the frame. | 172 // up, because it needs the expected frame height from the frame. |
| 173 function_return_.set_direction(JumpTarget::BIDIRECTIONAL); | 173 function_return_.set_direction(JumpTarget::BIDIRECTIONAL); |
| 174 function_return_is_shadowed_ = false; | 174 function_return_is_shadowed_ = false; |
| 175 | 175 |
| 176 // Allocate the local context if needed. | 176 // Allocate the local context if needed. |
| 177 int heap_slots = scope_->num_heap_slots(); | 177 int heap_slots = scope_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 178 if (heap_slots > 0) { | 178 if (heap_slots > 0) { |
| 179 Comment cmnt(masm_, "[ allocate local context"); | 179 Comment cmnt(masm_, "[ allocate local context"); |
| 180 // Allocate local context. | 180 // Allocate local context. |
| 181 // Get outer context and create a new context based on it. | 181 // Get outer context and create a new context based on it. |
| 182 frame_->PushFunction(); | 182 frame_->PushFunction(); |
| 183 Result context; | 183 Result context; |
| 184 if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 184 if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
| 185 FastNewContextStub stub(heap_slots); | 185 FastNewContextStub stub(heap_slots); |
| 186 context = frame_->CallStub(&stub, 1); | 186 context = frame_->CallStub(&stub, 1); |
| 187 } else { | 187 } else { |
| (...skipping 8749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8937 __ add(Operand(dest), Immediate(2)); | 8937 __ add(Operand(dest), Immediate(2)); |
| 8938 } | 8938 } |
| 8939 __ sub(Operand(count), Immediate(1)); | 8939 __ sub(Operand(count), Immediate(1)); |
| 8940 __ j(not_zero, &loop); | 8940 __ j(not_zero, &loop); |
| 8941 } | 8941 } |
| 8942 | 8942 |
| 8943 | 8943 |
| 8944 #undef __ | 8944 #undef __ |
| 8945 | 8945 |
| 8946 } } // namespace v8::internal | 8946 } } // namespace v8::internal |
| OLD | NEW |