aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h')
-rw-r--r--src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h b/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h
index e3c77d99e6..a7e78ad78f 100644
--- a/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h
+++ b/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h
@@ -27,6 +27,7 @@
#define MacroAssemblerCodeRef_h
#include "Disassembler.h"
+#include <wtf/Platform.h>
#include "ExecutableAllocator.h"
#include "LLIntData.h"
#include <wtf/DataLog.h>
@@ -141,6 +142,8 @@ public:
ASSERT_VALID_CODE_POINTER(m_value);
}
+ inline FunctionPtr(MacroAssemblerCodePtr ptr);
+
// MSVC doesn't seem to treat functions with different calling conventions as
// different types; these methods already defined for fastcall, below.
#if CALLING_CONVENTION_IS_STDCALL && !OS(WINDOWS)
@@ -327,6 +330,12 @@ private:
void* m_value;
};
+
+FunctionPtr::FunctionPtr(MacroAssemblerCodePtr ptr)
+ : m_value(ptr.executableAddress())
+{
+}
+
// MacroAssemblerCodeRef:
//
// A reference to a section of JIT generated code. A CodeRef consists of a