зеркало из https://github.com/mozilla/pjs.git
bug 360602. fix mac build from recent checkin
This commit is contained in:
Родитель
2f7e93523b
Коммит
ddc1e4bec2
|
@ -1300,7 +1300,13 @@ namespace avmplus
|
|||
if (!ensureMDBufferCapacity(pool, md_native_thunk_size))
|
||||
return NULL;
|
||||
#endif /* FEATURE_BUFFER_GUARD */
|
||||
|
||||
#if 0
|
||||
// test code to generate "int 3"
|
||||
(void) e;
|
||||
*mip++ = 0xCC;
|
||||
|
||||
#else
|
||||
// the generated thunk does not call any helper methods, so we are
|
||||
// free to use eax, ecx, edx as scratch regs without touchning the
|
||||
// stack.
|
||||
|
@ -1364,6 +1370,8 @@ namespace avmplus
|
|||
MOV (_env, ESP, EAX); // replace env before call
|
||||
JMP (offsetof(MethodEnv, impl32), EAX); // invoke real method indirectly
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef AVMPLUS_JIT_READONLY
|
||||
makeCodeExecutable();
|
||||
#endif /* AVMPLUS_JIT_READONLY */
|
||||
|
|
|
@ -121,7 +121,7 @@ namespace avmplus
|
|||
sintptr CodegenMIR::debuggerAddr( int (Debugger::*f)() )
|
||||
{
|
||||
RETURN_METHOD_PTR(Debugger, f);
|
||||
}
|
||||
}
|
||||
#endif /* DEBUGGER */
|
||||
|
||||
sintptr CodegenMIR::scriptAddr(int (ScriptObject::*f)())
|
||||
|
@ -1503,7 +1503,7 @@ namespace avmplus
|
|||
|
||||
#ifdef DEBUGGER
|
||||
#ifdef AVMPLUS_PROFILE
|
||||
names->add(FUNCADDR(DynamicProfiler::mark), "DynamicProfiler::mark");
|
||||
names->add(COREADDR(DynamicProfiler::mark), "DynamicProfiler::mark");
|
||||
#endif
|
||||
names->add(ENVADDR(MethodEnv::debugEnter), "MethodEnv::debugEnter");
|
||||
names->add(ENVADDR(MethodEnv::debugExit), "MethodEnv::debugExit");
|
||||
|
@ -1947,7 +1947,7 @@ namespace avmplus
|
|||
#ifdef AVMPLUS_PROFILE
|
||||
if (core->dprof.dprofile)
|
||||
{
|
||||
callIns(MIR_cm, FUNCADDR(DynamicProfiler::mark), 2,
|
||||
callIns(MIR_cm, COREADDR(DynamicProfiler::mark), 2,
|
||||
(uintptr)&core->dprof, InsConst(OP_prologue));
|
||||
}
|
||||
#endif
|
||||
|
@ -2719,7 +2719,7 @@ namespace avmplus
|
|||
DynamicProfiler::StackMark mark(OP_codegenop, &core->dprof);
|
||||
if (core->dprof.dprofile)
|
||||
{
|
||||
callIns(MIR_cm, FUNCADDR(DynamicProfiler::mark), 1,
|
||||
callIns(MIR_cm, COREADDR(DynamicProfiler::mark), 1,
|
||||
(uintptr)&core->dprof, InsConst(opcode));
|
||||
}
|
||||
#else
|
||||
|
@ -4192,7 +4192,7 @@ namespace avmplus
|
|||
DynamicProfiler::StackMark mark(OP_codegenop, &core->dprof);
|
||||
if (core->dprof.dprofile)
|
||||
{
|
||||
callIns(MIR_cm, FUNCADDR(DynamicProfiler::mark), 1,
|
||||
callIns(MIR_cm, COREADDR(DynamicProfiler::mark), 1,
|
||||
(uintptr)&core->dprof, InsConst(opcode));
|
||||
}
|
||||
#endif /* AVMPLUS_PROFILE */
|
||||
|
@ -7456,7 +7456,7 @@ namespace avmplus
|
|||
|
||||
|
||||
#if defined(_MAC) && !TARGET_RT_MAC_MACHO
|
||||
f->impl32 = (int (*)(MethodEnv*, int, va_list)) (mip-2);
|
||||
f->impl32 = (int (*)(MethodEnv*, int, va_list)) (mip-2);
|
||||
#else
|
||||
// funny gyration needed to work around GCC pedantic warning
|
||||
typedef Atom (*AtomMethodProc)(MethodEnv*, int, uint32 *);
|
||||
|
|
|
@ -855,7 +855,7 @@ namespace avmplus
|
|||
|
||||
void storeIns(OP* v, uintptr disp, OP* base);
|
||||
|
||||
OP* leaIns(int disp, OP* base);
|
||||
OP* leaIns(sintptr disp, OP* base);
|
||||
OP* callIns(sintptr addr, uint32 argCount, MirOpcode code);
|
||||
OP* callIndirect(MirOpcode code, OP* target, uint32 argCount, ...);
|
||||
OP* callIns(MirOpcode code, sintptr addr, uint32 argCount, ...);
|
||||
|
|
|
@ -112,11 +112,10 @@ namespace avmplus
|
|||
#endif
|
||||
|
||||
#ifdef AVMPLUS_INTERP
|
||||
// turbo flag only available if interpreter is there
|
||||
#ifdef AVMPLUS_64BIT // turbo disabled by default since MIR not working yet
|
||||
turbo = false;
|
||||
#else
|
||||
turbo = true;
|
||||
turbo = true;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1006,7 +1005,7 @@ return the result of the comparison ToPrimitive(x) == y.
|
|||
return out;
|
||||
}
|
||||
|
||||
String* AvmCore::toErrorString(sintptr d)
|
||||
String* AvmCore::toErrorString(int d)
|
||||
{
|
||||
String* s = NULL;
|
||||
#ifdef DEBUGGER
|
||||
|
|
|
@ -948,7 +948,7 @@ const int kBufferPadding = 16;
|
|||
* Convenience methods for converting various objects into value
|
||||
* strings used for error message output.
|
||||
*/
|
||||
String* toErrorString(sintptr d);
|
||||
String* toErrorString(int d);
|
||||
String* toErrorString(AbstractFunction* m);
|
||||
String* toErrorString(Multiname* n);
|
||||
String* toErrorString(Namespace* ns);
|
||||
|
|
|
@ -225,7 +225,7 @@ namespace avmplus
|
|||
void MethodEnv::debugEnter(int argc, uint32 *ap,
|
||||
Traits**frameTraits, int localCount,
|
||||
CallStackNode* callstack,
|
||||
Atom* framep, volatile int *eip)
|
||||
Atom* framep, volatile sintptr *eip)
|
||||
{
|
||||
AvmCore* core = this->core();
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ namespace avmplus
|
|||
void debugEnter(int argc, uint32 *ap,
|
||||
Traits**frameTraits, int localCount,
|
||||
CallStackNode* callstack,
|
||||
Atom* framep, volatile int *eip);
|
||||
Atom* framep, volatile sintptr *eip);
|
||||
void debugExit(CallStackNode* callstack);
|
||||
void sendEnter(int argc, uint32 *ap);
|
||||
void sendExit();
|
||||
|
|
|
@ -296,26 +296,6 @@ namespace avmplus
|
|||
writeHexByte(uint8(value>>8));
|
||||
writeHexByte(uint8(value&0xff));
|
||||
}
|
||||
|
||||
#ifdef AVMPLUS_64BIT
|
||||
PrintWriter& PrintWriter::operator<< (hexQWord value)
|
||||
{
|
||||
writeHexQWord(value.getValue());
|
||||
return *this;
|
||||
}
|
||||
|
||||
void PrintWriter::writeHexQWord(uint64 value)
|
||||
{
|
||||
writeHexByte(uint8((value>>54) & 0xff));
|
||||
writeHexByte(uint8((value>>48) & 0xff));
|
||||
writeHexByte(uint8((value>>40) & 0xff));
|
||||
writeHexByte(uint8((value>>32) & 0xff));
|
||||
writeHexByte(uint8((value>>24) & 0xff));
|
||||
writeHexByte(uint8((value>>16) & 0xff));
|
||||
writeHexByte(uint8(value>>8));
|
||||
writeHexByte(uint8(value&0xff));
|
||||
}
|
||||
#endif
|
||||
|
||||
void PrintWriter::formatTypeName(Traits* t)
|
||||
{
|
||||
|
|
|
@ -230,7 +230,7 @@ namespace avmplus
|
|||
if(cap > max)
|
||||
{
|
||||
T* newvalues = (gc) ? (T*) gc->Calloc(cap, sizeof(T), gcFlags) : new T[cap];
|
||||
sintptr* newkeys = (gc) ? (int*) gc->Calloc(cap, sizeof(sintptr), 0) : new sintptr[cap];
|
||||
sintptr* newkeys = (gc) ? (sintptr*) gc->Calloc(cap, sizeof(sintptr), 0) : new sintptr[cap];
|
||||
arraycopy(keys, 0, newkeys, 0 , len);
|
||||
arraycopy(values, 0, newvalues, 0 , len);
|
||||
if (gc)
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace avmplus
|
|||
Traits** traits,
|
||||
int argc,
|
||||
uint32 * ap,
|
||||
int volatile * eip)
|
||||
sintptr volatile * eip)
|
||||
{
|
||||
AvmCore *core = info->core();
|
||||
this->env = env;
|
||||
|
|
|
@ -123,7 +123,7 @@ namespace avmplus
|
|||
Traits** frameTraits,
|
||||
int argc,
|
||||
uint32 * ap,
|
||||
int volatile * eip)
|
||||
sintptr volatile *eip)
|
||||
{
|
||||
initialize(env, info, framep, frameTraits, argc, ap, eip);
|
||||
}
|
||||
|
@ -134,8 +134,8 @@ namespace avmplus
|
|||
Atom* framep,
|
||||
Traits** frameTraits,
|
||||
int argc,
|
||||
uint32 * ap,
|
||||
int volatile * eip);
|
||||
uint32 * ap,
|
||||
sintptr volatile * eip);
|
||||
|
||||
void exit();
|
||||
|
||||
|
@ -150,7 +150,7 @@ namespace avmplus
|
|||
int argc;
|
||||
Atom* framep; // pointer to top of AS registers
|
||||
Traits** traits; // array of traits for AS registers
|
||||
int volatile * eip; // ptr to where the current pc is stored
|
||||
sintptr volatile * eip; // ptr to where the current pc is stored
|
||||
|
||||
void** scopeBase(); // with MIR, array members are (ScriptObject*); with interpreter, they are (Atom).
|
||||
#ifdef AVMPLUS_INTERP
|
||||
|
|
Загрузка…
Ссылка в новой задаче