Ignore:
Timestamp:
Jan 6, 2009, 9:11:57 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2009-01-05 Gavin Barraclough <[email protected]>

Reviewed by Oliver Hunt.

Replace all uses of JSValue* with a new smart pointer type, JSValuePtr.


A JavaScript value may be a heap object or boxed primitive, represented by a
pointer, or may be an unboxed immediate value, such as an integer. Since a
value may dynamically need to contain either a pointer value or an immediate,
we encode immediates as pointer values (since all valid JSCell pointers are
allocated at alligned addesses, unaligned addresses are available to encode
immediates). As such all JavaScript values are represented using a JSValue*.

This implementation is encumbered by a number of constraints. It ties the
JSValue representation to the size of pointer on the platform, which, for
example, means that we currently can represent different ranges of integers
as immediates on x86 and x86-64. It also prevents us from overloading the
to-boolean conversion used to test for noValue() - effectively forcing us
to represent noValue() as 0. This would potentially be problematic were we
to wish to encode integer values differently (e.g. were we to use the v8
encoding, where pointers are tagged with 1 and integers with 0, then the
immediate integer 0 would conflict with noValue()).

This patch replaces all usage of JSValue* with a new class, JSValuePtr,
which encapsulates the pointer. JSValuePtr maintains the same interface as
JSValue*, overloading operator-> and operator bool such that previous
operations in the code on variables of type JSValue* are still supported.

In order to provide a ProtectPtr<> type with support for the new value
representation (without using the internal JSValue type directly), a new
ProtectJSValuePtr type has been added, equivalent to the previous type
ProtectPtr<JSValue>.

This patch is likely the first in a sequence of three changes. With the
value now encapsulated it will likely make sense to migrate the functionality
from JSValue into JSValuePtr, such that the internal pointer representation
need not be exposed. Through migrating the functionality to the wrapper
class the existing JSValue should be rendered redundant, and the class is
likely to be removed (the JSValuePtr now wrapping a pointer to a JSCell).
At this stage it will likely make sense to rename JSValuePtr to JSValue.

