| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 } | 164 } |
| 165 | 165 |
| 166 // Open a frame scope to indicate that there is a frame on the stack. The | 166 // Open a frame scope to indicate that there is a frame on the stack. The |
| 167 // MANUAL indicates that the scope shouldn't actually generate code to set up | 167 // MANUAL indicates that the scope shouldn't actually generate code to set up |
| 168 // the frame (that is done below). | 168 // the frame (that is done below). |
| 169 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 169 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
| 170 | 170 |
| 171 info->set_prologue_offset(masm_->pc_offset()); | 171 info->set_prologue_offset(masm_->pc_offset()); |
| 172 __ Prologue(BUILD_FUNCTION_FRAME); | 172 __ Prologue(BUILD_FUNCTION_FRAME); |
| 173 info->AddNoFrameRange(0, masm_->pc_offset()); | 173 info->AddNoFrameRange(0, masm_->pc_offset()); |
| 174 __ LoadConstantPoolPointerRegister(); | |
| 175 | 174 |
| 176 { Comment cmnt(masm_, "[ Allocate locals"); | 175 { Comment cmnt(masm_, "[ Allocate locals"); |
| 177 int locals_count = info->scope()->num_stack_slots(); | 176 int locals_count = info->scope()->num_stack_slots(); |
| 178 // Generators allocate locals, if any, in context slots. | 177 // Generators allocate locals, if any, in context slots. |
| 179 ASSERT(!info->function()->is_generator() || locals_count == 0); | 178 ASSERT(!info->function()->is_generator() || locals_count == 0); |
| 180 if (locals_count > 0) { | 179 if (locals_count > 0) { |
| 181 // Emit a loop to initialize stack cells for locals when optimizing for | 180 // Emit a loop to initialize stack cells for locals when optimizing for |
| 182 // size. Otherwise, unroll the loop for maximum performance. | 181 // size. Otherwise, unroll the loop for maximum performance. |
| 183 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); | 182 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); |
| 184 if (FLAG_optimize_for_size && locals_count > 4) { | 183 if (FLAG_optimize_for_size && locals_count > 4) { |
| (...skipping 4716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4901 ASSERT(Memory::uint32_at(interrupt_address_pointer) == | 4900 ASSERT(Memory::uint32_at(interrupt_address_pointer) == |
| 4902 reinterpret_cast<uint32_t>( | 4901 reinterpret_cast<uint32_t>( |
| 4903 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4902 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4904 return OSR_AFTER_STACK_CHECK; | 4903 return OSR_AFTER_STACK_CHECK; |
| 4905 } | 4904 } |
| 4906 | 4905 |
| 4907 | 4906 |
| 4908 } } // namespace v8::internal | 4907 } } // namespace v8::internal |
| 4909 | 4908 |
| 4910 #endif // V8_TARGET_ARCH_ARM | 4909 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |