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/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 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1538 __ Push(r0, fp, kConstantPoolRegister); | 1538 __ Push(r0, fp, kConstantPoolRegister); |
1539 // Adjust FP to point to saved FP. | 1539 // Adjust FP to point to saved FP. |
1540 __ subi(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset)); | 1540 __ subi(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset)); |
1541 } else { | 1541 } else { |
1542 __ Push(r0, fp); | 1542 __ Push(r0, fp); |
1543 __ mr(fp, sp); | 1543 __ mr(fp, sp); |
1544 } | 1544 } |
1545 } else if (descriptor->IsJSFunctionCall()) { | 1545 } else if (descriptor->IsJSFunctionCall()) { |
1546 __ Prologue(this->info()->GeneratePreagedPrologue(), ip); | 1546 __ Prologue(this->info()->GeneratePreagedPrologue(), ip); |
1547 } else if (frame()->needs_frame()) { | 1547 } else if (frame()->needs_frame()) { |
1548 __ StubPrologue(ip); | 1548 // TODO(mbrandy): Detect the case where we're not generating an |
1549 // exported wasm function -- so that we can leverage ip to set up | |
1550 // the constant pool pointer register. | |
titzer
2016/01/13 09:17:40
To detect the compilation of a WASM function, you
| |
1551 __ StubPrologue(); | |
1549 } else { | 1552 } else { |
1550 frame()->SetElidedFrameSizeInSlots(0); | 1553 frame()->SetElidedFrameSizeInSlots(0); |
1551 } | 1554 } |
1552 frame_access_state()->SetFrameAccessToDefault(); | 1555 frame_access_state()->SetFrameAccessToDefault(); |
1553 | 1556 |
1554 int stack_shrink_slots = frame()->GetSpillSlotCount(); | 1557 int stack_shrink_slots = frame()->GetSpillSlotCount(); |
1555 if (info()->is_osr()) { | 1558 if (info()->is_osr()) { |
1556 // TurboFan OSR-compiled functions cannot be entered directly. | 1559 // TurboFan OSR-compiled functions cannot be entered directly. |
1557 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1560 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
1558 | 1561 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1840 padding_size -= v8::internal::Assembler::kInstrSize; | 1843 padding_size -= v8::internal::Assembler::kInstrSize; |
1841 } | 1844 } |
1842 } | 1845 } |
1843 } | 1846 } |
1844 | 1847 |
1845 #undef __ | 1848 #undef __ |
1846 | 1849 |
1847 } // namespace compiler | 1850 } // namespace compiler |
1848 } // namespace internal | 1851 } // namespace internal |
1849 } // namespace v8 | 1852 } // namespace v8 |
OLD | NEW |