| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1870 | 1870 |
| 1871 namespace { | 1871 namespace { |
| 1872 | 1872 |
| 1873 static const int kQuadWordSize = 16; | 1873 static const int kQuadWordSize = 16; |
| 1874 | 1874 |
| 1875 } // namespace | 1875 } // namespace |
| 1876 | 1876 |
| 1877 | 1877 |
| 1878 void CodeGenerator::AssemblePrologue() { | 1878 void CodeGenerator::AssemblePrologue() { |
| 1879 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 1879 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| 1880 if (descriptor->IsCFunctionCall()) { | 1880 if (frame()->needs_frame()) { |
| 1881 __ pushq(rbp); | 1881 if (descriptor->IsCFunctionCall()) { |
| 1882 __ movq(rbp, rsp); | 1882 __ pushq(rbp); |
| 1883 } else if (descriptor->IsJSFunctionCall()) { | 1883 __ movq(rbp, rsp); |
| 1884 __ Prologue(this->info()->GeneratePreagedPrologue()); | 1884 } else if (descriptor->IsJSFunctionCall()) { |
| 1885 } else if (frame()->needs_frame()) { | 1885 __ Prologue(this->info()->GeneratePreagedPrologue()); |
| 1886 __ StubPrologue(); | 1886 } else { |
| 1887 __ StubPrologue(info()->GetOutputStackFrameType()); |
| 1888 } |
| 1887 } else { | 1889 } else { |
| 1888 frame()->SetElidedFrameSizeInSlots(kPCOnStackSize / kPointerSize); | 1890 frame()->SetElidedFrameSizeInSlots(kPCOnStackSize / kPointerSize); |
| 1889 } | 1891 } |
| 1890 frame_access_state()->SetFrameAccessToDefault(); | 1892 frame_access_state()->SetFrameAccessToDefault(); |
| 1891 | 1893 |
| 1892 int stack_shrink_slots = frame()->GetSpillSlotCount(); | 1894 int stack_shrink_slots = frame()->GetSpillSlotCount(); |
| 1893 if (info()->is_osr()) { | 1895 if (info()->is_osr()) { |
| 1894 // TurboFan OSR-compiled functions cannot be entered directly. | 1896 // TurboFan OSR-compiled functions cannot be entered directly. |
| 1895 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1897 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
| 1896 | 1898 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2193 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2192 __ Nop(padding_size); | 2194 __ Nop(padding_size); |
| 2193 } | 2195 } |
| 2194 } | 2196 } |
| 2195 | 2197 |
| 2196 #undef __ | 2198 #undef __ |
| 2197 | 2199 |
| 2198 } // namespace compiler | 2200 } // namespace compiler |
| 2199 } // namespace internal | 2201 } // namespace internal |
| 2200 } // namespace v8 | 2202 } // namespace v8 |
| OLD | NEW |