summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/interpreter
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-05 14:36:32 +0100
committerBen Murdoch <benm@google.com>2011-05-10 15:38:30 +0100
commitf05b935882198ccf7d81675736e3aeb089c5113a (patch)
tree4ea0ca838d9ef1b15cf17ddb3928efb427c7e5a1 /JavaScriptCore/interpreter
parent60fbdcc62bced8db2cb1fd233cc4d1e4ea17db1b (diff)
downloadexternal_webkit-f05b935882198ccf7d81675736e3aeb089c5113a.zip
external_webkit-f05b935882198ccf7d81675736e3aeb089c5113a.tar.gz
external_webkit-f05b935882198ccf7d81675736e3aeb089c5113a.tar.bz2
Merge WebKit at r74534: Initial merge by git.
Change-Id: I6ccd1154fa1b19c2ec2a66878eb675738735f1eb
Diffstat (limited to 'JavaScriptCore/interpreter')
-rw-r--r--JavaScriptCore/interpreter/Interpreter.cpp6
-rw-r--r--JavaScriptCore/interpreter/RegisterFile.h22
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