OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 | 167 |
168 // Open a frame scope to indicate that there is a frame on the stack. The | 168 // Open a frame scope to indicate that there is a frame on the stack. The |
169 // MANUAL indicates that the scope shouldn't actually generate code to set up | 169 // MANUAL indicates that the scope shouldn't actually generate code to set up |
170 // the frame (that is done below). | 170 // the frame (that is done below). |
171 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 171 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
172 | 172 |
173 info->set_prologue_offset(masm_->pc_offset()); | 173 info->set_prologue_offset(masm_->pc_offset()); |
174 __ Prologue(BUILD_FUNCTION_FRAME); | 174 __ Prologue(BUILD_FUNCTION_FRAME); |
175 info->AddNoFrameRange(0, masm_->pc_offset()); | 175 info->AddNoFrameRange(0, masm_->pc_offset()); |
176 __ LoadConstantPoolPointerRegister(); | |
177 | 176 |
178 { Comment cmnt(masm_, "[ Allocate locals"); | 177 { Comment cmnt(masm_, "[ Allocate locals"); |
179 int locals_count = info->scope()->num_stack_slots(); | 178 int locals_count = info->scope()->num_stack_slots(); |
180 // Generators allocate locals, if any, in context slots. | 179 // Generators allocate locals, if any, in context slots. |
181 ASSERT(!info->function()->is_generator() || locals_count == 0); | 180 ASSERT(!info->function()->is_generator() || locals_count == 0); |
182 if (locals_count > 0) { | 181 if (locals_count > 0) { |
183 // Emit a loop to initialize stack cells for locals when optimizing for | 182 // Emit a loop to initialize stack cells for locals when optimizing for |
184 // size. Otherwise, unroll the loop for maximum performance. | 183 // size. Otherwise, unroll the loop for maximum performance. |
185 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); | 184 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); |
186 if (FLAG_optimize_for_size && locals_count > 4) { | 185 if (FLAG_optimize_for_size && locals_count > 4) { |
(...skipping 4731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4918 ASSERT(Memory::uint32_at(interrupt_address_pointer) == | 4917 ASSERT(Memory::uint32_at(interrupt_address_pointer) == |
4919 reinterpret_cast<uint32_t>( | 4918 reinterpret_cast<uint32_t>( |
4920 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4919 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4921 return OSR_AFTER_STACK_CHECK; | 4920 return OSR_AFTER_STACK_CHECK; |
4922 } | 4921 } |
4923 | 4922 |
4924 | 4923 |
4925 } } // namespace v8::internal | 4924 } } // namespace v8::internal |
4926 | 4925 |
4927 #endif // V8_TARGET_ARCH_ARM | 4926 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |