| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // the frame (that is done below). | 162 // the frame (that is done below). |
| 163 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 163 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
| 164 | 164 |
| 165 info->set_prologue_offset(masm_->pc_offset()); | 165 info->set_prologue_offset(masm_->pc_offset()); |
| 166 { | 166 { |
| 167 PredictableCodeSizeScope predictible_code_size_scope( | 167 PredictableCodeSizeScope predictible_code_size_scope( |
| 168 masm_, kNoCodeAgeSequenceLength * Assembler::kInstrSize); | 168 masm_, kNoCodeAgeSequenceLength * Assembler::kInstrSize); |
| 169 // The following three instructions must remain together and unmodified | 169 // The following three instructions must remain together and unmodified |
| 170 // for code aging to work properly. | 170 // for code aging to work properly. |
| 171 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); | 171 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); |
| 172 __ nop(ip.code()); | 172 // Pre-age code objects on memory constrained devices. |
| 173 __ nop(isolate()->is_memory_constrained() ? |
| 174 kPreAgeCodeNopType : kNoAgeCodeNopType); |
| 173 // Adjust FP to point to saved FP. | 175 // Adjust FP to point to saved FP. |
| 174 __ add(fp, sp, Operand(2 * kPointerSize)); | 176 __ add(fp, sp, Operand(2 * kPointerSize)); |
| 175 } | 177 } |
| 176 info->AddNoFrameRange(0, masm_->pc_offset()); | 178 info->AddNoFrameRange(0, masm_->pc_offset()); |
| 177 | 179 |
| 178 { Comment cmnt(masm_, "[ Allocate locals"); | 180 { Comment cmnt(masm_, "[ Allocate locals"); |
| 179 int locals_count = info->scope()->num_stack_slots(); | 181 int locals_count = info->scope()->num_stack_slots(); |
| 180 // Generators allocate locals, if any, in context slots. | 182 // Generators allocate locals, if any, in context slots. |
| 181 ASSERT(!info->function()->is_generator() || locals_count == 0); | 183 ASSERT(!info->function()->is_generator() || locals_count == 0); |
| 182 if (locals_count > 0) { | 184 if (locals_count > 0) { |
| (...skipping 4707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4890 *context_length = 0; | 4892 *context_length = 0; |
| 4891 return previous_; | 4893 return previous_; |
| 4892 } | 4894 } |
| 4893 | 4895 |
| 4894 | 4896 |
| 4895 #undef __ | 4897 #undef __ |
| 4896 | 4898 |
| 4897 } } // namespace v8::internal | 4899 } } // namespace v8::internal |
| 4898 | 4900 |
| 4899 #endif // V8_TARGET_ARCH_ARM | 4901 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |