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->flags() & CallDescriptor::kHasStandardFrameHeader) { |
1882 __ movq(rbp, rsp); | 1882 __ Prologue(this->info()->GeneratePreagedPrologue()); |
1883 } else if (descriptor->IsJSFunctionCall()) { | 1883 } else { |
1884 __ Prologue(this->info()->GeneratePreagedPrologue()); | 1884 __ StubPrologue(info()->GetOutputStackFrameType()); |
1885 } else if (frame()->needs_frame()) { | 1885 } |
1886 __ StubPrologue(); | |
1887 } else { | 1886 } else { |
1888 frame()->SetElidedFrameSizeInSlots(kPCOnStackSize / kPointerSize); | 1887 frame()->SetElidedFrameSizeInSlots(kPCOnStackSize / kPointerSize); |
1889 } | 1888 } |
1890 frame_access_state()->SetFrameAccessToDefault(); | 1889 frame_access_state()->SetFrameAccessToDefault(); |
1891 | 1890 |
1892 int stack_shrink_slots = frame()->GetSpillSlotCount(); | 1891 int stack_shrink_slots = frame()->GetSpillSlotCount(); |
1893 if (info()->is_osr()) { | 1892 if (info()->is_osr()) { |
1894 // TurboFan OSR-compiled functions cannot be entered directly. | 1893 // TurboFan OSR-compiled functions cannot be entered directly. |
1895 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1894 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
1896 | 1895 |
(...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; | 2190 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2192 __ Nop(padding_size); | 2191 __ Nop(padding_size); |
2193 } | 2192 } |
2194 } | 2193 } |
2195 | 2194 |
2196 #undef __ | 2195 #undef __ |
2197 | 2196 |
2198 } // namespace compiler | 2197 } // namespace compiler |
2199 } // namespace internal | 2198 } // namespace internal |
2200 } // namespace v8 | 2199 } // namespace v8 |
OLD | NEW |