https://bugs.webkit.org/show_bug.cgi?id=23114

  • API/APICast.h: (toJS): (toRef):
  • API/JSBase.cpp: (JSEvaluateScript):
  • API/JSCallbackConstructor.h: (JSC::JSCallbackConstructor::createStructure):
  • API/JSCallbackFunction.cpp: (JSC::JSCallbackFunction::call):
  • API/JSCallbackFunction.h: (JSC::JSCallbackFunction::createStructure):
  • API/JSCallbackObject.h: (JSC::JSCallbackObject::createStructure):
  • API/JSCallbackObjectFunctions.h: (JSC::::asCallbackObject): (JSC::::put): (JSC::::hasInstance): (JSC::::call): (JSC::::staticValueGetter): (JSC::::staticFunctionGetter): (JSC::::callbackGetter):
  • API/JSContextRef.cpp:
  • API/JSObjectRef.cpp: (JSObjectMakeConstructor): (JSObjectSetPrototype): (JSObjectGetProperty): (JSObjectSetProperty): (JSObjectGetPropertyAtIndex): (JSObjectSetPropertyAtIndex):
  • API/JSValueRef.cpp: (JSValueGetType): (JSValueIsUndefined): (JSValueIsNull): (JSValueIsBoolean): (JSValueIsNumber): (JSValueIsString): (JSValueIsObject): (JSValueIsObjectOfClass): (JSValueIsEqual): (JSValueIsStrictEqual): (JSValueIsInstanceOfConstructor): (JSValueToBoolean): (JSValueToNumber): (JSValueToStringCopy): (JSValueToObject): (JSValueProtect): (JSValueUnprotect):
  • JavaScriptCore.exp:
  • bytecode/CodeBlock.cpp: (JSC::valueToSourceString): (JSC::constantName): (JSC::CodeBlock::dump):
  • bytecode/CodeBlock.h: (JSC::CodeBlock::getConstant): (JSC::CodeBlock::addUnexpectedConstant): (JSC::CodeBlock::unexpectedConstant):
  • bytecode/EvalCodeCache.h: (JSC::EvalCodeCache::get):
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::BytecodeGenerator): (JSC::BytecodeGenerator::addConstant): (JSC::BytecodeGenerator::addUnexpectedConstant): (JSC::BytecodeGenerator::emitLoad): (JSC::BytecodeGenerator::emitLoadJSV): (JSC::BytecodeGenerator::emitGetScopedVar): (JSC::BytecodeGenerator::emitPutScopedVar): (JSC::BytecodeGenerator::emitNewError): (JSC::keyForImmediateSwitch):
  • bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue): (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue):
  • debugger/DebuggerCallFrame.cpp: (JSC::DebuggerCallFrame::evaluate):
  • debugger/DebuggerCallFrame.h: (JSC::DebuggerCallFrame::DebuggerCallFrame): (JSC::DebuggerCallFrame::exception):
  • interpreter/CallFrame.cpp: (JSC::CallFrame::thisValue):
  • interpreter/CallFrame.h: (JSC::ExecState::setException): (JSC::ExecState::exception): (JSC::ExecState::exceptionSlot): (JSC::ExecState::hadException):
  • interpreter/Interpreter.cpp: (JSC::fastIsNumber): (JSC::fastToInt32): (JSC::fastToUInt32): (JSC::jsLess): (JSC::jsLessEq): (JSC::jsAddSlowCase): (JSC::jsAdd): (JSC::jsTypeStringForValue): (JSC::jsIsObjectType): (JSC::jsIsFunctionType): (JSC::Interpreter::resolve): (JSC::Interpreter::resolveSkip): (JSC::Interpreter::resolveGlobal): (JSC::inlineResolveBase): (JSC::Interpreter::resolveBase): (JSC::Interpreter::resolveBaseAndProperty): (JSC::Interpreter::resolveBaseAndFunc): (JSC::isNotObject): (JSC::Interpreter::callEval): (JSC::Interpreter::unwindCallFrame): (JSC::Interpreter::throwException): (JSC::Interpreter::execute): (JSC::Interpreter::checkTimeout): (JSC::Interpreter::createExceptionScope): (JSC::cachePrototypeChain): (JSC::Interpreter::tryCachePutByID): (JSC::countPrototypeChainEntriesAndCheckForProxies): (JSC::Interpreter::tryCacheGetByID): (JSC::Interpreter::privateExecute): (JSC::Interpreter::retrieveArguments): (JSC::Interpreter::retrieveCaller): (JSC::Interpreter::retrieveLastCaller): (JSC::Interpreter::tryCTICachePutByID): (JSC::Interpreter::tryCTICacheGetByID): (JSC::returnToThrowTrampoline): (JSC::Interpreter::cti_op_convert_this): (JSC::Interpreter::cti_op_add): (JSC::Interpreter::cti_op_pre_inc): (JSC::Interpreter::cti_op_loop_if_less): (JSC::Interpreter::cti_op_loop_if_lesseq): (JSC::Interpreter::cti_op_get_by_id_generic): (JSC::Interpreter::cti_op_get_by_id): (JSC::Interpreter::cti_op_get_by_id_second): (JSC::Interpreter::cti_op_get_by_id_self_fail): (JSC::Interpreter::cti_op_get_by_id_proto_list): (JSC::Interpreter::cti_op_get_by_id_proto_list_full): (JSC::Interpreter::cti_op_get_by_id_proto_fail): (JSC::Interpreter::cti_op_get_by_id_array_fail): (JSC::Interpreter::cti_op_get_by_id_string_fail): (JSC::Interpreter::cti_op_instanceof): (JSC::Interpreter::cti_op_del_by_id): (JSC::Interpreter::cti_op_mul): (JSC::Interpreter::cti_op_call_NotJSFunction): (JSC::Interpreter::cti_op_resolve): (JSC::Interpreter::cti_op_construct_NotJSConstruct): (JSC::Interpreter::cti_op_get_by_val): (JSC::Interpreter::cti_op_resolve_func): (JSC::Interpreter::cti_op_sub): (JSC::Interpreter::cti_op_put_by_val): (JSC::Interpreter::cti_op_put_by_val_array): (JSC::Interpreter::cti_op_lesseq): (JSC::Interpreter::cti_op_loop_if_true): (JSC::Interpreter::cti_op_negate): (JSC::Interpreter::cti_op_resolve_base): (JSC::Interpreter::cti_op_resolve_skip): (JSC::Interpreter::cti_op_resolve_global): (JSC::Interpreter::cti_op_div): (JSC::Interpreter::cti_op_pre_dec): (JSC::Interpreter::cti_op_jless): (JSC::Interpreter::cti_op_not): (JSC::Interpreter::cti_op_jtrue): (JSC::Interpreter::cti_op_post_inc): (JSC::Interpreter::cti_op_eq): (JSC::Interpreter::cti_op_lshift): (JSC::Interpreter::cti_op_bitand): (JSC::Interpreter::cti_op_rshift): (JSC::Interpreter::cti_op_bitnot): (JSC::Interpreter::cti_op_resolve_with_base): (JSC::Interpreter::cti_op_mod): (JSC::Interpreter::cti_op_less): (JSC::Interpreter::cti_op_neq): (JSC::Interpreter::cti_op_post_dec): (JSC::Interpreter::cti_op_urshift): (JSC::Interpreter::cti_op_bitxor): (JSC::Interpreter::cti_op_bitor): (JSC::Interpreter::cti_op_call_eval): (JSC::Interpreter::cti_op_throw): (JSC::Interpreter::cti_op_next_pname): (JSC::Interpreter::cti_op_typeof): (JSC::Interpreter::cti_op_is_undefined): (JSC::Interpreter::cti_op_is_boolean): (JSC::Interpreter::cti_op_is_number): (JSC::Interpreter::cti_op_is_string): (JSC::Interpreter::cti_op_is_object): (JSC::Interpreter::cti_op_is_function): (JSC::Interpreter::cti_op_stricteq): (JSC::Interpreter::cti_op_nstricteq): (JSC::Interpreter::cti_op_to_jsnumber): (JSC::Interpreter::cti_op_in): (JSC::Interpreter::cti_op_switch_imm): (JSC::Interpreter::cti_op_switch_char): (JSC::Interpreter::cti_op_switch_string): (JSC::Interpreter::cti_op_del_by_val): (JSC::Interpreter::cti_op_new_error): (JSC::Interpreter::cti_vm_throw):
  • interpreter/Interpreter.h: (JSC::Interpreter::isJSArray): (JSC::Interpreter::isJSString):
  • interpreter/Register.h: (JSC::Register::): (JSC::Register::Register): (JSC::Register::jsValue): (JSC::Register::getJSValue):
  • jit/JIT.cpp: (JSC::): (JSC::JIT::compileOpStrictEq): (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileSlowCases):
  • jit/JIT.h: (JSC::): (JSC::JIT::execute):
  • jit/JITArithmetic.cpp: (JSC::JIT::compileFastArith_op_rshift): (JSC::JIT::compileFastArithSlow_op_rshift):
  • jit/JITCall.cpp: (JSC::JIT::unlinkCall): (JSC::JIT::compileOpCallInitializeCallFrame): (JSC::JIT::compileOpCall):
  • jit/JITInlineMethods.h: (JSC::JIT::emitGetVirtualRegister): (JSC::JIT::getConstantOperand): (JSC::JIT::isOperandConstant31BitImmediateInt): (JSC::JIT::emitPutJITStubArgFromVirtualRegister): (JSC::JIT::emitInitRegister):
  • jit/JITPropertyAccess.cpp: (JSC::resizePropertyStorage): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::patchGetByIdSelf): (JSC::JIT::patchPutByIdReplace): (JSC::JIT::privateCompileGetByIdSelf): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdSelfList): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain): (JSC::JIT::privateCompilePutByIdReplace):
  • jsc.cpp: (functionPrint): (functionDebug): (functionGC): (functionVersion): (functionRun): (functionLoad): (functionReadline): (functionQuit):
  • parser/Nodes.cpp: (JSC::NullNode::emitBytecode): (JSC::ArrayNode::emitBytecode): (JSC::FunctionCallValueNode::emitBytecode): (JSC::FunctionCallResolveNode::emitBytecode): (JSC::VoidNode::emitBytecode): (JSC::ConstDeclNode::emitCodeSingle): (JSC::ReturnNode::emitBytecode): (JSC::processClauseList): (JSC::EvalNode::emitBytecode): (JSC::FunctionBodyNode::emitBytecode): (JSC::ProgramNode::emitBytecode):
  • profiler/ProfileGenerator.cpp: (JSC::ProfileGenerator::addParentForConsoleStart):
  • profiler/Profiler.cpp: (JSC::Profiler::willExecute): (JSC::Profiler::didExecute): (JSC::Profiler::createCallIdentifier):
  • profiler/Profiler.h:
  • runtime/ArgList.cpp: (JSC::ArgList::slowAppend):
  • runtime/ArgList.h: (JSC::ArgList::at): (JSC::ArgList::append):
  • runtime/Arguments.cpp: (JSC::Arguments::put):
  • runtime/Arguments.h: (JSC::Arguments::createStructure): (JSC::asArguments):
  • runtime/ArrayConstructor.cpp: (JSC::callArrayConstructor):
  • runtime/ArrayPrototype.cpp: (JSC::getProperty): (JSC::putProperty): (JSC::arrayProtoFuncToString): (JSC::arrayProtoFuncToLocaleString): (JSC::arrayProtoFuncJoin): (JSC::arrayProtoFuncConcat): (JSC::arrayProtoFuncPop): (JSC::arrayProtoFuncPush): (JSC::arrayProtoFuncReverse): (JSC::arrayProtoFuncShift): (JSC::arrayProtoFuncSlice): (JSC::arrayProtoFuncSort): (JSC::arrayProtoFuncSplice): (JSC::arrayProtoFuncUnShift): (JSC::arrayProtoFuncFilter): (JSC::arrayProtoFuncMap): (JSC::arrayProtoFuncEvery): (JSC::arrayProtoFuncForEach): (JSC::arrayProtoFuncSome): (JSC::arrayProtoFuncIndexOf): (JSC::arrayProtoFuncLastIndexOf):
  • runtime/BooleanConstructor.cpp: (JSC::callBooleanConstructor): (JSC::constructBooleanFromImmediateBoolean):
  • runtime/BooleanConstructor.h:
  • runtime/BooleanObject.h: (JSC::asBooleanObject):
  • runtime/BooleanPrototype.cpp: (JSC::booleanProtoFuncToString): (JSC::booleanProtoFuncValueOf):
  • runtime/CallData.cpp: (JSC::call):
  • runtime/CallData.h:
  • runtime/Collector.cpp: (JSC::Heap::protect): (JSC::Heap::unprotect): (JSC::Heap::heap): (JSC::Heap::collect):
  • runtime/Collector.h:
  • runtime/Completion.cpp: (JSC::evaluate):
  • runtime/Completion.h: (JSC::Completion::Completion): (JSC::Completion::value): (JSC::Completion::setValue): (JSC::Completion::isValueCompletion):
  • runtime/ConstructData.cpp: (JSC::construct):
  • runtime/ConstructData.h:
  • runtime/DateConstructor.cpp: (JSC::constructDate): (JSC::callDate): (JSC::dateParse): (JSC::dateNow): (JSC::dateUTC):
  • runtime/DateInstance.h: (JSC::asDateInstance):
  • runtime/DatePrototype.cpp: (JSC::dateProtoFuncToString): (JSC::dateProtoFuncToUTCString): (JSC::dateProtoFuncToDateString): (JSC::dateProtoFuncToTimeString): (JSC::dateProtoFuncToLocaleString): (JSC::dateProtoFuncToLocaleDateString): (JSC::dateProtoFuncToLocaleTimeString): (JSC::dateProtoFuncValueOf): (JSC::dateProtoFuncGetTime): (JSC::dateProtoFuncGetFullYear): (JSC::dateProtoFuncGetUTCFullYear): (JSC::dateProtoFuncToGMTString): (JSC::dateProtoFuncGetMonth): (JSC::dateProtoFuncGetUTCMonth): (JSC::dateProtoFuncGetDate): (JSC::dateProtoFuncGetUTCDate): (JSC::dateProtoFuncGetDay): (JSC::dateProtoFuncGetUTCDay): (JSC::dateProtoFuncGetHours): (JSC::dateProtoFuncGetUTCHours): (JSC::dateProtoFuncGetMinutes): (JSC::dateProtoFuncGetUTCMinutes): (JSC::dateProtoFuncGetSeconds): (JSC::dateProtoFuncGetUTCSeconds): (JSC::dateProtoFuncGetMilliSeconds): (JSC::dateProtoFuncGetUTCMilliseconds): (JSC::dateProtoFuncGetTimezoneOffset): (JSC::dateProtoFuncSetTime): (JSC::setNewValueFromTimeArgs): (JSC::setNewValueFromDateArgs): (JSC::dateProtoFuncSetMilliSeconds): (JSC::dateProtoFuncSetUTCMilliseconds): (JSC::dateProtoFuncSetSeconds): (JSC::dateProtoFuncSetUTCSeconds): (JSC::dateProtoFuncSetMinutes): (JSC::dateProtoFuncSetUTCMinutes): (JSC::dateProtoFuncSetHours): (JSC::dateProtoFuncSetUTCHours): (JSC::dateProtoFuncSetDate): (JSC::dateProtoFuncSetUTCDate): (JSC::dateProtoFuncSetMonth): (JSC::dateProtoFuncSetUTCMonth): (JSC::dateProtoFuncSetFullYear): (JSC::dateProtoFuncSetUTCFullYear): (JSC::dateProtoFuncSetYear): (JSC::dateProtoFuncGetYear):
  • runtime/DatePrototype.h: (JSC::DatePrototype::createStructure):
  • runtime/ErrorConstructor.cpp: (JSC::callErrorConstructor):
  • runtime/ErrorPrototype.cpp: (JSC::errorProtoFuncToString):
  • runtime/ExceptionHelpers.cpp: (JSC::createInterruptedExecutionException): (JSC::createError): (JSC::createStackOverflowError): (JSC::createUndefinedVariableError): (JSC::createErrorMessage): (JSC::createInvalidParamError): (JSC::createNotAConstructorError): (JSC::createNotAFunctionError):
  • runtime/ExceptionHelpers.h:
  • runtime/FunctionConstructor.cpp: (JSC::callFunctionConstructor):
  • runtime/FunctionPrototype.cpp: (JSC::callFunctionPrototype): (JSC::functionProtoFuncToString): (JSC::functionProtoFuncApply): (JSC::functionProtoFuncCall):
  • runtime/FunctionPrototype.h: (JSC::FunctionPrototype::createStructure):
  • runtime/GetterSetter.cpp: (JSC::GetterSetter::toPrimitive): (JSC::GetterSetter::getPrimitiveNumber):
  • runtime/GetterSetter.h: (JSC::asGetterSetter):
  • runtime/InitializeThreading.cpp:
  • runtime/InternalFunction.h: (JSC::InternalFunction::createStructure): (JSC::asInternalFunction):
  • runtime/JSActivation.cpp: (JSC::JSActivation::getOwnPropertySlot): (JSC::JSActivation::put): (JSC::JSActivation::putWithAttributes): (JSC::JSActivation::argumentsGetter):
  • runtime/JSActivation.h: (JSC::JSActivation::createStructure): (JSC::asActivation):
  • runtime/JSArray.cpp: (JSC::storageSize): (JSC::JSArray::JSArray): (JSC::JSArray::getOwnPropertySlot): (JSC::JSArray::put): (JSC::JSArray::putSlowCase): (JSC::JSArray::deleteProperty): (JSC::JSArray::getPropertyNames): (JSC::JSArray::setLength): (JSC::JSArray::pop): (JSC::JSArray::push): (JSC::JSArray::mark): (JSC::JSArray::sort): (JSC::JSArray::compactForSorting): (JSC::JSArray::checkConsistency): (JSC::constructArray):
  • runtime/JSArray.h: (JSC::JSArray::getIndex): (JSC::JSArray::setIndex): (JSC::JSArray::createStructure): (JSC::asArray):
  • runtime/JSCell.cpp: (JSC::JSCell::put): (JSC::JSCell::getJSNumber):
  • runtime/JSCell.h: (JSC::asCell): (JSC::JSValue::asCell): (JSC::JSValue::toPrimitive): (JSC::JSValue::getPrimitiveNumber): (JSC::JSValue::getJSNumber):
  • runtime/JSFunction.cpp: (JSC::JSFunction::call): (JSC::JSFunction::argumentsGetter): (JSC::JSFunction::callerGetter): (JSC::JSFunction::lengthGetter): (JSC::JSFunction::getOwnPropertySlot): (JSC::JSFunction::put): (JSC::JSFunction::construct):
  • runtime/JSFunction.h: (JSC::JSFunction::createStructure): (JSC::asFunction):
  • runtime/JSGlobalData.h:
  • runtime/JSGlobalObject.cpp: (JSC::markIfNeeded): (JSC::JSGlobalObject::put): (JSC::JSGlobalObject::putWithAttributes): (JSC::JSGlobalObject::reset): (JSC::JSGlobalObject::resetPrototype):
  • runtime/JSGlobalObject.h: (JSC::JSGlobalObject::createStructure): (JSC::JSGlobalObject::GlobalPropertyInfo::GlobalPropertyInfo): (JSC::asGlobalObject): (JSC::Structure::prototypeForLookup):
  • runtime/JSGlobalObjectFunctions.cpp: (JSC::encode): (JSC::decode): (JSC::globalFuncEval): (JSC::globalFuncParseInt): (JSC::globalFuncParseFloat): (JSC::globalFuncIsNaN): (JSC::globalFuncIsFinite): (JSC::globalFuncDecodeURI): (JSC::globalFuncDecodeURIComponent): (JSC::globalFuncEncodeURI): (JSC::globalFuncEncodeURIComponent): (JSC::globalFuncEscape): (JSC::globalFuncUnescape): (JSC::globalFuncJSCPrint):
  • runtime/JSGlobalObjectFunctions.h:
  • runtime/JSImmediate.cpp: (JSC::JSImmediate::toThisObject): (JSC::JSImmediate::toObject): (JSC::JSImmediate::prototype): (JSC::JSImmediate::toString):
  • runtime/JSImmediate.h: (JSC::JSImmediate::isImmediate): (JSC::JSImmediate::isNumber): (JSC::JSImmediate::isPositiveNumber): (JSC::JSImmediate::isBoolean): (JSC::JSImmediate::isUndefinedOrNull): (JSC::JSImmediate::isNegative): (JSC::JSImmediate::isEitherImmediate): (JSC::JSImmediate::isAnyImmediate): (JSC::JSImmediate::areBothImmediate): (JSC::JSImmediate::areBothImmediateNumbers): (JSC::JSImmediate::andImmediateNumbers): (JSC::JSImmediate::xorImmediateNumbers): (JSC::JSImmediate::orImmediateNumbers): (JSC::JSImmediate::rightShiftImmediateNumbers): (JSC::JSImmediate::canDoFastAdditiveOperations): (JSC::JSImmediate::addImmediateNumbers): (JSC::JSImmediate::subImmediateNumbers): (JSC::JSImmediate::incImmediateNumber): (JSC::JSImmediate::decImmediateNumber): (JSC::JSImmediate::makeValue): (JSC::JSImmediate::makeInt): (JSC::JSImmediate::makeBool): (JSC::JSImmediate::makeUndefined): (JSC::JSImmediate::makeNull): (JSC::JSImmediate::intValue): (JSC::JSImmediate::uintValue): (JSC::JSImmediate::boolValue): (JSC::JSImmediate::rawValue): (JSC::JSImmediate::trueImmediate): (JSC::JSImmediate::falseImmediate): (JSC::JSImmediate::undefinedImmediate): (JSC::JSImmediate::nullImmediate): (JSC::JSImmediate::zeroImmediate): (JSC::JSImmediate::oneImmediate): (JSC::JSImmediate::impossibleValue): (JSC::JSImmediate::toBoolean): (JSC::JSImmediate::getTruncatedUInt32): (JSC::JSImmediate::from): (JSC::JSImmediate::getTruncatedInt32): (JSC::JSImmediate::toDouble): (JSC::JSImmediate::getUInt32): (JSC::jsNull): (JSC::jsBoolean): (JSC::jsUndefined): (JSC::JSValue::isUndefined): (JSC::JSValue::isNull): (JSC::JSValue::isUndefinedOrNull): (JSC::JSValue::isBoolean): (JSC::JSValue::getBoolean): (JSC::JSValue::toInt32): (JSC::JSValue::toUInt32): (JSC::toInt32): (JSC::toUInt32):
  • runtime/JSNotAnObject.cpp: (JSC::JSNotAnObject::toPrimitive): (JSC::JSNotAnObject::getPrimitiveNumber): (JSC::JSNotAnObject::put):
  • runtime/JSNotAnObject.h: (JSC::JSNotAnObject::createStructure):
  • runtime/JSNumberCell.cpp: (JSC::JSNumberCell::toPrimitive): (JSC::JSNumberCell::getPrimitiveNumber): (JSC::JSNumberCell::getJSNumber): (JSC::jsNumberCell): (JSC::jsNaN):
  • runtime/JSNumberCell.h: (JSC::JSNumberCell::createStructure): (JSC::asNumberCell): (JSC::jsNumber): (JSC::JSValue::toJSNumber):
  • runtime/JSObject.cpp: (JSC::JSObject::mark): (JSC::JSObject::put): (JSC::JSObject::putWithAttributes): (JSC::callDefaultValueFunction): (JSC::JSObject::getPrimitiveNumber): (JSC::JSObject::defaultValue): (JSC::JSObject::defineGetter): (JSC::JSObject::defineSetter): (JSC::JSObject::lookupGetter): (JSC::JSObject::lookupSetter): (JSC::JSObject::hasInstance): (JSC::JSObject::toNumber): (JSC::JSObject::toString): (JSC::JSObject::fillGetterPropertySlot):
  • runtime/JSObject.h: (JSC::JSObject::getDirect): (JSC::JSObject::getDirectLocation): (JSC::JSObject::offsetForLocation): (JSC::JSObject::locationForOffset): (JSC::JSObject::getDirectOffset): (JSC::JSObject::putDirectOffset): (JSC::JSObject::createStructure): (JSC::asObject): (JSC::JSObject::prototype): (JSC::JSObject::setPrototype): (JSC::JSObject::inlineGetOwnPropertySlot): (JSC::JSObject::getOwnPropertySlotForWrite): (JSC::JSObject::getPropertySlot): (JSC::JSObject::get): (JSC::JSObject::putDirect): (JSC::JSObject::putDirectWithoutTransition): (JSC::JSObject::toPrimitive): (JSC::JSValue::get): (JSC::JSValue::put): (JSC::JSObject::allocatePropertyStorageInline):
  • runtime/JSPropertyNameIterator.cpp: (JSC::JSPropertyNameIterator::toPrimitive): (JSC::JSPropertyNameIterator::getPrimitiveNumber):
  • runtime/JSPropertyNameIterator.h: (JSC::JSPropertyNameIterator::create): (JSC::JSPropertyNameIterator::next):
  • runtime/JSStaticScopeObject.cpp: (JSC::JSStaticScopeObject::put): (JSC::JSStaticScopeObject::putWithAttributes):
  • runtime/JSStaticScopeObject.h: (JSC::JSStaticScopeObject::JSStaticScopeObject): (JSC::JSStaticScopeObject::createStructure):
  • runtime/JSString.cpp: (JSC::JSString::toPrimitive): (JSC::JSString::getPrimitiveNumber): (JSC::JSString::getOwnPropertySlot):
  • runtime/JSString.h: (JSC::JSString::createStructure): (JSC::asString):
  • runtime/JSValue.h: (JSC::JSValuePtr::makeImmediate): (JSC::JSValuePtr::immediateValue): (JSC::JSValuePtr::JSValuePtr): (JSC::JSValuePtr::operator->): (JSC::JSValuePtr::hasValue): (JSC::JSValuePtr::operator==): (JSC::JSValuePtr::operator!=): (JSC::JSValuePtr::encode): (JSC::JSValuePtr::decode): (JSC::JSValue::asValue): (JSC::noValue): (JSC::operator==): (JSC::operator!=):
  • runtime/JSVariableObject.h: (JSC::JSVariableObject::symbolTablePut): (JSC::JSVariableObject::symbolTablePutWithAttributes):
  • runtime/JSWrapperObject.cpp: (JSC::JSWrapperObject::mark):
  • runtime/JSWrapperObject.h: (JSC::JSWrapperObject::internalValue): (JSC::JSWrapperObject::setInternalValue):
  • runtime/Lookup.cpp: (JSC::setUpStaticFunctionSlot):
  • runtime/Lookup.h: (JSC::lookupPut):
  • runtime/MathObject.cpp: (JSC::mathProtoFuncAbs): (JSC::mathProtoFuncACos): (JSC::mathProtoFuncASin): (JSC::mathProtoFuncATan): (JSC::mathProtoFuncATan2): (JSC::mathProtoFuncCeil): (JSC::mathProtoFuncCos): (JSC::mathProtoFuncExp): (JSC::mathProtoFuncFloor): (JSC::mathProtoFuncLog): (JSC::mathProtoFuncMax): (JSC::mathProtoFuncMin): (JSC::mathProtoFuncPow): (JSC::mathProtoFuncRandom): (JSC::mathProtoFuncRound): (JSC::mathProtoFuncSin): (JSC::mathProtoFuncSqrt): (JSC::mathProtoFuncTan):
  • runtime/MathObject.h: (JSC::MathObject::createStructure):
  • runtime/NativeErrorConstructor.cpp: (JSC::callNativeErrorConstructor):
  • runtime/NumberConstructor.cpp: (JSC::numberConstructorNaNValue): (JSC::numberConstructorNegInfinity): (JSC::numberConstructorPosInfinity): (JSC::numberConstructorMaxValue): (JSC::numberConstructorMinValue): (JSC::callNumberConstructor):
  • runtime/NumberConstructor.h: (JSC::NumberConstructor::createStructure):
  • runtime/NumberObject.cpp: (JSC::NumberObject::getJSNumber): (JSC::constructNumberFromImmediateNumber):
  • runtime/NumberObject.h:
  • runtime/NumberPrototype.cpp: (JSC::numberProtoFuncToString): (JSC::numberProtoFuncToLocaleString): (JSC::numberProtoFuncValueOf): (JSC::numberProtoFuncToFixed): (JSC::numberProtoFuncToExponential): (JSC::numberProtoFuncToPrecision):
  • runtime/ObjectConstructor.cpp: (JSC::constructObject): (JSC::callObjectConstructor):
  • runtime/ObjectPrototype.cpp: (JSC::objectProtoFuncValueOf): (JSC::objectProtoFuncHasOwnProperty): (JSC::objectProtoFuncIsPrototypeOf): (JSC::objectProtoFuncDefineGetter): (JSC::objectProtoFuncDefineSetter): (JSC::objectProtoFuncLookupGetter): (JSC::objectProtoFuncLookupSetter): (JSC::objectProtoFuncPropertyIsEnumerable): (JSC::objectProtoFuncToLocaleString): (JSC::objectProtoFuncToString):
  • runtime/ObjectPrototype.h:
  • runtime/Operations.cpp: (JSC::equal): (JSC::equalSlowCase): (JSC::strictEqual): (JSC::strictEqualSlowCase): (JSC::throwOutOfMemoryError):
  • runtime/Operations.h: (JSC::equalSlowCaseInline): (JSC::strictEqualSlowCaseInline):
  • runtime/PropertySlot.cpp: (JSC::PropertySlot::functionGetter):
  • runtime/PropertySlot.h: (JSC::PropertySlot::PropertySlot): (JSC::PropertySlot::getValue): (JSC::PropertySlot::putValue): (JSC::PropertySlot::setValueSlot): (JSC::PropertySlot::setValue): (JSC::PropertySlot::setCustom): (JSC::PropertySlot::setCustomIndex): (JSC::PropertySlot::slotBase): (JSC::PropertySlot::setBase): (JSC::PropertySlot::):
  • runtime/Protect.h: (JSC::gcProtect): (JSC::gcUnprotect): (JSC::ProtectedPtr::ProtectedPtr): (JSC::ProtectedPtr::operator JSValuePtr): (JSC::ProtectedJSValuePtr::ProtectedJSValuePtr): (JSC::ProtectedJSValuePtr::get): (JSC::ProtectedJSValuePtr::operator JSValuePtr): (JSC::ProtectedJSValuePtr::operator->): (JSC::::ProtectedPtr): (JSC::::~ProtectedPtr): (JSC::::operator): (JSC::ProtectedJSValuePtr::~ProtectedJSValuePtr): (JSC::ProtectedJSValuePtr::operator=): (JSC::operator==): (JSC::operator!=):
  • runtime/RegExpConstructor.cpp: (JSC::RegExpConstructor::getBackref): (JSC::RegExpConstructor::getLastParen): (JSC::RegExpConstructor::getLeftContext): (JSC::RegExpConstructor::getRightContext): (JSC::regExpConstructorDollar1): (JSC::regExpConstructorDollar2): (JSC::regExpConstructorDollar3): (JSC::regExpConstructorDollar4): (JSC::regExpConstructorDollar5): (JSC::regExpConstructorDollar6): (JSC::regExpConstructorDollar7): (JSC::regExpConstructorDollar8): (JSC::regExpConstructorDollar9): (JSC::regExpConstructorInput): (JSC::regExpConstructorMultiline): (JSC::regExpConstructorLastMatch): (JSC::regExpConstructorLastParen): (JSC::regExpConstructorLeftContext): (JSC::regExpConstructorRightContext): (JSC::RegExpConstructor::put): (JSC::setRegExpConstructorInput): (JSC::setRegExpConstructorMultiline): (JSC::constructRegExp): (JSC::callRegExpConstructor):
  • runtime/RegExpConstructor.h: (JSC::RegExpConstructor::createStructure): (JSC::asRegExpConstructor):
  • runtime/RegExpMatchesArray.h: (JSC::RegExpMatchesArray::put):
  • runtime/RegExpObject.cpp: (JSC::regExpObjectGlobal): (JSC::regExpObjectIgnoreCase): (JSC::regExpObjectMultiline): (JSC::regExpObjectSource): (JSC::regExpObjectLastIndex): (JSC::RegExpObject::put): (JSC::setRegExpObjectLastIndex): (JSC::RegExpObject::test): (JSC::RegExpObject::exec): (JSC::callRegExpObject):
  • runtime/RegExpObject.h: (JSC::RegExpObject::createStructure): (JSC::asRegExpObject):
  • runtime/RegExpPrototype.cpp: (JSC::regExpProtoFuncTest): (JSC::regExpProtoFuncExec): (JSC::regExpProtoFuncCompile): (JSC::regExpProtoFuncToString):
  • runtime/StringConstructor.cpp: (JSC::stringFromCharCodeSlowCase): (JSC::stringFromCharCode): (JSC::callStringConstructor):
  • runtime/StringObject.cpp: (JSC::StringObject::put):
  • runtime/StringObject.h: (JSC::StringObject::createStructure): (JSC::asStringObject):
  • runtime/StringObjectThatMasqueradesAsUndefined.h: (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
  • runtime/StringPrototype.cpp: (JSC::stringProtoFuncReplace): (JSC::stringProtoFuncToString): (JSC::stringProtoFuncCharAt): (JSC::stringProtoFuncCharCodeAt): (JSC::stringProtoFuncConcat): (JSC::stringProtoFuncIndexOf): (JSC::stringProtoFuncLastIndexOf): (JSC::stringProtoFuncMatch): (JSC::stringProtoFuncSearch): (JSC::stringProtoFuncSlice): (JSC::stringProtoFuncSplit): (JSC::stringProtoFuncSubstr): (JSC::stringProtoFuncSubstring): (JSC::stringProtoFuncToLowerCase): (JSC::stringProtoFuncToUpperCase): (JSC::stringProtoFuncLocaleCompare): (JSC::stringProtoFuncBig): (JSC::stringProtoFuncSmall): (JSC::stringProtoFuncBlink): (JSC::stringProtoFuncBold): (JSC::stringProtoFuncFixed): (JSC::stringProtoFuncItalics): (JSC::stringProtoFuncStrike): (JSC::stringProtoFuncSub): (JSC::stringProtoFuncSup): (JSC::stringProtoFuncFontcolor): (JSC::stringProtoFuncFontsize): (JSC::stringProtoFuncAnchor): (JSC::stringProtoFuncLink):
  • runtime/Structure.cpp: (JSC::Structure::Structure): (JSC::Structure::changePrototypeTransition): (JSC::Structure::createCachedPrototypeChain):
  • runtime/Structure.h: (JSC::Structure::create): (JSC::Structure::setPrototypeWithoutTransition): (JSC::Structure::storedPrototype):

JavaScriptGlue:

2009-01-05 Gavin Barraclough <[email protected]>

Rubber Stamped by Oliver Hunt.

Replace all uses of JSValue* with new wrapper class, JSValuePtr.
See JavaScriptCore/ChangeLog for more detailed description.

  • JSObject.cpp: (nativeCallFunction):
  • JSUtils.cpp: (KJSValueToJSObject): (JSObjectKJSValue): (KJSValueToCFTypeInternal): (KJSValueToCFType):
  • JSUtils.h:
  • JSValueWrapper.cpp: (JSValueWrapper::JSValueWrapper): (JSValueWrapper::GetValue): (JSValueWrapper::JSObjectCopyProperty): (JSValueWrapper::JSObjectSetProperty): (JSValueWrapper::JSObjectCallFunction):
  • JSValueWrapper.h:
  • UserObjectImp.cpp: (UserObjectImp::callAsFunction): (UserObjectImp::userObjectGetter): (UserObjectImp::getOwnPropertySlot): (UserObjectImp::put): (UserObjectImp::toPrimitive):
  • UserObjectImp.h: (UserObjectImp::createStructure):

WebCore:

2009-01-05 Gavin Barraclough <[email protected]>

Rubber Stamped by Oliver Hunt.

Replace all uses of JSValue* with new wrapper class, JSValuePtr.
See JavaScriptCore/ChangeLog for more detailed description.

  • bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::setValue):
  • bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJS):
  • bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter): (WebCore::JSCSSStyleDeclaration::customPut):
  • bindings/js/JSCSSValueCustom.cpp: (WebCore::toJS):
  • bindings/js/JSCanvasPixelArrayCustom.h: (WebCore::JSCanvasPixelArray::getByIndex): (WebCore::JSCanvasPixelArray::indexSetter):
  • bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::toJS): (WebCore::toHTMLCanvasStyle): (WebCore::JSCanvasRenderingContext2D::strokeStyle): (WebCore::JSCanvasRenderingContext2D::setStrokeStyle): (WebCore::JSCanvasRenderingContext2D::fillStyle): (WebCore::JSCanvasRenderingContext2D::setFillStyle): (WebCore::JSCanvasRenderingContext2D::setFillColor): (WebCore::JSCanvasRenderingContext2D::setStrokeColor): (WebCore::JSCanvasRenderingContext2D::strokeRect): (WebCore::JSCanvasRenderingContext2D::drawImage): (WebCore::JSCanvasRenderingContext2D::drawImageFromRect): (WebCore::JSCanvasRenderingContext2D::setShadow): (WebCore::JSCanvasRenderingContext2D::createPattern): (WebCore::JSCanvasRenderingContext2D::putImageData): (WebCore::JSCanvasRenderingContext2D::fillText): (WebCore::JSCanvasRenderingContext2D::strokeText):
  • bindings/js/JSClipboardCustom.cpp: (WebCore::JSClipboard::types): (WebCore::JSClipboard::clearData): (WebCore::JSClipboard::getData): (WebCore::JSClipboard::setData): (WebCore::JSClipboard::setDragImage):
  • bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::profiles):
  • bindings/js/JSCustomPositionCallback.cpp: (WebCore::JSCustomPositionCallback::handleEvent):
  • bindings/js/JSCustomPositionErrorCallback.cpp: (WebCore::JSCustomPositionErrorCallback::handleEvent):
  • bindings/js/JSCustomSQLStatementCallback.cpp: (WebCore::JSCustomSQLStatementCallback::handleEvent):
  • bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
  • bindings/js/JSCustomSQLTransactionCallback.cpp: (WebCore::JSCustomSQLTransactionCallback::handleEvent):
  • bindings/js/JSCustomSQLTransactionErrorCallback.cpp: (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
  • bindings/js/JSCustomVoidCallback.cpp: (WebCore::JSCustomVoidCallback::handleEvent): (WebCore::toVoidCallback):
  • bindings/js/JSCustomVoidCallback.h:
  • bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::create): (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
  • bindings/js/JSCustomXPathNSResolver.h:
  • bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::add): (WebCore::JSDOMApplicationCache::remove): (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener):
  • bindings/js/JSDOMBinding.cpp: (WebCore::jsStringOrNull): (WebCore::jsOwnedStringOrNull): (WebCore::jsStringOrUndefined): (WebCore::jsStringOrFalse): (WebCore::valueToStringWithNullCheck): (WebCore::valueToStringWithUndefinedOrNullCheck): (WebCore::reportException): (WebCore::reportCurrentException): (WebCore::setDOMException): (WebCore::objectToStringFunctionGetter):
  • bindings/js/JSDOMBinding.h: (WebCore::getDOMObjectWrapper): (WebCore::getDOMNodeWrapper): (WebCore::toJS):
  • bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::findJSEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener): (WebCore::JSDOMGlobalObject::findJSUnprotectedEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSUnprotectedEventListener):
  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWindowBase.cpp: (WebCore::createWindow): (WebCore::showModalDialog): (jsDOMWindowBaseCrypto): (jsDOMWindowBaseEvent): (jsDOMWindowBaseImage): (jsDOMWindowBaseMessageChannel): (jsDOMWindowBaseOption): (jsDOMWindowBaseXMLHttpRequest): (jsDOMWindowBaseAudio): (jsDOMWindowBaseWorker): (jsDOMWindowBaseXSLTProcessor): (setJSDOMWindowBaseEvent): (setJSDOMWindowBaseAudio): (setJSDOMWindowBaseImage): (setJSDOMWindowBaseMessageChannel): (setJSDOMWindowBaseOption): (setJSDOMWindowBaseWorker): (setJSDOMWindowBaseXMLHttpRequest): (setJSDOMWindowBaseXSLTProcessor): (WebCore::JSDOMWindowBase::childFrameGetter): (WebCore::JSDOMWindowBase::indexGetter): (WebCore::JSDOMWindowBase::namedItemGetter): (WebCore::JSDOMWindowBase::getOwnPropertySlot): (WebCore::JSDOMWindowBase::put): (WebCore::JSDOMWindowBase::clear): (windowProtoFuncOpen): (windowProtoFuncShowModalDialog): (windowProtoFuncNotImplemented): (WebCore::JSDOMWindowBase::setReturnValueSlot): (WebCore::JSDOMWindowBase::installTimeout): (WebCore::toJS): (WebCore::toJSDOMWindow):
  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::lookupGetter): (WebCore::JSDOMWindow::lookupSetter): (WebCore::JSDOMWindow::setLocation): (WebCore::JSDOMWindow::postMessage): (WebCore::setTimeoutOrInterval): (WebCore::JSDOMWindow::setTimeout): (WebCore::JSDOMWindow::clearTimeout): (WebCore::JSDOMWindow::setInterval): (WebCore::JSDOMWindow::clearInterval): (WebCore::JSDOMWindow::atob): (WebCore::JSDOMWindow::btoa): (WebCore::JSDOMWindow::addEventListener): (WebCore::JSDOMWindow::removeEventListener): (WebCore::toDOMWindow): (WebCore::nonCachingStaticCloseFunctionGetter): (WebCore::nonCachingStaticBlurFunctionGetter): (WebCore::nonCachingStaticFocusFunctionGetter): (WebCore::nonCachingStaticPostMessageFunctionGetter):
  • bindings/js/JSDOMWindowCustom.h: (WebCore::JSDOMWindow::customPut):
  • bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::put): (WebCore::JSDOMWindowShell::putWithAttributes): (WebCore::JSDOMWindowShell::lookupGetter): (WebCore::JSDOMWindowShell::lookupSetter): (WebCore::toJS):
  • bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure):
  • bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::JSDatabase::transaction):
  • bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::location): (WebCore::JSDocument::setLocation): (WebCore::toJS):
  • bindings/js/JSElementCustom.cpp: (WebCore::JSElement::setAttribute): (WebCore::JSElement::setAttributeNode): (WebCore::JSElement::setAttributeNS): (WebCore::JSElement::setAttributeNodeNS): (WebCore::toJSNewlyCreated):
  • bindings/js/JSEventCustom.cpp: (WebCore::JSEvent::clipboardData): (WebCore::toJS):
  • bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent): (WebCore::eventParameterName): (WebCore::JSLazyEventListener::parseCode):
  • bindings/js/JSEventTarget.cpp: (WebCore::toJS):
  • bindings/js/JSEventTarget.h:
  • bindings/js/JSEventTargetBase.h:
  • bindings/js/JSEventTargetNodeCustom.cpp: (WebCore::JSEventTargetNode::addEventListener): (WebCore::JSEventTargetNode::removeEventListener):
  • bindings/js/JSGeolocationCustom.cpp: (WebCore::createPositionOptions): (WebCore::JSGeolocation::getCurrentPosition): (WebCore::JSGeolocation::watchPosition):
  • bindings/js/JSHTMLAllCollection.h: (WebCore::JSHTMLAllCollection::createStructure):
  • bindings/js/JSHTMLAppletElementCustom.cpp: (WebCore::JSHTMLAppletElement::customPut): (WebCore::JSHTMLAppletElement::nameGetter):
  • bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::getNamedItems): (WebCore::callHTMLCollection): (WebCore::JSHTMLCollection::nameGetter): (WebCore::JSHTMLCollection::item): (WebCore::JSHTMLCollection::namedItem): (WebCore::toJS):
  • bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): (WebCore::JSHTMLDocument::all): (WebCore::JSHTMLDocument::setAll): (WebCore::JSHTMLDocument::open): (WebCore::JSHTMLDocument::write): (WebCore::JSHTMLDocument::writeln):
  • bindings/js/JSHTMLEmbedElementCustom.cpp: (WebCore::JSHTMLEmbedElement::customPut): (WebCore::JSHTMLEmbedElement::nameGetter):
  • bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::nameGetter):
  • bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::JSHTMLFrameElement::setSrc): (WebCore::JSHTMLFrameElement::setLocation):
  • bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter):
  • bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc):
  • bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::JSHTMLInputElement::selectionStart): (WebCore::JSHTMLInputElement::selectionEnd):
  • bindings/js/JSHTMLObjectElementCustom.cpp: (WebCore::JSHTMLObjectElement::customPut): (WebCore::JSHTMLObjectElement::nameGetter):
  • bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::length): (WebCore::JSHTMLOptionsCollection::setLength): (WebCore::JSHTMLOptionsCollection::indexSetter): (WebCore::JSHTMLOptionsCollection::add): (WebCore::JSHTMLOptionsCollection::remove):
  • bindings/js/JSHTMLSelectElementCustom.cpp: (WebCore::JSHTMLSelectElement::remove): (WebCore::selectIndexSetter): (WebCore::JSHTMLSelectElement::indexSetter):
  • bindings/js/JSHTMLSelectElementCustom.h:
  • bindings/js/JSHistoryCustom.cpp: (WebCore::nonCachingStaticBackFunctionGetter): (WebCore::nonCachingStaticForwardFunctionGetter): (WebCore::nonCachingStaticGoFunctionGetter): (WebCore::JSHistory::customPut):
  • bindings/js/JSImageDataCustom.cpp: (WebCore::toJS):
  • bindings/js/JSInspectedObjectWrapper.cpp: (WebCore::JSInspectedObjectWrapper::wrap): (WebCore::JSInspectedObjectWrapper::prepareIncomingValue):
  • bindings/js/JSInspectedObjectWrapper.h: (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue):
  • bindings/js/JSInspectorCallbackWrapper.cpp: (WebCore::JSInspectorCallbackWrapper::wrap): (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue):
  • bindings/js/JSInspectorCallbackWrapper.h: (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue):
  • bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::evaluate): (WebCore::JSJavaScriptCallFrame::thisObject): (WebCore::JSJavaScriptCallFrame::type): (WebCore::JSJavaScriptCallFrame::scopeChain):
  • bindings/js/JSLocationCustom.cpp: (WebCore::nonCachingStaticReplaceFunctionGetter): (WebCore::nonCachingStaticReloadFunctionGetter): (WebCore::nonCachingStaticAssignFunctionGetter): (WebCore::JSLocation::customPut): (WebCore::JSLocation::setHref): (WebCore::JSLocation::setProtocol): (WebCore::JSLocation::setHost): (WebCore::JSLocation::setHostname): (WebCore::JSLocation::setPort): (WebCore::JSLocation::setPathname): (WebCore::JSLocation::setSearch): (WebCore::JSLocation::setHash): (WebCore::JSLocation::replace): (WebCore::JSLocation::reload): (WebCore::JSLocation::assign): (WebCore::JSLocation::toString):
  • bindings/js/JSMessageChannelConstructor.h:
  • bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::startConversation): (WebCore::JSMessagePort::addEventListener): (WebCore::JSMessagePort::removeEventListener):
  • bindings/js/JSMimeTypeArrayCustom.cpp: (WebCore::JSMimeTypeArray::nameGetter):
  • bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::nameGetter):
  • bindings/js/JSNamedNodesCollection.cpp: (WebCore::JSNamedNodesCollection::lengthGetter): (WebCore::JSNamedNodesCollection::indexGetter):
  • bindings/js/JSNamedNodesCollection.h: (WebCore::JSNamedNodesCollection::createStructure):
  • bindings/js/JSNavigatorCustom.cpp: (WebCore::needsYouTubeQuirk): (WebCore::JSNavigator::appVersion):
  • bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::insertBefore): (WebCore::JSNode::replaceChild): (WebCore::JSNode::removeChild): (WebCore::JSNode::appendChild): (WebCore::createWrapper): (WebCore::toJSNewlyCreated): (WebCore::toJS):
  • bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::JSNodeFilterCondition): (WebCore::JSNodeFilterCondition::acceptNode):
  • bindings/js/JSNodeFilterCondition.h: (WebCore::JSNodeFilterCondition::create):
  • bindings/js/JSNodeFilterCustom.cpp: (WebCore::JSNodeFilter::acceptNode): (WebCore::toNodeFilter):
  • bindings/js/JSNodeIteratorCustom.cpp: (WebCore::JSNodeIterator::nextNode): (WebCore::JSNodeIterator::previousNode):
  • bindings/js/JSNodeListCustom.cpp: (WebCore::callNodeList): (WebCore::JSNodeList::nameGetter):
  • bindings/js/JSPluginArrayCustom.cpp: (WebCore::JSPluginArray::nameGetter):
  • bindings/js/JSPluginCustom.cpp: (WebCore::JSPlugin::nameGetter):
  • bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectGetter): (WebCore::runtimeObjectPropertyGetter): (WebCore::runtimeObjectCustomPut): (WebCore::callPlugin):
  • bindings/js/JSPluginElementFunctions.h:
  • bindings/js/JSQuarantinedObjectWrapper.cpp: (WebCore::JSQuarantinedObjectWrapper::asWrapper): (WebCore::JSQuarantinedObjectWrapper::cachedValueGetter): (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot): (WebCore::JSQuarantinedObjectWrapper::put): (WebCore::JSQuarantinedObjectWrapper::construct): (WebCore::JSQuarantinedObjectWrapper::hasInstance): (WebCore::JSQuarantinedObjectWrapper::call):
  • bindings/js/JSQuarantinedObjectWrapper.h: (WebCore::JSQuarantinedObjectWrapper::createStructure):
  • bindings/js/JSRGBColor.cpp: (WebCore::getJSRGBColor): (jsRGBColorRed): (jsRGBColorGreen): (jsRGBColorBlue):
  • bindings/js/JSRGBColor.h: (WebCore::JSRGBColor::createStructure):
  • bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item):
  • bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql):
  • bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): (WebCore::JSSVGElementInstance::removeEventListener):
  • bindings/js/JSSVGLengthCustom.cpp: (WebCore::JSSVGLength::value): (WebCore::JSSVGLength::convertToSpecifiedUnits):
  • bindings/js/JSSVGMatrixCustom.cpp: (WebCore::JSSVGMatrix::multiply): (WebCore::JSSVGMatrix::inverse): (WebCore::JSSVGMatrix::translate): (WebCore::JSSVGMatrix::scale): (WebCore::JSSVGMatrix::scaleNonUniform): (WebCore::JSSVGMatrix::rotate): (WebCore::JSSVGMatrix::rotateFromVector): (WebCore::JSSVGMatrix::flipX): (WebCore::JSSVGMatrix::flipY): (WebCore::JSSVGMatrix::skewX): (WebCore::JSSVGMatrix::skewY):
  • bindings/js/JSSVGPathSegCustom.cpp: (WebCore::toJS):
  • bindings/js/JSSVGPathSegListCustom.cpp: (WebCore::JSSVGPathSegList::clear): (WebCore::JSSVGPathSegList::initialize): (WebCore::JSSVGPathSegList::getItem): (WebCore::JSSVGPathSegList::insertItemBefore): (WebCore::JSSVGPathSegList::replaceItem): (WebCore::JSSVGPathSegList::removeItem): (WebCore::JSSVGPathSegList::appendItem):
  • bindings/js/JSSVGPointListCustom.cpp: (WebCore::finishGetter): (WebCore::finishSetter): (WebCore::finishSetterReadOnlyResult): (WebCore::JSSVGPointList::clear): (WebCore::JSSVGPointList::initialize): (WebCore::JSSVGPointList::getItem): (WebCore::JSSVGPointList::insertItemBefore): (WebCore::JSSVGPointList::replaceItem): (WebCore::JSSVGPointList::removeItem): (WebCore::JSSVGPointList::appendItem):
  • bindings/js/JSSVGTransformListCustom.cpp: (WebCore::finishGetter): (WebCore::finishSetter): (WebCore::finishSetterReadOnlyResult): (WebCore::JSSVGTransformList::clear): (WebCore::JSSVGTransformList::initialize): (WebCore::JSSVGTransformList::getItem): (WebCore::JSSVGTransformList::insertItemBefore): (WebCore::JSSVGTransformList::replaceItem): (WebCore::JSSVGTransformList::removeItem): (WebCore::JSSVGTransformList::appendItem):
  • bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter): (WebCore::JSStorage::deleteProperty): (WebCore::JSStorage::customPut):
  • bindings/js/JSStyleSheetCustom.cpp: (WebCore::toJS):
  • bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::nameGetter):
  • bindings/js/JSTextCustom.cpp: (WebCore::toJSNewlyCreated):
  • bindings/js/JSTreeWalkerCustom.cpp: (WebCore::JSTreeWalker::parentNode): (WebCore::JSTreeWalker::firstChild): (WebCore::JSTreeWalker::lastChild): (WebCore::JSTreeWalker::nextSibling): (WebCore::JSTreeWalker::previousSibling): (WebCore::JSTreeWalker::previousNode): (WebCore::JSTreeWalker::nextNode):
  • bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::put):
  • bindings/js/JSWorkerContextBase.h:
  • bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::self): (WebCore::JSWorkerContext::setSelf): (WebCore::JSWorkerContext::addEventListener): (WebCore::JSWorkerContext::removeEventListener):
  • bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::addEventListener): (WebCore::JSWorker::removeEventListener):
  • bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::open): (WebCore::JSXMLHttpRequest::setRequestHeader): (WebCore::JSXMLHttpRequest::send): (WebCore::JSXMLHttpRequest::getResponseHeader): (WebCore::JSXMLHttpRequest::overrideMimeType): (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): (WebCore::JSXMLHttpRequest::responseText):
  • bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener):
  • bindings/js/JSXSLTProcessorCustom.cpp: (WebCore::JSXSLTProcessor::importStylesheet): (WebCore::JSXSLTProcessor::transformToFragment): (WebCore::JSXSLTProcessor::transformToDocument): (WebCore::JSXSLTProcessor::setParameter): (WebCore::JSXSLTProcessor::getParameter): (WebCore::JSXSLTProcessor::removeParameter):
  • bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::ScheduledAction): (WebCore::ScheduledAction::execute):
  • bindings/js/ScheduledAction.h:
  • bindings/js/ScriptCallStack.cpp: (WebCore::ScriptCallStack::ScriptCallStack): (WebCore::ScriptCallStack::initialize):
  • bindings/js/ScriptController.cpp: (WebCore::ScriptController::createScriptObjectForPluginElement):
  • bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::getString): (WebCore::ScriptValue::isNull): (WebCore::ScriptValue::isUndefined):
  • bindings/js/ScriptValue.h: (WebCore::ScriptValue::ScriptValue): (WebCore::ScriptValue::jsValue):
  • bindings/objc/WebScriptObject.mm: (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject evaluateWebScript:]): (-[WebScriptObject valueForKey:]): (-[WebScriptObject webScriptValueAtIndex:]): (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
  • bindings/objc/WebScriptObjectPrivate.h:
  • bindings/scripts/CodeGeneratorJS.pm:
  • bridge/NP_jsobject.cpp: (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Evaluate): (_NPN_GetProperty): (_NPN_HasMethod): (_NPN_Construct):
  • bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::invokeMethod): (JSC::Bindings::CInstance::invokeDefaultMethod): (JSC::Bindings::CInstance::invokeConstruct): (JSC::Bindings::CInstance::defaultValue): (JSC::Bindings::CInstance::stringValue): (JSC::Bindings::CInstance::numberValue): (JSC::Bindings::CInstance::booleanValue): (JSC::Bindings::CInstance::valueOf):
  • bridge/c/c_instance.h:
  • bridge/c/c_runtime.cpp: (JSC::Bindings::CField::valueFromInstance): (JSC::Bindings::CField::setValueToInstance):
  • bridge/c/c_runtime.h:
  • bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): (JSC::Bindings::convertNPVariantToValue):
  • bridge/c/c_utility.h:
  • bridge/jni/jni_instance.cpp: (JavaInstance::stringValue): (JavaInstance::numberValue): (JavaInstance::booleanValue): (JavaInstance::invokeMethod): (JavaInstance::defaultValue): (JavaInstance::valueOf):
  • bridge/jni/jni_instance.h:
  • bridge/jni/jni_jsobject.h:
  • bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::getSlot): (JavaJSObject::convertValueToJObject): (JavaJSObject::convertJObjectToValue):
  • bridge/jni/jni_objc.mm: (JSC::Bindings::dispatchJNICall):
  • bridge/jni/jni_runtime.cpp: (JavaArray::convertJObjectToArray): (JavaField::dispatchValueFromInstance): (JavaField::valueFromInstance): (JavaField::dispatchSetValueToInstance): (JavaField::setValueToInstance): (JavaArray::setValueAt): (JavaArray::valueAt):
  • bridge/jni/jni_runtime.h:
  • bridge/jni/jni_utility.cpp: (JSC::Bindings::convertArrayInstanceToJavaArray): (JSC::Bindings::convertValueToJValue):
  • bridge/jni/jni_utility.h:
  • bridge/objc/WebScriptObject.h:
  • bridge/objc/objc_class.h:
  • bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::fallbackObject):
  • bridge/objc/objc_instance.h:
  • bridge/objc/objc_instance.mm: (ObjcInstance::invokeMethod): (ObjcInstance::invokeDefaultMethod): (ObjcInstance::setValueOfUndefinedField): (ObjcInstance::getValueOfUndefinedField): (ObjcInstance::defaultValue): (ObjcInstance::stringValue): (ObjcInstance::numberValue): (ObjcInstance::booleanValue): (ObjcInstance::valueOf):
  • bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
  • bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcField::valueFromInstance): (JSC::Bindings::convertValueToObjcObject): (JSC::Bindings::ObjcField::setValueToInstance): (JSC::Bindings::ObjcArray::setValueAt): (JSC::Bindings::ObjcArray::valueAt): (JSC::Bindings::ObjcFallbackObjectImp::put): (JSC::Bindings::callObjCFallbackObject): (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
  • bridge/objc/objc_utility.h:
  • bridge/objc/objc_utility.mm: (JSC::Bindings::convertValueToObjcValue): (JSC::Bindings::convertNSStringToString): (JSC::Bindings::convertObjcValueToValue):
  • bridge/runtime.cpp: (JSC::Bindings::Instance::getValueOfField): (JSC::Bindings::Instance::setValueOfField):
  • bridge/runtime.h: (JSC::Bindings::Class::fallbackObject): (JSC::Bindings::Instance::getValueOfUndefinedField): (JSC::Bindings::Instance::setValueOfUndefinedField): (JSC::Bindings::Instance::invokeDefaultMethod): (JSC::Bindings::Instance::invokeConstruct): (JSC::Bindings::Instance::valueOf):
  • bridge/runtime_array.cpp: (JSC::RuntimeArray::lengthGetter): (JSC::RuntimeArray::indexGetter): (JSC::RuntimeArray::put):
  • bridge/runtime_array.h: (JSC::RuntimeArray::createStructure):
  • bridge/runtime_method.cpp: (JSC::RuntimeMethod::lengthGetter): (JSC::callRuntimeMethod):
  • bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure):
  • bridge/runtime_object.cpp: (JSC::RuntimeObjectImp::fallbackObjectGetter): (JSC::RuntimeObjectImp::fieldGetter): (JSC::RuntimeObjectImp::methodGetter): (JSC::RuntimeObjectImp::put): (JSC::RuntimeObjectImp::defaultValue): (JSC::callRuntimeObject): (JSC::callRuntimeConstructor):
  • bridge/runtime_object.h: (JSC::RuntimeObjectImp::createStructure):
  • inspector/InspectorController.cpp:
  • inspector/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::evaluate):
  • inspector/JavaScriptCallFrame.h:
  • inspector/JavaScriptProfile.cpp: (WebCore::toJS):
  • inspector/JavaScriptProfile.h:
  • inspector/JavaScriptProfileNode.cpp: (WebCore::toJS):
  • inspector/JavaScriptProfileNode.h:
  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dropProtection):

WebKit/mac:

2009-01-05 Gavin Barraclough <[email protected]>

Rubber Stamped by Oliver Hunt.

Replace all uses of JSValue* with new wrapper class, JSValuePtr.
See JavaScriptCore/ChangeLog for more detailed description.

  • WebView/WebFrame.mm: (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame _convertValueToObjcValue:]): (-[WebScriptCallFrame exception]): (-[WebScriptCallFrame evaluateWebScript:]):
  • WebView/WebView.mm: (aeDescFromJSValue): (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r39660 r39670  
    109109// FIXME: This operation should be called "getNumber", not "isNumber" (as it is in JSValue.h).
    110110// FIXME: There's no need to have a "slow" version of this. All versions should be fast.
    111 static ALWAYS_INLINE bool fastIsNumber(JSValue* value, double& arg)
     111static ALWAYS_INLINE bool fastIsNumber(JSValuePtr value, double& arg)
    112112{
    113113    if (JSImmediate::isNumber(value))
     
    120120}
    121121
    122 // FIXME: Why doesn't JSValue*::toInt32 have the Heap::isNumber optimization?
    123 static bool fastToInt32(JSValue* value, int32_t& arg)
     122// FIXME: Why doesn't JSValuePtr::toInt32 have the Heap::isNumber optimization?
     123static bool fastToInt32(JSValuePtr value, int32_t& arg)
    124124{
    125125    if (JSImmediate::isNumber(value))
     
    132132}
    133133
    134 static ALWAYS_INLINE bool fastToUInt32(JSValue* value, uint32_t& arg)
     134static ALWAYS_INLINE bool fastToUInt32(JSValuePtr value, uint32_t& arg)
    135135{
    136136    if (JSImmediate::isNumber(value)) {
     
    147147}
    148148
    149 static inline bool jsLess(CallFrame* callFrame, JSValue* v1, JSValue* v2)
     149static inline bool jsLess(CallFrame* callFrame, JSValuePtr v1, JSValuePtr v2)
    150150{
    151151    if (JSImmediate::areBothImmediateNumbers(v1, v2))
     
    161161        return asString(v1)->value() < asString(v2)->value();
    162162
    163     JSValue* p1;
    164     JSValue* p2;
     163    JSValuePtr p1;
     164    JSValuePtr p2;
    165165    bool wasNotString1 = v1->getPrimitiveNumber(callFrame, n1, p1);
    166166    bool wasNotString2 = v2->getPrimitiveNumber(callFrame, n2, p2);
     
    172172}
    173173
    174 static inline bool jsLessEq(CallFrame* callFrame, JSValue* v1, JSValue* v2)
     174static inline bool jsLessEq(CallFrame* callFrame, JSValuePtr v1, JSValuePtr v2)
    175175{
    176176    if (JSImmediate::areBothImmediateNumbers(v1, v2))
     
    186186        return !(asString(v2)->value() < asString(v1)->value());
    187187
    188     JSValue* p1;
    189     JSValue* p2;
     188    JSValuePtr p1;
     189    JSValuePtr p2;
    190190    bool wasNotString1 = v1->getPrimitiveNumber(callFrame, n1, p1);
    191191    bool wasNotString2 = v2->getPrimitiveNumber(callFrame, n2, p2);
     
    197197}
    198198
    199 static NEVER_INLINE JSValue* jsAddSlowCase(CallFrame* callFrame, JSValue* v1, JSValue* v2)
     199static NEVER_INLINE JSValuePtr jsAddSlowCase(CallFrame* callFrame, JSValuePtr v1, JSValuePtr v2)
    200200{
    201201    // exception for the Date exception in defaultValue()
    202     JSValue* p1 = v1->toPrimitive(callFrame);
    203     JSValue* p2 = v2->toPrimitive(callFrame);
     202    JSValuePtr p1 = v1->toPrimitive(callFrame);
     203    JSValuePtr p2 = v2->toPrimitive(callFrame);
    204204
    205205    if (p1->isString() || p2->isString()) {
     
    222222//    4000    Add case: 3 5
    223223
    224 static ALWAYS_INLINE JSValue* jsAdd(CallFrame* callFrame, JSValue* v1, JSValue* v2)
     224static ALWAYS_INLINE JSValuePtr jsAdd(CallFrame* callFrame, JSValuePtr v1, JSValuePtr v2)
    225225{
    226226    double left;
     
    253253}
    254254
    255 static JSValue* jsTypeStringForValue(CallFrame* callFrame, JSValue* v)
     255static JSValuePtr jsTypeStringForValue(CallFrame* callFrame, JSValuePtr v)
    256256{
    257257    if (v->isUndefined())
     
    275275}
    276276
    277 static bool jsIsObjectType(JSValue* v)
     277static bool jsIsObjectType(JSValuePtr v)
    278278{
    279279    if (JSImmediate::isImmediate(v))
     
    293293}
    294294
    295 static bool jsIsFunctionType(JSValue* v)
     295static bool jsIsFunctionType(JSValuePtr v)
    296296{
    297297    if (v->isObject()) {
     
    303303}
    304304
    305 NEVER_INLINE bool Interpreter::resolve(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     305NEVER_INLINE bool Interpreter::resolve(CallFrame* callFrame, Instruction* vPC, JSValuePtr& exceptionValue)
    306306{
    307307    int dst = (vPC + 1)->u.operand;
     
    319319        PropertySlot slot(o);
    320320        if (o->getPropertySlot(callFrame, ident, slot)) {
    321             JSValue* result = slot.getValue(callFrame, ident);
     321            JSValuePtr result = slot.getValue(callFrame, ident);
    322322            exceptionValue = callFrame->globalData().exception;
    323323            if (exceptionValue)
    324324                return false;
    325             callFrame[dst] = result;
     325            callFrame[dst] = JSValuePtr(result);
    326326            return true;
    327327        }
     
    331331}
    332332
    333 NEVER_INLINE bool Interpreter::resolveSkip(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     333NEVER_INLINE bool Interpreter::resolveSkip(CallFrame* callFrame, Instruction* vPC, JSValuePtr& exceptionValue)
    334334{
    335335    CodeBlock* codeBlock = callFrame->codeBlock();
     
    352352        PropertySlot slot(o);
    353353        if (o->getPropertySlot(callFrame, ident, slot)) {
    354             JSValue* result = slot.getValue(callFrame, ident);
     354            JSValuePtr result = slot.getValue(callFrame, ident);
    355355            exceptionValue = callFrame->globalData().exception;
    356356            if (exceptionValue)
    357357                return false;
    358             callFrame[dst] = result;
     358            callFrame[dst] = JSValuePtr(result);
    359359            return true;
    360360        }
     
    364364}
    365365
    366 NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     366NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction* vPC, JSValuePtr& exceptionValue)
    367367{
    368368    int dst = (vPC + 1)->u.operand;
     
    374374
    375375    if (structure == globalObject->structure()) {
    376         callFrame[dst] = globalObject->getDirectOffset(offset);
     376        callFrame[dst] = JSValuePtr(globalObject->getDirectOffset(offset));
    377377        return true;
    378378    }
     
    382382    PropertySlot slot(globalObject);
    383383    if (globalObject->getPropertySlot(callFrame, ident, slot)) {
    384         JSValue* result = slot.getValue(callFrame, ident);
     384        JSValuePtr result = slot.getValue(callFrame, ident);
    385385        if (slot.isCacheable() && !globalObject->structure()->isDictionary()) {
    386386            if (vPC[4].u.structure)
     
    389389            vPC[4] = globalObject->structure();
    390390            vPC[5] = slot.cachedOffset();
    391             callFrame[dst] = result;
     391            callFrame[dst] = JSValuePtr(result);
    392392            return true;
    393393        }
     
    396396        if (exceptionValue)
    397397            return false;
    398         callFrame[dst] = result;
     398        callFrame[dst] = JSValuePtr(result);
    399399        return true;
    400400    }
     
    404404}
    405405
    406 static ALWAYS_INLINE JSValue* inlineResolveBase(CallFrame* callFrame, Identifier& property, ScopeChainNode* scopeChain)
     406static ALWAYS_INLINE JSValuePtr inlineResolveBase(CallFrame* callFrame, Identifier& property, ScopeChainNode* scopeChain)
    407407{
    408408    ScopeChainIterator iter = scopeChain->begin();
     
    431431    int dst = (vPC + 1)->u.operand;
    432432    int property = (vPC + 2)->u.operand;
    433     callFrame[dst] = inlineResolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain());
    434 }
    435 
    436 NEVER_INLINE bool Interpreter::resolveBaseAndProperty(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     433    callFrame[dst] = JSValuePtr(inlineResolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain()));
     434}
     435
     436NEVER_INLINE bool Interpreter::resolveBaseAndProperty(CallFrame* callFrame, Instruction* vPC, JSValuePtr& exceptionValue)
    437437{
    438438    int baseDst = (vPC + 1)->u.operand;
     
    455455        PropertySlot slot(base);
    456456        if (base->getPropertySlot(callFrame, ident, slot)) {
    457             JSValue* result = slot.getValue(callFrame, ident);
     457            JSValuePtr result = slot.getValue(callFrame, ident);
    458458            exceptionValue = callFrame->globalData().exception;
    459459            if (exceptionValue)
    460460                return false;
    461             callFrame[propDst] = result;
    462             callFrame[baseDst] = base;
     461            callFrame[propDst] = JSValuePtr(result);
     462            callFrame[baseDst] = JSValuePtr(base);
    463463            return true;
    464464        }
     
    470470}
    471471
    472 NEVER_INLINE bool Interpreter::resolveBaseAndFunc(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     472NEVER_INLINE bool Interpreter::resolveBaseAndFunc(CallFrame* callFrame, Instruction* vPC, JSValuePtr& exceptionValue)
    473473{
    474474    int baseDst = (vPC + 1)->u.operand;
     
    499499            // We also handle wrapper substitution for the global object at the same time.
    500500            JSObject* thisObj = base->toThisObject(callFrame);
    501             JSValue* result = slot.getValue(callFrame, ident);
     501            JSValuePtr result = slot.getValue(callFrame, ident);
    502502            exceptionValue = callFrame->globalData().exception;
    503503            if (exceptionValue)
    504504                return false;
    505505
    506             callFrame[baseDst] = thisObj;
    507             callFrame[funcDst] = result;
     506            callFrame[baseDst] = JSValuePtr(thisObj);
     507            callFrame[funcDst] = JSValuePtr(result);
    508508            return true;
    509509        }
     
    552552}
    553553
    554 static NEVER_INLINE bool isNotObject(CallFrame* callFrame, bool forInstanceOf, CodeBlock* codeBlock, const Instruction* vPC, JSValue* value, JSValue*& exceptionData)
     554static NEVER_INLINE bool isNotObject(CallFrame* callFrame, bool forInstanceOf, CodeBlock* codeBlock, const Instruction* vPC, JSValuePtr value, JSValuePtr& exceptionData)
    555555{
    556556    if (value->isObject())
     
    560560}
    561561
    562 NEVER_INLINE JSValue* Interpreter::callEval(CallFrame* callFrame, RegisterFile* registerFile, Register* argv, int argc, int registerOffset, JSValue*& exceptionValue)
     562NEVER_INLINE JSValuePtr Interpreter::callEval(CallFrame* callFrame, RegisterFile* registerFile, Register* argv, int argc, int registerOffset, JSValuePtr& exceptionValue)
    563563{
    564564    if (argc < 2)
    565565        return jsUndefined();
    566566
    567     JSValue* program = argv[1].jsValue(callFrame);
     567    JSValuePtr program = argv[1].jsValue(callFrame);
    568568
    569569    if (!program->isString())
     
    576576    RefPtr<EvalNode> evalNode = codeBlock->evalCodeCache().get(callFrame, programSource, scopeChain, exceptionValue);
    577577
    578     JSValue* result = jsUndefined();
     578    JSValuePtr result = jsUndefined();
    579579    if (evalNode)
    580580        result = callFrame->globalData().interpreter->execute(evalNode.get(), callFrame, callFrame->thisValue()->toThisObject(callFrame), callFrame->registers() - registerFile->start() + registerOffset, scopeChain, &exceptionValue);
     
    734734}
    735735
    736 NEVER_INLINE bool Interpreter::unwindCallFrame(CallFrame*& callFrame, JSValue* exceptionValue, unsigned& bytecodeOffset, CodeBlock*& codeBlock)
     736NEVER_INLINE bool Interpreter::unwindCallFrame(CallFrame*& callFrame, JSValuePtr exceptionValue, unsigned& bytecodeOffset, CodeBlock*& codeBlock)
    737737{
    738738    CodeBlock* oldCodeBlock = codeBlock;
     
    777777}
    778778
    779 NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSValue*& exceptionValue, unsigned bytecodeOffset, bool explicitThrow)
     779NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSValuePtr& exceptionValue, unsigned bytecodeOffset, bool explicitThrow)
    780780{
    781781    // Set up the exception object
     
    862862}
    863863
    864 JSValue* Interpreter::execute(ProgramNode* programNode, CallFrame* callFrame, ScopeChainNode* scopeChain, JSObject* thisObj, JSValue** exception)
     864JSValuePtr Interpreter::execute(ProgramNode* programNode, CallFrame* callFrame, ScopeChainNode* scopeChain, JSObject* thisObj, JSValuePtr* exception)
    865865{
    866866    ASSERT(!scopeChain->globalData->exception);
     
    887887
    888888    CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize);
    889     newCallFrame[codeBlock->thisRegister()] = thisObj;
     889    newCallFrame[codeBlock->thisRegister()] = JSValuePtr(thisObj);
    890890    newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), 0, 0, 0);
    891891
     
    897897        (*profiler)->willExecute(newCallFrame, programNode->sourceURL(), programNode->lineNo());
    898898
    899     JSValue* result;
     899    JSValuePtr result;
    900900    {
    901901        SamplingTool::CallRecord callRecord(m_sampler);
     
    923923}
    924924
    925 JSValue* Interpreter::execute(FunctionBodyNode* functionBodyNode, CallFrame* callFrame, JSFunction* function, JSObject* thisObj, const ArgList& args, ScopeChainNode* scopeChain, JSValue** exception)
     925JSValuePtr Interpreter::execute(FunctionBodyNode* functionBodyNode, CallFrame* callFrame, JSFunction* function, JSObject* thisObj, const ArgList& args, ScopeChainNode* scopeChain, JSValuePtr* exception)
    926926{
    927927    ASSERT(!scopeChain->globalData->exception);
     
    944944    CallFrame* newCallFrame = CallFrame::create(oldEnd);
    945945    size_t dst = 0;
    946     newCallFrame[0] = thisObj;
     946    newCallFrame[0] = JSValuePtr(thisObj);
    947947    ArgList::const_iterator end = args.end();
    948948    for (ArgList::const_iterator it = args.begin(); it != end; ++it)
     
    963963        (*profiler)->willExecute(newCallFrame, function);
    964964
    965     JSValue* result;
     965    JSValuePtr result;
    966966    {
    967967        SamplingTool::CallRecord callRecord(m_sampler);
     
    985985}
    986986
    987 JSValue* Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue** exception)
     987JSValuePtr Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, ScopeChainNode* scopeChain, JSValuePtr* exception)
    988988{
    989989    return execute(evalNode, callFrame, thisObj, m_registerFile.size() + evalNode->bytecode(scopeChain).m_numParameters + RegisterFile::CallFrameHeaderSize, scopeChain, exception);
    990990}
    991991
    992 JSValue* Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, int globalRegisterOffset, ScopeChainNode* scopeChain, JSValue** exception)
     992JSValuePtr Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, int globalRegisterOffset, ScopeChainNode* scopeChain, JSValuePtr* exception)
    993993{
    994994    ASSERT(!scopeChain->globalData->exception);
     
    10451045
    10461046    // a 0 codeBlock indicates a built-in caller
    1047     newCallFrame[codeBlock->thisRegister()] = thisObj;
     1047    newCallFrame[codeBlock->thisRegister()] = JSValuePtr(thisObj);
    10481048    newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), 0, 0, 0);
    10491049
     
    10551055        (*profiler)->willExecute(newCallFrame, evalNode->sourceURL(), evalNode->lineNo());
    10561056
    1057     JSValue* result;
     1057    JSValuePtr result;
    10581058    {
    10591059        SamplingTool::CallRecord callRecord(m_sampler);
     
    11561156// We have to return a JSValue here, gcc seems to produce worse code if
    11571157// we attempt to return a bool
    1158 ALWAYS_INLINE JSValue* Interpreter::checkTimeout(JSGlobalObject* globalObject)
     1158ALWAYS_INLINE bool Interpreter::checkTimeout(JSGlobalObject* globalObject)
    11591159{
    11601160    unsigned currentTime = getCPUTime();
     
    11631163        // Suspicious amount of looping in a script -- start timing it
    11641164        m_timeAtLastCheckTimeout = currentTime;
    1165         return noValue();
     1165        return false;
    11661166    }
    11671167   
     
    11841184    if (m_timeoutTime && m_timeExecuting > m_timeoutTime) {
    11851185        if (globalObject->shouldInterruptScript())
    1186             return jsNull(); // Appeasing GCC, all we need is a non-null js value.
     1186            return true;
    11871187       
    11881188        resetTimeoutCheck();
    11891189    }
    11901190   
    1191     return noValue();
     1191    return false;
    11921192}
    11931193
     
    11971197    CodeBlock* codeBlock = callFrame->codeBlock();
    11981198    Identifier& property = codeBlock->identifier((++vPC)->u.operand);
    1199     JSValue* value = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1199    JSValuePtr value = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    12001200    JSObject* scope = new (callFrame) JSStaticScopeObject(callFrame, property, value, DontDelete);
    1201     callFrame[dst] = scope;
     1201    callFrame[dst] = JSValuePtr(scope);
    12021202
    12031203    return callFrame->scopeChain()->push(scope);
     
    12061206static StructureChain* cachePrototypeChain(CallFrame* callFrame, Structure* structure)
    12071207{
    1208     JSValue* prototype = structure->prototypeForLookup(callFrame);
     1208    JSValuePtr prototype = structure->prototypeForLookup(callFrame);
    12091209    if (JSImmediate::isImmediate(prototype))
    12101210        return 0;
     
    12141214}
    12151215
    1216 NEVER_INLINE void Interpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue* baseValue, const PutPropertySlot& slot)
     1216NEVER_INLINE void Interpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValuePtr baseValue, const PutPropertySlot& slot)
    12171217{
    12181218    // Recursive invocation may already have specialized this instruction.
     
    12911291}
    12921292
    1293 static size_t countPrototypeChainEntriesAndCheckForProxies(CallFrame* callFrame, JSValue* baseValue, const PropertySlot& slot)
     1293static size_t countPrototypeChainEntriesAndCheckForProxies(CallFrame* callFrame, JSValuePtr baseValue, const PropertySlot& slot)
    12941294{
    12951295    JSCell* cell = asCell(baseValue);
     
    12971297
    12981298    while (slot.slotBase() != cell) {
    1299         JSValue* v = cell->structure()->prototypeForLookup(callFrame);
     1299        JSValuePtr v = cell->structure()->prototypeForLookup(callFrame);
    13001300
    13011301        // If we didn't find slotBase in baseValue's prototype chain, then baseValue
     
    13221322}
    13231323
    1324 NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue* baseValue, const Identifier& propertyName, const PropertySlot& slot)
     1324NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValuePtr baseValue, const Identifier& propertyName, const PropertySlot& slot)
    13251325{
    13261326    // Recursive invocation may already have specialized this instruction.
     
    14281428}
    14291429
    1430 JSValue* Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFile, CallFrame* callFrame, JSValue** exception)
     1430JSValuePtr Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFile, CallFrame* callFrame, JSValuePtr* exception)
    14311431{
    14321432    // One-time initialization of our address tables. We have to put this code
     
    14521452
    14531453    JSGlobalData* globalData = &callFrame->globalData();
    1454     JSValue* exceptionValue = noValue();
     1454    JSValuePtr exceptionValue = noValue();
    14551455    HandlerInfo* handler = 0;
    14561456
     
    14731473#define CHECK_FOR_TIMEOUT() \
    14741474    if (!--tickCount) { \
    1475         if ((exceptionValue = checkTimeout(callFrame->dynamicGlobalObject()))) \
     1475        if (checkTimeout(callFrame->dynamicGlobalObject())) { \
     1476            exceptionValue = jsNull(); \
    14761477            goto vm_throw; \
     1478        } \
    14771479        tickCount = m_ticksUntilNextTimeoutCheck; \
    14781480    }
     
    15131515        */
    15141516        int dst = (++vPC)->u.operand;
    1515         callFrame[dst] = constructEmptyObject(callFrame);
     1517        callFrame[dst] = JSValuePtr(constructEmptyObject(callFrame));
    15161518
    15171519        ++vPC;
     
    15301532        int argCount = (++vPC)->u.operand;
    15311533        ArgList args(callFrame->registers() + firstArg, argCount);
    1532         callFrame[dst] = constructArray(callFrame, args);
     1534        callFrame[dst] = JSValuePtr(constructArray(callFrame, args));
    15331535
    15341536        ++vPC;
     
    15441546        int dst = (++vPC)->u.operand;
    15451547        int regExp = (++vPC)->u.operand;
    1546         callFrame[dst] = new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp));
     1548        callFrame[dst] = JSValuePtr(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp)));
    15471549
    15481550        ++vPC;
     
    15691571        */
    15701572        int dst = (++vPC)->u.operand;
    1571         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1572         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1573        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1574        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    15731575        if (JSImmediate::areBothImmediateNumbers(src1, src2))
    15741576            callFrame[dst] = jsBoolean(src1 == src2);
    15751577        else {
    1576             JSValue* result = jsBoolean(equalSlowCase(callFrame, src1, src2));
     1578            JSValuePtr result = jsBoolean(equalSlowCase(callFrame, src1, src2));
    15771579            CHECK_FOR_EXCEPTION();
    15781580            callFrame[dst] = result;
     
    15891591        */
    15901592        int dst = (++vPC)->u.operand;
    1591         JSValue* src = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1593        JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    15921594
    15931595        if (src->isUndefinedOrNull()) {
     
    16091611        */
    16101612        int dst = (++vPC)->u.operand;
    1611         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1612         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1613        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1614        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    16131615        if (JSImmediate::areBothImmediateNumbers(src1, src2))
    16141616            callFrame[dst] = jsBoolean(src1 != src2);
    16151617        else {
    1616             JSValue* result = jsBoolean(!equalSlowCase(callFrame, src1, src2));
     1618            JSValuePtr result = jsBoolean(!equalSlowCase(callFrame, src1, src2));
    16171619            CHECK_FOR_EXCEPTION();
    16181620            callFrame[dst] = result;
     
    16291631        */
    16301632        int dst = (++vPC)->u.operand;
    1631         JSValue* src = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1633        JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    16321634
    16331635        if (src->isUndefinedOrNull()) {
     
    16491651        */
    16501652        int dst = (++vPC)->u.operand;
    1651         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1652         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1653        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1654        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    16531655        if (JSImmediate::areBothImmediate(src1, src2))
    16541656            callFrame[dst] = jsBoolean(src1 == src2);
     
    16691671        */
    16701672        int dst = (++vPC)->u.operand;
    1671         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1672         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1673        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1674        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    16731675
    16741676        if (JSImmediate::areBothImmediate(src1, src2))
     
    16901692        */
    16911693        int dst = (++vPC)->u.operand;
    1692         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1693         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1694         JSValue* result = jsBoolean(jsLess(callFrame, src1, src2));
     1694        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1695        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1696        JSValuePtr result = jsBoolean(jsLess(callFrame, src1, src2));
    16951697        CHECK_FOR_EXCEPTION();
    16961698        callFrame[dst] = result;
     
    17071709        */
    17081710        int dst = (++vPC)->u.operand;
    1709         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1710         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1711         JSValue* result = jsBoolean(jsLessEq(callFrame, src1, src2));
     1711        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1712        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1713        JSValuePtr result = jsBoolean(jsLessEq(callFrame, src1, src2));
    17121714        CHECK_FOR_EXCEPTION();
    17131715        callFrame[dst] = result;
     
    17231725        */
    17241726        int srcDst = (++vPC)->u.operand;
    1725         JSValue* v = callFrame[srcDst].jsValue(callFrame);
     1727        JSValuePtr v = callFrame[srcDst].jsValue(callFrame);
    17261728        if (JSImmediate::canDoFastAdditiveOperations(v))
    1727             callFrame[srcDst] = JSImmediate::incImmediateNumber(v);
     1729            callFrame[srcDst] = JSValuePtr(JSImmediate::incImmediateNumber(v));
    17281730        else {
    1729             JSValue* result = jsNumber(callFrame, v->toNumber(callFrame) + 1);
     1731            JSValuePtr result = jsNumber(callFrame, v->toNumber(callFrame) + 1);
    17301732            CHECK_FOR_EXCEPTION();
    17311733            callFrame[srcDst] = result;
     
    17421744        */
    17431745        int srcDst = (++vPC)->u.operand;
    1744         JSValue* v = callFrame[srcDst].jsValue(callFrame);
     1746        JSValuePtr v = callFrame[srcDst].jsValue(callFrame);
    17451747        if (JSImmediate::canDoFastAdditiveOperations(v))
    1746             callFrame[srcDst] = JSImmediate::decImmediateNumber(v);
     1748            callFrame[srcDst] = JSValuePtr(JSImmediate::decImmediateNumber(v));
    17471749        else {
    1748             JSValue* result = jsNumber(callFrame, v->toNumber(callFrame) - 1);
     1750            JSValuePtr result = jsNumber(callFrame, v->toNumber(callFrame) - 1);
    17491751            CHECK_FOR_EXCEPTION();
    17501752            callFrame[srcDst] = result;
     
    17631765        int dst = (++vPC)->u.operand;
    17641766        int srcDst = (++vPC)->u.operand;
    1765         JSValue* v = callFrame[srcDst].jsValue(callFrame);
     1767        JSValuePtr v = callFrame[srcDst].jsValue(callFrame);
    17661768        if (JSImmediate::canDoFastAdditiveOperations(v)) {
    17671769            callFrame[dst] = v;
    1768             callFrame[srcDst] = JSImmediate::incImmediateNumber(v);
     1770            callFrame[srcDst] = JSValuePtr(JSImmediate::incImmediateNumber(v));
    17691771        } else {
    1770             JSValue* number = callFrame[srcDst].jsValue(callFrame)->toJSNumber(callFrame);
     1772            JSValuePtr number = callFrame[srcDst].jsValue(callFrame)->toJSNumber(callFrame);
    17711773            CHECK_FOR_EXCEPTION();
    17721774            callFrame[dst] = number;
    1773             callFrame[srcDst] = jsNumber(callFrame, number->uncheckedGetNumber() + 1);
     1775            callFrame[srcDst] = JSValuePtr(jsNumber(callFrame, number->uncheckedGetNumber() + 1));
    17741776        }
    17751777
     
    17861788        int dst = (++vPC)->u.operand;
    17871789        int srcDst = (++vPC)->u.operand;
    1788         JSValue* v = callFrame[srcDst].jsValue(callFrame);
     1790        JSValuePtr v = callFrame[srcDst].jsValue(callFrame);
    17891791        if (JSImmediate::canDoFastAdditiveOperations(v)) {
    17901792            callFrame[dst] = v;
    1791             callFrame[srcDst] = JSImmediate::decImmediateNumber(v);
     1793            callFrame[srcDst] = JSValuePtr(JSImmediate::decImmediateNumber(v));
    17921794        } else {
    1793             JSValue* number = callFrame[srcDst].jsValue(callFrame)->toJSNumber(callFrame);
     1795            JSValuePtr number = callFrame[srcDst].jsValue(callFrame)->toJSNumber(callFrame);
    17941796            CHECK_FOR_EXCEPTION();
    17951797            callFrame[dst] = number;
    1796             callFrame[srcDst] = jsNumber(callFrame, number->uncheckedGetNumber() - 1);
     1798            callFrame[srcDst] = JSValuePtr(jsNumber(callFrame, number->uncheckedGetNumber() - 1));
    17971799        }
    17981800
     
    18091811        int src = (++vPC)->u.operand;
    18101812
    1811         JSValue* srcVal = callFrame[src].jsValue(callFrame);
     1813        JSValuePtr srcVal = callFrame[src].jsValue(callFrame);
    18121814
    18131815        if (LIKELY(srcVal->isNumber()))
    18141816            callFrame[dst] = callFrame[src];
    18151817        else {
    1816             JSValue* result = srcVal->toJSNumber(callFrame);
     1818            JSValuePtr result = srcVal->toJSNumber(callFrame);
    18171819            CHECK_FOR_EXCEPTION();
    18181820            callFrame[dst] = result;
     
    18291831        */
    18301832        int dst = (++vPC)->u.operand;
    1831         JSValue* src = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1833        JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    18321834        ++vPC;
    18331835        double v;
    18341836        if (fastIsNumber(src, v))
    1835             callFrame[dst] = jsNumber(callFrame, -v);
     1837            callFrame[dst] = JSValuePtr(jsNumber(callFrame, -v));
    18361838        else {
    1837             JSValue* result = jsNumber(callFrame, -src->toNumber(callFrame));
     1839            JSValuePtr result = jsNumber(callFrame, -src->toNumber(callFrame));
    18381840            CHECK_FOR_EXCEPTION();
    18391841            callFrame[dst] = result;
     
    18501852        */
    18511853        int dst = (++vPC)->u.operand;
    1852         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1853         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1854        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1855        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    18541856        if (JSImmediate::canDoFastAdditiveOperations(src1) && JSImmediate::canDoFastAdditiveOperations(src2))
    1855             callFrame[dst] = JSImmediate::addImmediateNumbers(src1, src2);
     1857            callFrame[dst] = JSValuePtr(JSImmediate::addImmediateNumbers(src1, src2));
    18561858        else {
    1857             JSValue* result = jsAdd(callFrame, src1, src2);
     1859            JSValuePtr result = jsAdd(callFrame, src1, src2);
    18581860            CHECK_FOR_EXCEPTION();
    18591861            callFrame[dst] = result;
     
    18691871        */
    18701872        int dst = (++vPC)->u.operand;
    1871         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1872         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1873        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1874        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    18731875        double left;
    18741876        double right;
     
    18771879            int32_t right = JSImmediate::getTruncatedInt32(src2);
    18781880            if ((left | right) >> 15 == 0)
    1879                 callFrame[dst] = jsNumber(callFrame, left * right);
     1881                callFrame[dst] = JSValuePtr(jsNumber(callFrame, left * right));
    18801882            else
    1881                 callFrame[dst] = jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right));
     1883                callFrame[dst] = JSValuePtr(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right)));
    18821884        } else if (fastIsNumber(src1, left) && fastIsNumber(src2, right))
    1883             callFrame[dst] = jsNumber(callFrame, left * right);
     1885            callFrame[dst] = JSValuePtr(jsNumber(callFrame, left * right));
    18841886        else {
    1885             JSValue* result = jsNumber(callFrame, src1->toNumber(callFrame) * src2->toNumber(callFrame));
     1887            JSValuePtr result = jsNumber(callFrame, src1->toNumber(callFrame) * src2->toNumber(callFrame));
    18861888            CHECK_FOR_EXCEPTION();
    18871889            callFrame[dst] = result;
     
    18991901        */
    19001902        int dst = (++vPC)->u.operand;
    1901         JSValue* dividend = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1902         JSValue* divisor = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1903        JSValuePtr dividend = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1904        JSValuePtr divisor = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    19031905        double left;
    19041906        double right;
    19051907        if (fastIsNumber(dividend, left) && fastIsNumber(divisor, right))
    1906             callFrame[dst] = jsNumber(callFrame, left / right);
     1908            callFrame[dst] = JSValuePtr(jsNumber(callFrame, left / right));
    19071909        else {
    1908             JSValue* result = jsNumber(callFrame, dividend->toNumber(callFrame) / divisor->toNumber(callFrame));
     1910            JSValuePtr result = jsNumber(callFrame, dividend->toNumber(callFrame) / divisor->toNumber(callFrame));
    19091911            CHECK_FOR_EXCEPTION();
    19101912            callFrame[dst] = result;
     
    19241926        int divisor = (++vPC)->u.operand;
    19251927
    1926         JSValue* dividendValue = callFrame[dividend].jsValue(callFrame);
    1927         JSValue* divisorValue = callFrame[divisor].jsValue(callFrame);
     1928        JSValuePtr dividendValue = callFrame[dividend].jsValue(callFrame);
     1929        JSValuePtr divisorValue = callFrame[divisor].jsValue(callFrame);
    19281930
    19291931        if (JSImmediate::areBothImmediateNumbers(dividendValue, divisorValue) && divisorValue != JSImmediate::from(0)) {
    1930             callFrame[dst] = JSImmediate::from(JSImmediate::getTruncatedInt32(dividendValue) % JSImmediate::getTruncatedInt32(divisorValue));
     1932            callFrame[dst] = JSValuePtr(JSImmediate::from(JSImmediate::getTruncatedInt32(dividendValue) % JSImmediate::getTruncatedInt32(divisorValue)));
    19311933            ++vPC;
    19321934            NEXT_INSTRUCTION();
     
    19341936
    19351937        double d = dividendValue->toNumber(callFrame);
    1936         JSValue* result = jsNumber(callFrame, fmod(d, divisorValue->toNumber(callFrame)));
     1938        JSValuePtr result = jsNumber(callFrame, fmod(d, divisorValue->toNumber(callFrame)));
    19371939        CHECK_FOR_EXCEPTION();
    19381940        callFrame[dst] = result;
     
    19481950        */
    19491951        int dst = (++vPC)->u.operand;
    1950         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1951         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1952        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1953        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    19521954        double left;
    19531955        double right;
    19541956        if (JSImmediate::canDoFastAdditiveOperations(src1) && JSImmediate::canDoFastAdditiveOperations(src2))
    1955             callFrame[dst] = JSImmediate::subImmediateNumbers(src1, src2);
     1957            callFrame[dst] = JSValuePtr(JSImmediate::subImmediateNumbers(src1, src2));
    19561958        else if (fastIsNumber(src1, left) && fastIsNumber(src2, right))
    1957             callFrame[dst] = jsNumber(callFrame, left - right);
     1959            callFrame[dst] = JSValuePtr(jsNumber(callFrame, left - right));
    19581960        else {
    1959             JSValue* result = jsNumber(callFrame, src1->toNumber(callFrame) - src2->toNumber(callFrame));
     1961            JSValuePtr result = jsNumber(callFrame, src1->toNumber(callFrame) - src2->toNumber(callFrame));
    19601962            CHECK_FOR_EXCEPTION();
    19611963            callFrame[dst] = result;
     
    19721974        */
    19731975        int dst = (++vPC)->u.operand;
    1974         JSValue* val = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    1975         JSValue* shift = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1976        JSValuePtr val = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     1977        JSValuePtr shift = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    19761978        int32_t left;
    19771979        uint32_t right;
    19781980        if (JSImmediate::areBothImmediateNumbers(val, shift))
    1979             callFrame[dst] = jsNumber(callFrame, JSImmediate::getTruncatedInt32(val) << (JSImmediate::getTruncatedUInt32(shift) & 0x1f));
     1981            callFrame[dst] = JSValuePtr(jsNumber(callFrame, JSImmediate::getTruncatedInt32(val) << (JSImmediate::getTruncatedUInt32(shift) & 0x1f)));
    19801982        else if (fastToInt32(val, left) && fastToUInt32(shift, right))
    1981             callFrame[dst] = jsNumber(callFrame, left << (right & 0x1f));
     1983            callFrame[dst] = JSValuePtr(jsNumber(callFrame, left << (right & 0x1f)));
    19821984        else {
    1983             JSValue* result = jsNumber(callFrame, (val->toInt32(callFrame)) << (shift->toUInt32(callFrame) & 0x1f));
     1985            JSValuePtr result = jsNumber(callFrame, (val->toInt32(callFrame)) << (shift->toUInt32(callFrame) & 0x1f));
    19841986            CHECK_FOR_EXCEPTION();
    19851987            callFrame[dst] = result;
     
    19971999        */
    19982000        int dst = (++vPC)->u.operand;
    1999         JSValue* val = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    2000         JSValue* shift = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2001        JSValuePtr val = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2002        JSValuePtr shift = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    20012003        int32_t left;
    20022004        uint32_t right;
    20032005        if (JSImmediate::areBothImmediateNumbers(val, shift))
    2004             callFrame[dst] = JSImmediate::rightShiftImmediateNumbers(val, shift);
     2006            callFrame[dst] = JSValuePtr(JSImmediate::rightShiftImmediateNumbers(val, shift));
    20052007        else if (fastToInt32(val, left) && fastToUInt32(shift, right))
    2006             callFrame[dst] = jsNumber(callFrame, left >> (right & 0x1f));
     2008            callFrame[dst] = JSValuePtr(jsNumber(callFrame, left >> (right & 0x1f)));
    20072009        else {
    2008             JSValue* result = jsNumber(callFrame, (val->toInt32(callFrame)) >> (shift->toUInt32(callFrame) & 0x1f));
     2010            JSValuePtr result = jsNumber(callFrame, (val->toInt32(callFrame)) >> (shift->toUInt32(callFrame) & 0x1f));
    20092011            CHECK_FOR_EXCEPTION();
    20102012            callFrame[dst] = result;
     
    20222024        */
    20232025        int dst = (++vPC)->u.operand;
    2024         JSValue* val = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    2025         JSValue* shift = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2026        JSValuePtr val = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2027        JSValuePtr shift = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    20262028        if (JSImmediate::areBothImmediateNumbers(val, shift) && !JSImmediate::isNegative(val))
    2027             callFrame[dst] = JSImmediate::rightShiftImmediateNumbers(val, shift);
     2029            callFrame[dst] = JSValuePtr(JSImmediate::rightShiftImmediateNumbers(val, shift));
    20282030        else {
    2029             JSValue* result = jsNumber(callFrame, (val->toUInt32(callFrame)) >> (shift->toUInt32(callFrame) & 0x1f));
     2031            JSValuePtr result = jsNumber(callFrame, (val->toUInt32(callFrame)) >> (shift->toUInt32(callFrame) & 0x1f));
    20302032            CHECK_FOR_EXCEPTION();
    20312033            callFrame[dst] = result;
     
    20432045        */
    20442046        int dst = (++vPC)->u.operand;
    2045         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    2046         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2047        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2048        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    20472049        int32_t left;
    20482050        int32_t right;
    20492051        if (JSImmediate::areBothImmediateNumbers(src1, src2))
    2050             callFrame[dst] = JSImmediate::andImmediateNumbers(src1, src2);
     2052            callFrame[dst] = JSValuePtr(JSImmediate::andImmediateNumbers(src1, src2));
    20512053        else if (fastToInt32(src1, left) && fastToInt32(src2, right))
    2052             callFrame[dst] = jsNumber(callFrame, left & right);
     2054            callFrame[dst] = JSValuePtr(jsNumber(callFrame, left & right));
    20532055        else {
    2054             JSValue* result = jsNumber(callFrame, src1->toInt32(callFrame) & src2->toInt32(callFrame));
     2056            JSValuePtr result = jsNumber(callFrame, src1->toInt32(callFrame) & src2->toInt32(callFrame));
    20552057            CHECK_FOR_EXCEPTION();
    20562058            callFrame[dst] = result;
     
    20682070        */
    20692071        int dst = (++vPC)->u.operand;
    2070         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    2071         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2072        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2073        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    20722074        int32_t left;
    20732075        int32_t right;
    20742076        if (JSImmediate::areBothImmediateNumbers(src1, src2))
    2075             callFrame[dst] = JSImmediate::xorImmediateNumbers(src1, src2);
     2077            callFrame[dst] = JSValuePtr(JSImmediate::xorImmediateNumbers(src1, src2));
    20762078        else if (fastToInt32(src1, left) && fastToInt32(src2, right))
    2077             callFrame[dst] = jsNumber(callFrame, left ^ right);
     2079            callFrame[dst] = JSValuePtr(jsNumber(callFrame, left ^ right));
    20782080        else {
    2079             JSValue* result = jsNumber(callFrame, src1->toInt32(callFrame) ^ src2->toInt32(callFrame));
     2081            JSValuePtr result = jsNumber(callFrame, src1->toInt32(callFrame) ^ src2->toInt32(callFrame));
    20802082            CHECK_FOR_EXCEPTION();
    20812083            callFrame[dst] = result;
     
    20932095        */
    20942096        int dst = (++vPC)->u.operand;
    2095         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    2096         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2097        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2098        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    20972099        int32_t left;
    20982100        int32_t right;
    20992101        if (JSImmediate::areBothImmediateNumbers(src1, src2))
    2100             callFrame[dst] = JSImmediate::orImmediateNumbers(src1, src2);
     2102            callFrame[dst] = JSValuePtr(JSImmediate::orImmediateNumbers(src1, src2));
    21012103        else if (fastToInt32(src1, left) && fastToInt32(src2, right))
    2102             callFrame[dst] = jsNumber(callFrame, left | right);
     2104            callFrame[dst] = JSValuePtr(jsNumber(callFrame, left | right));
    21032105        else {
    2104             JSValue* result = jsNumber(callFrame, src1->toInt32(callFrame) | src2->toInt32(callFrame));
     2106            JSValuePtr result = jsNumber(callFrame, src1->toInt32(callFrame) | src2->toInt32(callFrame));
    21052107            CHECK_FOR_EXCEPTION();
    21062108            callFrame[dst] = result;
     
    21172119        */
    21182120        int dst = (++vPC)->u.operand;
    2119         JSValue* src = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     2121        JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    21202122        int32_t value;
    21212123        if (fastToInt32(src, value))
    2122             callFrame[dst] = jsNumber(callFrame, ~value);
     2124            callFrame[dst] = JSValuePtr(jsNumber(callFrame, ~value));
    21232125        else {
    2124             JSValue* result = jsNumber(callFrame, ~src->toInt32(callFrame));
     2126            JSValuePtr result = jsNumber(callFrame, ~src->toInt32(callFrame));
    21252127            CHECK_FOR_EXCEPTION();
    21262128            callFrame[dst] = result;
     
    21372139        int dst = (++vPC)->u.operand;
    21382140        int src = (++vPC)->u.operand;
    2139         JSValue* result = jsBoolean(!callFrame[src].jsValue(callFrame)->toBoolean(callFrame));
     2141        JSValuePtr result = jsBoolean(!callFrame[src].jsValue(callFrame)->toBoolean(callFrame));
    21402142        CHECK_FOR_EXCEPTION();
    21412143        callFrame[dst] = result;
     
    21622164        int baseProto = vPC[4].u.operand;
    21632165
    2164         JSValue* baseVal = callFrame[base].jsValue(callFrame);
     2166        JSValuePtr baseVal = callFrame[base].jsValue(callFrame);
    21652167
    21662168        if (isNotObject(callFrame, true, callFrame->codeBlock(), vPC, baseVal, exceptionValue))
     
    21812183        int dst = (++vPC)->u.operand;
    21822184        int src = (++vPC)->u.operand;
    2183         callFrame[dst] = jsTypeStringForValue(callFrame, callFrame[src].jsValue(callFrame));
     2185        callFrame[dst] = JSValuePtr(jsTypeStringForValue(callFrame, callFrame[src].jsValue(callFrame)));
    21842186
    21852187        ++vPC;
     
    21952197        int dst = (++vPC)->u.operand;
    21962198        int src = (++vPC)->u.operand;
    2197         JSValue* v = callFrame[src].jsValue(callFrame);
     2199        JSValuePtr v = callFrame[src].jsValue(callFrame);
    21982200        callFrame[dst] = jsBoolean(JSImmediate::isImmediate(v) ? v->isUndefined() : v->asCell()->structure()->typeInfo().masqueradesAsUndefined());
    21992201
     
    22842286        int base = (++vPC)->u.operand;
    22852287
    2286         JSValue* baseVal = callFrame[base].jsValue(callFrame);
     2288        JSValuePtr baseVal = callFrame[base].jsValue(callFrame);
    22872289        if (isNotObject(callFrame, false, callFrame->codeBlock(), vPC, baseVal, exceptionValue))
    22882290            goto vm_throw;
     
    22902292        JSObject* baseObj = asObject(baseVal);
    22912293
    2292         JSValue* propName = callFrame[property].jsValue(callFrame);
     2294        JSValuePtr propName = callFrame[property].jsValue(callFrame);
    22932295
    22942296        uint32_t i;
     
    23702372        int value = (++vPC)->u.operand;
    23712373       
    2372         scope->registerAt(index) = callFrame[value].jsValue(callFrame);
     2374        scope->registerAt(index) = JSValuePtr(callFrame[value].jsValue(callFrame));
    23732375        ++vPC;
    23742376        NEXT_INSTRUCTION();
     
    24182420        ASSERT((*iter)->isVariableObject());
    24192421        JSVariableObject* scope = static_cast<JSVariableObject*>(*iter);
    2420         scope->registerAt(index) = callFrame[value].jsValue(callFrame);
     2422        scope->registerAt(index) = JSValuePtr(callFrame[value].jsValue(callFrame));
    24212423        ++vPC;
    24222424        NEXT_INSTRUCTION();
     
    24862488        CodeBlock* codeBlock = callFrame->codeBlock();
    24872489        Identifier& ident = codeBlock->identifier(property);
    2488         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2490        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    24892491        PropertySlot slot(baseValue);
    2490         JSValue* result = baseValue->get(callFrame, ident, slot);
     2492        JSValuePtr result = baseValue->get(callFrame, ident, slot);
    24912493        CHECK_FOR_EXCEPTION();
    24922494
     
    25052507        */
    25062508        int base = vPC[2].u.operand;
    2507         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2509        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    25082510
    25092511        if (LIKELY(!JSImmediate::isImmediate(baseValue))) {
     
    25182520
    25192521                ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset));
    2520                 callFrame[dst] = baseObject->getDirectOffset(offset);
     2522                callFrame[dst] = JSValuePtr(baseObject->getDirectOffset(offset));
    25212523
    25222524                vPC += 8;
     
    25362538        */
    25372539        int base = vPC[2].u.operand;
    2538         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2540        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    25392541
    25402542        if (LIKELY(!JSImmediate::isImmediate(baseValue))) {
     
    25522554
    25532555                    ASSERT(protoObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset));
    2554                     callFrame[dst] = protoObject->getDirectOffset(offset);
     2556                    callFrame[dst] = JSValuePtr(protoObject->getDirectOffset(offset));
    25552557
    25562558                    vPC += 8;
     
    25852587        */
    25862588        int base = vPC[2].u.operand;
    2587         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2589        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    25882590
    25892591        if (LIKELY(!JSImmediate::isImmediate(baseValue))) {
     
    26072609
    26082610                        ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset));
    2609                         callFrame[dst] = baseObject->getDirectOffset(offset);
     2611                        callFrame[dst] = JSValuePtr(baseObject->getDirectOffset(offset));
    26102612
    26112613                        vPC += 8;
     
    26302632
    26312633        Identifier& ident = callFrame->codeBlock()->identifier(property);
    2632         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2634        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    26332635        PropertySlot slot(baseValue);
    2634         JSValue* result = baseValue->get(callFrame, ident, slot);
     2636        JSValuePtr result = baseValue->get(callFrame, ident, slot);
    26352637        CHECK_FOR_EXCEPTION();
    26362638
     
    26482650
    26492651        int base = vPC[2].u.operand;
    2650         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2652        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    26512653        if (LIKELY(isJSArray(baseValue))) {
    26522654            int dst = vPC[1].u.operand;
    2653             callFrame[dst] = jsNumber(callFrame, asArray(baseValue)->length());
     2655            callFrame[dst] = JSValuePtr(jsNumber(callFrame, asArray(baseValue)->length()));
    26542656            vPC += 8;
    26552657            NEXT_INSTRUCTION();
     
    26682670
    26692671        int base = vPC[2].u.operand;
    2670         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2672        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    26712673        if (LIKELY(isJSString(baseValue))) {
    26722674            int dst = vPC[1].u.operand;
    2673             callFrame[dst] = jsNumber(callFrame, asString(baseValue)->value().size());
     2675            callFrame[dst] = JSValuePtr(jsNumber(callFrame, asString(baseValue)->value().size()));
    26742676            vPC += 8;
    26752677            NEXT_INSTRUCTION();
     
    26942696
    26952697        CodeBlock* codeBlock = callFrame->codeBlock();
    2696         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2698        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    26972699        Identifier& ident = codeBlock->identifier(property);
    26982700        PutPropertySlot slot;
     
    27172719         */
    27182720        int base = vPC[1].u.operand;
    2719         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2721        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    27202722       
    27212723        if (LIKELY(!JSImmediate::isImmediate(baseValue))) {
     
    27302732                RefPtr<Structure>* it = vPC[6].u.structureChain->head();
    27312733
    2732                 JSValue* proto = baseObject->structure()->prototypeForLookup(callFrame);
     2734                JSValuePtr proto = baseObject->structure()->prototypeForLookup(callFrame);
    27332735                while (!proto->isNull()) {
    27342736                    if (UNLIKELY(asObject(proto)->structure() != (*it).get())) {
     
    27672769        */
    27682770        int base = vPC[1].u.operand;
    2769         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2771        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    27702772
    27712773        if (LIKELY(!JSImmediate::isImmediate(baseValue))) {
     
    28032805        int value = vPC[3].u.operand;
    28042806
    2805         JSValue* baseValue = callFrame[base].jsValue(callFrame);
     2807        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
    28062808        Identifier& ident = callFrame->codeBlock()->identifier(property);
    28072809        PutPropertySlot slot;
     
    28262828        JSObject* baseObj = callFrame[base].jsValue(callFrame)->toObject(callFrame);
    28272829        Identifier& ident = callFrame->codeBlock()->identifier(property);
    2828         JSValue* result = jsBoolean(baseObj->deleteProperty(callFrame, ident));
     2830        JSValuePtr result = jsBoolean(baseObj->deleteProperty(callFrame, ident));
    28292831        CHECK_FOR_EXCEPTION();
    28302832        callFrame[dst] = result;
     
    28442846        int property = (++vPC)->u.operand;
    28452847       
    2846         JSValue* baseValue = callFrame[base].jsValue(callFrame);
    2847         JSValue* subscript = callFrame[property].jsValue(callFrame);
    2848 
    2849         JSValue* result;
     2848        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
     2849        JSValuePtr subscript = callFrame[property].jsValue(callFrame);
     2850
     2851        JSValuePtr result;
    28502852        unsigned i;
    28512853
     
    28892891        int value = (++vPC)->u.operand;
    28902892
    2891         JSValue* baseValue = callFrame[base].jsValue(callFrame);
    2892         JSValue* subscript = callFrame[property].jsValue(callFrame);
     2893        JSValuePtr baseValue = callFrame[base].jsValue(callFrame);
     2894        JSValuePtr subscript = callFrame[property].jsValue(callFrame);
    28932895
    28942896        unsigned i;
     
    29052907                JSByteArray* jsByteArray = asByteArray(baseValue);
    29062908                double dValue = 0;
    2907                 JSValue* jsValue = callFrame[value].jsValue(callFrame);
     2909                JSValuePtr jsValue = callFrame[value].jsValue(callFrame);
    29082910                if (JSImmediate::isNumber(jsValue))
    29092911                    jsByteArray->setIndex(i, JSImmediate::getTruncatedInt32(jsValue));
     
    29402942        JSObject* baseObj = callFrame[base].jsValue(callFrame)->toObject(callFrame); // may throw
    29412943
    2942         JSValue* subscript = callFrame[property].jsValue(callFrame);
    2943         JSValue* result;
     2944        JSValuePtr subscript = callFrame[property].jsValue(callFrame);
     2945        JSValuePtr result;
    29442946        uint32_t i;
    29452947        if (subscript->getUInt32(i))
     
    30693071        int src = (++vPC)->u.operand;
    30703072        int target = (++vPC)->u.operand;
    3071         JSValue* srcValue = callFrame[src].jsValue(callFrame);
     3073        JSValuePtr srcValue = callFrame[src].jsValue(callFrame);
    30723074
    30733075        if (srcValue->isUndefinedOrNull() || (!JSImmediate::isImmediate(srcValue) && srcValue->asCell()->structure()->typeInfo().masqueradesAsUndefined())) {
     
    30873089        int src = (++vPC)->u.operand;
    30883090        int target = (++vPC)->u.operand;
    3089         JSValue* srcValue = callFrame[src].jsValue(callFrame);
     3091        JSValuePtr srcValue = callFrame[src].jsValue(callFrame);
    30903092
    30913093        if (!srcValue->isUndefinedOrNull() || (!JSImmediate::isImmediate(srcValue) && !srcValue->asCell()->structure()->typeInfo().masqueradesAsUndefined())) {
     
    31083110           the JS timeout is reached.
    31093111         */
    3110         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    3111         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     3112        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     3113        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    31123114        int target = (++vPC)->u.operand;
    31133115       
     
    31353137           the JS timeout is reached.
    31363138        */
    3137         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    3138         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     3139        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     3140        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    31393141        int target = (++vPC)->u.operand;
    31403142       
     
    31593161           result of the comparison is false.
    31603162        */
    3161         JSValue* src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    3162         JSValue* src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     3163        JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     3164        JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    31633165        int target = (++vPC)->u.operand;
    31643166
     
    31853187        int tableIndex = (++vPC)->u.operand;
    31863188        int defaultOffset = (++vPC)->u.operand;
    3187         JSValue* scrutinee = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     3189        JSValuePtr scrutinee = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    31883190        if (!JSImmediate::isNumber(scrutinee))
    31893191            vPC += defaultOffset;
     
    32053207        int tableIndex = (++vPC)->u.operand;
    32063208        int defaultOffset = (++vPC)->u.operand;
    3207         JSValue* scrutinee = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     3209        JSValuePtr scrutinee = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    32083210        if (!scrutinee->isString())
    32093211            vPC += defaultOffset;
     
    32283230        int tableIndex = (++vPC)->u.operand;
    32293231        int defaultOffset = (++vPC)->u.operand;
    3230         JSValue* scrutinee = callFrame[(++vPC)->u.operand].jsValue(callFrame);
     3232        JSValuePtr scrutinee = callFrame[(++vPC)->u.operand].jsValue(callFrame);
    32313233        if (!scrutinee->isString())
    32323234            vPC += defaultOffset;
     
    32843286        int registerOffset = vPC[4].u.operand;
    32853287
    3286         JSValue* funcVal = callFrame[func].jsValue(callFrame);
     3288        JSValuePtr funcVal = callFrame[func].jsValue(callFrame);
    32873289
    32883290        Register* newCallFrame = callFrame->registers() + registerOffset;
    32893291        Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount;
    3290         JSValue* thisValue = argv[0].jsValue(callFrame);
     3292        JSValuePtr thisValue = argv[0].jsValue(callFrame);
    32913293        JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject();
    32923294
    32933295        if (thisValue == globalObject && funcVal == globalObject->evalFunction()) {
    3294             JSValue* result = callEval(callFrame, registerFile, argv, argCount, registerOffset, exceptionValue);
     3296            JSValuePtr result = callEval(callFrame, registerFile, argv, argCount, registerOffset, exceptionValue);
    32953297            if (exceptionValue)
    32963298                goto vm_throw;
     
    33213323        int registerOffset = vPC[4].u.operand;
    33223324
    3323         JSValue* v = callFrame[func].jsValue(callFrame);
     3325        JSValuePtr v = callFrame[func].jsValue(callFrame);
    33243326
    33253327        CallData callData;
     
    33593361
    33603362            // FIXME: All host methods should be calling toThisObject, but this is not presently the case.
    3361             JSValue* thisValue = thisRegister->jsValue(callFrame);
     3363            JSValuePtr thisValue = thisRegister->jsValue(callFrame);
    33623364            if (thisValue == jsNull())
    33633365                thisValue = callFrame->globalThisValue();
    33643366
    3365             JSValue* returnValue;
     3367            JSValuePtr returnValue;
    33663368            {
    33673369                SamplingTool::HostCallRecord callRecord(m_sampler);
     
    33703372            CHECK_FOR_EXCEPTION();
    33713373
    3372             callFrame[dst] = returnValue;
     3374            callFrame[dst] = JSValuePtr(returnValue);
    33733375
    33743376            vPC += 5;
     
    34373439            callFrame->scopeChain()->deref();
    34383440
    3439         JSValue* returnValue = callFrame[result].jsValue(callFrame);
     3441        JSValuePtr returnValue = callFrame[result].jsValue(callFrame);
    34403442
    34413443        vPC = callFrame->returnPC();
     
    34463448            return returnValue;
    34473449
    3448         callFrame[dst] = returnValue;
     3450        callFrame[dst] = JSValuePtr(returnValue);
    34493451
    34503452        NEXT_INSTRUCTION();
     
    35163518
    35173519        int thisRegister = (++vPC)->u.operand;
    3518         JSValue* thisVal = callFrame[thisRegister].getJSValue();
     3520        JSValuePtr thisVal = callFrame[thisRegister].getJSValue();
    35193521        if (thisVal->needsThisConversion())
    3520             callFrame[thisRegister] = thisVal->toThisObject(callFrame);
     3522            callFrame[thisRegister] = JSValuePtr(thisVal->toThisObject(callFrame));
    35213523
    35223524        ++vPC;
     
    35633565        int thisRegister = vPC[6].u.operand;
    35643566
    3565         JSValue* v = callFrame[func].jsValue(callFrame);
     3567        JSValuePtr v = callFrame[func].jsValue(callFrame);
    35663568
    35673569        ConstructData constructData;
     
    35743576
    35753577            Structure* structure;
    3576             JSValue* prototype = callFrame[proto].jsValue(callFrame);
     3578            JSValuePtr prototype = callFrame[proto].jsValue(callFrame);
    35773579            if (prototype->isObject())
    35783580                structure = asObject(prototype)->inheritorID();
     
    35813583            JSObject* newObject = new (globalData) JSObject(structure);
    35823584
    3583             callFrame[thisRegister] = newObject; // "this" value
     3585            callFrame[thisRegister] = JSValuePtr(newObject); // "this" value
    35843586
    35853587            CallFrame* previousCallFrame = callFrame;
     
    36093611            newCallFrame->init(0, vPC + 7, scopeChain, callFrame, dst, argCount, 0);
    36103612
    3611             JSValue* returnValue;
     3613            JSValuePtr returnValue;
    36123614            {
    36133615                SamplingTool::HostCallRecord callRecord(m_sampler);
     
    36153617            }
    36163618            CHECK_FOR_EXCEPTION();
    3617             callFrame[dst] = returnValue;
     3619            callFrame[dst] = JSValuePtr(returnValue);
    36183620
    36193621            vPC += 7;
     
    36533655        */
    36543656        int scope = (++vPC)->u.operand;
    3655         JSValue* v = callFrame[scope].jsValue(callFrame);
     3657        JSValuePtr v = callFrame[scope].jsValue(callFrame);
    36563658        JSObject* o = v->toObject(callFrame);
    36573659        CHECK_FOR_EXCEPTION();
    36583660
    3659         callFrame[scope] = o;
     3661        callFrame[scope] = JSValuePtr(o);
    36603662        callFrame->setScopeChain(callFrame->scopeChain()->push(o));
    36613663
     
    37023704
    37033705        JSPropertyNameIterator* it = callFrame[iter].propertyNameIterator();
    3704         if (JSValue* temp = it->next(callFrame)) {
     3706        if (JSValuePtr temp = it->next(callFrame)) {
    37053707            CHECK_FOR_TIMEOUT();
    3706             callFrame[dst] = temp;
     3708            callFrame[dst] = JSValuePtr(temp);
    37073709            vPC += target;
    37083710            NEXT_INSTRUCTION();
     
    37963798        int dst = (++vPC)->u.operand;
    37973799        int src = (++vPC)->u.operand;
    3798         callFrame[dst] = callFrame->codeBlock()->unexpectedConstant(src);
     3800        callFrame[dst] = JSValuePtr(callFrame->codeBlock()->unexpectedConstant(src));
    37993801
    38003802        ++vPC;
     
    38143816
    38153817        CodeBlock* codeBlock = callFrame->codeBlock();
    3816         callFrame[dst] = Error::create(callFrame, (ErrorType)type, codeBlock->unexpectedConstant(message)->toString(callFrame), codeBlock->lineNumberForBytecodeOffset(vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL());
     3818        callFrame[dst] = JSValuePtr(Error::create(callFrame, (ErrorType)type, codeBlock->unexpectedConstant(message)->toString(callFrame), codeBlock->lineNumberForBytecodeOffset(vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL()));
    38173819
    38183820        ++vPC;
     
    39753977}
    39763978
    3977 JSValue* Interpreter::retrieveArguments(CallFrame* callFrame, JSFunction* function) const
     3979JSValuePtr Interpreter::retrieveArguments(CallFrame* callFrame, JSFunction* function) const
    39783980{
    39793981    CallFrame* functionCallFrame = findFunctionCallFrame(callFrame, function);
     
    39994001}
    40004002
    4001 JSValue* Interpreter::retrieveCaller(CallFrame* callFrame, InternalFunction* function) const
     4003JSValuePtr Interpreter::retrieveCaller(CallFrame* callFrame, InternalFunction* function) const
    40024004{
    40034005    CallFrame* functionCallFrame = findFunctionCallFrame(callFrame, function);
     
    40094011        return jsNull();
    40104012
    4011     JSValue* caller = callerFrame->callee();
     4013    JSValuePtr caller = callerFrame->callee();
    40124014    if (!caller)
    40134015        return jsNull();
     
    40164018}
    40174019
    4018 void Interpreter::retrieveLastCaller(CallFrame* callFrame, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue*& function) const
     4020void Interpreter::retrieveLastCaller(CallFrame* callFrame, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValuePtr& function) const
    40194021{
    40204022    function = noValue();
     
    40504052#if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
    40514053
    4052 NEVER_INLINE void Interpreter::tryCTICachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue* baseValue, const PutPropertySlot& slot)
     4054NEVER_INLINE void Interpreter::tryCTICachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValuePtr baseValue, const PutPropertySlot& slot)
    40534055{
    40544056    // The interpreter checks for recursion here; I do not believe this can occur in CTI.
     
    41074109}
    41084110
    4109 NEVER_INLINE void Interpreter::tryCTICacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue* baseValue, const Identifier& propertyName, const PropertySlot& slot)
     4111NEVER_INLINE void Interpreter::tryCTICacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValuePtr baseValue, const Identifier& propertyName, const PropertySlot& slot)
    41104112{
    41114113    // FIXME: Write a test that proves we need to check for recursion here just
     
    43024304    BEGIN_STUB_FUNCTION();
    43034305
    4304     JSValue* v1 = ARG_src1;
     4306    JSValuePtr v1 = ARG_src1;
    43054307    CallFrame* callFrame = ARG_callFrame;
    43064308
     
    43194321}
    43204322
    4321 JSValue* Interpreter::cti_op_add(STUB_ARGS)
    4322 {
    4323     BEGIN_STUB_FUNCTION();
    4324 
    4325     JSValue* v1 = ARG_src1;
    4326     JSValue* v2 = ARG_src2;
     4323JSValueEncodedAsPointer* Interpreter::cti_op_add(STUB_ARGS)
     4324{
     4325    BEGIN_STUB_FUNCTION();
     4326
     4327    JSValuePtr v1 = ARG_src1;
     4328    JSValuePtr v2 = ARG_src2;
    43274329
    43284330    double left;
     
    43314333    bool rightIsNumber = fastIsNumber(v2, right);
    43324334    if (rightIsNumber && fastIsNumber(v1, left))
    4333         return jsNumber(ARG_globalData, left + right);
     4335        return JSValuePtr::encode(jsNumber(ARG_globalData, left + right));
    43344336   
    43354337    CallFrame* callFrame = ARG_callFrame;
     
    43434345        }
    43444346
    4345         return jsString(ARG_globalData, value.release());
     4347        return JSValuePtr::encode(jsString(ARG_globalData, value.release()));
    43464348    }
    43474349
     
    43554357            VM_THROW_EXCEPTION();
    43564358        }
    4357         return jsString(ARG_globalData, value.release());
     4359        return JSValuePtr::encode(jsString(ARG_globalData, value.release()));
    43584360    }
    43594361
    43604362    // All other cases are pretty uncommon
    4361     JSValue* result = jsAddSlowCase(callFrame, v1, v2);
     4363    JSValuePtr result = jsAddSlowCase(callFrame, v1, v2);
    43624364    CHECK_FOR_EXCEPTION_AT_END();
    4363     return result;
    4364 }
    4365 
    4366 JSValue* Interpreter::cti_op_pre_inc(STUB_ARGS)
    4367 {
    4368     BEGIN_STUB_FUNCTION();
    4369 
    4370     JSValue* v = ARG_src1;
    4371 
    4372     CallFrame* callFrame = ARG_callFrame;
    4373     JSValue* result = jsNumber(ARG_globalData, v->toNumber(callFrame) + 1);
     4365    return JSValuePtr::encode(result);
     4366}
     4367
     4368JSValueEncodedAsPointer* Interpreter::cti_op_pre_inc(STUB_ARGS)
     4369{
     4370    BEGIN_STUB_FUNCTION();
     4371
     4372    JSValuePtr v = ARG_src1;
     4373
     4374    CallFrame* callFrame = ARG_callFrame;
     4375    JSValuePtr result = jsNumber(ARG_globalData, v->toNumber(callFrame) + 1);
    43744376    CHECK_FOR_EXCEPTION_AT_END();
    4375     return result;
     4377    return JSValuePtr::encode(result);
    43764378}
    43774379
     
    44074409    BEGIN_STUB_FUNCTION();
    44084410
    4409     JSValue* src1 = ARG_src1;
    4410     JSValue* src2 = ARG_src2;
     4411    JSValuePtr src1 = ARG_src1;
     4412    JSValuePtr src2 = ARG_src2;
    44114413    CallFrame* callFrame = ARG_callFrame;
    44124414
     
    44204422    BEGIN_STUB_FUNCTION();
    44214423
    4422     JSValue* src1 = ARG_src1;
    4423     JSValue* src2 = ARG_src2;
     4424    JSValuePtr src1 = ARG_src1;
     4425    JSValuePtr src2 = ARG_src2;
    44244426    CallFrame* callFrame = ARG_callFrame;
    44254427
     
    44454447}
    44464448
    4447 JSValue* Interpreter::cti_op_get_by_id_generic(STUB_ARGS)
     4449JSValueEncodedAsPointer* Interpreter::cti_op_get_by_id_generic(STUB_ARGS)
    44484450{
    44494451    BEGIN_STUB_FUNCTION();
     
    44524454    Identifier& ident = *ARG_id2;
    44534455
    4454     JSValue* baseValue = ARG_src1;
     4456    JSValuePtr baseValue = ARG_src1;
    44554457    PropertySlot slot(baseValue);
    4456     JSValue* result = baseValue->get(callFrame, ident, slot);
     4458    JSValuePtr result = baseValue->get(callFrame, ident, slot);
    44574459
    44584460    CHECK_FOR_EXCEPTION_AT_END();
    4459     return result;
     4461    return JSValuePtr::encode(result);
    44604462}
    44614463
     
    45004502}
    45014503
    4502 JSValue* Interpreter::cti_op_get_by_id(STUB_ARGS)
     4504JSValueEncodedAsPointer* Interpreter::cti_op_get_by_id(STUB_ARGS)
    45034505{
    45044506    BEGIN_STUB_FUNCTION();
     
    45074509    Identifier& ident = *ARG_id2;
    45084510
    4509     JSValue* baseValue = ARG_src1;
     4511    JSValuePtr baseValue = ARG_src1;
    45104512    PropertySlot slot(baseValue);
    4511     JSValue* result = baseValue->get(callFrame, ident, slot);
     4513    JSValuePtr result = baseValue->get(callFrame, ident, slot);
    45124514
    45134515    ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_id_second));
    45144516
    45154517    CHECK_FOR_EXCEPTION_AT_END();
    4516     return result;
    4517 }
    4518 
    4519 JSValue* Interpreter::cti_op_get_by_id_second(STUB_ARGS)
     4518    return JSValuePtr::encode(result);
     4519}
     4520
     4521JSValueEncodedAsPointer* Interpreter::cti_op_get_by_id_second(STUB_ARGS)
    45204522{
    45214523    BEGIN_STUB_FUNCTION();
     
    45244526    Identifier& ident = *ARG_id2;
    45254527
    4526     JSValue* baseValue = ARG_src1;
     4528    JSValuePtr baseValue = ARG_src1;
    45274529    PropertySlot slot(baseValue);
    4528     JSValue* result = baseValue->get(callFrame, ident, slot);
     4530    JSValuePtr result = baseValue->get(callFrame, ident, slot);
    45294531
    45304532    ARG_globalData->interpreter->tryCTICacheGetByID(callFrame, callFrame->codeBlock(), STUB_RETURN_ADDRESS, baseValue, ident, slot);
    45314533
    45324534    CHECK_FOR_EXCEPTION_AT_END();
    4533     return result;
    4534 }
    4535 
    4536 JSValue* Interpreter::cti_op_get_by_id_self_fail(STUB_ARGS)
     4535    return JSValuePtr::encode(result);
     4536}
     4537
     4538JSValueEncodedAsPointer* Interpreter::cti_op_get_by_id_self_fail(STUB_ARGS)
    45374539{
    45384540    BEGIN_STUB_FUNCTION();
     
    45414543    Identifier& ident = *ARG_id2;
    45424544
    4543     JSValue* baseValue = ARG_src1;
     4545    JSValuePtr baseValue = ARG_src1;
    45444546    PropertySlot slot(baseValue);
    4545     JSValue* result = baseValue->get(callFrame, ident, slot);
     4547    JSValuePtr result = baseValue->get(callFrame, ident, slot);
    45464548
    45474549    CHECK_FOR_EXCEPTION();
     
    45774579        ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_id_generic));
    45784580    }
    4579     return result;
     4581    return JSValuePtr::encode(result);
    45804582}
    45814583
     
    46094611}
    46104612
    4611 JSValue* Interpreter::cti_op_get_by_id_proto_list(STUB_ARGS)
    4612 {
    4613     BEGIN_STUB_FUNCTION();
    4614 
    4615     CallFrame* callFrame = ARG_callFrame;
    4616 
    4617     JSValue* baseValue = ARG_src1;
     4613JSValueEncodedAsPointer* Interpreter::cti_op_get_by_id_proto_list(STUB_ARGS)
     4614{
     4615    BEGIN_STUB_FUNCTION();
     4616
     4617    CallFrame* callFrame = ARG_callFrame;
     4618
     4619    JSValuePtr baseValue = ARG_src1;
    46184620    PropertySlot slot(baseValue);
    4619     JSValue* result = baseValue->get(callFrame, *ARG_id2, slot);
     4621    JSValuePtr result = baseValue->get(callFrame, *ARG_id2, slot);
    46204622
    46214623    CHECK_FOR_EXCEPTION();
     
    46234625    if (JSImmediate::isImmediate(baseValue) || !slot.isCacheable() || asCell(baseValue)->structure()->isDictionary()) {
    46244626        ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_id_proto_fail));
    4625         return result;
     4627        return JSValuePtr::encode(result);
    46264628    }
    46274629
     
    46674669        ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_id_proto_fail));
    46684670
    4669     return result;
    4670 }
    4671 
    4672 JSValue* Interpreter::cti_op_get_by_id_proto_list_full(STUB_ARGS)
    4673 {
    4674     BEGIN_STUB_FUNCTION();
    4675 
    4676     JSValue* baseValue = ARG_src1;
     4671    return JSValuePtr::encode(result);
     4672}
     4673
     4674JSValueEncodedAsPointer* Interpreter::cti_op_get_by_id_proto_list_full(STUB_ARGS)
     4675{
     4676    BEGIN_STUB_FUNCTION();
     4677
     4678    JSValuePtr baseValue = ARG_src1;
    46774679    PropertySlot slot(baseValue);
    4678     JSValue* result = baseValue->get(ARG_callFrame, *ARG_id2, slot);
     4680    JSValuePtr result = baseValue->get(ARG_callFrame, *ARG_id2, slot);
    46794681
    46804682    CHECK_FOR_EXCEPTION_AT_END();
    4681     return result;
    4682 }
    4683 
    4684 JSValue* Interpreter::cti_op_get_by_id_proto_fail(STUB_ARGS)
    4685 {
    4686     BEGIN_STUB_FUNCTION();
    4687 
    4688     JSValue* baseValue = ARG_src1;
     4683    return JSValuePtr::encode(result);
     4684}
     4685
     4686JSValueEncodedAsPointer* Interpreter::cti_op_get_by_id_proto_fail(STUB_ARGS)
     4687{
     4688    BEGIN_STUB_FUNCTION();
     4689
     4690    JSValuePtr baseValue = ARG_src1;
    46894691    PropertySlot slot(baseValue);
    4690     JSValue* result = baseValue->get(ARG_callFrame, *ARG_id2, slot);
     4692    JSValuePtr result = baseValue->get(ARG_callFrame, *ARG_id2, slot);
    46914693
    46924694    CHECK_FOR_EXCEPTION_AT_END();
    4693     return result;
    4694 }
    4695 
    4696 JSValue* Interpreter::cti_op_get_by_id_array_fail(STUB_ARGS)
    4697 {
    4698     BEGIN_STUB_FUNCTION();
    4699 
    4700     JSValue* baseValue = ARG_src1;
     4695    return JSValuePtr::encode(result);
     4696}
     4697
     4698JSValueEncodedAsPointer* Interpreter::cti_op_get_by_id_array_fail(STUB_ARGS)
     4699{
     4700    BEGIN_STUB_FUNCTION();
     4701
     4702    JSValuePtr baseValue = ARG_src1;
    47014703    PropertySlot slot(baseValue);
    4702     JSValue* result = baseValue->get(ARG_callFrame, *ARG_id2, slot);
     4704    JSValuePtr result = baseValue->get(ARG_callFrame, *ARG_id2, slot);
    47034705
    47044706    CHECK_FOR_EXCEPTION_AT_END();
    4705     return result;
    4706 }
    4707 
    4708 JSValue* Interpreter::cti_op_get_by_id_string_fail(STUB_ARGS)
    4709 {
    4710     BEGIN_STUB_FUNCTION();
    4711 
    4712     JSValue* baseValue = ARG_src1;
     4707    return JSValuePtr::encode(result);
     4708}
     4709
     4710JSValueEncodedAsPointer* Interpreter::cti_op_get_by_id_string_fail(STUB_ARGS)
     4711{
     4712    BEGIN_STUB_FUNCTION();
     4713
     4714    JSValuePtr baseValue = ARG_src1;
    47134715    PropertySlot slot(baseValue);
    4714     JSValue* result = baseValue->get(ARG_callFrame, *ARG_id2, slot);
     4716    JSValuePtr result = baseValue->get(ARG_callFrame, *ARG_id2, slot);
    47154717
    47164718    CHECK_FOR_EXCEPTION_AT_END();
    4717     return result;
     4719    return JSValuePtr::encode(result);
    47184720}
    47194721
    47204722#endif
    47214723
    4722 JSValue* Interpreter::cti_op_instanceof(STUB_ARGS)
    4723 {
    4724     BEGIN_STUB_FUNCTION();
    4725 
    4726     CallFrame* callFrame = ARG_callFrame;
    4727     JSValue* value = ARG_src1;
    4728     JSValue* baseVal = ARG_src2;
    4729     JSValue* proto = ARG_src3;
     4724JSValueEncodedAsPointer* Interpreter::cti_op_instanceof(STUB_ARGS)
     4725{
     4726    BEGIN_STUB_FUNCTION();
     4727
     4728    CallFrame* callFrame = ARG_callFrame;
     4729    JSValuePtr value = ARG_src1;
     4730    JSValuePtr baseVal = ARG_src2;
     4731    JSValuePtr proto = ARG_src3;
    47304732
    47314733    // at least one of these checks must have failed to get to the slow case
     
    47434745
    47444746    if (!asObject(baseVal)->structure()->typeInfo().implementsHasInstance())
    4745         return jsBoolean(false);
     4747        return JSValuePtr::encode(jsBoolean(false));
    47464748
    47474749    if (!proto->isObject()) {
     
    47514753       
    47524754    if (!value->isObject())
    4753         return jsBoolean(false);
    4754 
    4755     JSValue* result = jsBoolean(asObject(baseVal)->hasInstance(callFrame, value, proto));
     4755        return JSValuePtr::encode(jsBoolean(false));
     4756
     4757    JSValuePtr result = jsBoolean(asObject(baseVal)->hasInstance(callFrame, value, proto));
    47564758    CHECK_FOR_EXCEPTION_AT_END();
    47574759
    4758     return result;
    4759 }
    4760 
    4761 JSValue* Interpreter::cti_op_del_by_id(STUB_ARGS)
     4760    return JSValuePtr::encode(result);
     4761}
     4762
     4763JSValueEncodedAsPointer* Interpreter::cti_op_del_by_id(STUB_ARGS)
    47624764{
    47634765    BEGIN_STUB_FUNCTION();
     
    47674769    JSObject* baseObj = ARG_src1->toObject(callFrame);
    47684770
    4769     JSValue* result = jsBoolean(baseObj->deleteProperty(callFrame, *ARG_id2));
     4771    JSValuePtr result = jsBoolean(baseObj->deleteProperty(callFrame, *ARG_id2));
    47704772    CHECK_FOR_EXCEPTION_AT_END();
    4771     return result;
    4772 }
    4773 
    4774 JSValue* Interpreter::cti_op_mul(STUB_ARGS)
    4775 {
    4776     BEGIN_STUB_FUNCTION();
    4777 
    4778     JSValue* src1 = ARG_src1;
    4779     JSValue* src2 = ARG_src2;
     4773    return JSValuePtr::encode(result);
     4774}
     4775
     4776JSValueEncodedAsPointer* Interpreter::cti_op_mul(STUB_ARGS)
     4777{
     4778    BEGIN_STUB_FUNCTION();
     4779
     4780    JSValuePtr src1 = ARG_src1;
     4781    JSValuePtr src2 = ARG_src2;
    47804782
    47814783    double left;
    47824784    double right;
    47834785    if (fastIsNumber(src1, left) && fastIsNumber(src2, right))
    4784         return jsNumber(ARG_globalData, left * right);
    4785 
    4786     CallFrame* callFrame = ARG_callFrame;
    4787     JSValue* result = jsNumber(ARG_globalData, src1->toNumber(callFrame) * src2->toNumber(callFrame));
     4786        return JSValuePtr::encode(jsNumber(ARG_globalData, left * right));
     4787
     4788    CallFrame* callFrame = ARG_callFrame;
     4789    JSValuePtr result = jsNumber(ARG_globalData, src1->toNumber(callFrame) * src2->toNumber(callFrame));
    47884790    CHECK_FOR_EXCEPTION_AT_END();
    4789     return result;
     4791    return JSValuePtr::encode(result);
    47904792}
    47914793
     
    48984900}
    48994901
    4900 JSValue* Interpreter::cti_op_call_NotJSFunction(STUB_ARGS)
    4901 {
    4902     BEGIN_STUB_FUNCTION();
    4903 
    4904     JSValue* funcVal = ARG_src1;
     4902JSValueEncodedAsPointer* Interpreter::cti_op_call_NotJSFunction(STUB_ARGS)
     4903{
     4904    BEGIN_STUB_FUNCTION();
     4905
     4906    JSValuePtr funcVal = ARG_src1;
    49054907
    49064908    CallData callData;
     
    49214923        ArgList argList(argv + 1, argCount - 1);
    49224924
    4923         JSValue* returnValue;
     4925        JSValuePtr returnValue;
    49244926        {
    49254927            SamplingTool::HostCallRecord callRecord(CTI_SAMPLER);
    49264928
    49274929            // FIXME: All host methods should be calling toThisObject, but this is not presently the case.
    4928             JSValue* thisValue = argv[0].jsValue(callFrame);
     4930            JSValuePtr thisValue = argv[0].jsValue(callFrame);
    49294931            if (thisValue == jsNull())
    49304932                thisValue = callFrame->globalThisValue();
     
    49354937        CHECK_FOR_EXCEPTION();
    49364938
    4937         return returnValue;
     4939        return JSValuePtr::encode(returnValue);
    49384940    }
    49394941
     
    50125014}
    50135015
    5014 JSValue* Interpreter::cti_op_resolve(STUB_ARGS)
     5016JSValueEncodedAsPointer* Interpreter::cti_op_resolve(STUB_ARGS)
    50155017{
    50165018    BEGIN_STUB_FUNCTION();
     
    50285030        PropertySlot slot(o);
    50295031        if (o->getPropertySlot(callFrame, ident, slot)) {
    5030             JSValue* result = slot.getValue(callFrame, ident);
     5032            JSValuePtr result = slot.getValue(callFrame, ident);
    50315033            CHECK_FOR_EXCEPTION_AT_END();
    5032             return result;
     5034            return JSValuePtr::encode(result);
    50335035        }
    50345036    } while (++iter != end);
     
    50575059}
    50585060
    5059 JSValue* Interpreter::cti_op_construct_NotJSConstruct(STUB_ARGS)
    5060 {
    5061     BEGIN_STUB_FUNCTION();
    5062 
    5063     CallFrame* callFrame = ARG_callFrame;
    5064 
    5065     JSValue* constrVal = ARG_src1;
     5061JSValueEncodedAsPointer* Interpreter::cti_op_construct_NotJSConstruct(STUB_ARGS)
     5062{
     5063    BEGIN_STUB_FUNCTION();
     5064
     5065    CallFrame* callFrame = ARG_callFrame;
     5066
     5067    JSValuePtr constrVal = ARG_src1;
    50665068    int argCount = ARG_int3;
    50675069    int thisRegister = ARG_int5;
     
    50735075        ArgList argList(callFrame->registers() + thisRegister + 1, argCount - 1);
    50745076
    5075         JSValue* returnValue;
     5077        JSValuePtr returnValue;
    50765078        {
    50775079            SamplingTool::HostCallRecord callRecord(CTI_SAMPLER);
     
    50805082        CHECK_FOR_EXCEPTION();
    50815083
    5082         return returnValue;
     5084        return JSValuePtr::encode(returnValue);
    50835085    }
    50845086
     
    50915093}
    50925094
    5093 JSValue* Interpreter::cti_op_get_by_val(STUB_ARGS)
     5095JSValueEncodedAsPointer* Interpreter::cti_op_get_by_val(STUB_ARGS)
    50945096{
    50955097    BEGIN_STUB_FUNCTION();
     
    50985100    Interpreter* interpreter = ARG_globalData->interpreter;
    50995101
    5100     JSValue* baseValue = ARG_src1;
    5101     JSValue* subscript = ARG_src2;
    5102 
    5103     JSValue* result;
     5102    JSValuePtr baseValue = ARG_src1;
     5103    JSValuePtr subscript = ARG_src2;
     5104
     5105    JSValuePtr result;
    51045106    unsigned i;
    51055107
     
    51135115                result = jsArray->JSArray::get(callFrame, i);
    51145116        } else if (interpreter->isJSString(baseValue) && asString(baseValue)->canGetIndex(i))
    5115             return asString(baseValue)->getIndex(ARG_globalData, i);
     5117            return JSValuePtr::encode(asString(baseValue)->getIndex(ARG_globalData, i));
    51165118        else if (interpreter->isJSByteArray(baseValue) && asByteArray(baseValue)->canAccessIndex(i))
    5117             return asByteArray(baseValue)->getIndex(i);
     5119            return JSValuePtr::encode(asByteArray(baseValue)->getIndex(i));
    51185120        else
    51195121            result = baseValue->get(callFrame, i);
     
    51245126
    51255127    CHECK_FOR_EXCEPTION_AT_END();
    5126     return result;
     5128    return JSValuePtr::encode(result);
    51275129}
    51285130
     
    51555157            // We also handle wrapper substitution for the global object at the same time.
    51565158            JSObject* thisObj = base->toThisObject(callFrame);
    5157             JSValue* result = slot.getValue(callFrame, ident);
     5159            JSValuePtr result = slot.getValue(callFrame, ident);
    51585160            CHECK_FOR_EXCEPTION_AT_END();
    51595161
    5160             RETURN_PAIR(thisObj, asPointer(result));
     5162            RETURN_PAIR(thisObj, JSValuePtr::encode(result));
    51615163        }
    51625164        ++iter;
     
    51695171}
    51705172
    5171 JSValue* Interpreter::cti_op_sub(STUB_ARGS)
    5172 {
    5173     BEGIN_STUB_FUNCTION();
    5174 
    5175     JSValue* src1 = ARG_src1;
    5176     JSValue* src2 = ARG_src2;
     5173JSValueEncodedAsPointer* Interpreter::cti_op_sub(STUB_ARGS)
     5174{
     5175    BEGIN_STUB_FUNCTION();
     5176
     5177    JSValuePtr src1 = ARG_src1;
     5178    JSValuePtr src2 = ARG_src2;
    51775179
    51785180    double left;
    51795181    double right;
    51805182    if (fastIsNumber(src1, left) && fastIsNumber(src2, right))
    5181         return jsNumber(ARG_globalData, left - right);
    5182 
    5183     CallFrame* callFrame = ARG_callFrame;
    5184     JSValue* result = jsNumber(ARG_globalData, src1->toNumber(callFrame) - src2->toNumber(callFrame));
     5183        return JSValuePtr::encode(jsNumber(ARG_globalData, left - right));
     5184
     5185    CallFrame* callFrame = ARG_callFrame;
     5186    JSValuePtr result = jsNumber(ARG_globalData, src1->toNumber(callFrame) - src2->toNumber(callFrame));
    51855187    CHECK_FOR_EXCEPTION_AT_END();
    5186     return result;
     5188    return JSValuePtr::encode(result);
    51875189}
    51885190
     
    51945196    Interpreter* interpreter = ARG_globalData->interpreter;
    51955197
    5196     JSValue* baseValue = ARG_src1;
    5197     JSValue* subscript = ARG_src2;
    5198     JSValue* value = ARG_src3;
     5198    JSValuePtr baseValue = ARG_src1;
     5199    JSValuePtr subscript = ARG_src2;
     5200    JSValuePtr value = ARG_src3;
    51995201
    52005202    unsigned i;
     
    52385240    CallFrame* callFrame = ARG_callFrame;
    52395241
    5240     JSValue* baseValue = ARG_src1;
     5242    JSValuePtr baseValue = ARG_src1;
    52415243    int i = ARG_int2;
    5242     JSValue* value = ARG_src3;
     5244    JSValuePtr value = ARG_src3;
    52435245
    52445246    ASSERT(ARG_globalData->interpreter->isJSArray(baseValue));
     
    52585260}
    52595261
    5260 JSValue* Interpreter::cti_op_lesseq(STUB_ARGS)
    5261 {
    5262     BEGIN_STUB_FUNCTION();
    5263 
    5264     CallFrame* callFrame = ARG_callFrame;
    5265     JSValue* result = jsBoolean(jsLessEq(callFrame, ARG_src1, ARG_src2));
     5262JSValueEncodedAsPointer* Interpreter::cti_op_lesseq(STUB_ARGS)
     5263{
     5264    BEGIN_STUB_FUNCTION();
     5265
     5266    CallFrame* callFrame = ARG_callFrame;
     5267    JSValuePtr result = jsBoolean(jsLessEq(callFrame, ARG_src1, ARG_src2));
    52665268    CHECK_FOR_EXCEPTION_AT_END();
    5267     return result;
     5269    return JSValuePtr::encode(result);
    52685270}
    52695271
     
    52725274    BEGIN_STUB_FUNCTION();
    52735275
    5274     JSValue* src1 = ARG_src1;
     5276    JSValuePtr src1 = ARG_src1;
    52755277
    52765278    CallFrame* callFrame = ARG_callFrame;
     
    52815283}
    52825284
    5283 JSValue* Interpreter::cti_op_negate(STUB_ARGS)
    5284 {
    5285     BEGIN_STUB_FUNCTION();
    5286 
    5287     JSValue* src = ARG_src1;
     5285JSValueEncodedAsPointer* Interpreter::cti_op_negate(STUB_ARGS)
     5286{
     5287    BEGIN_STUB_FUNCTION();
     5288
     5289    JSValuePtr src = ARG_src1;
    52885290
    52895291    double v;
    52905292    if (fastIsNumber(src, v))
    5291         return jsNumber(ARG_globalData, -v);
    5292 
    5293     CallFrame* callFrame = ARG_callFrame;
    5294     JSValue* result = jsNumber(ARG_globalData, -src->toNumber(callFrame));
     5293        return JSValuePtr::encode(jsNumber(ARG_globalData, -v));
     5294
     5295    CallFrame* callFrame = ARG_callFrame;
     5296    JSValuePtr result = jsNumber(ARG_globalData, -src->toNumber(callFrame));
    52955297    CHECK_FOR_EXCEPTION_AT_END();
    5296     return result;
    5297 }
    5298 
    5299 JSValue* Interpreter::cti_op_resolve_base(STUB_ARGS)
    5300 {
    5301     BEGIN_STUB_FUNCTION();
    5302 
    5303     return inlineResolveBase(ARG_callFrame, *ARG_id1, ARG_callFrame->scopeChain());
    5304 }
    5305 
    5306 JSValue* Interpreter::cti_op_resolve_skip(STUB_ARGS)
     5298    return JSValuePtr::encode(result);
     5299}
     5300
     5301JSValueEncodedAsPointer* Interpreter::cti_op_resolve_base(STUB_ARGS)
     5302{
     5303    BEGIN_STUB_FUNCTION();
     5304
     5305    return JSValuePtr::encode(inlineResolveBase(ARG_callFrame, *ARG_id1, ARG_callFrame->scopeChain()));
     5306}
     5307
     5308JSValueEncodedAsPointer* Interpreter::cti_op_resolve_skip(STUB_ARGS)
    53075309{
    53085310    BEGIN_STUB_FUNCTION();
     
    53255327        PropertySlot slot(o);
    53265328        if (o->getPropertySlot(callFrame, ident, slot)) {
    5327             JSValue* result = slot.getValue(callFrame, ident);
     5329            JSValuePtr result = slot.getValue(callFrame, ident);
    53285330            CHECK_FOR_EXCEPTION_AT_END();
    5329             return result;
     5331            return JSValuePtr::encode(result);
    53305332        }
    53315333    } while (++iter != end);
     
    53375339}
    53385340
    5339 JSValue* Interpreter::cti_op_resolve_global(STUB_ARGS)
     5341JSValueEncodedAsPointer* Interpreter::cti_op_resolve_global(STUB_ARGS)
    53405342{
    53415343    BEGIN_STUB_FUNCTION();
     
    53495351    PropertySlot slot(globalObject);
    53505352    if (globalObject->getPropertySlot(callFrame, ident, slot)) {
    5351         JSValue* result = slot.getValue(callFrame, ident);
     5353        JSValuePtr result = slot.getValue(callFrame, ident);
    53525354        if (slot.isCacheable() && !globalObject->structure()->isDictionary()) {
    53535355            GlobalResolveInfo& globalResolveInfo = callFrame->codeBlock()->globalResolveInfo(globalResolveInfoIndex);
     
    53575359            globalResolveInfo.structure = globalObject->structure();
    53585360            globalResolveInfo.offset = slot.cachedOffset();
    5359             return result;
     5361            return JSValuePtr::encode(result);
    53605362        }
    53615363
    53625364        CHECK_FOR_EXCEPTION_AT_END();
    5363         return result;
     5365        return JSValuePtr::encode(result);
    53645366    }
    53655367
     
    53695371}
    53705372
    5371 JSValue* Interpreter::cti_op_div(STUB_ARGS)
    5372 {
    5373     BEGIN_STUB_FUNCTION();
    5374 
    5375     JSValue* src1 = ARG_src1;
    5376     JSValue* src2 = ARG_src2;
     5373JSValueEncodedAsPointer* Interpreter::cti_op_div(STUB_ARGS)
     5374{
     5375    BEGIN_STUB_FUNCTION();
     5376
     5377    JSValuePtr src1 = ARG_src1;
     5378    JSValuePtr src2 = ARG_src2;
    53775379
    53785380    double left;
    53795381    double right;
    53805382    if (fastIsNumber(src1, left) && fastIsNumber(src2, right))
    5381         return jsNumber(ARG_globalData, left / right);
    5382 
    5383     CallFrame* callFrame = ARG_callFrame;
    5384     JSValue* result = jsNumber(ARG_globalData, src1->toNumber(callFrame) / src2->toNumber(callFrame));
     5383        return JSValuePtr::encode(jsNumber(ARG_globalData, left / right));
     5384
     5385    CallFrame* callFrame = ARG_callFrame;
     5386    JSValuePtr result = jsNumber(ARG_globalData, src1->toNumber(callFrame) / src2->toNumber(callFrame));
    53855387    CHECK_FOR_EXCEPTION_AT_END();
    5386     return result;
    5387 }
    5388 
    5389 JSValue* Interpreter::cti_op_pre_dec(STUB_ARGS)
    5390 {
    5391     BEGIN_STUB_FUNCTION();
    5392 
    5393     JSValue* v = ARG_src1;
    5394 
    5395     CallFrame* callFrame = ARG_callFrame;
    5396     JSValue* result = jsNumber(ARG_globalData, v->toNumber(callFrame) - 1);
     5388    return JSValuePtr::encode(result);
     5389}
     5390
     5391JSValueEncodedAsPointer* Interpreter::cti_op_pre_dec(STUB_ARGS)
     5392{
     5393    BEGIN_STUB_FUNCTION();
     5394
     5395    JSValuePtr v = ARG_src1;
     5396
     5397    CallFrame* callFrame = ARG_callFrame;
     5398    JSValuePtr result = jsNumber(ARG_globalData, v->toNumber(callFrame) - 1);
    53975399    CHECK_FOR_EXCEPTION_AT_END();
    5398     return result;
     5400    return JSValuePtr::encode(result);
    53995401}
    54005402
     
    54035405    BEGIN_STUB_FUNCTION();
    54045406
    5405     JSValue* src1 = ARG_src1;
    5406     JSValue* src2 = ARG_src2;
     5407    JSValuePtr src1 = ARG_src1;
     5408    JSValuePtr src2 = ARG_src2;
    54075409    CallFrame* callFrame = ARG_callFrame;
    54085410
     
    54125414}
    54135415
    5414 JSValue* Interpreter::cti_op_not(STUB_ARGS)
    5415 {
    5416     BEGIN_STUB_FUNCTION();
    5417 
    5418     JSValue* src = ARG_src1;
    5419 
    5420     CallFrame* callFrame = ARG_callFrame;
    5421 
    5422     JSValue* result = jsBoolean(!src->toBoolean(callFrame));
     5416JSValueEncodedAsPointer* Interpreter::cti_op_not(STUB_ARGS)
     5417{
     5418    BEGIN_STUB_FUNCTION();
     5419
     5420    JSValuePtr src = ARG_src1;
     5421
     5422    CallFrame* callFrame = ARG_callFrame;
     5423
     5424    JSValuePtr result = jsBoolean(!src->toBoolean(callFrame));
    54235425    CHECK_FOR_EXCEPTION_AT_END();
    5424     return result;
     5426    return JSValuePtr::encode(result);
    54255427}
    54265428
     
    54295431    BEGIN_STUB_FUNCTION();
    54305432
    5431     JSValue* src1 = ARG_src1;
     5433    JSValuePtr src1 = ARG_src1;
    54325434
    54335435    CallFrame* callFrame = ARG_callFrame;
     
    54425444    BEGIN_STUB_FUNCTION();
    54435445
    5444     JSValue* v = ARG_src1;
    5445 
    5446     CallFrame* callFrame = ARG_callFrame;
    5447 
    5448     JSValue* number = v->toJSNumber(callFrame);
     5446    JSValuePtr v = ARG_src1;
     5447
     5448    CallFrame* callFrame = ARG_callFrame;
     5449
     5450    JSValuePtr number = v->toJSNumber(callFrame);
    54495451    CHECK_FOR_EXCEPTION_AT_END();
    54505452
    5451     RETURN_PAIR(asPointer(number), asPointer(jsNumber(ARG_globalData, number->uncheckedGetNumber() + 1)));
    5452 }
    5453 
    5454 JSValue* Interpreter::cti_op_eq(STUB_ARGS)
    5455 {
    5456     BEGIN_STUB_FUNCTION();
    5457 
    5458     JSValue* src1 = ARG_src1;
    5459     JSValue* src2 = ARG_src2;
     5453    RETURN_PAIR(JSValuePtr::encode(number), JSValuePtr::encode(jsNumber(ARG_globalData, number->uncheckedGetNumber() + 1)));
     5454}
     5455
     5456JSValueEncodedAsPointer* Interpreter::cti_op_eq(STUB_ARGS)
     5457{
     5458    BEGIN_STUB_FUNCTION();
     5459
     5460    JSValuePtr src1 = ARG_src1;
     5461    JSValuePtr src2 = ARG_src2;
    54605462
    54615463    CallFrame* callFrame = ARG_callFrame;
    54625464
    54635465    ASSERT(!JSImmediate::areBothImmediateNumbers(src1, src2));
    5464     JSValue* result = jsBoolean(equalSlowCaseInline(callFrame, src1, src2));
     5466    JSValuePtr result = jsBoolean(equalSlowCaseInline(callFrame, src1, src2));
    54655467    CHECK_FOR_EXCEPTION_AT_END();
    5466     return result;
    5467 }
    5468 
    5469 JSValue* Interpreter::cti_op_lshift(STUB_ARGS)
    5470 {
    5471     BEGIN_STUB_FUNCTION();
    5472 
    5473     JSValue* val = ARG_src1;
    5474     JSValue* shift = ARG_src2;
     5468    return JSValuePtr::encode(result);
     5469}
     5470
     5471JSValueEncodedAsPointer* Interpreter::cti_op_lshift(STUB_ARGS)
     5472{
     5473    BEGIN_STUB_FUNCTION();
     5474
     5475    JSValuePtr val = ARG_src1;
     5476    JSValuePtr shift = ARG_src2;
    54755477
    54765478    int32_t left;
    54775479    uint32_t right;
    54785480    if (JSImmediate::areBothImmediateNumbers(val, shift))
    5479         return jsNumber(ARG_globalData, JSImmediate::getTruncatedInt32(val) << (JSImmediate::getTruncatedUInt32(shift) & 0x1f));
     5481        return JSValuePtr::encode(jsNumber(ARG_globalData, JSImmediate::getTruncatedInt32(val) << (JSImmediate::getTruncatedUInt32(shift) & 0x1f)));
    54805482    if (fastToInt32(val, left) && fastToUInt32(shift, right))
    5481         return jsNumber(ARG_globalData, left << (right & 0x1f));
    5482 
    5483     CallFrame* callFrame = ARG_callFrame;
    5484     JSValue* result = jsNumber(ARG_globalData, (val->toInt32(callFrame)) << (shift->toUInt32(callFrame) & 0x1f));
     5483        return JSValuePtr::encode(jsNumber(ARG_globalData, left << (right & 0x1f)));
     5484
     5485    CallFrame* callFrame = ARG_callFrame;
     5486    JSValuePtr result = jsNumber(ARG_globalData, (val->toInt32(callFrame)) << (shift->toUInt32(callFrame) & 0x1f));
    54855487    CHECK_FOR_EXCEPTION_AT_END();
    5486     return result;
    5487 }
    5488 
    5489 JSValue* Interpreter::cti_op_bitand(STUB_ARGS)
    5490 {
    5491     BEGIN_STUB_FUNCTION();
    5492 
    5493     JSValue* src1 = ARG_src1;
    5494     JSValue* src2 = ARG_src2;
     5488    return JSValuePtr::encode(result);
     5489}
     5490
     5491JSValueEncodedAsPointer* Interpreter::cti_op_bitand(STUB_ARGS)
     5492{
     5493    BEGIN_STUB_FUNCTION();
     5494
     5495    JSValuePtr src1 = ARG_src1;
     5496    JSValuePtr src2 = ARG_src2;
    54955497
    54965498    int32_t left;
    54975499    int32_t right;
    54985500    if (fastToInt32(src1, left) && fastToInt32(src2, right))
    5499         return jsNumber(ARG_globalData, left & right);
    5500 
    5501     CallFrame* callFrame = ARG_callFrame;
    5502     JSValue* result = jsNumber(ARG_globalData, src1->toInt32(callFrame) & src2->toInt32(callFrame));
     5501        return JSValuePtr::encode(jsNumber(ARG_globalData, left & right));
     5502
     5503    CallFrame* callFrame = ARG_callFrame;
     5504    JSValuePtr result = jsNumber(ARG_globalData, src1->toInt32(callFrame) & src2->toInt32(callFrame));
    55035505    CHECK_FOR_EXCEPTION_AT_END();
    5504     return result;
    5505 }
    5506 
    5507 JSValue* Interpreter::cti_op_rshift(STUB_ARGS)
    5508 {
    5509     BEGIN_STUB_FUNCTION();
    5510 
    5511     JSValue* val = ARG_src1;
    5512     JSValue* shift = ARG_src2;
     5506    return JSValuePtr::encode(result);
     5507}
     5508
     5509JSValueEncodedAsPointer* Interpreter::cti_op_rshift(STUB_ARGS)
     5510{
     5511    BEGIN_STUB_FUNCTION();
     5512
     5513    JSValuePtr val = ARG_src1;
     5514    JSValuePtr shift = ARG_src2;
    55135515
    55145516    int32_t left;
    55155517    uint32_t right;
    55165518    if (JSImmediate::areBothImmediateNumbers(val, shift))
    5517         return JSImmediate::rightShiftImmediateNumbers(val, shift);
     5519        return JSValuePtr::encode(JSImmediate::rightShiftImmediateNumbers(val, shift));
    55185520    if (fastToInt32(val, left) && fastToUInt32(shift, right))
    5519         return jsNumber(ARG_globalData, left >> (right & 0x1f));
    5520 
    5521     CallFrame* callFrame = ARG_callFrame;
    5522     JSValue* result = jsNumber(ARG_globalData, (val->toInt32(callFrame)) >> (shift->toUInt32(callFrame) & 0x1f));
     5521        return JSValuePtr::encode(jsNumber(ARG_globalData, left >> (right & 0x1f)));
     5522
     5523    CallFrame* callFrame = ARG_callFrame;
     5524    JSValuePtr result = jsNumber(ARG_globalData, (val->toInt32(callFrame)) >> (shift->toUInt32(callFrame) & 0x1f));
    55235525    CHECK_FOR_EXCEPTION_AT_END();
    5524     return result;
    5525 }
    5526 
    5527 JSValue* Interpreter::cti_op_bitnot(STUB_ARGS)
    5528 {
    5529     BEGIN_STUB_FUNCTION();
    5530 
    5531     JSValue* src = ARG_src1;
     5526    return JSValuePtr::encode(result);
     5527}
     5528
     5529JSValueEncodedAsPointer* Interpreter::cti_op_bitnot(STUB_ARGS)
     5530{
     5531    BEGIN_STUB_FUNCTION();
     5532
     5533    JSValuePtr src = ARG_src1;
    55325534
    55335535    int value;
    55345536    if (fastToInt32(src, value))
    5535         return jsNumber(ARG_globalData, ~value);
    5536            
    5537     CallFrame* callFrame = ARG_callFrame;
    5538     JSValue* result = jsNumber(ARG_globalData, ~src->toInt32(callFrame));
     5537        return JSValuePtr::encode(jsNumber(ARG_globalData, ~value));
     5538
     5539    CallFrame* callFrame = ARG_callFrame;
     5540    JSValuePtr result = jsNumber(ARG_globalData, ~src->toInt32(callFrame));
    55395541    CHECK_FOR_EXCEPTION_AT_END();
    5540     return result;
     5542    return JSValuePtr::encode(result);
    55415543}
    55425544
     
    55615563        PropertySlot slot(base);
    55625564        if (base->getPropertySlot(callFrame, ident, slot)) {
    5563             JSValue* result = slot.getValue(callFrame, ident);
     5565            JSValuePtr result = slot.getValue(callFrame, ident);
    55645566            CHECK_FOR_EXCEPTION_AT_END();
    55655567
    5566             RETURN_PAIR(base, asPointer(result));
     5568            RETURN_PAIR(base, JSValuePtr::encode(result));
    55675569        }
    55685570        ++iter;
     
    55825584}
    55835585
    5584 JSValue* Interpreter::cti_op_mod(STUB_ARGS)
    5585 {
    5586     BEGIN_STUB_FUNCTION();
    5587 
    5588     JSValue* dividendValue = ARG_src1;
    5589     JSValue* divisorValue = ARG_src2;
     5586JSValueEncodedAsPointer* Interpreter::cti_op_mod(STUB_ARGS)
     5587{
     5588    BEGIN_STUB_FUNCTION();
     5589
     5590    JSValuePtr dividendValue = ARG_src1;
     5591    JSValuePtr divisorValue = ARG_src2;
    55905592
    55915593    CallFrame* callFrame = ARG_callFrame;
    55925594    double d = dividendValue->toNumber(callFrame);
    5593     JSValue* result = jsNumber(ARG_globalData, fmod(d, divisorValue->toNumber(callFrame)));
     5595    JSValuePtr result = jsNumber(ARG_globalData, fmod(d, divisorValue->toNumber(callFrame)));
    55945596    CHECK_FOR_EXCEPTION_AT_END();
    5595     return result;
    5596 }
    5597 
    5598 JSValue* Interpreter::cti_op_less(STUB_ARGS)
    5599 {
    5600     BEGIN_STUB_FUNCTION();
    5601 
    5602     CallFrame* callFrame = ARG_callFrame;
    5603     JSValue* result = jsBoolean(jsLess(callFrame, ARG_src1, ARG_src2));
     5597    return JSValuePtr::encode(result);
     5598}
     5599
     5600JSValueEncodedAsPointer* Interpreter::cti_op_less(STUB_ARGS)
     5601{
     5602    BEGIN_STUB_FUNCTION();
     5603
     5604    CallFrame* callFrame = ARG_callFrame;
     5605    JSValuePtr result = jsBoolean(jsLess(callFrame, ARG_src1, ARG_src2));
    56045606    CHECK_FOR_EXCEPTION_AT_END();
    5605     return result;
    5606 }
    5607 
    5608 JSValue* Interpreter::cti_op_neq(STUB_ARGS)
    5609 {
    5610     BEGIN_STUB_FUNCTION();
    5611 
    5612     JSValue* src1 = ARG_src1;
    5613     JSValue* src2 = ARG_src2;
     5607    return JSValuePtr::encode(result);
     5608}
     5609
     5610JSValueEncodedAsPointer* Interpreter::cti_op_neq(STUB_ARGS)
     5611{
     5612    BEGIN_STUB_FUNCTION();
     5613
     5614    JSValuePtr src1 = ARG_src1;
     5615    JSValuePtr src2 = ARG_src2;
    56145616
    56155617    ASSERT(!JSImmediate::areBothImmediateNumbers(src1, src2));
    56165618
    56175619    CallFrame* callFrame = ARG_callFrame;
    5618     JSValue* result = jsBoolean(!equalSlowCaseInline(callFrame, src1, src2));
     5620    JSValuePtr result = jsBoolean(!equalSlowCaseInline(callFrame, src1, src2));
    56195621    CHECK_FOR_EXCEPTION_AT_END();
    5620     return result;
     5622    return JSValuePtr::encode(result);
    56215623}
    56225624
     
    56255627    BEGIN_STUB_FUNCTION();
    56265628
    5627     JSValue* v = ARG_src1;
    5628 
    5629     CallFrame* callFrame = ARG_callFrame;
    5630 
    5631     JSValue* number = v->toJSNumber(callFrame);
     5629    JSValuePtr v = ARG_src1;
     5630
     5631    CallFrame* callFrame = ARG_callFrame;
     5632
     5633    JSValuePtr number = v->toJSNumber(callFrame);
    56325634    CHECK_FOR_EXCEPTION_AT_END();
    56335635
    5634     RETURN_PAIR(asPointer(number), asPointer(jsNumber(ARG_globalData, number->uncheckedGetNumber() - 1)));
    5635 }
    5636 
    5637 JSValue* Interpreter::cti_op_urshift(STUB_ARGS)
    5638 {
    5639     BEGIN_STUB_FUNCTION();
    5640 
    5641     JSValue* val = ARG_src1;
    5642     JSValue* shift = ARG_src2;
     5636    RETURN_PAIR(JSValuePtr::encode(number), JSValuePtr::encode(jsNumber(ARG_globalData, number->uncheckedGetNumber() - 1)));
     5637}
     5638
     5639JSValueEncodedAsPointer* Interpreter::cti_op_urshift(STUB_ARGS)
     5640{
     5641    BEGIN_STUB_FUNCTION();
     5642
     5643    JSValuePtr val = ARG_src1;
     5644    JSValuePtr shift = ARG_src2;
    56435645
    56445646    CallFrame* callFrame = ARG_callFrame;
    56455647
    56465648    if (JSImmediate::areBothImmediateNumbers(val, shift) && !JSImmediate::isNegative(val))
    5647         return JSImmediate::rightShiftImmediateNumbers(val, shift);
     5649        return JSValuePtr::encode(JSImmediate::rightShiftImmediateNumbers(val, shift));
    56485650    else {
    5649         JSValue* result = jsNumber(ARG_globalData, (val->toUInt32(callFrame)) >> (shift->toUInt32(callFrame) & 0x1f));
     5651        JSValuePtr result = jsNumber(ARG_globalData, (val->toUInt32(callFrame)) >> (shift->toUInt32(callFrame) & 0x1f));
    56505652        CHECK_FOR_EXCEPTION_AT_END();
    5651         return result;
    5652     }
    5653 }
    5654 
    5655 JSValue* Interpreter::cti_op_bitxor(STUB_ARGS)
    5656 {
    5657     BEGIN_STUB_FUNCTION();
    5658 
    5659     JSValue* src1 = ARG_src1;
    5660     JSValue* src2 = ARG_src2;
    5661 
    5662     CallFrame* callFrame = ARG_callFrame;
    5663 
    5664     JSValue* result = jsNumber(ARG_globalData, src1->toInt32(callFrame) ^ src2->toInt32(callFrame));
     5653        return JSValuePtr::encode(result);
     5654    }
     5655}
     5656
     5657JSValueEncodedAsPointer* Interpreter::cti_op_bitxor(STUB_ARGS)
     5658{
     5659    BEGIN_STUB_FUNCTION();
     5660
     5661    JSValuePtr src1 = ARG_src1;
     5662    JSValuePtr src2 = ARG_src2;
     5663
     5664    CallFrame* callFrame = ARG_callFrame;
     5665
     5666    JSValuePtr result = jsNumber(ARG_globalData, src1->toInt32(callFrame) ^ src2->toInt32(callFrame));
    56655667    CHECK_FOR_EXCEPTION_AT_END();
    5666     return result;
     5668    return JSValuePtr::encode(result);
    56675669}
    56685670
     
    56745676}
    56755677
    5676 JSValue* Interpreter::cti_op_bitor(STUB_ARGS)
    5677 {
    5678     BEGIN_STUB_FUNCTION();
    5679 
    5680     JSValue* src1 = ARG_src1;
    5681     JSValue* src2 = ARG_src2;
    5682 
    5683     CallFrame* callFrame = ARG_callFrame;
    5684 
    5685     JSValue* result = jsNumber(ARG_globalData, src1->toInt32(callFrame) | src2->toInt32(callFrame));
     5678JSValueEncodedAsPointer* Interpreter::cti_op_bitor(STUB_ARGS)
     5679{
     5680    BEGIN_STUB_FUNCTION();
     5681
     5682    JSValuePtr src1 = ARG_src1;
     5683    JSValuePtr src2 = ARG_src2;
     5684
     5685    CallFrame* callFrame = ARG_callFrame;
     5686
     5687    JSValuePtr result = jsNumber(ARG_globalData, src1->toInt32(callFrame) | src2->toInt32(callFrame));
    56865688    CHECK_FOR_EXCEPTION_AT_END();
    5687     return result;
    5688 }
    5689 
    5690 JSValue* Interpreter::cti_op_call_eval(STUB_ARGS)
     5689    return JSValuePtr::encode(result);
     5690}
     5691
     5692JSValueEncodedAsPointer* Interpreter::cti_op_call_eval(STUB_ARGS)
    56915693{
    56925694    BEGIN_STUB_FUNCTION();
     
    56975699    Interpreter* interpreter = ARG_globalData->interpreter;
    56985700   
    5699     JSValue* funcVal = ARG_src1;
     5701    JSValuePtr funcVal = ARG_src1;
    57005702    int registerOffset = ARG_int2;
    57015703    int argCount = ARG_int3;
     
    57035705    Register* newCallFrame = callFrame->registers() + registerOffset;
    57045706    Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount;
    5705     JSValue* thisValue = argv[0].jsValue(callFrame);
     5707    JSValuePtr thisValue = argv[0].jsValue(callFrame);
    57065708    JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject();
    57075709
    57085710    if (thisValue == globalObject && funcVal == globalObject->evalFunction()) {
    5709         JSValue* exceptionValue = noValue();
    5710         JSValue* result = interpreter->callEval(callFrame, registerFile, argv, argCount, registerOffset, exceptionValue);
     5711        JSValuePtr exceptionValue = noValue();
     5712        JSValuePtr result = interpreter->callEval(callFrame, registerFile, argv, argCount, registerOffset, exceptionValue);
    57115713        if (UNLIKELY(exceptionValue != noValue())) {
    57125714            ARG_globalData->exception = exceptionValue;
    57135715            VM_THROW_EXCEPTION_AT_END();
    57145716        }
    5715         return result;
    5716     }
    5717 
    5718     return JSImmediate::impossibleValue();
    5719 }
    5720 
    5721 JSValue* Interpreter::cti_op_throw(STUB_ARGS)
     5717        return JSValuePtr::encode(result);
     5718    }
     5719
     5720    return JSValuePtr::encode(JSImmediate::impossibleValue());
     5721}
     5722
     5723JSValueEncodedAsPointer* Interpreter::cti_op_throw(STUB_ARGS)
    57225724{
    57235725    BEGIN_STUB_FUNCTION();
     
    57285730    unsigned vPCIndex = codeBlock->getBytecodeIndex(STUB_RETURN_ADDRESS);
    57295731
    5730     JSValue* exceptionValue = ARG_src1;
     5732    JSValuePtr exceptionValue = ARG_src1;
    57315733    ASSERT(exceptionValue);
    57325734
     
    57355737    if (!handler) {
    57365738        *ARG_exception = exceptionValue;
    5737         return JSImmediate::nullImmediate();
     5739        return JSValuePtr::encode(JSImmediate::nullImmediate());
    57385740    }
    57395741
     
    57425744    ASSERT(catchRoutine);
    57435745    STUB_SET_RETURN_ADDRESS(catchRoutine);
    5744     return exceptionValue;
     5746    return JSValuePtr::encode(exceptionValue);
    57455747}
    57465748
     
    57525754}
    57535755
    5754 JSValue* Interpreter::cti_op_next_pname(STUB_ARGS)
     5756JSValueEncodedAsPointer* Interpreter::cti_op_next_pname(STUB_ARGS)
    57555757{
    57565758    BEGIN_STUB_FUNCTION();
    57575759
    57585760    JSPropertyNameIterator* it = ARG_pni1;
    5759     JSValue* temp = it->next(ARG_callFrame);
     5761    JSValuePtr temp = it->next(ARG_callFrame);
    57605762    if (!temp)
    57615763        it->invalidate();
    5762     return temp;
     5764    return JSValuePtr::encode(temp);
    57635765}
    57645766
     
    57805782}
    57815783
    5782 JSValue* Interpreter::cti_op_typeof(STUB_ARGS)
    5783 {
    5784     BEGIN_STUB_FUNCTION();
    5785 
    5786     return jsTypeStringForValue(ARG_callFrame, ARG_src1);
    5787 }
    5788 
    5789 JSValue* Interpreter::cti_op_is_undefined(STUB_ARGS)
    5790 {
    5791     BEGIN_STUB_FUNCTION();
    5792 
    5793     JSValue* v = ARG_src1;
    5794     return jsBoolean(JSImmediate::isImmediate(v) ? v->isUndefined() : v->asCell()->structure()->typeInfo().masqueradesAsUndefined());
    5795 }
    5796 
    5797 JSValue* Interpreter::cti_op_is_boolean(STUB_ARGS)
    5798 {
    5799     BEGIN_STUB_FUNCTION();
    5800 
    5801     return jsBoolean(ARG_src1->isBoolean());
    5802 }
    5803 
    5804 JSValue* Interpreter::cti_op_is_number(STUB_ARGS)
    5805 {
    5806     BEGIN_STUB_FUNCTION();
    5807 
    5808     return jsBoolean(ARG_src1->isNumber());
    5809 }
    5810 
    5811 JSValue* Interpreter::cti_op_is_string(STUB_ARGS)
    5812 {
    5813     BEGIN_STUB_FUNCTION();
    5814 
    5815     return jsBoolean(ARG_globalData->interpreter->isJSString(ARG_src1));
    5816 }
    5817 
    5818 JSValue* Interpreter::cti_op_is_object(STUB_ARGS)
    5819 {
    5820     BEGIN_STUB_FUNCTION();
    5821 
    5822     return jsBoolean(jsIsObjectType(ARG_src1));
    5823 }
    5824 
    5825 JSValue* Interpreter::cti_op_is_function(STUB_ARGS)
    5826 {
    5827     BEGIN_STUB_FUNCTION();
    5828 
    5829     return jsBoolean(jsIsFunctionType(ARG_src1));
    5830 }
    5831 
    5832 JSValue* Interpreter::cti_op_stricteq(STUB_ARGS)
    5833 {
    5834     BEGIN_STUB_FUNCTION();
    5835 
    5836     JSValue* src1 = ARG_src1;
    5837     JSValue* src2 = ARG_src2;
     5784JSValueEncodedAsPointer* Interpreter::cti_op_typeof(STUB_ARGS)
     5785{
     5786    BEGIN_STUB_FUNCTION();
     5787
     5788    return JSValuePtr::encode(jsTypeStringForValue(ARG_callFrame, ARG_src1));
     5789}
     5790
     5791JSValueEncodedAsPointer* Interpreter::cti_op_is_undefined(STUB_ARGS)
     5792{
     5793    BEGIN_STUB_FUNCTION();
     5794
     5795    JSValuePtr v = ARG_src1;
     5796    return JSValuePtr::encode(jsBoolean(JSImmediate::isImmediate(v) ? v->isUndefined() : v->asCell()->structure()->typeInfo().masqueradesAsUndefined()));
     5797}
     5798
     5799JSValueEncodedAsPointer* Interpreter::cti_op_is_boolean(STUB_ARGS)
     5800{
     5801    BEGIN_STUB_FUNCTION();
     5802
     5803    return JSValuePtr::encode(jsBoolean(ARG_src1->isBoolean()));
     5804}
     5805
     5806JSValueEncodedAsPointer* Interpreter::cti_op_is_number(STUB_ARGS)
     5807{
     5808    BEGIN_STUB_FUNCTION();
     5809
     5810    return JSValuePtr::encode(jsBoolean(ARG_src1->isNumber()));
     5811}
     5812
     5813JSValueEncodedAsPointer* Interpreter::cti_op_is_string(STUB_ARGS)
     5814{
     5815    BEGIN_STUB_FUNCTION();
     5816
     5817    return JSValuePtr::encode(jsBoolean(ARG_globalData->interpreter->isJSString(ARG_src1)));
     5818}
     5819
     5820JSValueEncodedAsPointer* Interpreter::cti_op_is_object(STUB_ARGS)
     5821{
     5822    BEGIN_STUB_FUNCTION();
     5823
     5824    return JSValuePtr::encode(jsBoolean(jsIsObjectType(ARG_src1)));
     5825}
     5826
     5827JSValueEncodedAsPointer* Interpreter::cti_op_is_function(STUB_ARGS)
     5828{
     5829    BEGIN_STUB_FUNCTION();
     5830
     5831    return JSValuePtr::encode(jsBoolean(jsIsFunctionType(ARG_src1)));
     5832}
     5833
     5834JSValueEncodedAsPointer* Interpreter::cti_op_stricteq(STUB_ARGS)
     5835{
     5836    BEGIN_STUB_FUNCTION();
     5837
     5838    JSValuePtr src1 = ARG_src1;
     5839    JSValuePtr src2 = ARG_src2;
    58385840
    58395841    // handled inline as fast cases
     
    58415843    ASSERT(!(JSImmediate::isEitherImmediate(src1, src2) & (src1 != JSImmediate::zeroImmediate()) & (src2 != JSImmediate::zeroImmediate())));
    58425844
    5843     return jsBoolean(strictEqualSlowCaseInline(src1, src2));
    5844 }
    5845 
    5846 JSValue* Interpreter::cti_op_nstricteq(STUB_ARGS)
    5847 {
    5848     BEGIN_STUB_FUNCTION();
    5849 
    5850     JSValue* src1 = ARG_src1;
    5851     JSValue* src2 = ARG_src2;
     5845    return JSValuePtr::encode(jsBoolean(strictEqualSlowCaseInline(src1, src2)));
     5846}
     5847
     5848JSValueEncodedAsPointer* Interpreter::cti_op_nstricteq(STUB_ARGS)
     5849{
     5850    BEGIN_STUB_FUNCTION();
     5851
     5852    JSValuePtr src1 = ARG_src1;
     5853    JSValuePtr src2 = ARG_src2;
    58525854
    58535855    // handled inline as fast cases
     
    58555857    ASSERT(!(JSImmediate::isEitherImmediate(src1, src2) & (src1 != JSImmediate::zeroImmediate()) & (src2 != JSImmediate::zeroImmediate())));
    58565858   
    5857     return jsBoolean(!strictEqualSlowCaseInline(src1, src2));
    5858 }
    5859 
    5860 JSValue* Interpreter::cti_op_to_jsnumber(STUB_ARGS)
    5861 {
    5862     BEGIN_STUB_FUNCTION();
    5863 
    5864     JSValue* src = ARG_src1;
    5865     CallFrame* callFrame = ARG_callFrame;
    5866 
    5867     JSValue* result = src->toJSNumber(callFrame);
     5859    return JSValuePtr::encode(jsBoolean(!strictEqualSlowCaseInline(src1, src2)));
     5860}
     5861
     5862JSValueEncodedAsPointer* Interpreter::cti_op_to_jsnumber(STUB_ARGS)
     5863{
     5864    BEGIN_STUB_FUNCTION();
     5865
     5866    JSValuePtr src = ARG_src1;
     5867    CallFrame* callFrame = ARG_callFrame;
     5868
     5869    JSValuePtr result = src->toJSNumber(callFrame);
    58685870    CHECK_FOR_EXCEPTION_AT_END();
    5869     return result;
    5870 }
    5871 
    5872 JSValue* Interpreter::cti_op_in(STUB_ARGS)
    5873 {
    5874     BEGIN_STUB_FUNCTION();
    5875 
    5876     CallFrame* callFrame = ARG_callFrame;
    5877     JSValue* baseVal = ARG_src2;
     5871    return JSValuePtr::encode(result);
     5872}
     5873
     5874JSValueEncodedAsPointer* Interpreter::cti_op_in(STUB_ARGS)
     5875{
     5876    BEGIN_STUB_FUNCTION();
     5877
     5878    CallFrame* callFrame = ARG_callFrame;
     5879    JSValuePtr baseVal = ARG_src2;
    58785880
    58795881    if (!baseVal->isObject()) {
     
    58855887    }
    58865888
    5887     JSValue* propName = ARG_src1;
     5889    JSValuePtr propName = ARG_src1;
    58885890    JSObject* baseObj = asObject(baseVal);
    58895891
    58905892    uint32_t i;
    58915893    if (propName->getUInt32(i))
    5892         return jsBoolean(baseObj->hasProperty(callFrame, i));
     5894        return JSValuePtr::encode(jsBoolean(baseObj->hasProperty(callFrame, i)));
    58935895
    58945896    Identifier property(callFrame, propName->toString(callFrame));
    58955897    CHECK_FOR_EXCEPTION();
    5896     return jsBoolean(baseObj->hasProperty(callFrame, property));
     5898    return JSValuePtr::encode(jsBoolean(baseObj->hasProperty(callFrame, property)));
    58975899}
    58985900
     
    59355937    BEGIN_STUB_FUNCTION();
    59365938
    5937     JSValue* scrutinee = ARG_src1;
     5939    JSValuePtr scrutinee = ARG_src1;
    59385940    unsigned tableIndex = ARG_int2;
    59395941    CallFrame* callFrame = ARG_callFrame;
     
    59525954    BEGIN_STUB_FUNCTION();
    59535955
    5954     JSValue* scrutinee = ARG_src1;
     5956    JSValuePtr scrutinee = ARG_src1;
    59555957    unsigned tableIndex = ARG_int2;
    59565958    CallFrame* callFrame = ARG_callFrame;
     
    59725974    BEGIN_STUB_FUNCTION();
    59735975
    5974     JSValue* scrutinee = ARG_src1;
     5976    JSValuePtr scrutinee = ARG_src1;
    59755977    unsigned tableIndex = ARG_int2;
    59765978    CallFrame* callFrame = ARG_callFrame;
     
    59875989}
    59885990
    5989 JSValue* Interpreter::cti_op_del_by_val(STUB_ARGS)
    5990 {
    5991     BEGIN_STUB_FUNCTION();
    5992 
    5993     CallFrame* callFrame = ARG_callFrame;
    5994 
    5995     JSValue* baseValue = ARG_src1;
     5991JSValueEncodedAsPointer* Interpreter::cti_op_del_by_val(STUB_ARGS)
     5992{
     5993    BEGIN_STUB_FUNCTION();
     5994
     5995    CallFrame* callFrame = ARG_callFrame;
     5996
     5997    JSValuePtr baseValue = ARG_src1;
    59965998    JSObject* baseObj = baseValue->toObject(callFrame); // may throw
    59975999
    5998     JSValue* subscript = ARG_src2;
    5999     JSValue* result;
     6000    JSValuePtr subscript = ARG_src2;
     6001    JSValuePtr result;
    60006002    uint32_t i;
    60016003    if (subscript->getUInt32(i))
     
    60096011
    60106012    CHECK_FOR_EXCEPTION_AT_END();
    6011     return result;
     6013    return JSValuePtr::encode(result);
    60126014}
    60136015
     
    60436045    CodeBlock* codeBlock = callFrame->codeBlock();
    60446046    unsigned type = ARG_int1;
    6045     JSValue* message = ARG_src2;
     6047    JSValuePtr message = ARG_src2;
    60466048    unsigned lineNumber = ARG_int3;
    60476049
     
    60626064}
    60636065
    6064 JSValue* Interpreter::cti_vm_throw(STUB_ARGS)
     6066JSValueEncodedAsPointer* Interpreter::cti_vm_throw(STUB_ARGS)
    60656067{
    60666068    BEGIN_STUB_FUNCTION();
     
    60726074    unsigned vPCIndex = codeBlock->getBytecodeIndex(globalData->exceptionLocation);
    60736075
    6074     JSValue* exceptionValue = globalData->exception;
     6076    JSValuePtr exceptionValue = globalData->exception;
    60756077    ASSERT(exceptionValue);
    60766078    globalData->exception = noValue();
     
    60806082    if (!handler) {
    60816083        *ARG_exception = exceptionValue;
    6082         return JSImmediate::nullImmediate();
     6084        return JSValuePtr::encode(JSImmediate::nullImmediate());
    60836085    }
    60846086
     
    60876089    ASSERT(catchRoutine);
    60886090    STUB_SET_RETURN_ADDRESS(catchRoutine);
    6089     return exceptionValue;
     6091    return JSValuePtr::encode(exceptionValue);
    60906092}
    60916093
Note: See TracChangeset for help on using the changeset viewer.