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 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 } | 1440 } |
1441 | 1441 |
1442 | 1442 |
1443 void CodeGenerator::AssemblePrologue() { | 1443 void CodeGenerator::AssemblePrologue() { |
1444 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 1444 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
1445 int stack_shrink_slots = frame()->GetSpillSlotCount(); | 1445 int stack_shrink_slots = frame()->GetSpillSlotCount(); |
1446 if (descriptor->IsCFunctionCall()) { | 1446 if (descriptor->IsCFunctionCall()) { |
1447 __ Push(ra, fp); | 1447 __ Push(ra, fp); |
1448 __ mov(fp, sp); | 1448 __ mov(fp, sp); |
1449 } else if (descriptor->IsJSFunctionCall()) { | 1449 } else if (descriptor->IsJSFunctionCall()) { |
1450 CompilationInfo* info = this->info(); | 1450 __ Prologue(this->info()->GeneratePreagedPrologue()); |
1451 __ Prologue(info->IsCodePreAgingActive()); | |
1452 } else if (frame()->needs_frame()) { | 1451 } else if (frame()->needs_frame()) { |
1453 __ StubPrologue(); | 1452 __ StubPrologue(); |
1454 } else { | 1453 } else { |
1455 frame()->SetElidedFrameSizeInSlots(0); | 1454 frame()->SetElidedFrameSizeInSlots(0); |
1456 } | 1455 } |
1457 frame_access_state()->SetFrameAccessToDefault(); | 1456 frame_access_state()->SetFrameAccessToDefault(); |
1458 | 1457 |
1459 if (info()->is_osr()) { | 1458 if (info()->is_osr()) { |
1460 // TurboFan OSR-compiled functions cannot be entered directly. | 1459 // TurboFan OSR-compiled functions cannot be entered directly. |
1461 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1460 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 padding_size -= v8::internal::Assembler::kInstrSize; | 1744 padding_size -= v8::internal::Assembler::kInstrSize; |
1746 } | 1745 } |
1747 } | 1746 } |
1748 } | 1747 } |
1749 | 1748 |
1750 #undef __ | 1749 #undef __ |
1751 | 1750 |
1752 } // namespace compiler | 1751 } // namespace compiler |
1753 } // namespace internal | 1752 } // namespace internal |
1754 } // namespace v8 | 1753 } // namespace v8 |
OLD | NEW |