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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.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 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 void CodeGenerator::AssembleDeoptimizerCall( | 1824 void CodeGenerator::AssembleDeoptimizerCall( |
1825 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { | 1825 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { |
1826 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 1826 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
1827 isolate(), deoptimization_id, bailout_type); | 1827 isolate(), deoptimization_id, bailout_type); |
1828 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 1828 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
1829 } | 1829 } |
1830 | 1830 |
1831 | 1831 |
1832 void CodeGenerator::AssemblePrologue() { | 1832 void CodeGenerator::AssemblePrologue() { |
1833 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 1833 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
1834 if (descriptor->IsCFunctionCall()) { | 1834 if (frame()->needs_frame()) { |
1835 __ Push(ra, fp); | 1835 if (descriptor->flags() & CallDescriptor::kHasStandardFrameHeader) { |
1836 __ mov(fp, sp); | 1836 __ Prologue(this->info()->GeneratePreagedPrologue()); |
1837 } else if (descriptor->IsJSFunctionCall()) { | 1837 } else { |
1838 __ Prologue(this->info()->GeneratePreagedPrologue()); | 1838 __ StubPrologue(); |
1839 } else if (frame()->needs_frame()) { | 1839 } |
1840 __ StubPrologue(); | |
1841 } else { | 1840 } else { |
1842 frame()->SetElidedFrameSizeInSlots(0); | 1841 frame()->SetElidedFrameSizeInSlots(0); |
1843 } | 1842 } |
1844 frame_access_state()->SetFrameAccessToDefault(); | 1843 frame_access_state()->SetFrameAccessToDefault(); |
1845 | 1844 |
1846 int stack_shrink_slots = frame()->GetSpillSlotCount(); | 1845 int stack_shrink_slots = frame()->GetSpillSlotCount(); |
1847 if (info()->is_osr()) { | 1846 if (info()->is_osr()) { |
1848 // TurboFan OSR-compiled functions cannot be entered directly. | 1847 // TurboFan OSR-compiled functions cannot be entered directly. |
1849 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1848 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
1850 | 1849 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2128 padding_size -= v8::internal::Assembler::kInstrSize; | 2127 padding_size -= v8::internal::Assembler::kInstrSize; |
2129 } | 2128 } |
2130 } | 2129 } |
2131 } | 2130 } |
2132 | 2131 |
2133 #undef __ | 2132 #undef __ |
2134 | 2133 |
2135 } // namespace compiler | 2134 } // namespace compiler |
2136 } // namespace internal | 2135 } // namespace internal |
2137 } // namespace v8 | 2136 } // namespace v8 |
OLD | NEW |