Changeset 33320
- Timestamp:
- 05/12/08 23:03:10 (6 months ago)
- Location:
- branches/squirrelfish/JavaScriptCore
- Files:
-
- 4 modified
-
ChangeLog (modified) (1 diff)
-
VM/Machine.cpp (modified) (4 diffs)
-
VM/RegisterFile.h (modified) (3 diffs)
-
kjs/function.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/squirrelfish/JavaScriptCore/ChangeLog
r33319 r33320 1 2008-05-01 Oliver Hunt <oliver@apple.com> 2 3 RS=Geoff 4 5 Rename unsafeForReentry to safeForReentry to avoid double negatives. 6 7 * VM/Machine.cpp: 8 (KJS::Machine::privateExecute): 9 * VM/RegisterFile.h: 10 * kjs/function.cpp: 11 (KJS::FunctionImp::callAsFunction): 12 1 13 2008-05-01 Oliver Hunt <oliver@apple.com> 2 14 -
branches/squirrelfish/JavaScriptCore/VM/Machine.cpp
r33319 r33320 718 718 JSValue** k = codeBlock->jsValues.data(); 719 719 720 registerFile->set UnsafeForReentry(true);720 registerFile->setSafeForReentry(false); 721 721 #define VM_CHECK_EXCEPTION() \ 722 722 do { \ … … 1425 1425 JSObject* thisObject = r[thisRegister].u.jsObject; 1426 1426 1427 registerFile->set UnsafeForReentry(false);1427 registerFile->setSafeForReentry(true); 1428 1428 JSValue* result = eval(exec, thisObject, scopeChain, registerFile, r, argv, argc, exceptionValue); 1429 registerFile->set UnsafeForReentry(true);1429 registerFile->setSafeForReentry(false); 1430 1430 r = (*registerBase) + registerOffset; 1431 1431 … … 1498 1498 List args(&r[argv + 1].u.jsValue, argc - 1); 1499 1499 1500 registerFile->set UnsafeForReentry(false);1500 registerFile->setSafeForReentry(true); 1501 1501 JSValue* returnValue = static_cast<JSObject*>(v)->callAsFunction(exec, thisObj, args); 1502 registerFile->set UnsafeForReentry(true);1502 registerFile->setSafeForReentry(false); 1503 1503 1504 1504 r = (*registerBase) + registerOffset; … … 1602 1602 1603 1603 List args(&r[argv + 1].u.jsValue, argc - 1); 1604 registerFile->set UnsafeForReentry(false);1604 registerFile->setSafeForReentry(true); 1605 1605 JSValue* returnValue = constructor->construct(exec, args); 1606 registerFile->set UnsafeForReentry(true);1606 registerFile->setSafeForReentry(false); 1607 1607 1608 1608 r = (*registerBase) + registerOffset; -
branches/squirrelfish/JavaScriptCore/VM/RegisterFile.h
r33319 r33320 89 89 enum { DefaultRegisterFileSize = 2 * 1024 * 1024 }; 90 90 RegisterFile(RegisterFileStack* stack, size_t maxSize) 91 : m_ unsafeForReentry(false)91 : m_safeForReentry(true) 92 92 , m_isForImplicitCall(false) 93 93 , m_size(0) … … 151 151 Collector::markStackObjectsConservatively(m_buffer, m_base + m_size); 152 152 } 153 bool unsafeForReentry() { return m_unsafeForReentry; }154 void set UnsafeForReentry(bool unsafeForReentry) { m_unsafeForReentry = unsafeForReentry; }153 bool safeForReentry() { return m_safeForReentry; } 154 void setSafeForReentry(bool safeForReentry) { m_safeForReentry = safeForReentry; } 155 155 void setIsForImplicitCall(bool isForImplicitCall) { m_isForImplicitCall = isForImplicitCall; } 156 156 bool isForImplicitCall() { return m_isForImplicitCall; } … … 167 167 168 168 void setBase(Register*); 169 bool m_ unsafeForReentry;169 bool m_safeForReentry; 170 170 bool m_isForImplicitCall; 171 171 size_t m_size; -
branches/squirrelfish/JavaScriptCore/kjs/function.cpp
r33319 r33320 86 86 RegisterFileStack* stack = &exec->dynamicGlobalObject()->registerFileStack(); 87 87 RegisterFile* current = stack->current(); 88 if ( current->unsafeForReentry()) {88 if (!current->safeForReentry()) { 89 89 stack->pushFunctionRegisterFile(); 90 90 JSValue* result = machine().execute(body.get(), exec, this, thisObj, args, stack, _scope.node(), &exception); … … 94 94 } else { 95 95 JSValue* result = machine().execute(body.get(), exec, this, thisObj, args, stack, _scope.node(), &exception); 96 current->set UnsafeForReentry(false);96 current->setSafeForReentry(true); 97 97 exec->setException(exception); 98 98 return result;