Changeset 33317
- Timestamp:
- 05/12/08 23:03:02 (6 months ago)
- Location:
- branches/squirrelfish/JavaScriptCore
- Files:
-
- 2 modified
-
ChangeLog (modified) (1 diff)
-
VM/Machine.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/squirrelfish/JavaScriptCore/ChangeLog
r33316 r33317 1 2008-04-30 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Maciej. 4 5 Minor code restructuring to prepare for getters and setters, 6 also helps exception semantics a bit. 7 8 * VM/Machine.cpp: 9 (KJS::Machine::privateExecute): 10 1 11 2008-04-30 Geoffrey Garen <ggaren@apple.com> 2 12 -
branches/squirrelfish/JavaScriptCore/VM/Machine.cpp
r33314 r33317 1199 1199 1200 1200 Identifier& ident = codeBlock->identifiers[property]; 1201 r[dst].u.jsValue= baseObj->get(exec, ident);1201 JSValue *result = baseObj->get(exec, ident); 1202 1202 VM_CHECK_EXCEPTION(); 1203 r[dst].u.jsValue = result; 1203 1204 ++vPC; 1204 1205 NEXT_OPCODE; … … 1242 1243 1243 1244 Identifier& ident = codeBlock->identifiers[property]; 1244 r[dst].u.jsValue = jsBoolean(baseObj->deleteProperty(exec, ident)); 1245 1245 JSValue* result = jsBoolean(baseObj->deleteProperty(exec, ident)); 1246 1246 VM_CHECK_EXCEPTION(); 1247 r[dst].u.jsValue = result; 1247 1248 ++vPC; 1248 1249 NEXT_OPCODE; … … 1263 1264 1264 1265 JSValue* subscript = r[property].u.jsValue; 1265 1266 JSValue* result; 1266 1267 uint32_t i; 1267 1268 if (subscript->getUInt32(i)) 1268 r [dst].u.jsValue= baseObj->get(exec, i);1269 result = baseObj->get(exec, i); 1269 1270 else { 1270 1271 VM_CHECK_EXCEPTION(); // If toObject threw, we must not call toString, which may execute arbitrary code 1271 r [dst].u.jsValue= baseObj->get(exec, Identifier(subscript->toString(exec)));1272 result = baseObj->get(exec, Identifier(subscript->toString(exec))); 1272 1273 } 1273 1274 1274 1275 VM_CHECK_EXCEPTION(); 1276 r[dst].u.jsValue = result; 1275 1277 ++vPC; 1276 1278 NEXT_OPCODE; … … 1322 1324 1323 1325 JSValue* subscript = r[property].u.jsValue; 1324 1326 JSValue* result; 1325 1327 uint32_t i; 1326 1328 if (subscript->getUInt32(i)) 1327 r [dst].u.jsValue= jsBoolean(baseObj->deleteProperty(exec, i));1329 result = jsBoolean(baseObj->deleteProperty(exec, i)); 1328 1330 else { 1329 1331 VM_CHECK_EXCEPTION(); // If toObject threw, we must not call toString, which may execute arbitrary code 1330 r [dst].u.jsValue= jsBoolean(baseObj->deleteProperty(exec, Identifier(subscript->toString(exec))));1332 result = jsBoolean(baseObj->deleteProperty(exec, Identifier(subscript->toString(exec)))); 1331 1333 } 1332 1334 1333 1335 VM_CHECK_EXCEPTION(); 1336 r[dst].u.jsValue = result; 1334 1337 ++vPC; 1335 1338 NEXT_OPCODE;