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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 ASSERT(frame_ == NULL); | 176 ASSERT(frame_ == NULL); |
177 frame_ = new VirtualFrame(); | 177 frame_ = new VirtualFrame(); |
178 set_in_spilled_code(false); | 178 set_in_spilled_code(false); |
179 | 179 |
180 // Adjust for function-level loop nesting. | 180 // Adjust for function-level loop nesting. |
181 ASSERT_EQ(0, loop_nesting_); | 181 ASSERT_EQ(0, loop_nesting_); |
182 loop_nesting_ = info->is_in_loop() ? 1 : 0; | 182 loop_nesting_ = info->is_in_loop() ? 1 : 0; |
183 | 183 |
184 JumpTarget::set_compiling_deferred_code(false); | 184 JumpTarget::set_compiling_deferred_code(false); |
185 | 185 |
186 #ifdef DEBUG | 186 { |
187 if (strlen(FLAG_stop_at) > 0 && | 187 CodeGenState state(this); |
188 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { | |
189 frame_->SpillAll(); | |
190 __ int3(); | |
191 } | |
192 #endif | |
193 | 188 |
194 { // NOLINT | |
195 CodeGenState state(this); | |
196 // Entry: | 189 // Entry: |
197 // Stack: receiver, arguments, return address. | 190 // Stack: receiver, arguments, return address. |
198 // ebp: caller's frame pointer | 191 // ebp: caller's frame pointer |
199 // esp: stack pointer | 192 // esp: stack pointer |
200 // edi: called JS function | 193 // edi: called JS function |
201 // esi: callee's context | 194 // esi: callee's context |
202 allocator_->Initialize(); | 195 allocator_->Initialize(); |
203 | 196 |
| 197 #ifdef DEBUG |
| 198 if (strlen(FLAG_stop_at) > 0 && |
| 199 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { |
| 200 frame_->SpillAll(); |
| 201 __ int3(); |
| 202 } |
| 203 #endif |
| 204 |
204 frame_->Enter(); | 205 frame_->Enter(); |
205 | 206 |
206 // Allocate space for locals and initialize them. | 207 // Allocate space for locals and initialize them. |
207 frame_->AllocateStackSlots(); | 208 frame_->AllocateStackSlots(); |
208 | 209 |
209 // Allocate the local context if needed. | 210 // Allocate the local context if needed. |
210 int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 211 int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
211 if (heap_slots > 0) { | 212 if (heap_slots > 0) { |
212 Comment cmnt(masm_, "[ allocate local context"); | 213 Comment cmnt(masm_, "[ allocate local context"); |
213 // Allocate local context. | 214 // Allocate local context. |
(...skipping 9922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10136 masm.GetCode(&desc); | 10137 masm.GetCode(&desc); |
10137 // Call the function from C++. | 10138 // Call the function from C++. |
10138 return FUNCTION_CAST<MemCopyFunction>(buffer); | 10139 return FUNCTION_CAST<MemCopyFunction>(buffer); |
10139 } | 10140 } |
10140 | 10141 |
10141 #undef __ | 10142 #undef __ |
10142 | 10143 |
10143 } } // namespace v8::internal | 10144 } } // namespace v8::internal |
10144 | 10145 |
10145 #endif // V8_TARGET_ARCH_IA32 | 10146 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |