diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-11 13:45:28 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-11 13:45:28 +0200 |
commit | d6a599dbc9d824a462b2b206316e102bf8136446 (patch) | |
tree | ecb257a5e55b2239d74b90fdad62fccd661cf286 /Source/JavaScriptCore/interpreter/Interpreter.cpp | |
parent | 3ccc3a85f09a83557b391aae380d3bf5f81a2911 (diff) | |
download | qtwebkit-d6a599dbc9d824a462b2b206316e102bf8136446.tar.gz |
Imported WebKit commit 8ff1f22783a32de82fee915abd55bd1b298f2644 (http://svn.webkit.org/repository/webkit/trunk@122325)
New snapshot that should work with the latest Qt build system changes
Diffstat (limited to 'Source/JavaScriptCore/interpreter/Interpreter.cpp')
-rw-r--r-- | Source/JavaScriptCore/interpreter/Interpreter.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp index b8610e7bf..b6072a5d6 100644 --- a/Source/JavaScriptCore/interpreter/Interpreter.cpp +++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. * Copyright (C) 2008 Cameron Zwarich <cwzwarich@uwaterloo.ca> * * Redistribution and use in source and binary forms, with or without @@ -1822,7 +1822,7 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* ASSERT(slot.slotBase().isObject()); JSObject* baseObject = asObject(slot.slotBase()); - size_t offset = slot.cachedOffset(); + PropertyOffset offset = slot.cachedOffset(); // Since we're accessing a prototype in a loop, it's a good bet that it // should not be treated as a dictionary. @@ -1851,7 +1851,7 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* return; } - size_t offset = slot.cachedOffset(); + PropertyOffset offset = slot.cachedOffset(); size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset); if (!count) { vPC[0] = getOpcode(op_get_by_id_generic); @@ -3045,6 +3045,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi vPC += OPCODE_LENGTH(op_resolve_with_this); NEXT_INSTRUCTION(); } + DEFINE_OPCODE(op_get_by_id_out_of_line) DEFINE_OPCODE(op_get_by_id) { /* get_by_id dst(r) base(r) property(id) structure(sID) nop(n) nop(n) nop(n) @@ -3527,6 +3528,7 @@ skip_id_custom_self: skip_get_string_length: goto *(&&skip_put_by_id); #endif + DEFINE_OPCODE(op_put_by_id_out_of_line) DEFINE_OPCODE(op_put_by_id) { /* put_by_id base(r) property(id) value(r) nop(n) nop(n) nop(n) nop(n) direct(b) @@ -3565,6 +3567,8 @@ skip_id_custom_self: #endif DEFINE_OPCODE(op_put_by_id_transition_direct) DEFINE_OPCODE(op_put_by_id_transition_normal) + DEFINE_OPCODE(op_put_by_id_transition_direct_out_of_line) + DEFINE_OPCODE(op_put_by_id_transition_normal_out_of_line) DEFINE_OPCODE(op_put_by_id_transition) { /* op_put_by_id_transition base(r) property(id) value(r) oldStructure(sID) newStructure(sID) structureChain(chain) offset(n) direct(b) @@ -3602,10 +3606,10 @@ skip_id_custom_self: proto = asObject(proto)->structure()->prototypeForLookup(callFrame); } } - baseObject->transitionTo(*globalData, newStructure); + baseObject->setStructureAndReallocateStorageIfNecessary(*globalData, newStructure); int value = vPC[3].u.operand; - unsigned offset = vPC[7].u.operand; + int offset = vPC[7].u.operand; ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(*globalData, codeBlock->identifier(vPC[2].u.operand))) == offset); baseObject->putDirectOffset(callFrame->globalData(), offset, callFrame->r(value).jsValue()); @@ -3639,7 +3643,7 @@ skip_id_custom_self: ASSERT(baseCell->isObject()); JSObject* baseObject = asObject(baseCell); int value = vPC[3].u.operand; - unsigned offset = vPC[5].u.operand; + int offset = vPC[5].u.operand; ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(*globalData, codeBlock->identifier(vPC[2].u.operand))) == offset); baseObject->putDirectOffset(callFrame->globalData(), offset, callFrame->r(value).jsValue()); @@ -3717,7 +3721,7 @@ skip_id_custom_self: JSValue expectedSubscript = callFrame->r(expected).jsValue(); int index = callFrame->r(i).i() - 1; JSValue result; - int offset = 0; + PropertyOffset offset = 0; if (subscript == expectedSubscript && baseValue.isCell() && (baseValue.asCell()->structure() == it->cachedStructure()) && it->getOffset(index, offset)) { callFrame->uncheckedR(dst) = JSValue(asObject(baseValue)->getDirectOffset(offset)); vPC += OPCODE_LENGTH(op_get_by_pname); |