| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 #include "src/compilation-info.h" | 6 #include "src/compilation-info.h" |
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
| (...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 } | 2232 } |
| 2233 | 2233 |
| 2234 void CodeGenerator::AssembleConstructFrame() { | 2234 void CodeGenerator::AssembleConstructFrame() { |
| 2235 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 2235 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| 2236 if (frame_access_state()->has_frame()) { | 2236 if (frame_access_state()->has_frame()) { |
| 2237 if (descriptor->IsCFunctionCall()) { | 2237 if (descriptor->IsCFunctionCall()) { |
| 2238 __ Push(ra, fp); | 2238 __ Push(ra, fp); |
| 2239 __ mov(fp, sp); | 2239 __ mov(fp, sp); |
| 2240 } else if (descriptor->IsJSFunctionCall()) { | 2240 } else if (descriptor->IsJSFunctionCall()) { |
| 2241 __ Prologue(this->info()->GeneratePreagedPrologue()); | 2241 __ Prologue(this->info()->GeneratePreagedPrologue()); |
| 2242 if (descriptor->PushArgumentCount()) { |
| 2243 __ Push(kJavaScriptCallArgCountRegister); |
| 2244 } |
| 2242 } else { | 2245 } else { |
| 2243 __ StubPrologue(info()->GetOutputStackFrameType()); | 2246 __ StubPrologue(info()->GetOutputStackFrameType()); |
| 2244 } | 2247 } |
| 2245 } | 2248 } |
| 2246 | 2249 |
| 2247 int shrink_slots = | 2250 int shrink_slots = |
| 2248 frame()->GetTotalFrameSlotCount() - descriptor->CalculateFixedFrameSize(); | 2251 frame()->GetTotalFrameSlotCount() - descriptor->CalculateFixedFrameSize(); |
| 2249 | 2252 |
| 2250 if (info()->is_osr()) { | 2253 if (info()->is_osr()) { |
| 2251 // TurboFan OSR-compiled functions cannot be entered directly. | 2254 // TurboFan OSR-compiled functions cannot be entered directly. |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2540 padding_size -= v8::internal::Assembler::kInstrSize; | 2543 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2541 } | 2544 } |
| 2542 } | 2545 } |
| 2543 } | 2546 } |
| 2544 | 2547 |
| 2545 #undef __ | 2548 #undef __ |
| 2546 | 2549 |
| 2547 } // namespace compiler | 2550 } // namespace compiler |
| 2548 } // namespace internal | 2551 } // namespace internal |
| 2549 } // namespace v8 | 2552 } // namespace v8 |
| OLD | NEW |