mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 792085. Fix js build on ppc, broken since ionmonkey merge. r=dvander
Sprinkle some #ifdef JS_IOn/JS_METHODJIT around ion includes. Fix part of #746112, where pagesize was set to 64k on all ppcs, while it seems it's only on ppc64.
This commit is contained in:
parent
7c55267d5e
commit
28247f6c9d
@ -21,7 +21,7 @@ namespace gc {
|
||||
(defined(__sparc) || defined(__sparcv9) || defined(__ia64))
|
||||
const size_t PageShift = 13;
|
||||
const size_t ArenaShift = PageShift;
|
||||
#elif defined(__powerpc__)
|
||||
#elif defined(__powerpc64__)
|
||||
const size_t PageShift = 16;
|
||||
const size_t ArenaShift = 12;
|
||||
#else
|
||||
|
@ -35,8 +35,10 @@ InitMemorySubsystem()
|
||||
{
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetSystemInfo(&sysinfo);
|
||||
if (sysinfo.dwPageSize != PageSize)
|
||||
if (sysinfo.dwPageSize != PageSize) {
|
||||
fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n");
|
||||
MOZ_CRASH();
|
||||
}
|
||||
AllocationGranularity = sysinfo.dwAllocationGranularity;
|
||||
}
|
||||
|
||||
@ -314,8 +316,10 @@ GetPageFaultCount()
|
||||
void
|
||||
InitMemorySubsystem()
|
||||
{
|
||||
if (size_t(sysconf(_SC_PAGESIZE)) != PageSize)
|
||||
if (size_t(sysconf(_SC_PAGESIZE)) != PageSize) {
|
||||
fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n");
|
||||
MOZ_CRASH();
|
||||
}
|
||||
}
|
||||
|
||||
void *
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "FixedArityList.h"
|
||||
|
||||
// ARM defines the RegisterID within Architecture-arm.h
|
||||
#ifndef JS_CPU_ARM
|
||||
#if !defined(JS_CPU_ARM) && defined(JS_METHODJIT)
|
||||
#include "assembler/assembler/MacroAssembler.h"
|
||||
#endif
|
||||
|
||||
|
@ -42,8 +42,10 @@
|
||||
#include "jsscript.h"
|
||||
#include "jsstr.h"
|
||||
#include "jsworkers.h"
|
||||
#ifdef JS_ION
|
||||
#include "ion/Ion.h"
|
||||
#include "ion/IonFrames.h"
|
||||
#endif
|
||||
|
||||
#ifdef JS_METHODJIT
|
||||
# include "assembler/assembler/MacroAssembler.h"
|
||||
|
@ -29,8 +29,10 @@
|
||||
#include "jsgcinlines.h"
|
||||
#include "jsobjinlines.h"
|
||||
#include "jsscopeinlines.h"
|
||||
#ifdef JS_ION
|
||||
#include "ion/IonCompartment.h"
|
||||
#include "ion/Ion.h"
|
||||
#endif
|
||||
|
||||
#if ENABLE_YARR_JIT
|
||||
#include "assembler/jit/ExecutableAllocator.h"
|
||||
|
@ -82,8 +82,8 @@
|
||||
#include "ion/IonCode.h"
|
||||
#ifdef JS_ION
|
||||
# include "ion/IonMacroAssembler.h"
|
||||
#endif
|
||||
#include "ion/IonFrameIterator.h"
|
||||
#endif
|
||||
|
||||
#include "jsinterpinlines.h"
|
||||
#include "jsobjinlines.h"
|
||||
|
@ -22,8 +22,10 @@
|
||||
#include "jsiter.h"
|
||||
#include "jsworkers.h"
|
||||
|
||||
#ifdef JS_ION
|
||||
#include "ion/Ion.h"
|
||||
#include "ion/IonCompartment.h"
|
||||
#endif
|
||||
#include "frontend/TokenStream.h"
|
||||
#include "gc/Marking.h"
|
||||
#include "js/MemoryMetrics.h"
|
||||
|
@ -14,7 +14,9 @@
|
||||
|
||||
#include "gc/Root.h"
|
||||
#include "vm/GlobalObject.h"
|
||||
#ifdef JS_ION
|
||||
#include "ion/IonFrames.h"
|
||||
#endif
|
||||
|
||||
#include "vm/Stack-inl.h"
|
||||
|
||||
@ -107,8 +109,12 @@ CompilerOutput::mjit() const
|
||||
inline ion::IonScript *
|
||||
CompilerOutput::ion() const
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JS_ASSERT(isIon() && isValid());
|
||||
return script->ionScript();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool
|
||||
@ -117,7 +123,7 @@ CompilerOutput::isValid() const
|
||||
if (!script)
|
||||
return false;
|
||||
|
||||
#ifdef DEBUG
|
||||
#if defined(DEBUG) && (defined(JS_METHODJIT) || defined(JS_ION))
|
||||
TypeCompartment &types = script->compartment()->types;
|
||||
#endif
|
||||
|
||||
@ -134,6 +140,7 @@ CompilerOutput::isValid() const
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef JS_ION
|
||||
if (isIon()) {
|
||||
if (script->hasIonScript()) {
|
||||
JS_ASSERT(this == script->ion->recompileInfo().compilerOutput(types));
|
||||
@ -143,6 +150,7 @@ CompilerOutput::isValid() const
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1121,8 +1121,10 @@ js::Interpret(JSContext *cx, StackFrame *entryFrame, InterpMode interpMode)
|
||||
RootedScript script(cx);
|
||||
SET_SCRIPT(regs.fp()->script());
|
||||
|
||||
#ifdef JS_METHODJIT
|
||||
/* Reset the loop count on the script we're entering. */
|
||||
script->resetLoopCount();
|
||||
#endif
|
||||
|
||||
#if JS_TRACE_LOGGING
|
||||
AutoTraceLog logger(TraceLogging::defaultLogger(),
|
||||
@ -1335,8 +1337,9 @@ END_EMPTY_CASES
|
||||
|
||||
BEGIN_CASE(JSOP_LOOPHEAD)
|
||||
|
||||
#ifdef JS_METHODJIT
|
||||
script->incrLoopCount();
|
||||
|
||||
#endif
|
||||
END_CASE(JSOP_LOOPHEAD)
|
||||
|
||||
BEGIN_CASE(JSOP_LABEL)
|
||||
@ -2338,7 +2341,9 @@ BEGIN_CASE(JSOP_FUNCALL)
|
||||
goto error;
|
||||
|
||||
SET_SCRIPT(regs.fp()->script());
|
||||
#ifdef JS_METHODJIT
|
||||
script->resetLoopCount();
|
||||
#endif
|
||||
|
||||
#ifdef JS_ION
|
||||
if (!newType && ion::IsEnabled(cx)) {
|
||||
|
@ -26,8 +26,10 @@
|
||||
#include "jspropertycacheinlines.h"
|
||||
#include "jstypedarrayinlines.h"
|
||||
|
||||
#ifdef JS_ION
|
||||
#include "ion/Ion.h"
|
||||
#include "ion/IonCompartment.h"
|
||||
#endif
|
||||
|
||||
#include "vm/Stack-inl.h"
|
||||
|
||||
|
@ -1826,8 +1826,11 @@ JSScript::isShortRunning()
|
||||
{
|
||||
return length < 100 &&
|
||||
hasAnalysis() &&
|
||||
!analysis()->hasFunctionCalls() &&
|
||||
getMaxLoopCount() < 40;
|
||||
!analysis()->hasFunctionCalls()
|
||||
#ifdef JS_METHODJIT
|
||||
&& getMaxLoopCount() < 40
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -13,8 +13,9 @@
|
||||
|
||||
#include "methodjit/MethodJIT.h"
|
||||
#include "vm/Stack.h"
|
||||
#ifdef JS_ION
|
||||
#include "ion/IonFrameIterator-inl.h"
|
||||
|
||||
#endif
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
#include "ArgumentsObject-inl.h"
|
||||
|
@ -8,9 +8,11 @@
|
||||
#include "jscntxt.h"
|
||||
#include "gc/Marking.h"
|
||||
#include "methodjit/MethodJIT.h"
|
||||
#ifdef JS_ION
|
||||
#include "ion/IonFrames.h"
|
||||
#include "ion/IonCompartment.h"
|
||||
#include "ion/Bailouts.h"
|
||||
#endif
|
||||
#include "Stack.h"
|
||||
|
||||
#include "jsgcinlines.h"
|
||||
|
@ -9,7 +9,9 @@
|
||||
#define Stack_h__
|
||||
|
||||
#include "jsfun.h"
|
||||
#ifdef JS_ION
|
||||
#include "ion/IonFrameIterator.h"
|
||||
#endif
|
||||
#include "jsautooplen.h"
|
||||
|
||||
struct JSContext;
|
||||
|
Loading…
Reference in New Issue
Block a user