| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
| 6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 std::ostream& operator<<(std::ostream& os, const CompareNilICStub::State& s); | 1510 std::ostream& operator<<(std::ostream& os, const CompareNilICStub::State& s); |
| 1511 | 1511 |
| 1512 | 1512 |
| 1513 class CEntryStub : public PlatformCodeStub { | 1513 class CEntryStub : public PlatformCodeStub { |
| 1514 public: | 1514 public: |
| 1515 CEntryStub(Isolate* isolate, int result_size, | 1515 CEntryStub(Isolate* isolate, int result_size, |
| 1516 SaveFPRegsMode save_doubles = kDontSaveFPRegs) | 1516 SaveFPRegsMode save_doubles = kDontSaveFPRegs) |
| 1517 : PlatformCodeStub(isolate) { | 1517 : PlatformCodeStub(isolate) { |
| 1518 minor_key_ = SaveDoublesBits::encode(save_doubles == kSaveFPRegs); | 1518 minor_key_ = SaveDoublesBits::encode(save_doubles == kSaveFPRegs); |
| 1519 DCHECK(result_size == 1 || result_size == 2); | 1519 DCHECK(result_size == 1 || result_size == 2); |
| 1520 #if _WIN64 || (V8_TARGET_ARCH_PPC64 && !ABI_RETURNS_OBJECT_PAIRS_IN_REGS) | 1520 #if _WIN64 || V8_TARGET_ARCH_PPC |
| 1521 minor_key_ = ResultSizeBits::update(minor_key_, result_size); | 1521 minor_key_ = ResultSizeBits::update(minor_key_, result_size); |
| 1522 #endif // _WIN64 | 1522 #endif // _WIN64 |
| 1523 } | 1523 } |
| 1524 | 1524 |
| 1525 // The version of this stub that doesn't save doubles is generated ahead of | 1525 // The version of this stub that doesn't save doubles is generated ahead of |
| 1526 // time, so it's OK to call it from other stubs that can't cope with GC during | 1526 // time, so it's OK to call it from other stubs that can't cope with GC during |
| 1527 // their code generation. On machines that always have gp registers (x64) we | 1527 // their code generation. On machines that always have gp registers (x64) we |
| 1528 // can generate both variants ahead of time. | 1528 // can generate both variants ahead of time. |
| 1529 static void GenerateAheadOfTime(Isolate* isolate); | 1529 static void GenerateAheadOfTime(Isolate* isolate); |
| 1530 | 1530 |
| 1531 private: | 1531 private: |
| 1532 bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); } | 1532 bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); } |
| 1533 #if _WIN64 || (V8_TARGET_ARCH_PPC64 && !ABI_RETURNS_OBJECT_PAIRS_IN_REGS) | 1533 #if _WIN64 || V8_TARGET_ARCH_PPC |
| 1534 int result_size() const { return ResultSizeBits::decode(minor_key_); } | 1534 int result_size() const { return ResultSizeBits::decode(minor_key_); } |
| 1535 #endif // _WIN64 | 1535 #endif // _WIN64 |
| 1536 | 1536 |
| 1537 bool NeedsImmovableCode() OVERRIDE; | 1537 bool NeedsImmovableCode() OVERRIDE; |
| 1538 | 1538 |
| 1539 class SaveDoublesBits : public BitField<bool, 0, 1> {}; | 1539 class SaveDoublesBits : public BitField<bool, 0, 1> {}; |
| 1540 class ResultSizeBits : public BitField<int, 1, 3> {}; | 1540 class ResultSizeBits : public BitField<int, 1, 3> {}; |
| 1541 | 1541 |
| 1542 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 1542 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
| 1543 DEFINE_PLATFORM_CODE_STUB(CEntry, PlatformCodeStub); | 1543 DEFINE_PLATFORM_CODE_STUB(CEntry, PlatformCodeStub); |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2634 | 2634 |
| 2635 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2635 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
| 2636 #undef DEFINE_PLATFORM_CODE_STUB | 2636 #undef DEFINE_PLATFORM_CODE_STUB |
| 2637 #undef DEFINE_HANDLER_CODE_STUB | 2637 #undef DEFINE_HANDLER_CODE_STUB |
| 2638 #undef DEFINE_HYDROGEN_CODE_STUB | 2638 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2639 #undef DEFINE_CODE_STUB | 2639 #undef DEFINE_CODE_STUB |
| 2640 #undef DEFINE_CODE_STUB_BASE | 2640 #undef DEFINE_CODE_STUB_BASE |
| 2641 } } // namespace v8::internal | 2641 } } // namespace v8::internal |
| 2642 | 2642 |
| 2643 #endif // V8_CODE_STUBS_H_ | 2643 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |