| 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 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1915 } | 1915 } |
| 1916 | 1916 |
| 1917 void CodeGenerator::AssembleConstructFrame() { | 1917 void CodeGenerator::AssembleConstructFrame() { |
| 1918 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 1918 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| 1919 if (frame_access_state()->has_frame()) { | 1919 if (frame_access_state()->has_frame()) { |
| 1920 if (descriptor->IsCFunctionCall()) { | 1920 if (descriptor->IsCFunctionCall()) { |
| 1921 __ Push(ra, fp); | 1921 __ Push(ra, fp); |
| 1922 __ mov(fp, sp); | 1922 __ mov(fp, sp); |
| 1923 } else if (descriptor->IsJSFunctionCall()) { | 1923 } else if (descriptor->IsJSFunctionCall()) { |
| 1924 __ Prologue(this->info()->GeneratePreagedPrologue()); | 1924 __ Prologue(this->info()->GeneratePreagedPrologue()); |
| 1925 if (descriptor->PushArgumentCount()) { |
| 1926 __ Push(kJavaScriptCallArgCountRegister); |
| 1927 } |
| 1925 } else { | 1928 } else { |
| 1926 __ StubPrologue(info()->GetOutputStackFrameType()); | 1929 __ StubPrologue(info()->GetOutputStackFrameType()); |
| 1927 } | 1930 } |
| 1928 } | 1931 } |
| 1929 | 1932 |
| 1930 int shrink_slots = frame()->GetSpillSlotCount(); | 1933 int shrink_slots = frame()->GetSpillSlotCount(); |
| 1931 | 1934 |
| 1932 if (info()->is_osr()) { | 1935 if (info()->is_osr()) { |
| 1933 // TurboFan OSR-compiled functions cannot be entered directly. | 1936 // TurboFan OSR-compiled functions cannot be entered directly. |
| 1934 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1937 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2264 padding_size -= v8::internal::Assembler::kInstrSize; | 2267 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2265 } | 2268 } |
| 2266 } | 2269 } |
| 2267 } | 2270 } |
| 2268 | 2271 |
| 2269 #undef __ | 2272 #undef __ |
| 2270 | 2273 |
| 2271 } // namespace compiler | 2274 } // namespace compiler |
| 2272 } // namespace internal | 2275 } // namespace internal |
| 2273 } // namespace v8 | 2276 } // namespace v8 |
| OLD | NEW |