| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 | 518 |
| 519 private: | 519 private: |
| 520 struct MachOHeader { | 520 struct MachOHeader { |
| 521 uint32_t magic; | 521 uint32_t magic; |
| 522 uint32_t cputype; | 522 uint32_t cputype; |
| 523 uint32_t cpusubtype; | 523 uint32_t cpusubtype; |
| 524 uint32_t filetype; | 524 uint32_t filetype; |
| 525 uint32_t ncmds; | 525 uint32_t ncmds; |
| 526 uint32_t sizeofcmds; | 526 uint32_t sizeofcmds; |
| 527 uint32_t flags; | 527 uint32_t flags; |
| 528 #if V8_TARGET_ARCH_X64 | 528 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 529 uint32_t reserved; | 529 uint32_t reserved; |
| 530 #endif | 530 #endif |
| 531 }; | 531 }; |
| 532 | 532 |
| 533 struct MachOSegmentCommand { | 533 struct MachOSegmentCommand { |
| 534 uint32_t cmd; | 534 uint32_t cmd; |
| 535 uint32_t cmdsize; | 535 uint32_t cmdsize; |
| 536 char segname[16]; | 536 char segname[16]; |
| 537 #if V8_TARGET_ARCH_IA32 | 537 #if V8_TARGET_ARCH_IA32 |
| 538 uint32_t vmaddr; | 538 uint32_t vmaddr; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 557 }; | 557 }; |
| 558 | 558 |
| 559 | 559 |
| 560 Writer::Slot<MachOHeader> WriteHeader(Writer* w) { | 560 Writer::Slot<MachOHeader> WriteHeader(Writer* w) { |
| 561 ASSERT(w->position() == 0); | 561 ASSERT(w->position() == 0); |
| 562 Writer::Slot<MachOHeader> header = w->CreateSlotHere<MachOHeader>(); | 562 Writer::Slot<MachOHeader> header = w->CreateSlotHere<MachOHeader>(); |
| 563 #if V8_TARGET_ARCH_IA32 | 563 #if V8_TARGET_ARCH_IA32 |
| 564 header->magic = 0xFEEDFACEu; | 564 header->magic = 0xFEEDFACEu; |
| 565 header->cputype = 7; // i386 | 565 header->cputype = 7; // i386 |
| 566 header->cpusubtype = 3; // CPU_SUBTYPE_I386_ALL | 566 header->cpusubtype = 3; // CPU_SUBTYPE_I386_ALL |
| 567 #elif V8_TARGET_ARCH_X64 | 567 #elif V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 568 header->magic = 0xFEEDFACFu; | 568 header->magic = 0xFEEDFACFu; |
| 569 header->cputype = 7 | 0x01000000; // i386 | 64-bit ABI | 569 header->cputype = 7 | 0x01000000; // i386 | 64-bit ABI |
| 570 header->cpusubtype = 3; // CPU_SUBTYPE_I386_ALL | 570 header->cpusubtype = 3; // CPU_SUBTYPE_I386_ALL |
| 571 header->reserved = 0; | 571 header->reserved = 0; |
| 572 #else | 572 #else |
| 573 #error Unsupported target architecture. | 573 #error Unsupported target architecture. |
| 574 #endif | 574 #endif |
| 575 header->filetype = 0x1; // MH_OBJECT | 575 header->filetype = 0x1; // MH_OBJECT |
| 576 header->ncmds = 1; | 576 header->ncmds = 1; |
| 577 header->sizeofcmds = 0; | 577 header->sizeofcmds = 0; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 uint16_t pht_entry_num; | 665 uint16_t pht_entry_num; |
| 666 uint16_t sht_entry_size; | 666 uint16_t sht_entry_size; |
| 667 uint16_t sht_entry_num; | 667 uint16_t sht_entry_num; |
| 668 uint16_t sht_strtab_index; | 668 uint16_t sht_strtab_index; |
| 669 }; | 669 }; |
| 670 | 670 |
| 671 | 671 |
| 672 void WriteHeader(Writer* w) { | 672 void WriteHeader(Writer* w) { |
| 673 ASSERT(w->position() == 0); | 673 ASSERT(w->position() == 0); |
| 674 Writer::Slot<ELFHeader> header = w->CreateSlotHere<ELFHeader>(); | 674 Writer::Slot<ELFHeader> header = w->CreateSlotHere<ELFHeader>(); |
| 675 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM | 675 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X32 |
| 676 const uint8_t ident[16] = | 676 const uint8_t ident[16] = |
| 677 { 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | 677 { 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; |
| 678 #elif V8_TARGET_ARCH_X64 | 678 #elif V8_TARGET_ARCH_X64 |
| 679 const uint8_t ident[16] = | 679 const uint8_t ident[16] = |
| 680 { 0x7f, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | 680 { 0x7f, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; |
| 681 #else | 681 #else |
| 682 #error Unsupported target architecture. | 682 #error Unsupported target architecture. |
| 683 #endif | 683 #endif |
| 684 OS::MemCopy(header->ident, ident, 16); | 684 OS::MemCopy(header->ident, ident, 16); |
| 685 header->type = 1; | 685 header->type = 1; |
| 686 #if V8_TARGET_ARCH_IA32 | 686 #if V8_TARGET_ARCH_IA32 |
| 687 header->machine = 3; | 687 header->machine = 3; |
| 688 #elif V8_TARGET_ARCH_X64 | 688 #elif V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 689 // Processor identification value for x64 is 62 as defined in | 689 // Processor identification value for x64 is 62 as defined in |
| 690 // System V ABI, AMD64 Supplement | 690 // System V ABI, AMD64 Supplement |
| 691 // http://www.x86-64.org/documentation/abi.pdf | 691 // http://www.x86-64.org/documentation/abi.pdf |
| 692 header->machine = 62; | 692 header->machine = 62; |
| 693 #elif V8_TARGET_ARCH_ARM | 693 #elif V8_TARGET_ARCH_ARM |
| 694 // Set to EM_ARM, defined as 40, in "ARM ELF File Format" at | 694 // Set to EM_ARM, defined as 40, in "ARM ELF File Format" at |
| 695 // infocenter.arm.com/help/topic/com.arm.doc.dui0101a/DUI0101A_Elf.pdf | 695 // infocenter.arm.com/help/topic/com.arm.doc.dui0101a/DUI0101A_Elf.pdf |
| 696 header->machine = 40; | 696 header->machine = 40; |
| 697 #else | 697 #else |
| 698 #error Unsupported target architecture. | 698 #error Unsupported target architecture. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 value(value), | 778 value(value), |
| 779 size(size), | 779 size(size), |
| 780 info((binding << 4) | type), | 780 info((binding << 4) | type), |
| 781 other(0), | 781 other(0), |
| 782 section(section) { | 782 section(section) { |
| 783 } | 783 } |
| 784 | 784 |
| 785 Binding binding() const { | 785 Binding binding() const { |
| 786 return static_cast<Binding>(info >> 4); | 786 return static_cast<Binding>(info >> 4); |
| 787 } | 787 } |
| 788 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM | 788 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X32 |
| 789 struct SerializedLayout { | 789 struct SerializedLayout { |
| 790 SerializedLayout(uint32_t name, | 790 SerializedLayout(uint32_t name, |
| 791 uintptr_t value, | 791 uintptr_t value, |
| 792 uintptr_t size, | 792 uintptr_t size, |
| 793 Binding binding, | 793 Binding binding, |
| 794 Type type, | 794 Type type, |
| 795 uint16_t section) | 795 uint16_t section) |
| 796 : name(name), | 796 : name(name), |
| 797 value(value), | 797 value(value), |
| 798 size(size), | 798 size(size), |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 } | 915 } |
| 916 | 916 |
| 917 ZoneList<ELFSymbol> locals_; | 917 ZoneList<ELFSymbol> locals_; |
| 918 ZoneList<ELFSymbol> globals_; | 918 ZoneList<ELFSymbol> globals_; |
| 919 }; | 919 }; |
| 920 #endif // defined(__ELF) | 920 #endif // defined(__ELF) |
| 921 | 921 |
| 922 | 922 |
| 923 class CodeDescription BASE_EMBEDDED { | 923 class CodeDescription BASE_EMBEDDED { |
| 924 public: | 924 public: |
| 925 #if V8_TARGET_ARCH_X64 | 925 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 926 enum StackState { | 926 enum StackState { |
| 927 POST_RBP_PUSH, | 927 POST_RBP_PUSH, |
| 928 POST_RBP_SET, | 928 POST_RBP_SET, |
| 929 POST_RBP_POP, | 929 POST_RBP_POP, |
| 930 STACK_STATE_MAX | 930 STACK_STATE_MAX |
| 931 }; | 931 }; |
| 932 #endif | 932 #endif |
| 933 | 933 |
| 934 CodeDescription(const char* name, | 934 CodeDescription(const char* name, |
| 935 Code* code, | 935 Code* code, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 } | 978 } |
| 979 | 979 |
| 980 bool IsLineInfoAvailable() { | 980 bool IsLineInfoAvailable() { |
| 981 return !script_.is_null() && | 981 return !script_.is_null() && |
| 982 script_->source()->IsString() && | 982 script_->source()->IsString() && |
| 983 script_->HasValidSource() && | 983 script_->HasValidSource() && |
| 984 script_->name()->IsString() && | 984 script_->name()->IsString() && |
| 985 lineinfo_ != NULL; | 985 lineinfo_ != NULL; |
| 986 } | 986 } |
| 987 | 987 |
| 988 #if V8_TARGET_ARCH_X64 | 988 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 989 uintptr_t GetStackStateStartAddress(StackState state) const { | 989 uintptr_t GetStackStateStartAddress(StackState state) const { |
| 990 ASSERT(state < STACK_STATE_MAX); | 990 ASSERT(state < STACK_STATE_MAX); |
| 991 return stack_state_start_addresses_[state]; | 991 return stack_state_start_addresses_[state]; |
| 992 } | 992 } |
| 993 | 993 |
| 994 void SetStackStateStartAddress(StackState state, uintptr_t addr) { | 994 void SetStackStateStartAddress(StackState state, uintptr_t addr) { |
| 995 ASSERT(state < STACK_STATE_MAX); | 995 ASSERT(state < STACK_STATE_MAX); |
| 996 stack_state_start_addresses_[state] = addr; | 996 stack_state_start_addresses_[state] = addr; |
| 997 } | 997 } |
| 998 #endif | 998 #endif |
| 999 | 999 |
| 1000 SmartArrayPointer<char> GetFilename() { | 1000 SmartArrayPointer<char> GetFilename() { |
| 1001 return String::cast(script_->name())->ToCString(); | 1001 return String::cast(script_->name())->ToCString(); |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 int GetScriptLineNumber(int pos) { | 1004 int GetScriptLineNumber(int pos) { |
| 1005 return GetScriptLineNumberSafe(script_, pos) + 1; | 1005 return GetScriptLineNumberSafe(script_, pos) + 1; |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 | 1008 |
| 1009 private: | 1009 private: |
| 1010 const char* name_; | 1010 const char* name_; |
| 1011 Code* code_; | 1011 Code* code_; |
| 1012 Handle<Script> script_; | 1012 Handle<Script> script_; |
| 1013 GDBJITLineInfo* lineinfo_; | 1013 GDBJITLineInfo* lineinfo_; |
| 1014 GDBJITInterface::CodeTag tag_; | 1014 GDBJITInterface::CodeTag tag_; |
| 1015 CompilationInfo* info_; | 1015 CompilationInfo* info_; |
| 1016 #if V8_TARGET_ARCH_X64 | 1016 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 1017 uintptr_t stack_state_start_addresses_[STACK_STATE_MAX]; | 1017 uintptr_t stack_state_start_addresses_[STACK_STATE_MAX]; |
| 1018 #endif | 1018 #endif |
| 1019 }; | 1019 }; |
| 1020 | 1020 |
| 1021 #if defined(__ELF) | 1021 #if defined(__ELF) |
| 1022 static void CreateSymbolsTable(CodeDescription* desc, | 1022 static void CreateSymbolsTable(CodeDescription* desc, |
| 1023 Zone* zone, | 1023 Zone* zone, |
| 1024 ELF* elf, | 1024 ELF* elf, |
| 1025 int text_section_index) { | 1025 int text_section_index) { |
| 1026 ELFSymbolTable* symtab = new(zone) ELFSymbolTable(".symtab", zone); | 1026 ELFSymbolTable* symtab = new(zone) ELFSymbolTable(".symtab", zone); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 if (desc_->IsInfoAvailable()) { | 1102 if (desc_->IsInfoAvailable()) { |
| 1103 Scope* scope = desc_->info()->scope(); | 1103 Scope* scope = desc_->info()->scope(); |
| 1104 w->WriteULEB128(2); | 1104 w->WriteULEB128(2); |
| 1105 w->WriteString(desc_->name()); | 1105 w->WriteString(desc_->name()); |
| 1106 w->Write<intptr_t>(desc_->CodeStart()); | 1106 w->Write<intptr_t>(desc_->CodeStart()); |
| 1107 w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize()); | 1107 w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize()); |
| 1108 Writer::Slot<uint32_t> fb_block_size = w->CreateSlotHere<uint32_t>(); | 1108 Writer::Slot<uint32_t> fb_block_size = w->CreateSlotHere<uint32_t>(); |
| 1109 uintptr_t fb_block_start = w->position(); | 1109 uintptr_t fb_block_start = w->position(); |
| 1110 #if V8_TARGET_ARCH_IA32 | 1110 #if V8_TARGET_ARCH_IA32 |
| 1111 w->Write<uint8_t>(DW_OP_reg5); // The frame pointer's here on ia32 | 1111 w->Write<uint8_t>(DW_OP_reg5); // The frame pointer's here on ia32 |
| 1112 #elif V8_TARGET_ARCH_X64 | 1112 #elif V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 1113 w->Write<uint8_t>(DW_OP_reg6); // and here on x64. | 1113 w->Write<uint8_t>(DW_OP_reg6); // and here on x64. |
| 1114 #elif V8_TARGET_ARCH_ARM | 1114 #elif V8_TARGET_ARCH_ARM |
| 1115 UNIMPLEMENTED(); | 1115 UNIMPLEMENTED(); |
| 1116 #elif V8_TARGET_ARCH_MIPS | 1116 #elif V8_TARGET_ARCH_MIPS |
| 1117 UNIMPLEMENTED(); | 1117 UNIMPLEMENTED(); |
| 1118 #else | 1118 #else |
| 1119 #error Unsupported target architecture. | 1119 #error Unsupported target architecture. |
| 1120 #endif | 1120 #endif |
| 1121 fb_block_size.set(static_cast<uint32_t>(w->position() - fb_block_start)); | 1121 fb_block_size.set(static_cast<uint32_t>(w->position() - fb_block_start)); |
| 1122 | 1122 |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1557 return +1; | 1557 return +1; |
| 1558 } else { | 1558 } else { |
| 1559 return -1; | 1559 return -1; |
| 1560 } | 1560 } |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 CodeDescription* desc_; | 1563 CodeDescription* desc_; |
| 1564 }; | 1564 }; |
| 1565 | 1565 |
| 1566 | 1566 |
| 1567 #if V8_TARGET_ARCH_X64 | 1567 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 1568 | 1568 |
| 1569 class UnwindInfoSection : public DebugSection { | 1569 class UnwindInfoSection : public DebugSection { |
| 1570 public: | 1570 public: |
| 1571 explicit UnwindInfoSection(CodeDescription* desc); | 1571 explicit UnwindInfoSection(CodeDescription* desc); |
| 1572 virtual bool WriteBodyInternal(Writer* w); | 1572 virtual bool WriteBodyInternal(Writer* w); |
| 1573 | 1573 |
| 1574 int WriteCIE(Writer* w); | 1574 int WriteCIE(Writer* w); |
| 1575 void WriteFDE(Writer* w, int); | 1575 void WriteFDE(Writer* w, int); |
| 1576 | 1576 |
| 1577 void WriteFDEStateOnEntry(Writer* w); | 1577 void WriteFDEStateOnEntry(Writer* w); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1781 } | 1781 } |
| 1782 | 1782 |
| 1783 | 1783 |
| 1784 bool UnwindInfoSection::WriteBodyInternal(Writer* w) { | 1784 bool UnwindInfoSection::WriteBodyInternal(Writer* w) { |
| 1785 uint32_t cie_position = WriteCIE(w); | 1785 uint32_t cie_position = WriteCIE(w); |
| 1786 WriteFDE(w, cie_position); | 1786 WriteFDE(w, cie_position); |
| 1787 return true; | 1787 return true; |
| 1788 } | 1788 } |
| 1789 | 1789 |
| 1790 | 1790 |
| 1791 #endif // V8_TARGET_ARCH_X64 | 1791 #endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 1792 | 1792 |
| 1793 static void CreateDWARFSections(CodeDescription* desc, | 1793 static void CreateDWARFSections(CodeDescription* desc, |
| 1794 Zone* zone, | 1794 Zone* zone, |
| 1795 DebugObject* obj) { | 1795 DebugObject* obj) { |
| 1796 if (desc->IsLineInfoAvailable()) { | 1796 if (desc->IsLineInfoAvailable()) { |
| 1797 obj->AddSection(new(zone) DebugInfoSection(desc)); | 1797 obj->AddSection(new(zone) DebugInfoSection(desc)); |
| 1798 obj->AddSection(new(zone) DebugAbbrevSection(desc)); | 1798 obj->AddSection(new(zone) DebugAbbrevSection(desc)); |
| 1799 obj->AddSection(new(zone) DebugLineSection(desc)); | 1799 obj->AddSection(new(zone) DebugLineSection(desc)); |
| 1800 } | 1800 } |
| 1801 #if V8_TARGET_ARCH_X64 | 1801 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 1802 obj->AddSection(new(zone) UnwindInfoSection(desc)); | 1802 obj->AddSection(new(zone) UnwindInfoSection(desc)); |
| 1803 #endif | 1803 #endif |
| 1804 } | 1804 } |
| 1805 | 1805 |
| 1806 | 1806 |
| 1807 // ------------------------------------------------------------------- | 1807 // ------------------------------------------------------------------- |
| 1808 // Binary GDB JIT Interface as described in | 1808 // Binary GDB JIT Interface as described in |
| 1809 // http://sourceware.org/gdb/onlinedocs/gdb/Declarations.html | 1809 // http://sourceware.org/gdb/onlinedocs/gdb/Declarations.html |
| 1810 extern "C" { | 1810 extern "C" { |
| 1811 typedef enum { | 1811 typedef enum { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2009 if (!name.is_null() && name->IsString()) { | 2009 if (!name.is_null() && name->IsString()) { |
| 2010 SmartArrayPointer<char> name_cstring = | 2010 SmartArrayPointer<char> name_cstring = |
| 2011 Handle<String>::cast(name)->ToCString(DISALLOW_NULLS); | 2011 Handle<String>::cast(name)->ToCString(DISALLOW_NULLS); |
| 2012 AddCode(*name_cstring, *code, GDBJITInterface::FUNCTION, *script, info); | 2012 AddCode(*name_cstring, *code, GDBJITInterface::FUNCTION, *script, info); |
| 2013 } else { | 2013 } else { |
| 2014 AddCode("", *code, GDBJITInterface::FUNCTION, *script, info); | 2014 AddCode("", *code, GDBJITInterface::FUNCTION, *script, info); |
| 2015 } | 2015 } |
| 2016 } | 2016 } |
| 2017 | 2017 |
| 2018 static void AddUnwindInfo(CodeDescription* desc) { | 2018 static void AddUnwindInfo(CodeDescription* desc) { |
| 2019 #if V8_TARGET_ARCH_X64 | 2019 #if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 2020 if (desc->tag() == GDBJITInterface::FUNCTION) { | 2020 if (desc->tag() == GDBJITInterface::FUNCTION) { |
| 2021 // To avoid propagating unwinding information through | 2021 // To avoid propagating unwinding information through |
| 2022 // compilation pipeline we use an approximation. | 2022 // compilation pipeline we use an approximation. |
| 2023 // For most use cases this should not affect usability. | 2023 // For most use cases this should not affect usability. |
| 2024 static const int kFramePointerPushOffset = 1; | 2024 static const int kFramePointerPushOffset = 1; |
| 2025 static const int kFramePointerSetOffset = 4; | 2025 static const int kFramePointerSetOffset = 4; |
| 2026 static const int kFramePointerPopOffset = -3; | 2026 static const int kFramePointerPopOffset = -3; |
| 2027 | 2027 |
| 2028 uintptr_t frame_pointer_push_address = | 2028 uintptr_t frame_pointer_push_address = |
| 2029 desc->CodeStart() + kFramePointerPushOffset; | 2029 desc->CodeStart() + kFramePointerPushOffset; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2041 desc->SetStackStateStartAddress(CodeDescription::POST_RBP_POP, | 2041 desc->SetStackStateStartAddress(CodeDescription::POST_RBP_POP, |
| 2042 frame_pointer_pop_address); | 2042 frame_pointer_pop_address); |
| 2043 } else { | 2043 } else { |
| 2044 desc->SetStackStateStartAddress(CodeDescription::POST_RBP_PUSH, | 2044 desc->SetStackStateStartAddress(CodeDescription::POST_RBP_PUSH, |
| 2045 desc->CodeStart()); | 2045 desc->CodeStart()); |
| 2046 desc->SetStackStateStartAddress(CodeDescription::POST_RBP_SET, | 2046 desc->SetStackStateStartAddress(CodeDescription::POST_RBP_SET, |
| 2047 desc->CodeStart()); | 2047 desc->CodeStart()); |
| 2048 desc->SetStackStateStartAddress(CodeDescription::POST_RBP_POP, | 2048 desc->SetStackStateStartAddress(CodeDescription::POST_RBP_POP, |
| 2049 desc->CodeEnd()); | 2049 desc->CodeEnd()); |
| 2050 } | 2050 } |
| 2051 #endif // V8_TARGET_ARCH_X64 | 2051 #endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X32 |
| 2052 } | 2052 } |
| 2053 | 2053 |
| 2054 | 2054 |
| 2055 static LazyMutex mutex = LAZY_MUTEX_INITIALIZER; | 2055 static LazyMutex mutex = LAZY_MUTEX_INITIALIZER; |
| 2056 | 2056 |
| 2057 | 2057 |
| 2058 void GDBJITInterface::AddCode(const char* name, | 2058 void GDBJITInterface::AddCode(const char* name, |
| 2059 Code* code, | 2059 Code* code, |
| 2060 GDBJITInterface::CodeTag tag, | 2060 GDBJITInterface::CodeTag tag, |
| 2061 Script* script, | 2061 Script* script, |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2189 ScopedLock lock(mutex.Pointer()); | 2189 ScopedLock lock(mutex.Pointer()); |
| 2190 ASSERT(!IsLineInfoTagged(line_info)); | 2190 ASSERT(!IsLineInfoTagged(line_info)); |
| 2191 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); | 2191 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); |
| 2192 ASSERT(e->value == NULL); | 2192 ASSERT(e->value == NULL); |
| 2193 e->value = TagLineInfo(line_info); | 2193 e->value = TagLineInfo(line_info); |
| 2194 } | 2194 } |
| 2195 | 2195 |
| 2196 | 2196 |
| 2197 } } // namespace v8::internal | 2197 } } // namespace v8::internal |
| 2198 #endif | 2198 #endif |
| OLD | NEW |