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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { | 1518 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { |
1519 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 1519 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
1520 isolate(), deoptimization_id, bailout_type); | 1520 isolate(), deoptimization_id, bailout_type); |
1521 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 1521 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
1522 } | 1522 } |
1523 | 1523 |
1524 | 1524 |
1525 void CodeGenerator::AssemblePrologue() { | 1525 void CodeGenerator::AssemblePrologue() { |
1526 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 1526 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
1527 int stack_shrink_slots = frame()->GetSpillSlotCount(); | 1527 int stack_shrink_slots = frame()->GetSpillSlotCount(); |
1528 if (descriptor->IsCFunctionCall()) { | 1528 if (frame()->needs_frame()) { |
1529 __ Push(ra, fp); | 1529 if (descriptor->flags() & CallDescriptor::kHasStandardFrameHeader) { |
1530 __ mov(fp, sp); | 1530 __ Prologue(this->info()->GeneratePreagedPrologue()); |
1531 } else if (descriptor->IsJSFunctionCall()) { | 1531 } else { |
1532 __ Prologue(this->info()->GeneratePreagedPrologue()); | 1532 __ StubPrologue(); |
1533 } else if (frame()->needs_frame()) { | 1533 } |
1534 __ StubPrologue(); | |
1535 } else { | 1534 } else { |
1536 frame()->SetElidedFrameSizeInSlots(0); | 1535 frame()->SetElidedFrameSizeInSlots(0); |
1537 } | 1536 } |
1538 frame_access_state()->SetFrameAccessToDefault(); | 1537 frame_access_state()->SetFrameAccessToDefault(); |
1539 | 1538 |
1540 if (info()->is_osr()) { | 1539 if (info()->is_osr()) { |
1541 // TurboFan OSR-compiled functions cannot be entered directly. | 1540 // TurboFan OSR-compiled functions cannot be entered directly. |
1542 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1541 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
1543 | 1542 |
1544 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 1543 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 padding_size -= v8::internal::Assembler::kInstrSize; | 1823 padding_size -= v8::internal::Assembler::kInstrSize; |
1825 } | 1824 } |
1826 } | 1825 } |
1827 } | 1826 } |
1828 | 1827 |
1829 #undef __ | 1828 #undef __ |
1830 | 1829 |
1831 } // namespace compiler | 1830 } // namespace compiler |
1832 } // namespace internal | 1831 } // namespace internal |
1833 } // namespace v8 | 1832 } // namespace v8 |
OLD | NEW |