summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/assembler/CodeLocation.h
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-08-25 19:20:41 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:30:55 +0000
commit6882a04fb36642862b11efe514251d32070c3d65 (patch)
treeb7959826000b061fd5ccc7512035c7478742f7b0 /Source/JavaScriptCore/assembler/CodeLocation.h
parentab6df191029eeeb0b0f16f127d553265659f739e (diff)
downloadqtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/JavaScriptCore/assembler/CodeLocation.h')
-rw-r--r--Source/JavaScriptCore/assembler/CodeLocation.h19
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)