PropertySlot slot(globalObject);
if (globalObject->getPropertySlot(callFrame, ident, slot)) {
JSValuePtr result = slot.getValue(callFrame, ident);
- if (slot.isCacheable() && !globalObject->structure()->isDictionary()) {
+ if (slot.isCacheable() && !globalObject->structure()->isDictionary() && slot.slotBase() == globalObject) {
if (vPC[4].u.structure)
vPC[4].u.structure->deref();
globalObject->structure()->ref();
PropertySlot slot(globalObject);
if (globalObject->getPropertySlot(callFrame, ident, slot)) {
JSValuePtr result = slot.getValue(callFrame, ident);
- if (slot.isCacheable() && !globalObject->structure()->isDictionary()) {
+ if (slot.isCacheable() && !globalObject->structure()->isDictionary() && slot.slotBase() == globalObject) {
GlobalResolveInfo& globalResolveInfo = callFrame->codeBlock()->globalResolveInfo(globalResolveInfoIndex);
if (globalResolveInfo.structure)
globalResolveInfo.structure->deref();
WillExecuteStatement
};
- enum { MaxReentryDepth = 128 };
+ // We use a smaller reentrancy limit on iPhone because of the high amount of
+ // stack space required on the web thread.
+ enum { MaxReentryDepth = 100 };
class Interpreter {
friend class JIT;
+++ /dev/null
-***************
-*** 63,88 ****
- CFRelease(str);
- CFRelease(cfFormat);
- } else
-- #elif COMPILER(MSVC) && !PLATFORM(WIN_CE)
-- if (IsDebuggerPresent()) {
-- size_t size = 1024;
--
-- do {
-- char* buffer = (char*)malloc(size);
--
-- if (buffer == NULL)
-- break;
--
-- if (_vsnprintf(buffer, size, format, args) != -1) {
-- OutputDebugStringA(buffer);
-- free(buffer);
-- break;
-- }
--
-- free(buffer);
-- size *= 2;
-- } while (size > 1024);
-- }
- vfprintf(stderr, format, args);
- }
-
---- 63,68 ----
- CFRelease(str);
- CFRelease(cfFormat);
- } else
- vfprintf(stderr, format, args);
- }
-
#include <pthread.h>
#endif
+#include <Availability.h>
+
#ifndef NO_TCMALLOC_SAMPLES
#ifdef WTF_CHANGES
#define NO_TCMALLOC_SAMPLES
extern "C" {
malloc_introspection_t jscore_fastmalloc_introspection = { &FastMallocZone::enumerate, &FastMallocZone::goodSize, &FastMallocZone::check, &FastMallocZone::print,
- &FastMallocZone::log, &FastMallocZone::forceLock, &FastMallocZone::forceUnlock, &FastMallocZone::statistics };
+ &FastMallocZone::log, &FastMallocZone::forceLock, &FastMallocZone::forceUnlock, &FastMallocZone::statistics
+ };
}
FastMallocZone::FastMallocZone(TCMalloc_PageHeap* pageHeap, TCMalloc_ThreadCache** threadHeaps, TCMalloc_Central_FreeListPadded* centralCaches)
, m_centralCaches(centralCaches)
{
memset(&m_zone, 0, sizeof(m_zone));
+ m_zone.version = 4;
m_zone.zone_name = "JavaScriptCore FastMalloc";
m_zone.size = &FastMallocZone::size;
m_zone.malloc = &FastMallocZone::zoneMalloc;
#define MAP_ANONYMOUS MAP_ANON
#endif
-#if PLATFORM(DARWIN) && defined(VM_MEMORY_TCMALLOC)
-static const int mmapFileDescriptor = VM_MAKE_TAG(VM_MEMORY_TCMALLOC);
-#else
-static const int mmapFileDescriptor = -1;
-#endif
-
// Structure for discovering alignment
union MemoryAligner {
void* p;
void* result = mmap(NULL, size + extra,
PROT_READ | PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS,
- mmapFileDescriptor, 0);
+ -1, 0);
if (result == reinterpret_cast<void*>(MAP_FAILED)) {
mmap_failure = true;
return NULL;
#endif
#if HAVE(MMAP)
- void* newAddress = mmap(start, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, mmapFileDescriptor, 0);
+ void* newAddress = mmap(start, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
// If the mmap failed then that's ok, we just won't return the memory to the system.
ASSERT_UNUSED(newAddress, newAddress == start || newAddress == reinterpret_cast<void*>(MAP_FAILED));
return;