| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 161   // MANUAL indicates that the scope shouldn't actually generate code to set up | 161   // MANUAL indicates that the scope shouldn't actually generate code to set up | 
| 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     if (FLAG_optimize_for_size) { | 
| 172     __ nop(ip.code()); | 172       // Pre-age the code. | 
| 173     // Adjust FP to point to saved FP. | 173       Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); | 
| 174     __ add(fp, sp, Operand(2 * kPointerSize)); | 174       __ add(r0, pc, Operand(-8)); | 
|  | 175       __ ldr(pc, MemOperand(pc, -4)); | 
|  | 176       __ dd(reinterpret_cast<uint32_t>(stub->instruction_start())); | 
|  | 177     } else { | 
|  | 178       // The following three instructions must remain together and unmodified | 
|  | 179       // for code aging to work properly. | 
|  | 180       __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); | 
|  | 181       __ nop(ip.code()); | 
|  | 182       // Adjust FP to point to saved FP. | 
|  | 183       __ add(fp, sp, Operand(2 * kPointerSize)); | 
|  | 184     } | 
| 175   } | 185   } | 
| 176   info->AddNoFrameRange(0, masm_->pc_offset()); | 186   info->AddNoFrameRange(0, masm_->pc_offset()); | 
| 177 | 187 | 
| 178   { Comment cmnt(masm_, "[ Allocate locals"); | 188   { Comment cmnt(masm_, "[ Allocate locals"); | 
| 179     int locals_count = info->scope()->num_stack_slots(); | 189     int locals_count = info->scope()->num_stack_slots(); | 
| 180     // Generators allocate locals, if any, in context slots. | 190     // Generators allocate locals, if any, in context slots. | 
| 181     ASSERT(!info->function()->is_generator() || locals_count == 0); | 191     ASSERT(!info->function()->is_generator() || locals_count == 0); | 
| 182     if (locals_count > 0) { | 192     if (locals_count > 0) { | 
| 183       __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | 193       __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | 
| 184       for (int i = 0; i < locals_count; i++) { | 194       for (int i = 0; i < locals_count; i++) { | 
| (...skipping 4703 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4888   *context_length = 0; | 4898   *context_length = 0; | 
| 4889   return previous_; | 4899   return previous_; | 
| 4890 } | 4900 } | 
| 4891 | 4901 | 
| 4892 | 4902 | 
| 4893 #undef __ | 4903 #undef __ | 
| 4894 | 4904 | 
| 4895 } }  // namespace v8::internal | 4905 } }  // namespace v8::internal | 
| 4896 | 4906 | 
| 4897 #endif  // V8_TARGET_ARCH_ARM | 4907 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW | 
|---|