diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
| commit | a4e969f4965059196ca948db781e52f7cfebf19e (patch) | |
| tree | 6ca352808c8fdc52006a0f33f6ae3c593b23867d /Source/JavaScriptCore/assembler/CodeLocation.h | |
| parent | 41386e9cb918eed93b3f13648cbef387e371e451 (diff) | |
| download | WebKitGtk-tarball-a4e969f4965059196ca948db781e52f7cfebf19e.tar.gz | |
webkitgtk-2.12.3webkitgtk-2.12.3
Diffstat (limited to 'Source/JavaScriptCore/assembler/CodeLocation.h')
| -rw-r--r-- | Source/JavaScriptCore/assembler/CodeLocation.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/JavaScriptCore/assembler/CodeLocation.h b/Source/JavaScriptCore/assembler/CodeLocation.h index 86d1f2b75..3116e0602 100644 --- a/Source/JavaScriptCore/assembler/CodeLocation.h +++ b/Source/JavaScriptCore/assembler/CodeLocation.h @@ -32,6 +32,8 @@ namespace JSC { +enum NearCallMode { Regular, Tail }; + class CodeLocationInstruction; class CodeLocationLabel; class CodeLocationJump; @@ -59,7 +61,7 @@ public: CodeLocationLabel labelAtOffset(int offset); CodeLocationJump jumpAtOffset(int offset); CodeLocationCall callAtOffset(int offset); - CodeLocationNearCall nearCallAtOffset(int offset); + CodeLocationNearCall nearCallAtOffset(int offset, NearCallMode); CodeLocationDataLabelPtr dataLabelPtrAtOffset(int offset); CodeLocationDataLabel32 dataLabel32AtOffset(int offset); CodeLocationDataLabelCompact dataLabelCompactAtOffset(int offset); @@ -115,10 +117,13 @@ public: class CodeLocationNearCall : public CodeLocationCommon { public: CodeLocationNearCall() {} - explicit CodeLocationNearCall(MacroAssemblerCodePtr location) - : CodeLocationCommon(location) {} - explicit CodeLocationNearCall(void* location) - : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} + explicit CodeLocationNearCall(MacroAssemblerCodePtr location, NearCallMode callMode) + : CodeLocationCommon(location), m_callMode(callMode) { } + explicit CodeLocationNearCall(void* location, NearCallMode callMode) + : CodeLocationCommon(MacroAssemblerCodePtr(location)), m_callMode(callMode) { } + NearCallMode callMode() { return m_callMode; } +private: + NearCallMode m_callMode = NearCallMode::Regular; }; class CodeLocationDataLabel32 : public CodeLocationCommon { @@ -181,10 +186,10 @@ inline CodeLocationCall CodeLocationCommon::callAtOffset(int offset) return CodeLocationCall(reinterpret_cast<char*>(dataLocation()) + offset); } -inline CodeLocationNearCall CodeLocationCommon::nearCallAtOffset(int offset) +inline CodeLocationNearCall CodeLocationCommon::nearCallAtOffset(int offset, NearCallMode callMode) { ASSERT_VALID_CODE_OFFSET(offset); - return CodeLocationNearCall(reinterpret_cast<char*>(dataLocation()) + offset); + return CodeLocationNearCall(reinterpret_cast<char*>(dataLocation()) + offset, callMode); } inline CodeLocationDataLabelPtr CodeLocationCommon::dataLabelPtrAtOffset(int offset) |
