mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00
Bug 595420: fix warning in trampoline compiler, r=lw
This commit is contained in:
parent
408ee71d51
commit
d6dc6f8375
js/src
@ -233,10 +233,11 @@ struct TracerState
|
||||
namespace mjit {
|
||||
struct Trampolines
|
||||
{
|
||||
void (* forceReturn)();
|
||||
typedef void (*TrampolinePtr)();
|
||||
TrampolinePtr forceReturn;
|
||||
JSC::ExecutablePool *forceReturnPool;
|
||||
#if (defined(JS_NO_FASTCALL) && defined(JS_CPU_X86)) || defined(_WIN64)
|
||||
void (* forceReturnFast)();
|
||||
TrampolinePtr forceReturnFast;
|
||||
JSC::ExecutablePool *forceReturnFastPool;
|
||||
#endif
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ namespace js {
|
||||
namespace mjit {
|
||||
|
||||
#define CHECK_RESULT(x) if (!(x)) return false
|
||||
#define COMPILE(which, pool, how) CHECK_RESULT(compileTrampoline((void **)(&(which)), &pool, how))
|
||||
#define COMPILE(which, pool, how) CHECK_RESULT(compileTrampoline(&(which), &pool, how))
|
||||
#define RELEASE(which, pool) JS_BEGIN_MACRO \
|
||||
which = NULL; \
|
||||
if (pool) \
|
||||
@ -86,7 +86,7 @@ TrampolineCompiler::release(Trampolines *tramps)
|
||||
}
|
||||
|
||||
bool
|
||||
TrampolineCompiler::compileTrampoline(void **where, JSC::ExecutablePool **pool,
|
||||
TrampolineCompiler::compileTrampoline(Trampolines::TrampolinePtr *where, JSC::ExecutablePool **pool,
|
||||
TrampolineGenerator generator)
|
||||
{
|
||||
Assembler masm;
|
||||
@ -102,7 +102,7 @@ TrampolineCompiler::compileTrampoline(void **where, JSC::ExecutablePool **pool,
|
||||
JSC::LinkBuffer buffer(&masm, *pool);
|
||||
uint8 *result = (uint8*)buffer.finalizeCodeAddendum().dataLocation();
|
||||
masm.finalize(result);
|
||||
*where = result + masm.distanceOf(entry);
|
||||
*where = JS_DATA_TO_FUNC_PTR(Trampolines::TrampolinePtr, result + masm.distanceOf(entry));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
static void release(Trampolines *tramps);
|
||||
|
||||
private:
|
||||
bool compileTrampoline(void **where, JSC::ExecutablePool **pool,
|
||||
bool compileTrampoline(Trampolines::TrampolinePtr *where, JSC::ExecutablePool **pool,
|
||||
TrampolineGenerator generator);
|
||||
|
||||
/* Generators for trampolines. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user