diff options
Diffstat (limited to 'JavaScriptCore/interpreter')
| -rw-r--r-- | JavaScriptCore/interpreter/Interpreter.cpp | 6 | ||||
| -rw-r--r-- | JavaScriptCore/interpreter/RegisterFile.h | 22 |
2 files changed, 9 insertions, 19 deletions
diff --git a/JavaScriptCore/interpreter/Interpreter.cpp b/JavaScriptCore/interpreter/Interpreter.cpp index febdb71..57c068a 100644 --- a/JavaScriptCore/interpreter/Interpreter.cpp +++ b/JavaScriptCore/interpreter/Interpreter.cpp @@ -3196,8 +3196,10 @@ skip_id_custom_self: vPC += OPCODE_LENGTH(op_get_by_pname); NEXT_INSTRUCTION(); } - Identifier propertyName(callFrame, subscript.toString(callFrame)); - result = baseValue.get(callFrame, propertyName); + { + Identifier propertyName(callFrame, subscript.toString(callFrame)); + result = baseValue.get(callFrame, propertyName); + } CHECK_FOR_EXCEPTION(); callFrame->uncheckedR(dst) = result; vPC += OPCODE_LENGTH(op_get_by_pname); diff --git a/JavaScriptCore/interpreter/RegisterFile.h b/JavaScriptCore/interpreter/RegisterFile.h index d9f6a2b..51a5bdf 100644 --- a/JavaScriptCore/interpreter/RegisterFile.h +++ b/JavaScriptCore/interpreter/RegisterFile.h @@ -138,7 +138,6 @@ namespace JSC { static void initializeThreading(); private: - void checkAllocatedOkay(bool okay); void releaseExcessCapacity(); void addToCommittedByteCount(long); size_t m_numGlobals; @@ -160,15 +159,14 @@ namespace JSC { , m_end(0) , m_max(0) { - ASSERT(maxGlobals && PageAllocation::isPageAligned(maxGlobals)); - ASSERT(capacity && PageAllocation::isPageAligned(capacity)); + ASSERT(maxGlobals && isPageAligned(maxGlobals)); + ASSERT(capacity && isPageAligned(capacity)); size_t bufferLength = (capacity + maxGlobals) * sizeof(Register); - m_reservation = PageReservation::reserve(roundUpAllocationSize(bufferLength, commitSize), PageAllocation::JSVMStackPages); + m_reservation = PageReservation::reserve(roundUpAllocationSize(bufferLength, commitSize), OSAllocator::JSVMStackPages); void* base = m_reservation.base(); - checkAllocatedOkay(base); size_t committedSize = roundUpAllocationSize(maxGlobals * sizeof(Register), commitSize); - checkAllocatedOkay(m_reservation.commit(base, committedSize)); + m_reservation.commit(base, committedSize); addToCommittedByteCount(static_cast<long>(committedSize)); m_commitEnd = reinterpret_cast_ptr<Register*>(reinterpret_cast<char*>(base) + committedSize); m_start = static_cast<Register*>(base) + maxGlobals; @@ -196,7 +194,7 @@ namespace JSC { if (newEnd > m_commitEnd) { size_t size = roundUpAllocationSize(reinterpret_cast<char*>(newEnd) - reinterpret_cast<char*>(m_commitEnd), commitSize); - checkAllocatedOkay(m_reservation.commit(m_commitEnd, size)); + m_reservation.commit(m_commitEnd, size); addToCommittedByteCount(static_cast<long>(size)); m_commitEnd = reinterpret_cast_ptr<Register*>(reinterpret_cast<char*>(m_commitEnd) + size); } @@ -208,16 +206,6 @@ namespace JSC { return true; } - inline void RegisterFile::checkAllocatedOkay(bool okay) - { - if (!okay) { -#ifndef NDEBUG - fprintf(stderr, "Could not allocate register file: %d\n", PageReservation::lastError()); -#endif - CRASH(); - } - } - } // namespace JSC #endif // RegisterFile_h |
