| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // The following three instructions must remain together and unmodified for | 174 // The following three instructions must remain together and unmodified for |
| 175 // code aging to work properly. | 175 // code aging to work properly. |
| 176 __ Push(ra, fp, cp, a1); | 176 __ Push(ra, fp, cp, a1); |
| 177 __ nop(Assembler::CODE_AGE_SEQUENCE_NOP); | 177 __ nop(isolate()->is_memory_constrained() ? |
| 178 Assembler::CODE_AGE_PRE_AGED_SEQUENCE_NOP : |
| 179 Assembler::CODE_AGE_YOUNG_SEQUENCE_NOP); |
| 178 // Adjust fp to point to caller's fp. | 180 // Adjust fp to point to caller's fp. |
| 179 __ Addu(fp, sp, Operand(2 * kPointerSize)); | 181 __ Addu(fp, sp, Operand(2 * kPointerSize)); |
| 180 info->AddNoFrameRange(0, masm_->pc_offset()); | 182 info->AddNoFrameRange(0, masm_->pc_offset()); |
| 181 | 183 |
| 182 { Comment cmnt(masm_, "[ Allocate locals"); | 184 { Comment cmnt(masm_, "[ Allocate locals"); |
| 183 int locals_count = info->scope()->num_stack_slots(); | 185 int locals_count = info->scope()->num_stack_slots(); |
| 184 // Generators allocate locals, if any, in context slots. | 186 // Generators allocate locals, if any, in context slots. |
| 185 ASSERT(!info->function()->is_generator() || locals_count == 0); | 187 ASSERT(!info->function()->is_generator() || locals_count == 0); |
| 186 if (locals_count > 0) { | 188 if (locals_count > 0) { |
| 187 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 189 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
| (...skipping 4734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4922 *context_length = 0; | 4924 *context_length = 0; |
| 4923 return previous_; | 4925 return previous_; |
| 4924 } | 4926 } |
| 4925 | 4927 |
| 4926 | 4928 |
| 4927 #undef __ | 4929 #undef __ |
| 4928 | 4930 |
| 4929 } } // namespace v8::internal | 4931 } } // namespace v8::internal |
| 4930 | 4932 |
| 4931 #endif // V8_TARGET_ARCH_MIPS | 4933 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |