Changeset 43122 in webkit for trunk/JavaScriptCore/runtime
- Timestamp:
- May 1, 2009, 3:43:39 PM (16 years ago)
- Location:
- trunk/JavaScriptCore/runtime
- Files:
-
- 97 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/ArgList.cpp
r43037 r43122 51 51 } 52 52 53 void MarkedArgumentBuffer::slowAppend(JSValue Ptrv)53 void MarkedArgumentBuffer::slowAppend(JSValue v) 54 54 { 55 55 // As long as our size stays within our Vector's inline -
trunk/JavaScriptCore/runtime/ArgList.h
r43037 r43122 86 86 bool isEmpty() const { return !m_size; } 87 87 88 JSValue Ptrat(size_t i) const88 JSValue at(size_t i) const 89 89 { 90 90 if (i < m_size) … … 100 100 } 101 101 102 void append(JSValue Ptrv)102 void append(JSValue v) 103 103 { 104 104 ASSERT(!m_isReadOnly); … … 124 124 125 125 private: 126 void slowAppend(JSValue Ptr);126 void slowAppend(JSValue); 127 127 128 128 Register* m_buffer; … … 157 157 class ArgList { 158 158 public: 159 typedef JSValue Ptr* iterator;160 typedef const JSValue Ptr* const_iterator;159 typedef JSValue* iterator; 160 typedef const JSValue* const_iterator; 161 161 162 162 ArgList() … … 166 166 } 167 167 168 ArgList(JSValue Ptr* args, unsigned argCount)168 ArgList(JSValue* args, unsigned argCount) 169 169 : m_args(args) 170 170 , m_argCount(argCount) … … 173 173 174 174 ArgList(Register* args, int argCount) 175 : m_args(reinterpret_cast<JSValue Ptr*>(args))175 : m_args(reinterpret_cast<JSValue*>(args)) 176 176 , m_argCount(argCount) 177 177 { … … 180 180 181 181 ArgList(const MarkedArgumentBuffer& args) 182 : m_args(reinterpret_cast<JSValue Ptr*>(const_cast<Register*>(args.begin())))182 : m_args(reinterpret_cast<JSValue*>(const_cast<Register*>(args.begin()))) 183 183 , m_argCount(args.size()) 184 184 { 185 185 } 186 186 187 JSValue Ptrat(size_t idx) const187 JSValue at(size_t idx) const 188 188 { 189 189 if (idx < m_argCount) … … 204 204 void getSlice(int startIndex, ArgList& result) const; 205 205 private: 206 JSValue Ptr* m_args;206 JSValue* m_args; 207 207 size_t m_argCount; 208 208 }; -
trunk/JavaScriptCore/runtime/Arguments.cpp
r43037 r43122 188 188 } 189 189 190 void Arguments::put(ExecState* exec, unsigned i, JSValue Ptrvalue, PutPropertySlot& slot)190 void Arguments::put(ExecState* exec, unsigned i, JSValue value, PutPropertySlot& slot) 191 191 { 192 192 if (i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { 193 193 if (i < d->numParameters) 194 d->registers[d->firstParameterIndex + i] = JSValue Ptr(value);195 else 196 d->extraArguments[i - d->numParameters] = JSValue Ptr(value);194 d->registers[d->firstParameterIndex + i] = JSValue(value); 195 else 196 d->extraArguments[i - d->numParameters] = JSValue(value); 197 197 return; 198 198 } … … 201 201 } 202 202 203 void Arguments::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)203 void Arguments::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 204 204 { 205 205 bool isArrayIndex; … … 207 207 if (isArrayIndex && i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { 208 208 if (i < d->numParameters) 209 d->registers[d->firstParameterIndex + i] = JSValue Ptr(value);210 else 211 d->extraArguments[i - d->numParameters] = JSValue Ptr(value);209 d->registers[d->firstParameterIndex + i] = JSValue(value); 210 else 211 d->extraArguments[i - d->numParameters] = JSValue(value); 212 212 return; 213 213 } -
trunk/JavaScriptCore/runtime/Arguments.h
r43037 r43122 82 82 } 83 83 84 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)84 static PassRefPtr<Structure> createStructure(JSValue prototype) 85 85 { 86 86 return Structure::create(prototype, TypeInfo(ObjectType)); … … 91 91 virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); 92 92 virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&); 93 virtual void put(ExecState*, const Identifier& propertyName, JSValue Ptr, PutPropertySlot&);94 virtual void put(ExecState*, unsigned propertyName, JSValue Ptr, PutPropertySlot&);93 virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 94 virtual void put(ExecState*, unsigned propertyName, JSValue, PutPropertySlot&); 95 95 virtual bool deleteProperty(ExecState*, const Identifier& propertyName); 96 96 virtual bool deleteProperty(ExecState*, unsigned propertyName); … … 103 103 }; 104 104 105 Arguments* asArguments(JSValue Ptr);106 107 inline Arguments* asArguments(JSValue Ptrvalue)105 Arguments* asArguments(JSValue); 106 107 inline Arguments* asArguments(JSValue value) 108 108 { 109 109 ASSERT(asObject(value)->inherits(&Arguments::info)); -
trunk/JavaScriptCore/runtime/ArrayConstructor.cpp
r42989 r43122 69 69 } 70 70 71 static JSValue Ptr callArrayConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)71 static JSValue callArrayConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 72 72 { 73 73 return constructArrayWithSizeQuirk(exec, args); -
trunk/JavaScriptCore/runtime/ArrayPrototype.cpp
r43037 r43122 40 40 ASSERT_CLASS_FITS_IN_CELL(ArrayPrototype); 41 41 42 static JSValue Ptr arrayProtoFuncToString(ExecState*, JSObject*, JSValuePtr, const ArgList&);43 static JSValue Ptr arrayProtoFuncToLocaleString(ExecState*, JSObject*, JSValuePtr, const ArgList&);44 static JSValue Ptr arrayProtoFuncConcat(ExecState*, JSObject*, JSValuePtr, const ArgList&);45 static JSValue Ptr arrayProtoFuncJoin(ExecState*, JSObject*, JSValuePtr, const ArgList&);46 static JSValue Ptr arrayProtoFuncPop(ExecState*, JSObject*, JSValuePtr, const ArgList&);47 static JSValue Ptr arrayProtoFuncPush(ExecState*, JSObject*, JSValuePtr, const ArgList&);48 static JSValue Ptr arrayProtoFuncReverse(ExecState*, JSObject*, JSValuePtr, const ArgList&);49 static JSValue Ptr arrayProtoFuncShift(ExecState*, JSObject*, JSValuePtr, const ArgList&);50 static JSValue Ptr arrayProtoFuncSlice(ExecState*, JSObject*, JSValuePtr, const ArgList&);51 static JSValue Ptr arrayProtoFuncSort(ExecState*, JSObject*, JSValuePtr, const ArgList&);52 static JSValue Ptr arrayProtoFuncSplice(ExecState*, JSObject*, JSValuePtr, const ArgList&);53 static JSValue Ptr arrayProtoFuncUnShift(ExecState*, JSObject*, JSValuePtr, const ArgList&);54 static JSValue Ptr arrayProtoFuncEvery(ExecState*, JSObject*, JSValuePtr, const ArgList&);55 static JSValue Ptr arrayProtoFuncForEach(ExecState*, JSObject*, JSValuePtr, const ArgList&);56 static JSValue Ptr arrayProtoFuncSome(ExecState*, JSObject*, JSValuePtr, const ArgList&);57 static JSValue Ptr arrayProtoFuncIndexOf(ExecState*, JSObject*, JSValuePtr, const ArgList&);58 static JSValue Ptr arrayProtoFuncFilter(ExecState*, JSObject*, JSValuePtr, const ArgList&);59 static JSValue Ptr arrayProtoFuncMap(ExecState*, JSObject*, JSValuePtr, const ArgList&);60 static JSValue Ptr arrayProtoFuncReduce(ExecState*, JSObject*, JSValuePtr, const ArgList&);61 static JSValue Ptr arrayProtoFuncReduceRight(ExecState*, JSObject*, JSValuePtr, const ArgList&);62 static JSValue Ptr arrayProtoFuncLastIndexOf(ExecState*, JSObject*, JSValuePtr, const ArgList&);42 static JSValue arrayProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 43 static JSValue arrayProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&); 44 static JSValue arrayProtoFuncConcat(ExecState*, JSObject*, JSValue, const ArgList&); 45 static JSValue arrayProtoFuncJoin(ExecState*, JSObject*, JSValue, const ArgList&); 46 static JSValue arrayProtoFuncPop(ExecState*, JSObject*, JSValue, const ArgList&); 47 static JSValue arrayProtoFuncPush(ExecState*, JSObject*, JSValue, const ArgList&); 48 static JSValue arrayProtoFuncReverse(ExecState*, JSObject*, JSValue, const ArgList&); 49 static JSValue arrayProtoFuncShift(ExecState*, JSObject*, JSValue, const ArgList&); 50 static JSValue arrayProtoFuncSlice(ExecState*, JSObject*, JSValue, const ArgList&); 51 static JSValue arrayProtoFuncSort(ExecState*, JSObject*, JSValue, const ArgList&); 52 static JSValue arrayProtoFuncSplice(ExecState*, JSObject*, JSValue, const ArgList&); 53 static JSValue arrayProtoFuncUnShift(ExecState*, JSObject*, JSValue, const ArgList&); 54 static JSValue arrayProtoFuncEvery(ExecState*, JSObject*, JSValue, const ArgList&); 55 static JSValue arrayProtoFuncForEach(ExecState*, JSObject*, JSValue, const ArgList&); 56 static JSValue arrayProtoFuncSome(ExecState*, JSObject*, JSValue, const ArgList&); 57 static JSValue arrayProtoFuncIndexOf(ExecState*, JSObject*, JSValue, const ArgList&); 58 static JSValue arrayProtoFuncFilter(ExecState*, JSObject*, JSValue, const ArgList&); 59 static JSValue arrayProtoFuncMap(ExecState*, JSObject*, JSValue, const ArgList&); 60 static JSValue arrayProtoFuncReduce(ExecState*, JSObject*, JSValue, const ArgList&); 61 static JSValue arrayProtoFuncReduceRight(ExecState*, JSObject*, JSValue, const ArgList&); 62 static JSValue arrayProtoFuncLastIndexOf(ExecState*, JSObject*, JSValue, const ArgList&); 63 63 64 64 } … … 128 128 129 129 // Helper function 130 static JSValue PtrgetProperty(ExecState* exec, JSObject* obj, unsigned index)130 static JSValue getProperty(ExecState* exec, JSObject* obj, unsigned index) 131 131 { 132 132 PropertySlot slot(obj); … … 136 136 } 137 137 138 static void putProperty(ExecState* exec, JSObject* obj, const Identifier& propertyName, JSValue Ptrvalue)138 static void putProperty(ExecState* exec, JSObject* obj, const Identifier& propertyName, JSValue value) 139 139 { 140 140 PutPropertySlot slot; … … 142 142 } 143 143 144 JSValue Ptr arrayProtoFuncToString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)144 JSValue arrayProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 145 145 { 146 146 if (!thisValue.isObject(&JSArray::info)) … … 167 167 } 168 168 169 JSValue Ptrelement = thisObj->get(exec, k);169 JSValue element = thisObj->get(exec, k); 170 170 if (element.isUndefinedOrNull()) 171 171 continue; … … 186 186 } 187 187 188 JSValue Ptr arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)188 JSValue arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 189 189 { 190 190 if (!thisValue.isObject(&JSArray::info)) … … 211 211 } 212 212 213 JSValue Ptrelement = thisObj->get(exec, k);213 JSValue element = thisObj->get(exec, k); 214 214 if (element.isUndefinedOrNull()) 215 215 continue; 216 216 217 217 JSObject* o = element.toObject(exec); 218 JSValue PtrconversionFunction = o->get(exec, exec->propertyNames().toLocaleString);218 JSValue conversionFunction = o->get(exec, exec->propertyNames().toLocaleString); 219 219 UString str; 220 220 CallData callData; … … 238 238 } 239 239 240 JSValue Ptr arrayProtoFuncJoin(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)240 JSValue arrayProtoFuncJoin(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 241 241 { 242 242 JSObject* thisObj = thisValue.toThisObject(exec); … … 265 265 } 266 266 267 JSValue Ptrelement = thisObj->get(exec, k);267 JSValue element = thisObj->get(exec, k); 268 268 if (element.isUndefinedOrNull()) 269 269 continue; … … 284 284 } 285 285 286 JSValue Ptr arrayProtoFuncConcat(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)286 JSValue arrayProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 287 287 { 288 288 JSArray* arr = constructEmptyArray(exec); 289 289 int n = 0; 290 JSValue PtrcurArg = thisValue.toThisObject(exec);290 JSValue curArg = thisValue.toThisObject(exec); 291 291 ArgList::const_iterator it = args.begin(); 292 292 ArgList::const_iterator end = args.end(); … … 296 296 JSObject* curObject = curArg.toObject(exec); 297 297 for (unsigned k = 0; k < length; ++k) { 298 if (JSValue Ptrv = getProperty(exec, curObject, k))298 if (JSValue v = getProperty(exec, curObject, k)) 299 299 arr->put(exec, n, v); 300 300 n++; … … 313 313 } 314 314 315 JSValue Ptr arrayProtoFuncPop(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)315 JSValue arrayProtoFuncPop(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 316 316 { 317 317 if (isJSArray(&exec->globalData(), thisValue)) … … 319 319 320 320 JSObject* thisObj = thisValue.toThisObject(exec); 321 JSValue Ptrresult;321 JSValue result; 322 322 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); 323 323 if (length == 0) { … … 332 332 } 333 333 334 JSValue Ptr arrayProtoFuncPush(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)334 JSValue arrayProtoFuncPush(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 335 335 { 336 336 if (isJSArray(&exec->globalData(), thisValue) && args.size() == 1) { … … 349 349 } 350 350 351 JSValue Ptr arrayProtoFuncReverse(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)351 JSValue arrayProtoFuncReverse(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 352 352 { 353 353 JSObject* thisObj = thisValue.toThisObject(exec); … … 357 357 for (unsigned k = 0; k < middle; k++) { 358 358 unsigned lk1 = length - k - 1; 359 JSValue Ptrobj2 = getProperty(exec, thisObj, lk1);360 JSValue Ptrobj = getProperty(exec, thisObj, k);359 JSValue obj2 = getProperty(exec, thisObj, lk1); 360 JSValue obj = getProperty(exec, thisObj, k); 361 361 362 362 if (obj2) … … 373 373 } 374 374 375 JSValue Ptr arrayProtoFuncShift(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)376 { 377 JSObject* thisObj = thisValue.toThisObject(exec); 378 JSValue Ptrresult;375 JSValue arrayProtoFuncShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 376 { 377 JSObject* thisObj = thisValue.toThisObject(exec); 378 JSValue result; 379 379 380 380 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); … … 385 385 result = thisObj->get(exec, 0); 386 386 for (unsigned k = 1; k < length; k++) { 387 if (JSValue Ptrobj = getProperty(exec, thisObj, k))387 if (JSValue obj = getProperty(exec, thisObj, k)) 388 388 thisObj->put(exec, k - 1, obj); 389 389 else … … 396 396 } 397 397 398 JSValue Ptr arrayProtoFuncSlice(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)398 JSValue arrayProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 399 399 { 400 400 // http://developer.netscape.com/docs/manuals/js/client/jsref/array.htm#1193713 or 15.4.4.10 … … 404 404 // We return a new array 405 405 JSArray* resObj = constructEmptyArray(exec); 406 JSValue Ptrresult = resObj;406 JSValue result = resObj; 407 407 double begin = args.at(0).toInteger(exec); 408 408 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); … … 434 434 int e = static_cast<int>(end); 435 435 for (int k = b; k < e; k++, n++) { 436 if (JSValue Ptrv = getProperty(exec, thisObj, k))436 if (JSValue v = getProperty(exec, thisObj, k)) 437 437 resObj->put(exec, n, v); 438 438 } … … 441 441 } 442 442 443 JSValue Ptr arrayProtoFuncSort(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)444 { 445 JSObject* thisObj = thisValue.toThisObject(exec); 446 447 JSValue Ptrfunction = args.at(0);443 JSValue arrayProtoFuncSort(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 444 { 445 JSObject* thisObj = thisValue.toThisObject(exec); 446 447 JSValue function = args.at(0); 448 448 CallData callData; 449 449 CallType callType = function.getCallData(callData); … … 467 467 // or quicksort, and much less swapping than bubblesort/insertionsort. 468 468 for (unsigned i = 0; i < length - 1; ++i) { 469 JSValue PtriObj = thisObj->get(exec, i);469 JSValue iObj = thisObj->get(exec, i); 470 470 unsigned themin = i; 471 JSValue PtrminObj = iObj;471 JSValue minObj = iObj; 472 472 for (unsigned j = i + 1; j < length; ++j) { 473 JSValue PtrjObj = thisObj->get(exec, j);473 JSValue jObj = thisObj->get(exec, j); 474 474 double compareResult; 475 475 if (jObj.isUndefined()) … … 499 499 } 500 500 501 JSValue Ptr arrayProtoFuncSplice(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)501 JSValue arrayProtoFuncSplice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 502 502 { 503 503 JSObject* thisObj = thisValue.toThisObject(exec); … … 505 505 // 15.4.4.12 506 506 JSArray* resObj = constructEmptyArray(exec); 507 JSValue Ptrresult = resObj;507 JSValue result = resObj; 508 508 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); 509 509 if (!args.size()) … … 522 522 523 523 for (unsigned k = 0; k < deleteCount; k++) { 524 if (JSValue Ptrv = getProperty(exec, thisObj, k + begin))524 if (JSValue v = getProperty(exec, thisObj, k + begin)) 525 525 resObj->put(exec, k, v); 526 526 } … … 531 531 if (additionalArgs < deleteCount) { 532 532 for (unsigned k = begin; k < length - deleteCount; ++k) { 533 if (JSValue Ptrv = getProperty(exec, thisObj, k + deleteCount))533 if (JSValue v = getProperty(exec, thisObj, k + deleteCount)) 534 534 thisObj->put(exec, k + additionalArgs, v); 535 535 else … … 540 540 } else { 541 541 for (unsigned k = length - deleteCount; (int)k > begin; --k) { 542 if (JSValue Ptrobj = getProperty(exec, thisObj, k + deleteCount - 1))542 if (JSValue obj = getProperty(exec, thisObj, k + deleteCount - 1)) 543 543 thisObj->put(exec, k + additionalArgs - 1, obj); 544 544 else … … 554 554 } 555 555 556 JSValue Ptr arrayProtoFuncUnShift(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)556 JSValue arrayProtoFuncUnShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 557 557 { 558 558 JSObject* thisObj = thisValue.toThisObject(exec); … … 563 563 if (nrArgs) { 564 564 for (unsigned k = length; k > 0; --k) { 565 if (JSValue Ptrv = getProperty(exec, thisObj, k - 1))565 if (JSValue v = getProperty(exec, thisObj, k - 1)) 566 566 thisObj->put(exec, k + nrArgs - 1, v); 567 567 else … … 571 571 for (unsigned k = 0; k < nrArgs; ++k) 572 572 thisObj->put(exec, k, args.at(k)); 573 JSValue Ptrresult = jsNumber(exec, length + nrArgs);573 JSValue result = jsNumber(exec, length + nrArgs); 574 574 putProperty(exec, thisObj, exec->propertyNames().length, result); 575 575 return result; 576 576 } 577 577 578 JSValue Ptr arrayProtoFuncFilter(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)579 { 580 JSObject* thisObj = thisValue.toThisObject(exec); 581 582 JSValue Ptrfunction = args.at(0);578 JSValue arrayProtoFuncFilter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 579 { 580 JSObject* thisObj = thisValue.toThisObject(exec); 581 582 JSValue function = args.at(0); 583 583 CallData callData; 584 584 CallType callType = function.getCallData(callData); … … 599 599 if (!array->canGetIndex(k)) 600 600 break; 601 JSValue Ptrv = array->getIndex(k);601 JSValue v = array->getIndex(k); 602 602 cachedCall.setThis(applyThis); 603 603 cachedCall.setArgument(0, v); … … 605 605 cachedCall.setArgument(2, thisObj); 606 606 607 JSValue Ptrresult = cachedCall.call();607 JSValue result = cachedCall.call(); 608 608 if (result.toBoolean(exec)) 609 609 resultArray->put(exec, filterIndex++, v); … … 618 618 continue; 619 619 620 JSValue Ptrv = slot.getValue(exec, k);620 JSValue v = slot.getValue(exec, k); 621 621 622 622 MarkedArgumentBuffer eachArguments; … … 626 626 eachArguments.append(thisObj); 627 627 628 JSValue Ptrresult = call(exec, function, callType, callData, applyThis, eachArguments);628 JSValue result = call(exec, function, callType, callData, applyThis, eachArguments); 629 629 630 630 if (result.toBoolean(exec)) … … 634 634 } 635 635 636 JSValue Ptr arrayProtoFuncMap(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)637 { 638 JSObject* thisObj = thisValue.toThisObject(exec); 639 640 JSValue Ptrfunction = args.at(0);636 JSValue arrayProtoFuncMap(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 637 { 638 JSObject* thisObj = thisValue.toThisObject(exec); 639 640 JSValue function = args.at(0); 641 641 CallData callData; 642 642 CallType callType = function.getCallData(callData); … … 671 671 continue; 672 672 673 JSValue Ptrv = slot.getValue(exec, k);673 JSValue v = slot.getValue(exec, k); 674 674 675 675 MarkedArgumentBuffer eachArguments; … … 679 679 eachArguments.append(thisObj); 680 680 681 JSValue Ptrresult = call(exec, function, callType, callData, applyThis, eachArguments);681 JSValue result = call(exec, function, callType, callData, applyThis, eachArguments); 682 682 resultArray->put(exec, k, result); 683 683 } … … 691 691 // http://developer-test.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:some 692 692 693 JSValue Ptr arrayProtoFuncEvery(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)694 { 695 JSObject* thisObj = thisValue.toThisObject(exec); 696 697 JSValue Ptrfunction = args.at(0);693 JSValue arrayProtoFuncEvery(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 694 { 695 JSObject* thisObj = thisValue.toThisObject(exec); 696 697 JSValue function = args.at(0); 698 698 CallData callData; 699 699 CallType callType = function.getCallData(callData); … … 703 703 JSObject* applyThis = args.at(1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(1).toObject(exec); 704 704 705 JSValue Ptrresult = jsBoolean(true);705 JSValue result = jsBoolean(true); 706 706 707 707 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); … … 747 747 } 748 748 749 JSValue Ptr arrayProtoFuncForEach(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)750 { 751 JSObject* thisObj = thisValue.toThisObject(exec); 752 753 JSValue Ptrfunction = args.at(0);749 JSValue arrayProtoFuncForEach(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 750 { 751 JSObject* thisObj = thisValue.toThisObject(exec); 752 753 JSValue function = args.at(0); 754 754 CallData callData; 755 755 CallType callType = function.getCallData(callData); … … 792 792 } 793 793 794 JSValue Ptr arrayProtoFuncSome(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)795 { 796 JSObject* thisObj = thisValue.toThisObject(exec); 797 798 JSValue Ptrfunction = args.at(0);794 JSValue arrayProtoFuncSome(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 795 { 796 JSObject* thisObj = thisValue.toThisObject(exec); 797 798 JSValue function = args.at(0); 799 799 CallData callData; 800 800 CallType callType = function.getCallData(callData); … … 804 804 JSObject* applyThis = args.at(1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(1).toObject(exec); 805 805 806 JSValue Ptrresult = jsBoolean(false);806 JSValue result = jsBoolean(false); 807 807 808 808 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); … … 845 845 } 846 846 847 JSValue Ptr arrayProtoFuncReduce(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)847 JSValue arrayProtoFuncReduce(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 848 848 { 849 849 JSObject* thisObj = thisValue.toThisObject(exec); 850 850 851 JSValue Ptrfunction = args.at(0);851 JSValue function = args.at(0); 852 852 CallData callData; 853 853 CallType callType = function.getCallData(callData); … … 856 856 857 857 unsigned i = 0; 858 JSValue Ptrrv;858 JSValue rv; 859 859 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); 860 860 if (!length && args.size() == 1) … … 885 885 cachedCall.setThis(jsNull()); 886 886 cachedCall.setArgument(0, rv); 887 JSValue Ptrv;887 JSValue v; 888 888 if (LIKELY(array->canGetIndex(i))) 889 889 v = array->getIndex(i); … … 900 900 901 901 for (; i < length && !exec->hadException(); ++i) { 902 JSValue Ptrprop = getProperty(exec, thisObj, i);902 JSValue prop = getProperty(exec, thisObj, i); 903 903 if (!prop) 904 904 continue; … … 915 915 } 916 916 917 JSValue Ptr arrayProtoFuncReduceRight(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)917 JSValue arrayProtoFuncReduceRight(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 918 918 { 919 919 JSObject* thisObj = thisValue.toThisObject(exec); 920 920 921 JSValue Ptrfunction = args.at(0);921 JSValue function = args.at(0); 922 922 CallData callData; 923 923 CallType callType = function.getCallData(callData); … … 926 926 927 927 unsigned i = 0; 928 JSValue Ptrrv;928 JSValue rv; 929 929 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); 930 930 if (!length && args.size() == 1) … … 969 969 for (; i < length && !exec->hadException(); ++i) { 970 970 unsigned idx = length - i - 1; 971 JSValue Ptrprop = getProperty(exec, thisObj, idx);971 JSValue prop = getProperty(exec, thisObj, idx); 972 972 if (!prop) 973 973 continue; … … 984 984 } 985 985 986 JSValue Ptr arrayProtoFuncIndexOf(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)986 JSValue arrayProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 987 987 { 988 988 // JavaScript 1.5 Extension by Mozilla … … 1003 1003 } 1004 1004 1005 JSValue PtrsearchElement = args.at(0);1005 JSValue searchElement = args.at(0); 1006 1006 for (; index < length; ++index) { 1007 JSValue Ptre = getProperty(exec, thisObj, index);1007 JSValue e = getProperty(exec, thisObj, index); 1008 1008 if (!e) 1009 1009 continue; 1010 if (JSValue Ptr::strictEqual(searchElement, e))1010 if (JSValue::strictEqual(searchElement, e)) 1011 1011 return jsNumber(exec, index); 1012 1012 } … … 1015 1015 } 1016 1016 1017 JSValue Ptr arrayProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)1017 JSValue arrayProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 1018 1018 { 1019 1019 // JavaScript 1.6 Extension by Mozilla … … 1034 1034 index = static_cast<int>(d); 1035 1035 1036 JSValue PtrsearchElement = args.at(0);1036 JSValue searchElement = args.at(0); 1037 1037 for (; index >= 0; --index) { 1038 JSValue Ptre = getProperty(exec, thisObj, index);1038 JSValue e = getProperty(exec, thisObj, index); 1039 1039 if (!e) 1040 1040 continue; 1041 if (JSValue Ptr::strictEqual(searchElement, e))1041 if (JSValue::strictEqual(searchElement, e)) 1042 1042 return jsNumber(exec, index); 1043 1043 } -
trunk/JavaScriptCore/runtime/BooleanConstructor.cpp
r42989 r43122 58 58 59 59 // ECMA 15.6.1 60 static JSValue Ptr callBooleanConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)60 static JSValue callBooleanConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 61 61 { 62 62 return jsBoolean(args.at(0).toBoolean(exec)); … … 69 69 } 70 70 71 JSObject* constructBooleanFromImmediateBoolean(ExecState* exec, JSValue PtrimmediateBooleanValue)71 JSObject* constructBooleanFromImmediateBoolean(ExecState* exec, JSValue immediateBooleanValue) 72 72 { 73 73 BooleanObject* obj = new (exec) BooleanObject(exec->lexicalGlobalObject()->booleanObjectStructure()); -
trunk/JavaScriptCore/runtime/BooleanConstructor.h
r39670 r43122 37 37 }; 38 38 39 JSObject* constructBooleanFromImmediateBoolean(ExecState*, JSValue Ptr);39 JSObject* constructBooleanFromImmediateBoolean(ExecState*, JSValue); 40 40 JSObject* constructBoolean(ExecState*, const ArgList&); 41 41 -
trunk/JavaScriptCore/runtime/BooleanObject.h
r39670 r43122 34 34 }; 35 35 36 BooleanObject* asBooleanObject(JSValue Ptr);36 BooleanObject* asBooleanObject(JSValue); 37 37 38 inline BooleanObject* asBooleanObject(JSValue Ptrvalue)38 inline BooleanObject* asBooleanObject(JSValue value) 39 39 { 40 40 ASSERT(asObject(value)->inherits(&BooleanObject::info)); -
trunk/JavaScriptCore/runtime/BooleanPrototype.cpp
r40046 r43122 32 32 33 33 // Functions 34 static JSValue Ptr booleanProtoFuncToString(ExecState*, JSObject*, JSValuePtr, const ArgList&);35 static JSValue Ptr booleanProtoFuncValueOf(ExecState*, JSObject*, JSValuePtr, const ArgList&);34 static JSValue booleanProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 35 static JSValue booleanProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&); 36 36 37 37 // ECMA 15.6.4 … … 51 51 // ECMA 15.6.4.2 + 15.6.4.3 52 52 53 JSValue Ptr booleanProtoFuncToString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)53 JSValue booleanProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 54 54 { 55 55 if (thisValue == jsBoolean(false)) … … 69 69 } 70 70 71 JSValue Ptr booleanProtoFuncValueOf(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)71 JSValue booleanProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 72 72 { 73 73 if (thisValue.isBoolean()) -
trunk/JavaScriptCore/runtime/CallData.cpp
r39670 r43122 31 31 namespace JSC { 32 32 33 JSValue Ptr call(ExecState* exec, JSValuePtr functionObject, CallType callType, const CallData& callData, JSValuePtrthisValue, const ArgList& args)33 JSValue call(ExecState* exec, JSValue functionObject, CallType callType, const CallData& callData, JSValue thisValue, const ArgList& args) 34 34 { 35 35 if (callType == CallTypeHost) -
trunk/JavaScriptCore/runtime/CallData.h
r39670 r43122 36 36 class FunctionBodyNode; 37 37 class JSObject; 38 class JSValue Ptr;38 class JSValue; 39 39 class ScopeChainNode; 40 40 … … 45 45 }; 46 46 47 typedef JSValue Ptr (*NativeFunction)(ExecState*, JSObject*, JSValuePtrthisValue, const ArgList&);47 typedef JSValue (*NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&); 48 48 49 49 union CallData { … … 57 57 }; 58 58 59 JSValue Ptr call(ExecState*, JSValuePtr functionObject, CallType, const CallData&, JSValuePtrthisValue, const ArgList&);59 JSValue call(ExecState*, JSValue functionObject, CallType, const CallData&, JSValue thisValue, const ArgList&); 60 60 61 61 } // namespace JSC -
trunk/JavaScriptCore/runtime/Collector.cpp
r43037 r43122 809 809 } 810 810 811 void Heap::protect(JSValue Ptrk)811 void Heap::protect(JSValue k) 812 812 { 813 813 ASSERT(k); … … 826 826 } 827 827 828 void Heap::unprotect(JSValue Ptrk)828 void Heap::unprotect(JSValue k) 829 829 { 830 830 ASSERT(k); … … 843 843 } 844 844 845 Heap* Heap::heap(JSValue Ptrv)845 Heap* Heap::heap(JSValue v) 846 846 { 847 847 if (!v.isCell()) -
trunk/JavaScriptCore/runtime/Collector.h
r43037 r43122 44 44 class JSCell; 45 45 class JSGlobalData; 46 class JSValue Ptr;46 class JSValue; 47 47 48 48 enum OperationInProgress { NoOperation, Allocation, Collection }; … … 97 97 98 98 void setGCProtectNeedsLocking(); 99 void protect(JSValue Ptr);100 void unprotect(JSValue Ptr);101 102 static Heap* heap(JSValue Ptr); // 0 for immediate values99 void protect(JSValue); 100 void unprotect(JSValue); 101 102 static Heap* heap(JSValue); // 0 for immediate values 103 103 104 104 size_t globalObjectCount(); -
trunk/JavaScriptCore/runtime/Completion.cpp
r41912 r43122 51 51 } 52 52 53 Completion evaluate(ExecState* exec, ScopeChain& scopeChain, const SourceCode& source, JSValue PtrthisValue)53 Completion evaluate(ExecState* exec, ScopeChain& scopeChain, const SourceCode& source, JSValue thisValue) 54 54 { 55 55 JSLock lock(exec); … … 64 64 JSObject* thisObj = (!thisValue || thisValue.isUndefinedOrNull()) ? exec->dynamicGlobalObject() : thisValue.toObject(exec); 65 65 66 JSValue Ptrexception = noValue();67 JSValue Ptrresult = exec->interpreter()->execute(programNode.get(), exec, scopeChain.node(), thisObj, &exception);66 JSValue exception = noValue(); 67 JSValue result = exec->interpreter()->execute(programNode.get(), exec, scopeChain.node(), thisObj, &exception); 68 68 69 69 if (exception) { -
trunk/JavaScriptCore/runtime/Completion.h
r39670 r43122 40 40 class Completion { 41 41 public: 42 Completion(ComplType type = Normal, JSValue Ptrvalue = noValue())42 Completion(ComplType type = Normal, JSValue value = noValue()) 43 43 : m_type(type) 44 44 , m_value(value) … … 47 47 48 48 ComplType complType() const { return m_type; } 49 JSValue Ptrvalue() const { return m_value; }50 void setValue(JSValue Ptrv) { m_value = v; }49 JSValue value() const { return m_value; } 50 void setValue(JSValue v) { m_value = v; } 51 51 bool isValueCompletion() const { return m_value; } 52 52 53 53 private: 54 54 ComplType m_type; 55 JSValue Ptrm_value;55 JSValue m_value; 56 56 }; 57 57 58 58 Completion checkSyntax(ExecState*, const SourceCode&); 59 Completion evaluate(ExecState*, ScopeChain&, const SourceCode&, JSValue PtrthisValue = noValue());59 Completion evaluate(ExecState*, ScopeChain&, const SourceCode&, JSValue thisValue = noValue()); 60 60 61 61 } // namespace JSC -
trunk/JavaScriptCore/runtime/ConstructData.cpp
r39670 r43122 31 31 namespace JSC { 32 32 33 JSObject* construct(ExecState* exec, JSValue Ptrobject, ConstructType constructType, const ConstructData& constructData, const ArgList& args)33 JSObject* construct(ExecState* exec, JSValue object, ConstructType constructType, const ConstructData& constructData, const ArgList& args) 34 34 { 35 35 if (constructType == ConstructTypeHost) -
trunk/JavaScriptCore/runtime/ConstructData.h
r39670 r43122 36 36 class FunctionBodyNode; 37 37 class JSObject; 38 class JSValue Ptr;38 class JSValue; 39 39 class ScopeChainNode; 40 40 … … 57 57 }; 58 58 59 JSObject* construct(ExecState*, JSValue Ptrconstructor, ConstructType, const ConstructData&, const ArgList&);59 JSObject* construct(ExecState*, JSValue constructor, ConstructType, const ConstructData&, const ArgList&); 60 60 61 61 } // namespace JSC -
trunk/JavaScriptCore/runtime/DateConstructor.cpp
r42989 r43122 48 48 ASSERT_CLASS_FITS_IN_CELL(DateConstructor); 49 49 50 static JSValue Ptr dateParse(ExecState*, JSObject*, JSValuePtr, const ArgList&);51 static JSValue Ptr dateNow(ExecState*, JSObject*, JSValuePtr, const ArgList&);52 static JSValue Ptr dateUTC(ExecState*, JSObject*, JSValuePtr, const ArgList&);50 static JSValue dateParse(ExecState*, JSObject*, JSValue, const ArgList&); 51 static JSValue dateNow(ExecState*, JSObject*, JSValue, const ArgList&); 52 static JSValue dateUTC(ExecState*, JSObject*, JSValue, const ArgList&); 53 53 54 54 DateConstructor::DateConstructor(ExecState* exec, PassRefPtr<Structure> structure, Structure* prototypeFunctionStructure, DatePrototype* datePrototype) … … 77 77 value = asDateInstance(args.at(0))->internalNumber(); 78 78 else { 79 JSValue Ptrprimitive = args.at(0).toPrimitive(exec);79 JSValue primitive = args.at(0).toPrimitive(exec); 80 80 if (primitive.isString()) 81 81 value = parseDate(primitive.getString()); … … 124 124 125 125 // ECMA 15.9.2 126 static JSValue Ptr callDate(ExecState* exec, JSObject*, JSValuePtr, const ArgList&)126 static JSValue callDate(ExecState* exec, JSObject*, JSValue, const ArgList&) 127 127 { 128 128 time_t localTime = time(0); … … 139 139 } 140 140 141 static JSValue Ptr dateParse(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)141 static JSValue dateParse(ExecState* exec, JSObject*, JSValue, const ArgList& args) 142 142 { 143 143 return jsNumber(exec, parseDate(args.at(0).toString(exec))); 144 144 } 145 145 146 static JSValue Ptr dateNow(ExecState* exec, JSObject*, JSValuePtr, const ArgList&)146 static JSValue dateNow(ExecState* exec, JSObject*, JSValue, const ArgList&) 147 147 { 148 148 return jsNumber(exec, getCurrentUTCTime()); 149 149 } 150 150 151 static JSValue Ptr dateUTC(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)151 static JSValue dateUTC(ExecState* exec, JSObject*, JSValue, const ArgList& args) 152 152 { 153 153 int n = args.size(); -
trunk/JavaScriptCore/runtime/DateInstance.h
r40046 r43122 53 53 }; 54 54 55 DateInstance* asDateInstance(JSValue Ptr);55 DateInstance* asDateInstance(JSValue); 56 56 57 inline DateInstance* asDateInstance(JSValue Ptrvalue)57 inline DateInstance* asDateInstance(JSValue value) 58 58 { 59 59 ASSERT(asObject(value)->inherits(&DateInstance::info)); -
trunk/JavaScriptCore/runtime/DatePrototype.cpp
r42989 r43122 64 64 ASSERT_CLASS_FITS_IN_CELL(DatePrototype); 65 65 66 static JSValue Ptr dateProtoFuncGetDate(ExecState*, JSObject*, JSValuePtr, const ArgList&);67 static JSValue Ptr dateProtoFuncGetDay(ExecState*, JSObject*, JSValuePtr, const ArgList&);68 static JSValue Ptr dateProtoFuncGetFullYear(ExecState*, JSObject*, JSValuePtr, const ArgList&);69 static JSValue Ptr dateProtoFuncGetHours(ExecState*, JSObject*, JSValuePtr, const ArgList&);70 static JSValue Ptr dateProtoFuncGetMilliSeconds(ExecState*, JSObject*, JSValuePtr, const ArgList&);71 static JSValue Ptr dateProtoFuncGetMinutes(ExecState*, JSObject*, JSValuePtr, const ArgList&);72 static JSValue Ptr dateProtoFuncGetMonth(ExecState*, JSObject*, JSValuePtr, const ArgList&);73 static JSValue Ptr dateProtoFuncGetSeconds(ExecState*, JSObject*, JSValuePtr, const ArgList&);74 static JSValue Ptr dateProtoFuncGetTime(ExecState*, JSObject*, JSValuePtr, const ArgList&);75 static JSValue Ptr dateProtoFuncGetTimezoneOffset(ExecState*, JSObject*, JSValuePtr, const ArgList&);76 static JSValue Ptr dateProtoFuncGetUTCDate(ExecState*, JSObject*, JSValuePtr, const ArgList&);77 static JSValue Ptr dateProtoFuncGetUTCDay(ExecState*, JSObject*, JSValuePtr, const ArgList&);78 static JSValue Ptr dateProtoFuncGetUTCFullYear(ExecState*, JSObject*, JSValuePtr, const ArgList&);79 static JSValue Ptr dateProtoFuncGetUTCHours(ExecState*, JSObject*, JSValuePtr, const ArgList&);80 static JSValue Ptr dateProtoFuncGetUTCMilliseconds(ExecState*, JSObject*, JSValuePtr, const ArgList&);81 static JSValue Ptr dateProtoFuncGetUTCMinutes(ExecState*, JSObject*, JSValuePtr, const ArgList&);82 static JSValue Ptr dateProtoFuncGetUTCMonth(ExecState*, JSObject*, JSValuePtr, const ArgList&);83 static JSValue Ptr dateProtoFuncGetUTCSeconds(ExecState*, JSObject*, JSValuePtr, const ArgList&);84 static JSValue Ptr dateProtoFuncGetYear(ExecState*, JSObject*, JSValuePtr, const ArgList&);85 static JSValue Ptr dateProtoFuncSetDate(ExecState*, JSObject*, JSValuePtr, const ArgList&);86 static JSValue Ptr dateProtoFuncSetFullYear(ExecState*, JSObject*, JSValuePtr, const ArgList&);87 static JSValue Ptr dateProtoFuncSetHours(ExecState*, JSObject*, JSValuePtr, const ArgList&);88 static JSValue Ptr dateProtoFuncSetMilliSeconds(ExecState*, JSObject*, JSValuePtr, const ArgList&);89 static JSValue Ptr dateProtoFuncSetMinutes(ExecState*, JSObject*, JSValuePtr, const ArgList&);90 static JSValue Ptr dateProtoFuncSetMonth(ExecState*, JSObject*, JSValuePtr, const ArgList&);91 static JSValue Ptr dateProtoFuncSetSeconds(ExecState*, JSObject*, JSValuePtr, const ArgList&);92 static JSValue Ptr dateProtoFuncSetTime(ExecState*, JSObject*, JSValuePtr, const ArgList&);93 static JSValue Ptr dateProtoFuncSetUTCDate(ExecState*, JSObject*, JSValuePtr, const ArgList&);94 static JSValue Ptr dateProtoFuncSetUTCFullYear(ExecState*, JSObject*, JSValuePtr, const ArgList&);95 static JSValue Ptr dateProtoFuncSetUTCHours(ExecState*, JSObject*, JSValuePtr, const ArgList&);96 static JSValue Ptr dateProtoFuncSetUTCMilliseconds(ExecState*, JSObject*, JSValuePtr, const ArgList&);97 static JSValue Ptr dateProtoFuncSetUTCMinutes(ExecState*, JSObject*, JSValuePtr, const ArgList&);98 static JSValue Ptr dateProtoFuncSetUTCMonth(ExecState*, JSObject*, JSValuePtr, const ArgList&);99 static JSValue Ptr dateProtoFuncSetUTCSeconds(ExecState*, JSObject*, JSValuePtr, const ArgList&);100 static JSValue Ptr dateProtoFuncSetYear(ExecState*, JSObject*, JSValuePtr, const ArgList&);101 static JSValue Ptr dateProtoFuncToDateString(ExecState*, JSObject*, JSValuePtr, const ArgList&);102 static JSValue Ptr dateProtoFuncToGMTString(ExecState*, JSObject*, JSValuePtr, const ArgList&);103 static JSValue Ptr dateProtoFuncToLocaleDateString(ExecState*, JSObject*, JSValuePtr, const ArgList&);104 static JSValue Ptr dateProtoFuncToLocaleString(ExecState*, JSObject*, JSValuePtr, const ArgList&);105 static JSValue Ptr dateProtoFuncToLocaleTimeString(ExecState*, JSObject*, JSValuePtr, const ArgList&);106 static JSValue Ptr dateProtoFuncToString(ExecState*, JSObject*, JSValuePtr, const ArgList&);107 static JSValue Ptr dateProtoFuncToTimeString(ExecState*, JSObject*, JSValuePtr, const ArgList&);108 static JSValue Ptr dateProtoFuncToUTCString(ExecState*, JSObject*, JSValuePtr, const ArgList&);66 static JSValue dateProtoFuncGetDate(ExecState*, JSObject*, JSValue, const ArgList&); 67 static JSValue dateProtoFuncGetDay(ExecState*, JSObject*, JSValue, const ArgList&); 68 static JSValue dateProtoFuncGetFullYear(ExecState*, JSObject*, JSValue, const ArgList&); 69 static JSValue dateProtoFuncGetHours(ExecState*, JSObject*, JSValue, const ArgList&); 70 static JSValue dateProtoFuncGetMilliSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 71 static JSValue dateProtoFuncGetMinutes(ExecState*, JSObject*, JSValue, const ArgList&); 72 static JSValue dateProtoFuncGetMonth(ExecState*, JSObject*, JSValue, const ArgList&); 73 static JSValue dateProtoFuncGetSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 74 static JSValue dateProtoFuncGetTime(ExecState*, JSObject*, JSValue, const ArgList&); 75 static JSValue dateProtoFuncGetTimezoneOffset(ExecState*, JSObject*, JSValue, const ArgList&); 76 static JSValue dateProtoFuncGetUTCDate(ExecState*, JSObject*, JSValue, const ArgList&); 77 static JSValue dateProtoFuncGetUTCDay(ExecState*, JSObject*, JSValue, const ArgList&); 78 static JSValue dateProtoFuncGetUTCFullYear(ExecState*, JSObject*, JSValue, const ArgList&); 79 static JSValue dateProtoFuncGetUTCHours(ExecState*, JSObject*, JSValue, const ArgList&); 80 static JSValue dateProtoFuncGetUTCMilliseconds(ExecState*, JSObject*, JSValue, const ArgList&); 81 static JSValue dateProtoFuncGetUTCMinutes(ExecState*, JSObject*, JSValue, const ArgList&); 82 static JSValue dateProtoFuncGetUTCMonth(ExecState*, JSObject*, JSValue, const ArgList&); 83 static JSValue dateProtoFuncGetUTCSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 84 static JSValue dateProtoFuncGetYear(ExecState*, JSObject*, JSValue, const ArgList&); 85 static JSValue dateProtoFuncSetDate(ExecState*, JSObject*, JSValue, const ArgList&); 86 static JSValue dateProtoFuncSetFullYear(ExecState*, JSObject*, JSValue, const ArgList&); 87 static JSValue dateProtoFuncSetHours(ExecState*, JSObject*, JSValue, const ArgList&); 88 static JSValue dateProtoFuncSetMilliSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 89 static JSValue dateProtoFuncSetMinutes(ExecState*, JSObject*, JSValue, const ArgList&); 90 static JSValue dateProtoFuncSetMonth(ExecState*, JSObject*, JSValue, const ArgList&); 91 static JSValue dateProtoFuncSetSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 92 static JSValue dateProtoFuncSetTime(ExecState*, JSObject*, JSValue, const ArgList&); 93 static JSValue dateProtoFuncSetUTCDate(ExecState*, JSObject*, JSValue, const ArgList&); 94 static JSValue dateProtoFuncSetUTCFullYear(ExecState*, JSObject*, JSValue, const ArgList&); 95 static JSValue dateProtoFuncSetUTCHours(ExecState*, JSObject*, JSValue, const ArgList&); 96 static JSValue dateProtoFuncSetUTCMilliseconds(ExecState*, JSObject*, JSValue, const ArgList&); 97 static JSValue dateProtoFuncSetUTCMinutes(ExecState*, JSObject*, JSValue, const ArgList&); 98 static JSValue dateProtoFuncSetUTCMonth(ExecState*, JSObject*, JSValue, const ArgList&); 99 static JSValue dateProtoFuncSetUTCSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 100 static JSValue dateProtoFuncSetYear(ExecState*, JSObject*, JSValue, const ArgList&); 101 static JSValue dateProtoFuncToDateString(ExecState*, JSObject*, JSValue, const ArgList&); 102 static JSValue dateProtoFuncToGMTString(ExecState*, JSObject*, JSValue, const ArgList&); 103 static JSValue dateProtoFuncToLocaleDateString(ExecState*, JSObject*, JSValue, const ArgList&); 104 static JSValue dateProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&); 105 static JSValue dateProtoFuncToLocaleTimeString(ExecState*, JSObject*, JSValue, const ArgList&); 106 static JSValue dateProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 107 static JSValue dateProtoFuncToTimeString(ExecState*, JSObject*, JSValue, const ArgList&); 108 static JSValue dateProtoFuncToUTCString(ExecState*, JSObject*, JSValue, const ArgList&); 109 109 110 110 } … … 395 395 // Functions 396 396 397 JSValue Ptr dateProtoFuncToString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)397 JSValue dateProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 398 398 { 399 399 if (!thisValue.isObject(&DateInstance::info)) … … 412 412 } 413 413 414 JSValue Ptr dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)414 JSValue dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 415 415 { 416 416 if (!thisValue.isObject(&DateInstance::info)) … … 429 429 } 430 430 431 JSValue Ptr dateProtoFuncToDateString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)431 JSValue dateProtoFuncToDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 432 432 { 433 433 if (!thisValue.isObject(&DateInstance::info)) … … 446 446 } 447 447 448 JSValue Ptr dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)448 JSValue dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 449 449 { 450 450 if (!thisValue.isObject(&DateInstance::info)) … … 463 463 } 464 464 465 JSValue Ptr dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)465 JSValue dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 466 466 { 467 467 if (!thisValue.isObject(&DateInstance::info)) … … 476 476 } 477 477 478 JSValue Ptr dateProtoFuncToLocaleDateString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)478 JSValue dateProtoFuncToLocaleDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 479 479 { 480 480 if (!thisValue.isObject(&DateInstance::info)) … … 489 489 } 490 490 491 JSValue Ptr dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)491 JSValue dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 492 492 { 493 493 if (!thisValue.isObject(&DateInstance::info)) … … 502 502 } 503 503 504 JSValue Ptr dateProtoFuncGetTime(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)504 JSValue dateProtoFuncGetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 505 505 { 506 506 if (!thisValue.isObject(&DateInstance::info)) … … 515 515 } 516 516 517 JSValue Ptr dateProtoFuncGetFullYear(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)517 JSValue dateProtoFuncGetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 518 518 { 519 519 if (!thisValue.isObject(&DateInstance::info)) … … 532 532 } 533 533 534 JSValue Ptr dateProtoFuncGetUTCFullYear(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)534 JSValue dateProtoFuncGetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 535 535 { 536 536 if (!thisValue.isObject(&DateInstance::info)) … … 549 549 } 550 550 551 JSValue Ptr dateProtoFuncToGMTString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)551 JSValue dateProtoFuncToGMTString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 552 552 { 553 553 if (!thisValue.isObject(&DateInstance::info)) … … 566 566 } 567 567 568 JSValue Ptr dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)568 JSValue dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 569 569 { 570 570 if (!thisValue.isObject(&DateInstance::info)) … … 583 583 } 584 584 585 JSValue Ptr dateProtoFuncGetUTCMonth(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)585 JSValue dateProtoFuncGetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 586 586 { 587 587 if (!thisValue.isObject(&DateInstance::info)) … … 600 600 } 601 601 602 JSValue Ptr dateProtoFuncGetDate(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)602 JSValue dateProtoFuncGetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 603 603 { 604 604 if (!thisValue.isObject(&DateInstance::info)) … … 617 617 } 618 618 619 JSValue Ptr dateProtoFuncGetUTCDate(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)619 JSValue dateProtoFuncGetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 620 620 { 621 621 if (!thisValue.isObject(&DateInstance::info)) … … 634 634 } 635 635 636 JSValue Ptr dateProtoFuncGetDay(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)636 JSValue dateProtoFuncGetDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 637 637 { 638 638 if (!thisValue.isObject(&DateInstance::info)) … … 651 651 } 652 652 653 JSValue Ptr dateProtoFuncGetUTCDay(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)653 JSValue dateProtoFuncGetUTCDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 654 654 { 655 655 if (!thisValue.isObject(&DateInstance::info)) … … 668 668 } 669 669 670 JSValue Ptr dateProtoFuncGetHours(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)670 JSValue dateProtoFuncGetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 671 671 { 672 672 if (!thisValue.isObject(&DateInstance::info)) … … 685 685 } 686 686 687 JSValue Ptr dateProtoFuncGetUTCHours(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)687 JSValue dateProtoFuncGetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 688 688 { 689 689 if (!thisValue.isObject(&DateInstance::info)) … … 702 702 } 703 703 704 JSValue Ptr dateProtoFuncGetMinutes(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)704 JSValue dateProtoFuncGetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 705 705 { 706 706 if (!thisValue.isObject(&DateInstance::info)) … … 719 719 } 720 720 721 JSValue Ptr dateProtoFuncGetUTCMinutes(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)721 JSValue dateProtoFuncGetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 722 722 { 723 723 if (!thisValue.isObject(&DateInstance::info)) … … 736 736 } 737 737 738 JSValue Ptr dateProtoFuncGetSeconds(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)738 JSValue dateProtoFuncGetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 739 739 { 740 740 if (!thisValue.isObject(&DateInstance::info)) … … 753 753 } 754 754 755 JSValue Ptr dateProtoFuncGetUTCSeconds(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)755 JSValue dateProtoFuncGetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 756 756 { 757 757 if (!thisValue.isObject(&DateInstance::info)) … … 770 770 } 771 771 772 JSValue Ptr dateProtoFuncGetMilliSeconds(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)772 JSValue dateProtoFuncGetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 773 773 { 774 774 if (!thisValue.isObject(&DateInstance::info)) … … 785 785 } 786 786 787 JSValue Ptr dateProtoFuncGetUTCMilliseconds(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)787 JSValue dateProtoFuncGetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 788 788 { 789 789 if (!thisValue.isObject(&DateInstance::info)) … … 800 800 } 801 801 802 JSValue Ptr dateProtoFuncGetTimezoneOffset(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)802 JSValue dateProtoFuncGetTimezoneOffset(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 803 803 { 804 804 if (!thisValue.isObject(&DateInstance::info)) … … 817 817 } 818 818 819 JSValue Ptr dateProtoFuncSetTime(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)819 JSValue dateProtoFuncSetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 820 820 { 821 821 if (!thisValue.isObject(&DateInstance::info)) … … 825 825 826 826 double milli = timeClip(args.at(0).toNumber(exec)); 827 JSValue Ptrresult = jsNumber(exec, milli);827 JSValue result = jsNumber(exec, milli); 828 828 thisDateObj->setInternalValue(result); 829 829 return result; 830 830 } 831 831 832 static JSValue Ptr setNewValueFromTimeArgs(ExecState* exec, JSValuePtrthisValue, const ArgList& args, int numArgsToUse, bool inputIsUTC)832 static JSValue setNewValueFromTimeArgs(ExecState* exec, JSValue thisValue, const ArgList& args, int numArgsToUse, bool inputIsUTC) 833 833 { 834 834 if (!thisValue.isObject(&DateInstance::info)) … … 839 839 840 840 if (args.isEmpty() || isnan(milli)) { 841 JSValue Ptrresult = jsNaN(exec);841 JSValue result = jsNaN(exec); 842 842 thisDateObj->setInternalValue(result); 843 843 return result; … … 851 851 852 852 if (!fillStructuresUsingTimeArgs(exec, args, numArgsToUse, &ms, &t)) { 853 JSValue Ptrresult = jsNaN(exec);853 JSValue result = jsNaN(exec); 854 854 thisDateObj->setInternalValue(result); 855 855 return result; 856 856 } 857 857 858 JSValue Ptrresult = jsNumber(exec, gregorianDateTimeToMS(t, ms, inputIsUTC));858 JSValue result = jsNumber(exec, gregorianDateTimeToMS(t, ms, inputIsUTC)); 859 859 thisDateObj->setInternalValue(result); 860 860 return result; 861 861 } 862 862 863 static JSValue Ptr setNewValueFromDateArgs(ExecState* exec, JSValuePtrthisValue, const ArgList& args, int numArgsToUse, bool inputIsUTC)863 static JSValue setNewValueFromDateArgs(ExecState* exec, JSValue thisValue, const ArgList& args, int numArgsToUse, bool inputIsUTC) 864 864 { 865 865 if (!thisValue.isObject(&DateInstance::info)) … … 868 868 DateInstance* thisDateObj = asDateInstance(thisValue); 869 869 if (args.isEmpty()) { 870 JSValue Ptrresult = jsNaN(exec);870 JSValue result = jsNaN(exec); 871 871 thisDateObj->setInternalValue(result); 872 872 return result; … … 888 888 889 889 if (!fillStructuresUsingDateArgs(exec, args, numArgsToUse, &ms, &t)) { 890 JSValue Ptrresult = jsNaN(exec);890 JSValue result = jsNaN(exec); 891 891 thisDateObj->setInternalValue(result); 892 892 return result; 893 893 } 894 894 895 JSValue Ptrresult = jsNumber(exec, gregorianDateTimeToMS(t, ms, inputIsUTC));895 JSValue result = jsNumber(exec, gregorianDateTimeToMS(t, ms, inputIsUTC)); 896 896 thisDateObj->setInternalValue(result); 897 897 return result; 898 898 } 899 899 900 JSValue Ptr dateProtoFuncSetMilliSeconds(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)900 JSValue dateProtoFuncSetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 901 901 { 902 902 const bool inputIsUTC = false; … … 904 904 } 905 905 906 JSValue Ptr dateProtoFuncSetUTCMilliseconds(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)906 JSValue dateProtoFuncSetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 907 907 { 908 908 const bool inputIsUTC = true; … … 910 910 } 911 911 912 JSValue Ptr dateProtoFuncSetSeconds(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)912 JSValue dateProtoFuncSetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 913 913 { 914 914 const bool inputIsUTC = false; … … 916 916 } 917 917 918 JSValue Ptr dateProtoFuncSetUTCSeconds(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)918 JSValue dateProtoFuncSetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 919 919 { 920 920 const bool inputIsUTC = true; … … 922 922 } 923 923 924 JSValue Ptr dateProtoFuncSetMinutes(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)924 JSValue dateProtoFuncSetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 925 925 { 926 926 const bool inputIsUTC = false; … … 928 928 } 929 929 930 JSValue Ptr dateProtoFuncSetUTCMinutes(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)930 JSValue dateProtoFuncSetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 931 931 { 932 932 const bool inputIsUTC = true; … … 934 934 } 935 935 936 JSValue Ptr dateProtoFuncSetHours(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)936 JSValue dateProtoFuncSetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 937 937 { 938 938 const bool inputIsUTC = false; … … 940 940 } 941 941 942 JSValue Ptr dateProtoFuncSetUTCHours(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)942 JSValue dateProtoFuncSetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 943 943 { 944 944 const bool inputIsUTC = true; … … 946 946 } 947 947 948 JSValue Ptr dateProtoFuncSetDate(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)948 JSValue dateProtoFuncSetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 949 949 { 950 950 const bool inputIsUTC = false; … … 952 952 } 953 953 954 JSValue Ptr dateProtoFuncSetUTCDate(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)954 JSValue dateProtoFuncSetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 955 955 { 956 956 const bool inputIsUTC = true; … … 958 958 } 959 959 960 JSValue Ptr dateProtoFuncSetMonth(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)960 JSValue dateProtoFuncSetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 961 961 { 962 962 const bool inputIsUTC = false; … … 964 964 } 965 965 966 JSValue Ptr dateProtoFuncSetUTCMonth(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)966 JSValue dateProtoFuncSetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 967 967 { 968 968 const bool inputIsUTC = true; … … 970 970 } 971 971 972 JSValue Ptr dateProtoFuncSetFullYear(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)972 JSValue dateProtoFuncSetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 973 973 { 974 974 const bool inputIsUTC = false; … … 976 976 } 977 977 978 JSValue Ptr dateProtoFuncSetUTCFullYear(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)978 JSValue dateProtoFuncSetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 979 979 { 980 980 const bool inputIsUTC = true; … … 982 982 } 983 983 984 JSValue Ptr dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)984 JSValue dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 985 985 { 986 986 if (!thisValue.isObject(&DateInstance::info)) … … 991 991 DateInstance* thisDateObj = asDateInstance(thisValue); 992 992 if (args.isEmpty()) { 993 JSValue Ptrresult = jsNaN(exec);993 JSValue result = jsNaN(exec); 994 994 thisDateObj->setInternalValue(result); 995 995 return result; … … 1013 1013 int32_t year = args.at(0).toInt32(exec, ok); 1014 1014 if (!ok) { 1015 JSValue Ptrresult = jsNaN(exec);1015 JSValue result = jsNaN(exec); 1016 1016 thisDateObj->setInternalValue(result); 1017 1017 return result; … … 1019 1019 1020 1020 t.year = (year > 99 || year < 0) ? year - 1900 : year; 1021 JSValue Ptrresult = jsNumber(exec, gregorianDateTimeToMS(t, ms, utc));1021 JSValue result = jsNumber(exec, gregorianDateTimeToMS(t, ms, utc)); 1022 1022 thisDateObj->setInternalValue(result); 1023 1023 return result; 1024 1024 } 1025 1025 1026 JSValue Ptr dateProtoFuncGetYear(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)1026 JSValue dateProtoFuncGetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 1027 1027 { 1028 1028 if (!thisValue.isObject(&DateInstance::info)) -
trunk/JavaScriptCore/runtime/DatePrototype.h
r39670 r43122 37 37 static const ClassInfo info; 38 38 39 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)39 static PassRefPtr<Structure> createStructure(JSValue prototype) 40 40 { 41 41 return Structure::create(prototype, TypeInfo(ObjectType)); -
trunk/JavaScriptCore/runtime/ErrorConstructor.cpp
r42989 r43122 59 59 60 60 // ECMA 15.9.2 61 static JSValue Ptr callErrorConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)61 static JSValue callErrorConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 62 62 { 63 63 // "Error()" gives the sames result as "new Error()" -
trunk/JavaScriptCore/runtime/ErrorPrototype.cpp
r40046 r43122 31 31 ASSERT_CLASS_FITS_IN_CELL(ErrorPrototype); 32 32 33 static JSValue Ptr errorProtoFuncToString(ExecState*, JSObject*, JSValuePtr, const ArgList&);33 static JSValue errorProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 34 34 35 35 // ECMA 15.9.4 … … 45 45 } 46 46 47 JSValue Ptr errorProtoFuncToString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)47 JSValue errorProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 48 48 { 49 49 JSObject* thisObj = thisValue.toThisObject(exec); … … 51 51 UString s = "Error"; 52 52 53 JSValue Ptrv = thisObj->get(exec, exec->propertyNames().name);53 JSValue v = thisObj->get(exec, exec->propertyNames().name); 54 54 if (!v.isUndefined()) 55 55 s = v.toString(exec); -
trunk/JavaScriptCore/runtime/ExceptionHelpers.cpp
r41912 r43122 52 52 }; 53 53 54 JSValue PtrcreateInterruptedExecutionException(JSGlobalData* globalData)54 JSValue createInterruptedExecutionException(JSGlobalData* globalData) 55 55 { 56 56 return new (globalData) InterruptedExecutionError(globalData); 57 57 } 58 58 59 static JSValue PtrcreateError(ExecState* exec, ErrorType e, const char* msg)59 static JSValue createError(ExecState* exec, ErrorType e, const char* msg) 60 60 { 61 61 return Error::create(exec, e, msg, -1, -1, 0); 62 62 } 63 63 64 JSValue PtrcreateStackOverflowError(ExecState* exec)64 JSValue createStackOverflowError(ExecState* exec) 65 65 { 66 66 return createError(exec, RangeError, "Maximum call stack size exceeded."); 67 67 } 68 68 69 JSValue PtrcreateUndefinedVariableError(ExecState* exec, const Identifier& ident, unsigned bytecodeOffset, CodeBlock* codeBlock)69 JSValue createUndefinedVariableError(ExecState* exec, const Identifier& ident, unsigned bytecodeOffset, CodeBlock* codeBlock) 70 70 { 71 71 int startOffset = 0; … … 82 82 } 83 83 84 static UString createErrorMessage(ExecState* exec, CodeBlock* codeBlock, int, int expressionStart, int expressionStop, JSValue Ptrvalue, UString error)84 static UString createErrorMessage(ExecState* exec, CodeBlock* codeBlock, int, int expressionStart, int expressionStop, JSValue value, UString error) 85 85 { 86 86 if (!expressionStop || expressionStart > codeBlock->source()->length()) { … … 126 126 } 127 127 128 JSObject* createInvalidParamError(ExecState* exec, const char* op, JSValue Ptrvalue, unsigned bytecodeOffset, CodeBlock* codeBlock)128 JSObject* createInvalidParamError(ExecState* exec, const char* op, JSValue value, unsigned bytecodeOffset, CodeBlock* codeBlock) 129 129 { 130 130 UString message = "not a valid argument for '"; … … 144 144 } 145 145 146 JSObject* createNotAConstructorError(ExecState* exec, JSValue Ptrvalue, unsigned bytecodeOffset, CodeBlock* codeBlock)146 JSObject* createNotAConstructorError(ExecState* exec, JSValue value, unsigned bytecodeOffset, CodeBlock* codeBlock) 147 147 { 148 148 int startOffset = 0; … … 165 165 } 166 166 167 JSValue Ptr createNotAFunctionError(ExecState* exec, JSValuePtrvalue, unsigned bytecodeOffset, CodeBlock* codeBlock)167 JSValue createNotAFunctionError(ExecState* exec, JSValue value, unsigned bytecodeOffset, CodeBlock* codeBlock) 168 168 { 169 169 int startOffset = 0; -
trunk/JavaScriptCore/runtime/ExceptionHelpers.h
r39670 r43122 41 41 class JSNotAnObjectErrorStub; 42 42 class JSObject; 43 class JSValue Ptr;43 class JSValue; 44 44 class Node; 45 45 46 JSValue PtrcreateInterruptedExecutionException(JSGlobalData*);47 JSValue PtrcreateStackOverflowError(ExecState*);48 JSValue PtrcreateUndefinedVariableError(ExecState*, const Identifier&, unsigned bytecodeOffset, CodeBlock*);46 JSValue createInterruptedExecutionException(JSGlobalData*); 47 JSValue createStackOverflowError(ExecState*); 48 JSValue createUndefinedVariableError(ExecState*, const Identifier&, unsigned bytecodeOffset, CodeBlock*); 49 49 JSNotAnObjectErrorStub* createNotAnObjectErrorStub(ExecState*, bool isNull); 50 JSObject* createInvalidParamError(ExecState*, const char* op, JSValue Ptr, unsigned bytecodeOffset, CodeBlock*);51 JSObject* createNotAConstructorError(ExecState*, JSValue Ptr, unsigned bytecodeOffset, CodeBlock*);52 JSValue Ptr createNotAFunctionError(ExecState*, JSValuePtr, unsigned bytecodeOffset, CodeBlock*);50 JSObject* createInvalidParamError(ExecState*, const char* op, JSValue, unsigned bytecodeOffset, CodeBlock*); 51 JSObject* createNotAConstructorError(ExecState*, JSValue, unsigned bytecodeOffset, CodeBlock*); 52 JSValue createNotAFunctionError(ExecState*, JSValue, unsigned bytecodeOffset, CodeBlock*); 53 53 JSObject* createNotAnObjectError(ExecState*, JSNotAnObjectErrorStub*, unsigned bytecodeOffset, CodeBlock*); 54 54 -
trunk/JavaScriptCore/runtime/FunctionConstructor.cpp
r42989 r43122 55 55 } 56 56 57 static JSValue Ptr callFunctionConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)57 static JSValue callFunctionConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 58 58 { 59 59 return constructFunction(exec, args); -
trunk/JavaScriptCore/runtime/FunctionPrototype.cpp
r43037 r43122 34 34 ASSERT_CLASS_FITS_IN_CELL(FunctionPrototype); 35 35 36 static JSValue Ptr functionProtoFuncToString(ExecState*, JSObject*, JSValuePtr, const ArgList&);37 static JSValue Ptr functionProtoFuncApply(ExecState*, JSObject*, JSValuePtr, const ArgList&);38 static JSValue Ptr functionProtoFuncCall(ExecState*, JSObject*, JSValuePtr, const ArgList&);36 static JSValue functionProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 37 static JSValue functionProtoFuncApply(ExecState*, JSObject*, JSValue, const ArgList&); 38 static JSValue functionProtoFuncCall(ExecState*, JSObject*, JSValue, const ArgList&); 39 39 40 40 FunctionPrototype::FunctionPrototype(ExecState* exec, PassRefPtr<Structure> structure) … … 53 53 } 54 54 55 static JSValue Ptr callFunctionPrototype(ExecState*, JSObject*, JSValuePtr, const ArgList&)55 static JSValue callFunctionPrototype(ExecState*, JSObject*, JSValue, const ArgList&) 56 56 { 57 57 return jsUndefined(); … … 83 83 } 84 84 85 JSValue Ptr functionProtoFuncToString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)85 JSValue functionProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 86 86 { 87 87 if (thisValue.isObject(&JSFunction::info)) { … … 100 100 } 101 101 102 JSValue Ptr functionProtoFuncApply(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)102 JSValue functionProtoFuncApply(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 103 103 { 104 104 CallData callData; … … 107 107 return throwError(exec, TypeError); 108 108 109 JSValue Ptrarray = args.at(1);109 JSValue array = args.at(1); 110 110 111 111 MarkedArgumentBuffer applyArgs; … … 128 128 } 129 129 130 JSValue Ptr functionProtoFuncCall(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)130 JSValue functionProtoFuncCall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 131 131 { 132 132 CallData callData; -
trunk/JavaScriptCore/runtime/FunctionPrototype.h
r42337 r43122 33 33 void addFunctionProperties(ExecState*, Structure* prototypeFunctionStructure, PrototypeFunction** callFunction, PrototypeFunction** applyFunction); 34 34 35 static PassRefPtr<Structure> createStructure(JSValue Ptrproto)35 static PassRefPtr<Structure> createStructure(JSValue proto) 36 36 { 37 37 return Structure::create(proto, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot)); -
trunk/JavaScriptCore/runtime/GetterSetter.cpp
r40046 r43122 39 39 } 40 40 41 JSValue PtrGetterSetter::toPrimitive(ExecState*, PreferredPrimitiveType) const41 JSValue GetterSetter::toPrimitive(ExecState*, PreferredPrimitiveType) const 42 42 { 43 43 ASSERT_NOT_REACHED(); … … 45 45 } 46 46 47 bool GetterSetter::getPrimitiveNumber(ExecState*, double& number, JSValue Ptr& value)47 bool GetterSetter::getPrimitiveNumber(ExecState*, double& number, JSValue& value) 48 48 { 49 49 ASSERT_NOT_REACHED(); -
trunk/JavaScriptCore/runtime/GetterSetter.h
r39670 r43122 51 51 virtual bool isGetterSetter() const; 52 52 53 virtual JSValue PtrtoPrimitive(ExecState*, PreferredPrimitiveType) const;54 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue Ptr& value);53 virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const; 54 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue& value); 55 55 virtual bool toBoolean(ExecState*) const; 56 56 virtual double toNumber(ExecState*) const; … … 62 62 }; 63 63 64 GetterSetter* asGetterSetter(JSValue Ptr);64 GetterSetter* asGetterSetter(JSValue); 65 65 66 inline GetterSetter* asGetterSetter(JSValue Ptrvalue)66 inline GetterSetter* asGetterSetter(JSValue value) 67 67 { 68 68 ASSERT(asCell(value)->isGetterSetter()); -
trunk/JavaScriptCore/runtime/InternalFunction.cpp
r43006 r43122 51 51 const UString InternalFunction::displayName(JSGlobalData* globalData) 52 52 { 53 JSValue PtrdisplayName = getDirect(globalData->propertyNames->displayName);53 JSValue displayName = getDirect(globalData->propertyNames->displayName); 54 54 55 55 if (displayName && isJSString(globalData, displayName)) -
trunk/JavaScriptCore/runtime/InternalFunction.h
r42680 r43122 41 41 const UString calculatedDisplayName(JSGlobalData*); 42 42 43 static PassRefPtr<Structure> createStructure(JSValue Ptrproto)43 static PassRefPtr<Structure> createStructure(JSValue proto) 44 44 { 45 45 return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | HasStandardGetOwnPropertySlot)); … … 54 54 }; 55 55 56 InternalFunction* asInternalFunction(JSValue Ptr);56 InternalFunction* asInternalFunction(JSValue); 57 57 58 inline InternalFunction* asInternalFunction(JSValue Ptrvalue)58 inline InternalFunction* asInternalFunction(JSValue value) 59 59 { 60 60 ASSERT(asObject(value)->inherits(&InternalFunction::info)); -
trunk/JavaScriptCore/runtime/JSActivation.cpp
r40046 r43122 86 86 return true; 87 87 88 if (JSValue Ptr* location = getDirectLocation(propertyName)) {88 if (JSValue* location = getDirectLocation(propertyName)) { 89 89 slot.setValueSlot(location); 90 90 return true; … … 104 104 } 105 105 106 void JSActivation::put(ExecState*, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)106 void JSActivation::put(ExecState*, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 107 107 { 108 108 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); … … 119 119 120 120 // FIXME: Make this function honor ReadOnly (const) and DontEnum 121 void JSActivation::putWithAttributes(ExecState*, const Identifier& propertyName, JSValue Ptrvalue, unsigned attributes)121 void JSActivation::putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes) 122 122 { 123 123 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); … … 152 152 } 153 153 154 JSValue PtrJSActivation::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)154 JSValue JSActivation::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) 155 155 { 156 156 JSActivation* activation = asActivation(slot.slotBase()); -
trunk/JavaScriptCore/runtime/JSActivation.h
r40332 r43122 55 55 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 56 56 57 virtual void put(ExecState*, const Identifier&, JSValue Ptr, PutPropertySlot&);57 virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); 58 58 59 virtual void putWithAttributes(ExecState*, const Identifier&, JSValue Ptr, unsigned attributes);59 virtual void putWithAttributes(ExecState*, const Identifier&, JSValue, unsigned attributes); 60 60 virtual bool deleteProperty(ExecState*, const Identifier& propertyName); 61 61 … … 67 67 static const ClassInfo info; 68 68 69 static PassRefPtr<Structure> createStructure(JSValue Ptrproto) { return Structure::create(proto, TypeInfo(ObjectType, NeedsThisConversion)); }69 static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, NeedsThisConversion)); } 70 70 71 71 private: … … 80 80 }; 81 81 82 static JSValue PtrargumentsGetter(ExecState*, const Identifier&, const PropertySlot&);82 static JSValue argumentsGetter(ExecState*, const Identifier&, const PropertySlot&); 83 83 NEVER_INLINE PropertySlot::GetValueFunc getArgumentsGetter(); 84 84 … … 86 86 }; 87 87 88 JSActivation* asActivation(JSValue Ptr);88 JSActivation* asActivation(JSValue); 89 89 90 inline JSActivation* asActivation(JSValue Ptrvalue)90 inline JSActivation* asActivation(JSValue value) 91 91 { 92 92 ASSERT(asObject(value)->inherits(&JSActivation::info)); -
trunk/JavaScriptCore/runtime/JSArray.cpp
r43037 r43122 68 68 // The definition of MAX_STORAGE_VECTOR_LENGTH is dependant on the definition storageSize 69 69 // function below - the MAX_STORAGE_VECTOR_LENGTH limit is defined such that the storage 70 // size calculation cannot overflow. (sizeof(ArrayStorage) - sizeof(JSValue Ptr)) +71 // (vectorLength * sizeof(JSValue Ptr)) must be <= 0xFFFFFFFFU (which is maximum value of size_t).72 #define MAX_STORAGE_VECTOR_LENGTH static_cast<unsigned>((0xFFFFFFFFU - (sizeof(ArrayStorage) - sizeof(JSValue Ptr))) / sizeof(JSValuePtr))70 // size calculation cannot overflow. (sizeof(ArrayStorage) - sizeof(JSValue)) + 71 // (vectorLength * sizeof(JSValue)) must be <= 0xFFFFFFFFU (which is maximum value of size_t). 72 #define MAX_STORAGE_VECTOR_LENGTH static_cast<unsigned>((0xFFFFFFFFU - (sizeof(ArrayStorage) - sizeof(JSValue))) / sizeof(JSValue)) 73 73 74 74 // These values have to be macros to be used in max() and min() without introducing … … 93 93 // MAX_STORAGE_VECTOR_LENGTH is defined such that provided (vectorLength <= MAX_STORAGE_VECTOR_LENGTH) 94 94 // - as asserted above - the following calculation cannot overflow. 95 size_t size = (sizeof(ArrayStorage) - sizeof(JSValue Ptr)) + (vectorLength * sizeof(JSValuePtr));95 size_t size = (sizeof(ArrayStorage) - sizeof(JSValue)) + (vectorLength * sizeof(JSValue)); 96 96 // Assertion to detect integer overflow in previous calculation (should not be possible, provided that 97 97 // MAX_STORAGE_VECTOR_LENGTH is correctly defined). 98 ASSERT(((size - (sizeof(ArrayStorage) - sizeof(JSValue Ptr))) / sizeof(JSValuePtr) == vectorLength) && (size >= (sizeof(ArrayStorage) - sizeof(JSValuePtr))));98 ASSERT(((size - (sizeof(ArrayStorage) - sizeof(JSValue))) / sizeof(JSValue) == vectorLength) && (size >= (sizeof(ArrayStorage) - sizeof(JSValue)))); 99 99 100 100 return size; … … 152 152 m_storage->m_length = initialLength; 153 153 154 Heap::heap(this)->reportExtraMemoryCost(initialCapacity * sizeof(JSValue Ptr));154 Heap::heap(this)->reportExtraMemoryCost(initialCapacity * sizeof(JSValue)); 155 155 156 156 checkConsistency(); … … 202 202 203 203 if (i < storage->m_vectorLength) { 204 JSValue Ptr& valueSlot = storage->m_vector[i];204 JSValue& valueSlot = storage->m_vector[i]; 205 205 if (valueSlot) { 206 206 slot.setValueSlot(&valueSlot); … … 236 236 237 237 // ECMA 15.4.5.1 238 void JSArray::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)238 void JSArray::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 239 239 { 240 240 bool isArrayIndex; … … 258 258 } 259 259 260 void JSArray::put(ExecState* exec, unsigned i, JSValue Ptrvalue)260 void JSArray::put(ExecState* exec, unsigned i, JSValue value) 261 261 { 262 262 checkConsistency(); … … 269 269 270 270 if (i < m_storage->m_vectorLength) { 271 JSValue Ptr& valueSlot = m_storage->m_vector[i];271 JSValue& valueSlot = m_storage->m_vector[i]; 272 272 if (valueSlot) { 273 273 valueSlot = value; … … 285 285 } 286 286 287 NEVER_INLINE void JSArray::putSlowCase(ExecState* exec, unsigned i, JSValue Ptrvalue)287 NEVER_INLINE void JSArray::putSlowCase(ExecState* exec, unsigned i, JSValue value) 288 288 { 289 289 ArrayStorage* storage = m_storage; … … 396 396 397 397 if (i < storage->m_vectorLength) { 398 JSValue Ptr& valueSlot = storage->m_vector[i];398 JSValue& valueSlot = storage->m_vector[i]; 399 399 if (!valueSlot) { 400 400 checkConsistency(); … … 491 491 unsigned usedVectorLength = min(length, storage->m_vectorLength); 492 492 for (unsigned i = newLength; i < usedVectorLength; ++i) { 493 JSValue Ptr& valueSlot = storage->m_vector[i];493 JSValue& valueSlot = storage->m_vector[i]; 494 494 bool hadValue = valueSlot; 495 495 valueSlot = noValue(); … … 516 516 } 517 517 518 JSValue PtrJSArray::pop()518 JSValue JSArray::pop() 519 519 { 520 520 checkConsistency(); … … 526 526 --length; 527 527 528 JSValue Ptrresult;528 JSValue result; 529 529 530 530 if (m_fastAccessCutoff > length) { 531 JSValue Ptr& valueSlot = m_storage->m_vector[length];531 JSValue& valueSlot = m_storage->m_vector[length]; 532 532 result = valueSlot; 533 533 ASSERT(result); … … 536 536 m_fastAccessCutoff = length; 537 537 } else if (length < m_storage->m_vectorLength) { 538 JSValue Ptr& valueSlot = m_storage->m_vector[length];538 JSValue& valueSlot = m_storage->m_vector[length]; 539 539 result = valueSlot; 540 540 valueSlot = noValue(); … … 565 565 } 566 566 567 void JSArray::push(ExecState* exec, JSValue Ptrvalue)567 void JSArray::push(ExecState* exec, JSValue value) 568 568 { 569 569 checkConsistency(); … … 605 605 unsigned usedVectorLength = min(storage->m_length, storage->m_vectorLength); 606 606 for (unsigned i = 0; i < usedVectorLength; ++i) { 607 JSValue Ptrvalue = storage->m_vector[i];607 JSValue value = storage->m_vector[i]; 608 608 if (value && !value.marked()) 609 609 value.mark(); … … 613 613 SparseArrayValueMap::iterator end = map->end(); 614 614 for (SparseArrayValueMap::iterator it = map->begin(); it != end; ++it) { 615 JSValue Ptrvalue = it->second;615 JSValue value = it->second; 616 616 if (!value.marked()) 617 617 value.mark(); … … 622 622 static int compareNumbersForQSort(const void* a, const void* b) 623 623 { 624 double da = static_cast<const JSValue Ptr*>(a)->uncheckedGetNumber();625 double db = static_cast<const JSValue Ptr*>(b)->uncheckedGetNumber();624 double da = static_cast<const JSValue*>(a)->uncheckedGetNumber(); 625 double db = static_cast<const JSValue*>(b)->uncheckedGetNumber(); 626 626 return (da > db) - (da < db); 627 627 } 628 628 629 typedef std::pair<JSValue Ptr, UString> ValueStringPair;629 typedef std::pair<JSValue, UString> ValueStringPair; 630 630 631 631 static int compareByStringPairForQSort(const void* a, const void* b) … … 636 636 } 637 637 638 void JSArray::sortNumeric(ExecState* exec, JSValue PtrcompareFunction, CallType callType, const CallData& callData)638 void JSArray::sortNumeric(ExecState* exec, JSValue compareFunction, CallType callType, const CallData& callData) 639 639 { 640 640 unsigned lengthNotIncludingUndefined = compactForSorting(); … … 662 662 // also don't require mergesort's stability, since there's no user visible 663 663 // side-effect from swapping the order of equal primitive values. 664 qsort(m_storage->m_vector, size, sizeof(JSValue Ptr), compareNumbersForQSort);664 qsort(m_storage->m_vector, size, sizeof(JSValue), compareNumbersForQSort); 665 665 666 666 checkConsistency(SortConsistencyCheck); … … 690 690 691 691 for (size_t i = 0; i < lengthNotIncludingUndefined; i++) { 692 JSValue Ptrvalue = m_storage->m_vector[i];692 JSValue value = m_storage->m_vector[i]; 693 693 ASSERT(!value.isUndefined()); 694 694 values[i].first = value; … … 728 728 729 729 struct AVLTreeNodeForArrayCompare { 730 JSValue Ptrvalue;730 JSValue value; 731 731 732 732 // Child pointers. The high bit of gt is robbed and used as the … … 739 739 struct AVLTreeAbstractorForArrayCompare { 740 740 typedef int32_t handle; // Handle is an index into m_nodes vector. 741 typedef JSValue Ptrkey;741 typedef JSValue key; 742 742 typedef int32_t size; 743 743 744 744 Vector<AVLTreeNodeForArrayCompare> m_nodes; 745 745 ExecState* m_exec; 746 JSValue Ptrm_compareFunction;746 JSValue m_compareFunction; 747 747 CallType m_compareCallType; 748 748 const CallData* m_compareCallData; 749 JSValue Ptrm_globalThisValue;749 JSValue m_globalThisValue; 750 750 OwnPtr<CachedCall> m_cachedCall; 751 751 … … 805 805 }; 806 806 807 void JSArray::sort(ExecState* exec, JSValue PtrcompareFunction, CallType callType, const CallData& callData)807 void JSArray::sort(ExecState* exec, JSValue compareFunction, CallType callType, const CallData& callData) 808 808 { 809 809 checkConsistency(); … … 846 846 // Iterate over the array, ignoring missing values, counting undefined ones, and inserting all other ones into the tree. 847 847 for (; numDefined < usedVectorLength; ++numDefined) { 848 JSValue Ptrv = m_storage->m_vector[numDefined];848 JSValue v = m_storage->m_vector[numDefined]; 849 849 if (!v || v.isUndefined()) 850 850 break; … … 853 853 } 854 854 for (unsigned i = numDefined; i < usedVectorLength; ++i) { 855 JSValue Ptrv = m_storage->m_vector[i];855 JSValue v = m_storage->m_vector[i]; 856 856 if (v) { 857 857 if (v.isUndefined()) … … 950 950 951 951 for (; numDefined < usedVectorLength; ++numDefined) { 952 JSValue Ptrv = storage->m_vector[numDefined];952 JSValue v = storage->m_vector[numDefined]; 953 953 if (!v || v.isUndefined()) 954 954 break; 955 955 } 956 956 for (unsigned i = numDefined; i < usedVectorLength; ++i) { 957 JSValue Ptrv = storage->m_vector[i];957 JSValue v = storage->m_vector[i]; 958 958 if (v) { 959 959 if (v.isUndefined()) … … 1020 1020 unsigned numValuesInVector = 0; 1021 1021 for (unsigned i = 0; i < m_storage->m_vectorLength; ++i) { 1022 if (JSValue Ptrvalue = m_storage->m_vector[i]) {1022 if (JSValue value = m_storage->m_vector[i]) { 1023 1023 ASSERT(i < m_storage->m_length); 1024 1024 if (type != DestructorConsistencyCheck) … … 1059 1059 } 1060 1060 1061 JSArray* constructArray(ExecState* exec, JSValue PtrsingleItemValue)1061 JSArray* constructArray(ExecState* exec, JSValue singleItemValue) 1062 1062 { 1063 1063 MarkedArgumentBuffer values; -
trunk/JavaScriptCore/runtime/JSArray.h
r43037 r43122 26 26 namespace JSC { 27 27 28 typedef HashMap<unsigned, JSValue Ptr> SparseArrayValueMap;28 typedef HashMap<unsigned, JSValue> SparseArrayValueMap; 29 29 30 30 struct ArrayStorage { … … 34 34 SparseArrayValueMap* m_sparseValueMap; 35 35 void* lazyCreationData; // A JSArray subclass can use this to fill the vector lazily. 36 JSValue Ptrm_vector[1];36 JSValue m_vector[1]; 37 37 }; 38 38 … … 48 48 virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); 49 49 virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&); 50 virtual void put(ExecState*, unsigned propertyName, JSValue Ptr); // FIXME: Make protected and add setItem.50 virtual void put(ExecState*, unsigned propertyName, JSValue); // FIXME: Make protected and add setItem. 51 51 52 52 static JS_EXPORTDATA const ClassInfo info; … … 56 56 57 57 void sort(ExecState*); 58 void sort(ExecState*, JSValue PtrcompareFunction, CallType, const CallData&);59 void sortNumeric(ExecState*, JSValue PtrcompareFunction, CallType, const CallData&);58 void sort(ExecState*, JSValue compareFunction, CallType, const CallData&); 59 void sortNumeric(ExecState*, JSValue compareFunction, CallType, const CallData&); 60 60 61 void push(ExecState*, JSValue Ptr);62 JSValue Ptrpop();61 void push(ExecState*, JSValue); 62 JSValue pop(); 63 63 64 64 bool canGetIndex(unsigned i) { return i < m_fastAccessCutoff; } 65 JSValue PtrgetIndex(unsigned i)65 JSValue getIndex(unsigned i) 66 66 { 67 67 ASSERT(canGetIndex(i)); … … 70 70 71 71 bool canSetIndex(unsigned i) { return i < m_fastAccessCutoff; } 72 JSValue Ptr setIndex(unsigned i, JSValuePtrv)72 JSValue setIndex(unsigned i, JSValue v) 73 73 { 74 74 ASSERT(canSetIndex(i)); … … 79 79 void copyToRegisters(ExecState*, Register*, uint32_t); 80 80 81 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)81 static PassRefPtr<Structure> createStructure(JSValue prototype) 82 82 { 83 83 return Structure::create(prototype, TypeInfo(ObjectType)); … … 85 85 86 86 protected: 87 virtual void put(ExecState*, const Identifier& propertyName, JSValue Ptr, PutPropertySlot&);87 virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 88 88 virtual bool deleteProperty(ExecState*, const Identifier& propertyName); 89 89 virtual bool deleteProperty(ExecState*, unsigned propertyName); … … 98 98 99 99 bool getOwnPropertySlotSlowCase(ExecState*, unsigned propertyName, PropertySlot&); 100 void putSlowCase(ExecState*, unsigned propertyName, JSValue Ptr);100 void putSlowCase(ExecState*, unsigned propertyName, JSValue); 101 101 102 102 bool increaseVectorLength(unsigned newLength); … … 111 111 }; 112 112 113 JSArray* asArray(JSValue Ptr);113 JSArray* asArray(JSValue); 114 114 115 115 JSArray* constructEmptyArray(ExecState*); 116 116 JSArray* constructEmptyArray(ExecState*, unsigned initialLength); 117 JSArray* constructArray(ExecState*, JSValue PtrsingleItemValue);117 JSArray* constructArray(ExecState*, JSValue singleItemValue); 118 118 JSArray* constructArray(ExecState*, const ArgList& values); 119 119 120 inline JSArray* asArray(JSValue Ptrvalue)120 inline JSArray* asArray(JSValue value) 121 121 { 122 122 ASSERT(asObject(value)->inherits(&JSArray::info)); … … 124 124 } 125 125 126 inline bool isJSArray(JSGlobalData* globalData, JSValue Ptrv) { return v.isCell() && v.asCell()->vptr() == globalData->jsArrayVPtr; }126 inline bool isJSArray(JSGlobalData* globalData, JSValue v) { return v.isCell() && v.asCell()->vptr() == globalData->jsArrayVPtr; } 127 127 128 128 } // namespace JSC -
trunk/JavaScriptCore/runtime/JSByteArray.cpp
r40055 r43122 44 44 } 45 45 46 PassRefPtr<Structure> JSByteArray::createStructure(JSValue Ptrprototype)46 PassRefPtr<Structure> JSByteArray::createStructure(JSValue prototype) 47 47 { 48 48 PassRefPtr<Structure> result = Structure::create(prototype, TypeInfo(ObjectType)); … … 70 70 } 71 71 72 void JSByteArray::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)72 void JSByteArray::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 73 73 { 74 74 bool ok; … … 81 81 } 82 82 83 void JSByteArray::put(ExecState* exec, unsigned propertyName, JSValue Ptrvalue)83 void JSByteArray::put(ExecState* exec, unsigned propertyName, JSValue value) 84 84 { 85 85 setIndex(exec, propertyName, value); -
trunk/JavaScriptCore/runtime/JSByteArray.h
r41168 r43122 37 37 public: 38 38 bool canAccessIndex(unsigned i) { return i < m_storage->length(); } 39 JSValue PtrgetIndex(ExecState* exec, unsigned i)39 JSValue getIndex(ExecState* exec, unsigned i) 40 40 { 41 41 ASSERT(canAccessIndex(i)); … … 65 65 } 66 66 67 void setIndex(ExecState* exec, unsigned i, JSValue Ptrvalue)67 void setIndex(ExecState* exec, unsigned i, JSValue value) 68 68 { 69 69 double byteValue = value.toNumber(exec); … … 75 75 76 76 JSByteArray(ExecState* exec, PassRefPtr<Structure>, WTF::ByteArray* storage, const JSC::ClassInfo* = &s_defaultInfo); 77 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype);77 static PassRefPtr<Structure> createStructure(JSValue prototype); 78 78 79 79 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); 80 80 virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&); 81 virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue Ptr, JSC::PutPropertySlot&);82 virtual void put(JSC::ExecState*, unsigned propertyName, JSC::JSValue Ptr);81 virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); 82 virtual void put(JSC::ExecState*, unsigned propertyName, JSC::JSValue); 83 83 84 84 virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); … … 103 103 }; 104 104 105 JSByteArray* asByteArray(JSValue Ptrvalue);106 inline JSByteArray* asByteArray(JSValue Ptrvalue)105 JSByteArray* asByteArray(JSValue value); 106 inline JSByteArray* asByteArray(JSValue value) 107 107 { 108 108 return static_cast<JSByteArray*>(asCell(value)); 109 109 } 110 110 111 inline bool isJSByteArray(JSGlobalData* globalData, JSValue Ptrv) { return v.isCell() && v.asCell()->vptr() == globalData->jsByteArrayVPtr; }111 inline bool isJSByteArray(JSGlobalData* globalData, JSValue v) { return v.isCell() && v.asCell()->vptr() == globalData->jsByteArrayVPtr; } 112 112 113 113 } // namespace JSC -
trunk/JavaScriptCore/runtime/JSCell.cpp
r39851 r43122 158 158 } 159 159 160 void JSCell::put(ExecState* exec, const Identifier& identifier, JSValue Ptrvalue, PutPropertySlot& slot)160 void JSCell::put(ExecState* exec, const Identifier& identifier, JSValue value, PutPropertySlot& slot) 161 161 { 162 162 toObject(exec)->put(exec, identifier, value, slot); 163 163 } 164 164 165 void JSCell::put(ExecState* exec, unsigned identifier, JSValue Ptrvalue)165 void JSCell::put(ExecState* exec, unsigned identifier, JSValue value) 166 166 { 167 167 toObject(exec)->put(exec, identifier, value); … … 198 198 } 199 199 200 JSValue PtrJSCell::getJSNumber()200 JSValue JSCell::getJSNumber() 201 201 { 202 202 return noValue(); -
trunk/JavaScriptCore/runtime/JSCell.h
r41168 r43122 40 40 friend class JSPropertyNameIterator; 41 41 friend class JSString; 42 friend class JSValue Ptr;42 friend class JSValue; 43 43 friend class VPtrSet; 44 44 … … 67 67 68 68 // Extracting integer values. 69 // FIXME: remove these methods, can check isNumberCell in JSValue Ptr&& then call asNumberCell::*.69 // FIXME: remove these methods, can check isNumberCell in JSValue && then call asNumberCell::*. 70 70 virtual bool getUInt32(uint32_t&) const; 71 71 virtual bool getTruncatedInt32(int32_t&) const; … … 73 73 74 74 // Basic conversions. 75 virtual JSValue PtrtoPrimitive(ExecState*, PreferredPrimitiveType) const = 0;76 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue Ptr&) = 0;75 virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const = 0; 76 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue&) = 0; 77 77 virtual bool toBoolean(ExecState*) const = 0; 78 78 virtual double toNumber(ExecState*) const = 0; … … 89 89 // Object operations, with the toObject operation included. 90 90 virtual const ClassInfo* classInfo() const; 91 virtual void put(ExecState*, const Identifier& propertyName, JSValue Ptr, PutPropertySlot&);92 virtual void put(ExecState*, unsigned propertyName, JSValue Ptr);91 virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 92 virtual void put(ExecState*, unsigned propertyName, JSValue); 93 93 virtual bool deleteProperty(ExecState*, const Identifier& propertyName); 94 94 virtual bool deleteProperty(ExecState*, unsigned propertyName); … … 97 97 virtual UString toThisString(ExecState*) const; 98 98 virtual JSString* toThisJSString(ExecState*); 99 virtual JSValue PtrgetJSNumber();99 virtual JSValue getJSNumber(); 100 100 void* vptr() { return *reinterpret_cast<void**>(this); } 101 101 … … 109 109 }; 110 110 111 JSCell* asCell(JSValue Ptr);112 113 inline JSCell* asCell(JSValue Ptrvalue)111 JSCell* asCell(JSValue); 112 113 inline JSCell* asCell(JSValue value) 114 114 { 115 115 return value.asCell(); … … 155 155 } 156 156 157 ALWAYS_INLINE JSCell* JSValue Ptr::asCell() const157 ALWAYS_INLINE JSCell* JSValue::asCell() const 158 158 { 159 159 ASSERT(isCell()); … … 172 172 // --- JSValue inlines ---------------------------- 173 173 174 inline bool JSValue Ptr::isString() const174 inline bool JSValue::isString() const 175 175 { 176 176 return !JSImmediate::isImmediate(asValue()) && asCell()->isString(); 177 177 } 178 178 179 inline bool JSValue Ptr::isGetterSetter() const179 inline bool JSValue::isGetterSetter() const 180 180 { 181 181 return !JSImmediate::isImmediate(asValue()) && asCell()->isGetterSetter(); 182 182 } 183 183 184 inline bool JSValue Ptr::isObject() const184 inline bool JSValue::isObject() const 185 185 { 186 186 return !JSImmediate::isImmediate(asValue()) && asCell()->isObject(); 187 187 } 188 188 189 inline bool JSValue Ptr::getString(UString& s) const189 inline bool JSValue::getString(UString& s) const 190 190 { 191 191 return !JSImmediate::isImmediate(asValue()) && asCell()->getString(s); 192 192 } 193 193 194 inline UString JSValue Ptr::getString() const194 inline UString JSValue::getString() const 195 195 { 196 196 return JSImmediate::isImmediate(asValue()) ? UString() : asCell()->getString(); 197 197 } 198 198 199 inline JSObject* JSValue Ptr::getObject() const199 inline JSObject* JSValue::getObject() const 200 200 { 201 201 return JSImmediate::isImmediate(asValue()) ? 0 : asCell()->getObject(); 202 202 } 203 203 204 inline CallType JSValue Ptr::getCallData(CallData& callData)204 inline CallType JSValue::getCallData(CallData& callData) 205 205 { 206 206 return JSImmediate::isImmediate(asValue()) ? CallTypeNone : asCell()->getCallData(callData); 207 207 } 208 208 209 inline ConstructType JSValue Ptr::getConstructData(ConstructData& constructData)209 inline ConstructType JSValue::getConstructData(ConstructData& constructData) 210 210 { 211 211 return JSImmediate::isImmediate(asValue()) ? ConstructTypeNone : asCell()->getConstructData(constructData); 212 212 } 213 213 214 ALWAYS_INLINE bool JSValue Ptr::getUInt32(uint32_t& v) const214 ALWAYS_INLINE bool JSValue::getUInt32(uint32_t& v) const 215 215 { 216 216 return JSImmediate::isImmediate(asValue()) ? JSImmediate::getUInt32(asValue(), v) : asCell()->getUInt32(v); 217 217 } 218 218 219 ALWAYS_INLINE bool JSValue Ptr::getTruncatedInt32(int32_t& v) const219 ALWAYS_INLINE bool JSValue::getTruncatedInt32(int32_t& v) const 220 220 { 221 221 return JSImmediate::isImmediate(asValue()) ? JSImmediate::getTruncatedInt32(asValue(), v) : asCell()->getTruncatedInt32(v); 222 222 } 223 223 224 inline bool JSValue Ptr::getTruncatedUInt32(uint32_t& v) const224 inline bool JSValue::getTruncatedUInt32(uint32_t& v) const 225 225 { 226 226 return JSImmediate::isImmediate(asValue()) ? JSImmediate::getTruncatedUInt32(asValue(), v) : asCell()->getTruncatedUInt32(v); 227 227 } 228 228 229 inline void JSValue Ptr::mark()229 inline void JSValue::mark() 230 230 { 231 231 asCell()->mark(); // callers should check !marked() before calling mark(), so this should only be called with cells 232 232 } 233 233 234 inline bool JSValue Ptr::marked() const234 inline bool JSValue::marked() const 235 235 { 236 236 return JSImmediate::isImmediate(asValue()) || asCell()->marked(); 237 237 } 238 238 239 inline JSValue Ptr JSValuePtr::toPrimitive(ExecState* exec, PreferredPrimitiveType preferredType) const239 inline JSValue JSValue::toPrimitive(ExecState* exec, PreferredPrimitiveType preferredType) const 240 240 { 241 241 return JSImmediate::isImmediate(asValue()) ? asValue() : asCell()->toPrimitive(exec, preferredType); 242 242 } 243 243 244 inline bool JSValue Ptr::getPrimitiveNumber(ExecState* exec, double& number, JSValuePtr& value)244 inline bool JSValue::getPrimitiveNumber(ExecState* exec, double& number, JSValue& value) 245 245 { 246 246 if (JSImmediate::isImmediate(asValue())) { … … 252 252 } 253 253 254 inline bool JSValue Ptr::toBoolean(ExecState* exec) const254 inline bool JSValue::toBoolean(ExecState* exec) const 255 255 { 256 256 return JSImmediate::isImmediate(asValue()) ? JSImmediate::toBoolean(asValue()) : asCell()->toBoolean(exec); 257 257 } 258 258 259 ALWAYS_INLINE double JSValue Ptr::toNumber(ExecState* exec) const259 ALWAYS_INLINE double JSValue::toNumber(ExecState* exec) const 260 260 { 261 261 return JSImmediate::isImmediate(asValue()) ? JSImmediate::toDouble(asValue()) : asCell()->toNumber(exec); 262 262 } 263 263 264 inline UString JSValue Ptr::toString(ExecState* exec) const264 inline UString JSValue::toString(ExecState* exec) const 265 265 { 266 266 return JSImmediate::isImmediate(asValue()) ? JSImmediate::toString(asValue()) : asCell()->toString(exec); 267 267 } 268 268 269 inline JSObject* JSValue Ptr::toObject(ExecState* exec) const269 inline JSObject* JSValue::toObject(ExecState* exec) const 270 270 { 271 271 return JSImmediate::isImmediate(asValue()) ? JSImmediate::toObject(asValue(), exec) : asCell()->toObject(exec); 272 272 } 273 273 274 inline JSObject* JSValue Ptr::toThisObject(ExecState* exec) const274 inline JSObject* JSValue::toThisObject(ExecState* exec) const 275 275 { 276 276 if (UNLIKELY(JSImmediate::isImmediate(asValue()))) … … 279 279 } 280 280 281 inline bool JSValue Ptr::needsThisConversion() const281 inline bool JSValue::needsThisConversion() const 282 282 { 283 283 if (UNLIKELY(JSImmediate::isImmediate(asValue()))) … … 286 286 } 287 287 288 inline UString JSValue Ptr::toThisString(ExecState* exec) const288 inline UString JSValue::toThisString(ExecState* exec) const 289 289 { 290 290 return JSImmediate::isImmediate(asValue()) ? JSImmediate::toString(asValue()) : asCell()->toThisString(exec); 291 291 } 292 292 293 inline JSValue Ptr JSValuePtr::getJSNumber()293 inline JSValue JSValue::getJSNumber() 294 294 { 295 295 return JSImmediate::isNumber(asValue()) ? asValue() : JSImmediate::isImmediate(asValue()) ? noValue() : asCell()->getJSNumber(); -
trunk/JavaScriptCore/runtime/JSFunction.cpp
r40046 r43122 78 78 } 79 79 80 JSValue Ptr JSFunction::call(ExecState* exec, JSValuePtrthisValue, const ArgList& args)80 JSValue JSFunction::call(ExecState* exec, JSValue thisValue, const ArgList& args) 81 81 { 82 82 return exec->interpreter()->execute(m_body.get(), exec, this, thisValue.toThisObject(exec), args, m_scopeChain.node(), exec->exceptionSlot()); 83 83 } 84 84 85 JSValue PtrJSFunction::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)85 JSValue JSFunction::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) 86 86 { 87 87 JSFunction* thisObj = asFunction(slot.slotBase()); … … 89 89 } 90 90 91 JSValue PtrJSFunction::callerGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)91 JSValue JSFunction::callerGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) 92 92 { 93 93 JSFunction* thisObj = asFunction(slot.slotBase()); … … 95 95 } 96 96 97 JSValue PtrJSFunction::lengthGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)97 JSValue JSFunction::lengthGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) 98 98 { 99 99 JSFunction* thisObj = asFunction(slot.slotBase()); … … 104 104 { 105 105 if (propertyName == exec->propertyNames().prototype) { 106 JSValue Ptr* location = getDirectLocation(propertyName);106 JSValue* location = getDirectLocation(propertyName); 107 107 108 108 if (!location) { … … 134 134 } 135 135 136 void JSFunction::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)136 void JSFunction::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 137 137 { 138 138 if (propertyName == exec->propertyNames().arguments || propertyName == exec->propertyNames().length) … … 159 159 { 160 160 Structure* structure; 161 JSValue Ptrprototype = get(exec, exec->propertyNames().prototype);161 JSValue prototype = get(exec, exec->propertyNames().prototype); 162 162 if (prototype.isObject()) 163 163 structure = asObject(prototype)->inheritorID(); … … 166 166 JSObject* thisObj = new (exec) JSObject(structure); 167 167 168 JSValue Ptrresult = exec->interpreter()->execute(m_body.get(), exec, this, thisObj, args, m_scopeChain.node(), exec->exceptionSlot());168 JSValue result = exec->interpreter()->execute(m_body.get(), exec, this, thisObj, args, m_scopeChain.node(), exec->exceptionSlot()); 169 169 if (exec->hadException() || !result.isObject()) 170 170 return thisObj; -
trunk/JavaScriptCore/runtime/JSFunction.h
r42680 r43122 56 56 57 57 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 58 virtual void put(ExecState*, const Identifier& propertyName, JSValue Ptr, PutPropertySlot&);58 virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 59 59 virtual bool deleteProperty(ExecState*, const Identifier& propertyName); 60 60 61 61 JSObject* construct(ExecState*, const ArgList&); 62 JSValue Ptr call(ExecState*, JSValuePtrthisValue, const ArgList&);62 JSValue call(ExecState*, JSValue thisValue, const ArgList&); 63 63 64 64 void setScope(const ScopeChain& scopeChain) { m_scopeChain = scopeChain; } … … 73 73 static JS_EXPORTDATA const ClassInfo info; 74 74 75 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)75 static PassRefPtr<Structure> createStructure(JSValue prototype) 76 76 { 77 77 return Structure::create(prototype, TypeInfo(ObjectType, ImplementsHasInstance)); … … 84 84 virtual CallType getCallData(CallData&); 85 85 86 static JSValue PtrargumentsGetter(ExecState*, const Identifier&, const PropertySlot&);87 static JSValue PtrcallerGetter(ExecState*, const Identifier&, const PropertySlot&);88 static JSValue PtrlengthGetter(ExecState*, const Identifier&, const PropertySlot&);86 static JSValue argumentsGetter(ExecState*, const Identifier&, const PropertySlot&); 87 static JSValue callerGetter(ExecState*, const Identifier&, const PropertySlot&); 88 static JSValue lengthGetter(ExecState*, const Identifier&, const PropertySlot&); 89 89 90 90 RefPtr<FunctionBodyNode> m_body; … … 92 92 }; 93 93 94 JSFunction* asFunction(JSValue Ptr);94 JSFunction* asFunction(JSValue); 95 95 96 inline JSFunction* asFunction(JSValue Ptrvalue)96 inline JSFunction* asFunction(JSValue value) 97 97 { 98 98 ASSERT(asObject(value)->inherits(&JSFunction::info)); -
trunk/JavaScriptCore/runtime/JSGlobalData.h
r43037 r43122 124 124 Heap heap; 125 125 126 JSValue Ptrexception;126 JSValue exception; 127 127 #if ENABLE(JIT) 128 128 void* exceptionLocation; -
trunk/JavaScriptCore/runtime/JSGlobalObject.cpp
r42337 r43122 79 79 static const int preferredScriptCheckTimeInterval = 1000; 80 80 81 static inline void markIfNeeded(JSValue Ptrv)81 static inline void markIfNeeded(JSValue v) 82 82 { 83 83 if (v && !v.marked()) … … 148 148 } 149 149 150 void JSGlobalObject::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)150 void JSGlobalObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 151 151 { 152 152 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); … … 157 157 } 158 158 159 void JSGlobalObject::putWithAttributes(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, unsigned attributes)159 void JSGlobalObject::putWithAttributes(ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes) 160 160 { 161 161 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); … … 164 164 return; 165 165 166 JSValue PtrvalueBefore = getDirect(propertyName);166 JSValue valueBefore = getDirect(propertyName); 167 167 PutPropertySlot slot; 168 168 JSVariableObject::put(exec, propertyName, value, slot); 169 169 if (!valueBefore) { 170 JSValue PtrvalueAfter = getDirect(propertyName);170 JSValue valueAfter = getDirect(propertyName); 171 171 if (valueAfter) 172 172 putDirect(propertyName, valueAfter, attributes); … … 196 196 } 197 197 198 void JSGlobalObject::reset(JSValue Ptrprototype)198 void JSGlobalObject::reset(JSValue prototype) 199 199 { 200 200 ExecState* exec = JSGlobalObject::globalExec(); … … 253 253 // Constructors 254 254 255 JSValue PtrobjectConstructor = new (exec) ObjectConstructor(exec, ObjectConstructor::createStructure(d()->functionPrototype), d()->objectPrototype);256 JSValue PtrfunctionConstructor = new (exec) FunctionConstructor(exec, FunctionConstructor::createStructure(d()->functionPrototype), d()->functionPrototype);257 JSValue PtrarrayConstructor = new (exec) ArrayConstructor(exec, ArrayConstructor::createStructure(d()->functionPrototype), d()->arrayPrototype);258 JSValue PtrstringConstructor = new (exec) StringConstructor(exec, StringConstructor::createStructure(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->stringPrototype);259 JSValue PtrbooleanConstructor = new (exec) BooleanConstructor(exec, BooleanConstructor::createStructure(d()->functionPrototype), d()->booleanPrototype);260 JSValue PtrnumberConstructor = new (exec) NumberConstructor(exec, NumberConstructor::createStructure(d()->functionPrototype), d()->numberPrototype);261 JSValue PtrdateConstructor = new (exec) DateConstructor(exec, DateConstructor::createStructure(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->datePrototype);255 JSValue objectConstructor = new (exec) ObjectConstructor(exec, ObjectConstructor::createStructure(d()->functionPrototype), d()->objectPrototype); 256 JSValue functionConstructor = new (exec) FunctionConstructor(exec, FunctionConstructor::createStructure(d()->functionPrototype), d()->functionPrototype); 257 JSValue arrayConstructor = new (exec) ArrayConstructor(exec, ArrayConstructor::createStructure(d()->functionPrototype), d()->arrayPrototype); 258 JSValue stringConstructor = new (exec) StringConstructor(exec, StringConstructor::createStructure(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->stringPrototype); 259 JSValue booleanConstructor = new (exec) BooleanConstructor(exec, BooleanConstructor::createStructure(d()->functionPrototype), d()->booleanPrototype); 260 JSValue numberConstructor = new (exec) NumberConstructor(exec, NumberConstructor::createStructure(d()->functionPrototype), d()->numberPrototype); 261 JSValue dateConstructor = new (exec) DateConstructor(exec, DateConstructor::createStructure(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->datePrototype); 262 262 263 263 d()->regExpConstructor = new (exec) RegExpConstructor(exec, RegExpConstructor::createStructure(d()->functionPrototype), d()->regExpPrototype); … … 343 343 344 344 // Set prototype, and also insert the object prototype at the end of the chain. 345 void JSGlobalObject::resetPrototype(JSValue Ptrprototype)345 void JSGlobalObject::resetPrototype(JSValue prototype) 346 346 { 347 347 setPrototype(prototype); -
trunk/JavaScriptCore/runtime/JSGlobalObject.h
r42337 r43122 167 167 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 168 168 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&, bool& slotIsWriteable); 169 virtual void put(ExecState*, const Identifier&, JSValue Ptr, PutPropertySlot&);170 virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue Ptrvalue, unsigned attributes);169 virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); 170 virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes); 171 171 172 172 virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunc); … … 246 246 void copyGlobalsTo(RegisterFile&); 247 247 248 void resetPrototype(JSValue Ptrprototype);248 void resetPrototype(JSValue prototype); 249 249 250 250 JSGlobalData* globalData() { return d()->globalData.get(); } 251 251 JSGlobalObjectData* d() const { return static_cast<JSGlobalObjectData*>(JSVariableObject::d); } 252 252 253 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)253 static PassRefPtr<Structure> createStructure(JSValue prototype) 254 254 { 255 255 return Structure::create(prototype, TypeInfo(ObjectType)); … … 258 258 protected: 259 259 struct GlobalPropertyInfo { 260 GlobalPropertyInfo(const Identifier& i, JSValue Ptrv, unsigned a)260 GlobalPropertyInfo(const Identifier& i, JSValue v, unsigned a) 261 261 : identifier(i) 262 262 , value(v) … … 266 266 267 267 const Identifier identifier; 268 JSValue Ptrvalue;268 JSValue value; 269 269 unsigned attributes; 270 270 }; … … 274 274 // FIXME: Fold reset into init. 275 275 void init(JSObject* thisValue); 276 void reset(JSValue Ptrprototype);276 void reset(JSValue prototype); 277 277 278 278 void setRegisters(Register* registers, Register* registerArray, size_t count); … … 281 281 }; 282 282 283 JSGlobalObject* asGlobalObject(JSValue Ptr);284 285 inline JSGlobalObject* asGlobalObject(JSValue Ptrvalue)283 JSGlobalObject* asGlobalObject(JSValue); 284 285 inline JSGlobalObject* asGlobalObject(JSValue value) 286 286 { 287 287 ASSERT(asObject(value)->isGlobalObject()); … … 335 335 } 336 336 337 inline JSValue PtrStructure::prototypeForLookup(ExecState* exec) const337 inline JSValue Structure::prototypeForLookup(ExecState* exec) const 338 338 { 339 339 if (typeInfo().type() == ObjectType) … … 351 351 // We cache our prototype chain so our clients can share it. 352 352 if (!isValid(exec, m_cachedPrototypeChain.get())) { 353 JSValue Ptrprototype = prototypeForLookup(exec);353 JSValue prototype = prototypeForLookup(exec); 354 354 m_cachedPrototypeChain = StructureChain::create(prototype.isNull() ? 0 : asObject(prototype)->structure()); 355 355 } … … 362 362 return false; 363 363 364 JSValue Ptrprototype = prototypeForLookup(exec);364 JSValue prototype = prototypeForLookup(exec); 365 365 RefPtr<Structure>* cachedStructure = cachedPrototypeChain->head(); 366 366 while(*cachedStructure && !prototype.isNull()) { -
trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
r43121 r43122 48 48 namespace JSC { 49 49 50 static JSValue Ptrencode(ExecState* exec, const ArgList& args, const char* doNotEscape)50 static JSValue encode(ExecState* exec, const ArgList& args, const char* doNotEscape) 51 51 { 52 52 UString str = args.at(0).toString(exec); … … 70 70 } 71 71 72 static JSValue Ptrdecode(ExecState* exec, const ArgList& args, const char* doNotUnescape, bool strict)72 static JSValue decode(ExecState* exec, const ArgList& args, const char* doNotUnescape, bool strict) 73 73 { 74 74 UString result = ""; … … 269 269 } 270 270 271 JSValue Ptr globalFuncEval(ExecState* exec, JSObject* function, JSValuePtrthisValue, const ArgList& args)271 JSValue globalFuncEval(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args) 272 272 { 273 273 JSObject* thisObject = thisValue.toThisObject(exec); … … 276 276 return throwError(exec, EvalError, "The \"this\" value passed to eval must be the global object from which eval originated"); 277 277 278 JSValue Ptrx = args.at(0);278 JSValue x = args.at(0); 279 279 if (!x.isString()) 280 280 return x; … … 294 294 } 295 295 296 JSValue Ptr globalFuncParseInt(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)297 { 298 JSValue Ptrvalue = args.at(0);296 JSValue globalFuncParseInt(ExecState* exec, JSObject*, JSValue, const ArgList& args) 297 { 298 JSValue value = args.at(0); 299 299 int32_t radix = args.at(1).toInt32(exec); 300 300 … … 313 313 } 314 314 315 JSValue Ptr globalFuncParseFloat(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)315 JSValue globalFuncParseFloat(ExecState* exec, JSObject*, JSValue, const ArgList& args) 316 316 { 317 317 return jsNumber(exec, parseFloat(args.at(0).toString(exec))); 318 318 } 319 319 320 JSValue Ptr globalFuncIsNaN(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)320 JSValue globalFuncIsNaN(ExecState* exec, JSObject*, JSValue, const ArgList& args) 321 321 { 322 322 return jsBoolean(isnan(args.at(0).toNumber(exec))); 323 323 } 324 324 325 JSValue Ptr globalFuncIsFinite(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)325 JSValue globalFuncIsFinite(ExecState* exec, JSObject*, JSValue, const ArgList& args) 326 326 { 327 327 double n = args.at(0).toNumber(exec); … … 329 329 } 330 330 331 JSValue Ptr globalFuncDecodeURI(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)331 JSValue globalFuncDecodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args) 332 332 { 333 333 static const char do_not_unescape_when_decoding_URI[] = … … 337 337 } 338 338 339 JSValue Ptr globalFuncDecodeURIComponent(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)339 JSValue globalFuncDecodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args) 340 340 { 341 341 return decode(exec, args, "", true); 342 342 } 343 343 344 JSValue Ptr globalFuncEncodeURI(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)344 JSValue globalFuncEncodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args) 345 345 { 346 346 static const char do_not_escape_when_encoding_URI[] = … … 353 353 } 354 354 355 JSValue Ptr globalFuncEncodeURIComponent(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)355 JSValue globalFuncEncodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args) 356 356 { 357 357 static const char do_not_escape_when_encoding_URI_component[] = … … 364 364 } 365 365 366 JSValue Ptr globalFuncEscape(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)366 JSValue globalFuncEscape(ExecState* exec, JSObject*, JSValue, const ArgList& args) 367 367 { 368 368 static const char do_not_escape[] = … … 395 395 } 396 396 397 JSValue Ptr globalFuncUnescape(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)397 JSValue globalFuncUnescape(ExecState* exec, JSObject*, JSValue, const ArgList& args) 398 398 { 399 399 UString result = ""; … … 423 423 424 424 #ifndef NDEBUG 425 JSValue Ptr globalFuncJSCPrint(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)425 JSValue globalFuncJSCPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args) 426 426 { 427 427 CStringBuffer string; -
trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.h
r40176 r43122 32 32 class ExecState; 33 33 class JSObject; 34 class JSValue Ptr;34 class JSValue; 35 35 36 36 // FIXME: These functions should really be in JSGlobalObject.cpp, but putting them there 37 37 // is a 0.5% reduction. 38 38 39 JSValue Ptr globalFuncEval(ExecState*, JSObject*, JSValuePtr, const ArgList&);40 JSValue Ptr globalFuncParseInt(ExecState*, JSObject*, JSValuePtr, const ArgList&);41 JSValue Ptr globalFuncParseFloat(ExecState*, JSObject*, JSValuePtr, const ArgList&);42 JSValue Ptr globalFuncIsNaN(ExecState*, JSObject*, JSValuePtr, const ArgList&);43 JSValue Ptr globalFuncIsFinite(ExecState*, JSObject*, JSValuePtr, const ArgList&);44 JSValue Ptr globalFuncDecodeURI(ExecState*, JSObject*, JSValuePtr, const ArgList&);45 JSValue Ptr globalFuncDecodeURIComponent(ExecState*, JSObject*, JSValuePtr, const ArgList&);46 JSValue Ptr globalFuncEncodeURI(ExecState*, JSObject*, JSValuePtr, const ArgList&);47 JSValue Ptr globalFuncEncodeURIComponent(ExecState*, JSObject*, JSValuePtr, const ArgList&);48 JSValue Ptr globalFuncEscape(ExecState*, JSObject*, JSValuePtr, const ArgList&);49 JSValue Ptr globalFuncUnescape(ExecState*, JSObject*, JSValuePtr, const ArgList&);39 JSValue globalFuncEval(ExecState*, JSObject*, JSValue, const ArgList&); 40 JSValue globalFuncParseInt(ExecState*, JSObject*, JSValue, const ArgList&); 41 JSValue globalFuncParseFloat(ExecState*, JSObject*, JSValue, const ArgList&); 42 JSValue globalFuncIsNaN(ExecState*, JSObject*, JSValue, const ArgList&); 43 JSValue globalFuncIsFinite(ExecState*, JSObject*, JSValue, const ArgList&); 44 JSValue globalFuncDecodeURI(ExecState*, JSObject*, JSValue, const ArgList&); 45 JSValue globalFuncDecodeURIComponent(ExecState*, JSObject*, JSValue, const ArgList&); 46 JSValue globalFuncEncodeURI(ExecState*, JSObject*, JSValue, const ArgList&); 47 JSValue globalFuncEncodeURIComponent(ExecState*, JSObject*, JSValue, const ArgList&); 48 JSValue globalFuncEscape(ExecState*, JSObject*, JSValue, const ArgList&); 49 JSValue globalFuncUnescape(ExecState*, JSObject*, JSValue, const ArgList&); 50 50 #ifndef NDEBUG 51 JSValue Ptr globalFuncJSCPrint(ExecState*, JSObject*, JSValuePtr, const ArgList&);51 JSValue globalFuncJSCPrint(ExecState*, JSObject*, JSValue, const ArgList&); 52 52 #endif 53 53 -
trunk/JavaScriptCore/runtime/JSImmediate.cpp
r41083 r43122 33 33 namespace JSC { 34 34 35 JSObject* JSImmediate::toThisObject(JSValue Ptrv, ExecState* exec)35 JSObject* JSImmediate::toThisObject(JSValue v, ExecState* exec) 36 36 { 37 37 ASSERT(isImmediate(v)); … … 44 44 } 45 45 46 JSObject* JSImmediate::toObject(JSValue Ptrv, ExecState* exec)46 JSObject* JSImmediate::toObject(JSValue v, ExecState* exec) 47 47 { 48 48 ASSERT(isImmediate(v)); … … 57 57 } 58 58 59 JSObject* JSImmediate::prototype(JSValue Ptrv, ExecState* exec)59 JSObject* JSImmediate::prototype(JSValue v, ExecState* exec) 60 60 { 61 61 ASSERT(isImmediate(v)); … … 70 70 } 71 71 72 UString JSImmediate::toString(JSValue Ptrv)72 UString JSImmediate::toString(JSValue v) 73 73 { 74 74 ASSERT(isImmediate(v)); -
trunk/JavaScriptCore/runtime/JSImmediate.h
r43121 r43122 43 43 class UString; 44 44 45 JSValue PtrjsNumber(ExecState* exec, double d);46 JSValue PtrjsNumber(ExecState*, char i);47 JSValue PtrjsNumber(ExecState*, unsigned char i);48 JSValue PtrjsNumber(ExecState*, short i);49 JSValue PtrjsNumber(ExecState*, unsigned short i);50 JSValue PtrjsNumber(ExecState* exec, int i);51 JSValue PtrjsNumber(ExecState* exec, unsigned i);52 JSValue PtrjsNumber(ExecState* exec, long i);53 JSValue PtrjsNumber(ExecState* exec, unsigned long i);54 JSValue PtrjsNumber(ExecState* exec, long long i);55 JSValue PtrjsNumber(ExecState* exec, unsigned long long i);56 JSValue PtrjsNumber(JSGlobalData* globalData, double d);57 JSValue PtrjsNumber(JSGlobalData* globalData, short i);58 JSValue PtrjsNumber(JSGlobalData* globalData, unsigned short i);59 JSValue PtrjsNumber(JSGlobalData* globalData, int i);60 JSValue PtrjsNumber(JSGlobalData* globalData, unsigned i);61 JSValue PtrjsNumber(JSGlobalData* globalData, long i);62 JSValue PtrjsNumber(JSGlobalData* globalData, unsigned long i);63 JSValue PtrjsNumber(JSGlobalData* globalData, long long i);64 JSValue PtrjsNumber(JSGlobalData* globalData, unsigned long long i);45 JSValue jsNumber(ExecState* exec, double d); 46 JSValue jsNumber(ExecState*, char i); 47 JSValue jsNumber(ExecState*, unsigned char i); 48 JSValue jsNumber(ExecState*, short i); 49 JSValue jsNumber(ExecState*, unsigned short i); 50 JSValue jsNumber(ExecState* exec, int i); 51 JSValue jsNumber(ExecState* exec, unsigned i); 52 JSValue jsNumber(ExecState* exec, long i); 53 JSValue jsNumber(ExecState* exec, unsigned long i); 54 JSValue jsNumber(ExecState* exec, long long i); 55 JSValue jsNumber(ExecState* exec, unsigned long long i); 56 JSValue jsNumber(JSGlobalData* globalData, double d); 57 JSValue jsNumber(JSGlobalData* globalData, short i); 58 JSValue jsNumber(JSGlobalData* globalData, unsigned short i); 59 JSValue jsNumber(JSGlobalData* globalData, int i); 60 JSValue jsNumber(JSGlobalData* globalData, unsigned i); 61 JSValue jsNumber(JSGlobalData* globalData, long i); 62 JSValue jsNumber(JSGlobalData* globalData, unsigned long i); 63 JSValue jsNumber(JSGlobalData* globalData, long long i); 64 JSValue jsNumber(JSGlobalData* globalData, unsigned long long i); 65 65 66 66 #if USE(ALTERNATE_JSIMMEDIATE) … … 154 154 private: 155 155 friend class JIT; 156 friend class JSValue Ptr;156 friend class JSValue; 157 157 friend class JSFastMath; 158 friend JSValue PtrjsNumber(ExecState* exec, double d);159 friend JSValue PtrjsNumber(ExecState*, char i);160 friend JSValue PtrjsNumber(ExecState*, unsigned char i);161 friend JSValue PtrjsNumber(ExecState*, short i);162 friend JSValue PtrjsNumber(ExecState*, unsigned short i);163 friend JSValue PtrjsNumber(ExecState* exec, int i);164 friend JSValue PtrjsNumber(ExecState* exec, unsigned i);165 friend JSValue PtrjsNumber(ExecState* exec, long i);166 friend JSValue PtrjsNumber(ExecState* exec, unsigned long i);167 friend JSValue PtrjsNumber(ExecState* exec, long long i);168 friend JSValue PtrjsNumber(ExecState* exec, unsigned long long i);169 friend JSValue PtrjsNumber(JSGlobalData* globalData, double d);170 friend JSValue PtrjsNumber(JSGlobalData* globalData, short i);171 friend JSValue PtrjsNumber(JSGlobalData* globalData, unsigned short i);172 friend JSValue PtrjsNumber(JSGlobalData* globalData, int i);173 friend JSValue PtrjsNumber(JSGlobalData* globalData, unsigned i);174 friend JSValue PtrjsNumber(JSGlobalData* globalData, long i);175 friend JSValue PtrjsNumber(JSGlobalData* globalData, unsigned long i);176 friend JSValue PtrjsNumber(JSGlobalData* globalData, long long i);177 friend JSValue PtrjsNumber(JSGlobalData* globalData, unsigned long long i);158 friend JSValue jsNumber(ExecState* exec, double d); 159 friend JSValue jsNumber(ExecState*, char i); 160 friend JSValue jsNumber(ExecState*, unsigned char i); 161 friend JSValue jsNumber(ExecState*, short i); 162 friend JSValue jsNumber(ExecState*, unsigned short i); 163 friend JSValue jsNumber(ExecState* exec, int i); 164 friend JSValue jsNumber(ExecState* exec, unsigned i); 165 friend JSValue jsNumber(ExecState* exec, long i); 166 friend JSValue jsNumber(ExecState* exec, unsigned long i); 167 friend JSValue jsNumber(ExecState* exec, long long i); 168 friend JSValue jsNumber(ExecState* exec, unsigned long long i); 169 friend JSValue jsNumber(JSGlobalData* globalData, double d); 170 friend JSValue jsNumber(JSGlobalData* globalData, short i); 171 friend JSValue jsNumber(JSGlobalData* globalData, unsigned short i); 172 friend JSValue jsNumber(JSGlobalData* globalData, int i); 173 friend JSValue jsNumber(JSGlobalData* globalData, unsigned i); 174 friend JSValue jsNumber(JSGlobalData* globalData, long i); 175 friend JSValue jsNumber(JSGlobalData* globalData, unsigned long i); 176 friend JSValue jsNumber(JSGlobalData* globalData, long long i); 177 friend JSValue jsNumber(JSGlobalData* globalData, unsigned long long i); 178 178 179 179 #if USE(ALTERNATE_JSIMMEDIATE) … … 210 210 static const int32_t signBit = 0x80000000; 211 211 212 static ALWAYS_INLINE bool isImmediate(JSValue Ptrv)212 static ALWAYS_INLINE bool isImmediate(JSValue v) 213 213 { 214 214 return rawValue(v) & TagMask; 215 215 } 216 216 217 static ALWAYS_INLINE bool isNumber(JSValue Ptrv)217 static ALWAYS_INLINE bool isNumber(JSValue v) 218 218 { 219 219 return rawValue(v) & TagTypeNumber; 220 220 } 221 221 222 static ALWAYS_INLINE bool isIntegerNumber(JSValue Ptrv)222 static ALWAYS_INLINE bool isIntegerNumber(JSValue v) 223 223 { 224 224 #if USE(ALTERNATE_JSIMMEDIATE) … … 230 230 231 231 #if USE(ALTERNATE_JSIMMEDIATE) 232 static ALWAYS_INLINE bool isDoubleNumber(JSValue Ptrv)232 static ALWAYS_INLINE bool isDoubleNumber(JSValue v) 233 233 { 234 234 return isNumber(v) && !isIntegerNumber(v); … … 236 236 #endif 237 237 238 static ALWAYS_INLINE bool isPositiveIntegerNumber(JSValue Ptrv)238 static ALWAYS_INLINE bool isPositiveIntegerNumber(JSValue v) 239 239 { 240 240 // A single mask to check for the sign bit and the number tag all at once. … … 242 242 } 243 243 244 static ALWAYS_INLINE bool isBoolean(JSValue Ptrv)244 static ALWAYS_INLINE bool isBoolean(JSValue v) 245 245 { 246 246 return (rawValue(v) & FullTagTypeMask) == FullTagTypeBool; 247 247 } 248 248 249 static ALWAYS_INLINE bool isUndefinedOrNull(JSValue Ptrv)249 static ALWAYS_INLINE bool isUndefinedOrNull(JSValue v) 250 250 { 251 251 // Undefined and null share the same value, bar the 'undefined' bit in the extended tag. … … 253 253 } 254 254 255 static JSValue Ptrfrom(char);256 static JSValue Ptrfrom(signed char);257 static JSValue Ptrfrom(unsigned char);258 static JSValue Ptrfrom(short);259 static JSValue Ptrfrom(unsigned short);260 static JSValue Ptrfrom(int);261 static JSValue Ptrfrom(unsigned);262 static JSValue Ptrfrom(long);263 static JSValue Ptrfrom(unsigned long);264 static JSValue Ptrfrom(long long);265 static JSValue Ptrfrom(unsigned long long);266 static JSValue Ptrfrom(double);267 268 static ALWAYS_INLINE bool isEitherImmediate(JSValue Ptr v1, JSValuePtrv2)255 static JSValue from(char); 256 static JSValue from(signed char); 257 static JSValue from(unsigned char); 258 static JSValue from(short); 259 static JSValue from(unsigned short); 260 static JSValue from(int); 261 static JSValue from(unsigned); 262 static JSValue from(long); 263 static JSValue from(unsigned long); 264 static JSValue from(long long); 265 static JSValue from(unsigned long long); 266 static JSValue from(double); 267 268 static ALWAYS_INLINE bool isEitherImmediate(JSValue v1, JSValue v2) 269 269 { 270 270 return (rawValue(v1) | rawValue(v2)) & TagMask; 271 271 } 272 272 273 static ALWAYS_INLINE bool areBothImmediate(JSValue Ptr v1, JSValuePtrv2)273 static ALWAYS_INLINE bool areBothImmediate(JSValue v1, JSValue v2) 274 274 { 275 275 return isImmediate(v1) & isImmediate(v2); 276 276 } 277 277 278 static ALWAYS_INLINE bool areBothImmediateIntegerNumbers(JSValue Ptr v1, JSValuePtrv2)278 static ALWAYS_INLINE bool areBothImmediateIntegerNumbers(JSValue v1, JSValue v2) 279 279 { 280 280 #if USE(ALTERNATE_JSIMMEDIATE) … … 285 285 } 286 286 287 static double toDouble(JSValue Ptr);288 static bool toBoolean(JSValue Ptr);289 static JSObject* toObject(JSValue Ptr, ExecState*);290 static JSObject* toThisObject(JSValue Ptr, ExecState*);291 static UString toString(JSValue Ptr);292 293 static bool getUInt32(JSValue Ptr, uint32_t&);294 static bool getTruncatedInt32(JSValue Ptr, int32_t&);295 static bool getTruncatedUInt32(JSValue Ptr, uint32_t&);296 297 static int32_t getTruncatedInt32(JSValue Ptr);298 static uint32_t getTruncatedUInt32(JSValue Ptr);299 300 static JSValue PtrtrueImmediate();301 static JSValue PtrfalseImmediate();302 static JSValue PtrundefinedImmediate();303 static JSValue PtrnullImmediate();304 static JSValue PtrzeroImmediate();305 static JSValue PtroneImmediate();306 307 static JSValue PtrimpossibleValue();308 309 static JSObject* prototype(JSValue Ptr, ExecState*);287 static double toDouble(JSValue); 288 static bool toBoolean(JSValue); 289 static JSObject* toObject(JSValue, ExecState*); 290 static JSObject* toThisObject(JSValue, ExecState*); 291 static UString toString(JSValue); 292 293 static bool getUInt32(JSValue, uint32_t&); 294 static bool getTruncatedInt32(JSValue, int32_t&); 295 static bool getTruncatedUInt32(JSValue, uint32_t&); 296 297 static int32_t getTruncatedInt32(JSValue); 298 static uint32_t getTruncatedUInt32(JSValue); 299 300 static JSValue trueImmediate(); 301 static JSValue falseImmediate(); 302 static JSValue undefinedImmediate(); 303 static JSValue nullImmediate(); 304 static JSValue zeroImmediate(); 305 static JSValue oneImmediate(); 306 307 static JSValue impossibleValue(); 308 309 static JSObject* prototype(JSValue, ExecState*); 310 310 311 311 private: … … 319 319 static const unsigned maxImmediateUInt = maxImmediateInt; 320 320 321 static ALWAYS_INLINE JSValue PtrmakeValue(intptr_t integer)322 { 323 return JSValue Ptr::makeImmediate(integer);321 static ALWAYS_INLINE JSValue makeValue(intptr_t integer) 322 { 323 return JSValue::makeImmediate(integer); 324 324 } 325 325 … … 328 328 // if intptr_t id larger then int32_t we sign extend the value through the upper word. 329 329 #if USE(ALTERNATE_JSIMMEDIATE) 330 static ALWAYS_INLINE JSValue PtrmakeInt(uint32_t value)331 #else 332 static ALWAYS_INLINE JSValue PtrmakeInt(int32_t value)330 static ALWAYS_INLINE JSValue makeInt(uint32_t value) 331 #else 332 static ALWAYS_INLINE JSValue makeInt(int32_t value) 333 333 #endif 334 334 { … … 337 337 338 338 #if USE(ALTERNATE_JSIMMEDIATE) 339 static ALWAYS_INLINE JSValue PtrmakeDouble(double value)339 static ALWAYS_INLINE JSValue makeDouble(double value) 340 340 { 341 341 return makeValue(reinterpretDoubleToIntptr(value) + DoubleEncodeOffset); … … 343 343 #endif 344 344 345 static ALWAYS_INLINE JSValue PtrmakeBool(bool b)345 static ALWAYS_INLINE JSValue makeBool(bool b) 346 346 { 347 347 return makeValue((static_cast<intptr_t>(b) << ExtendedPayloadShift) | FullTagTypeBool); 348 348 } 349 349 350 static ALWAYS_INLINE JSValue PtrmakeUndefined()350 static ALWAYS_INLINE JSValue makeUndefined() 351 351 { 352 352 return makeValue(FullTagTypeUndefined); 353 353 } 354 354 355 static ALWAYS_INLINE JSValue PtrmakeNull()355 static ALWAYS_INLINE JSValue makeNull() 356 356 { 357 357 return makeValue(FullTagTypeNull); … … 359 359 360 360 template<typename T> 361 static JSValue PtrfromNumberOutsideIntegerRange(T);362 363 #if USE(ALTERNATE_JSIMMEDIATE) 364 static ALWAYS_INLINE double doubleValue(JSValue Ptrv)361 static JSValue fromNumberOutsideIntegerRange(T); 362 363 #if USE(ALTERNATE_JSIMMEDIATE) 364 static ALWAYS_INLINE double doubleValue(JSValue v) 365 365 { 366 366 return reinterpretIntptrToDouble(rawValue(v) - DoubleEncodeOffset); … … 368 368 #endif 369 369 370 static ALWAYS_INLINE int32_t intValue(JSValue Ptrv)370 static ALWAYS_INLINE int32_t intValue(JSValue v) 371 371 { 372 372 return static_cast<int32_t>(rawValue(v) >> IntegerPayloadShift); 373 373 } 374 374 375 static ALWAYS_INLINE uint32_t uintValue(JSValue Ptrv)375 static ALWAYS_INLINE uint32_t uintValue(JSValue v) 376 376 { 377 377 return static_cast<uint32_t>(rawValue(v) >> IntegerPayloadShift); 378 378 } 379 379 380 static ALWAYS_INLINE bool boolValue(JSValue Ptrv)380 static ALWAYS_INLINE bool boolValue(JSValue v) 381 381 { 382 382 return rawValue(v) & ExtendedPayloadBitBoolValue; 383 383 } 384 384 385 static ALWAYS_INLINE intptr_t rawValue(JSValue Ptrv)385 static ALWAYS_INLINE intptr_t rawValue(JSValue v) 386 386 { 387 387 return v.immediateValue(); … … 391 391 }; 392 392 393 ALWAYS_INLINE JSValue PtrJSImmediate::trueImmediate() { return makeBool(true); }394 ALWAYS_INLINE JSValue PtrJSImmediate::falseImmediate() { return makeBool(false); }395 ALWAYS_INLINE JSValue PtrJSImmediate::undefinedImmediate() { return makeUndefined(); }396 ALWAYS_INLINE JSValue PtrJSImmediate::nullImmediate() { return makeNull(); }397 ALWAYS_INLINE JSValue PtrJSImmediate::zeroImmediate() { return makeInt(0); }398 ALWAYS_INLINE JSValue PtrJSImmediate::oneImmediate() { return makeInt(1); }393 ALWAYS_INLINE JSValue JSImmediate::trueImmediate() { return makeBool(true); } 394 ALWAYS_INLINE JSValue JSImmediate::falseImmediate() { return makeBool(false); } 395 ALWAYS_INLINE JSValue JSImmediate::undefinedImmediate() { return makeUndefined(); } 396 ALWAYS_INLINE JSValue JSImmediate::nullImmediate() { return makeNull(); } 397 ALWAYS_INLINE JSValue JSImmediate::zeroImmediate() { return makeInt(0); } 398 ALWAYS_INLINE JSValue JSImmediate::oneImmediate() { return makeInt(1); } 399 399 400 400 // This value is impossible because 0x4 is not a valid pointer but a tag of 0 would indicate non-immediate 401 ALWAYS_INLINE JSValue PtrJSImmediate::impossibleValue() { return makeValue(0x4); }401 ALWAYS_INLINE JSValue JSImmediate::impossibleValue() { return makeValue(0x4); } 402 402 403 403 #if USE(ALTERNATE_JSIMMEDIATE) … … 407 407 } 408 408 409 ALWAYS_INLINE bool JSImmediate::toBoolean(JSValue Ptrv)409 ALWAYS_INLINE bool JSImmediate::toBoolean(JSValue v) 410 410 { 411 411 ASSERT(isImmediate(v)); … … 414 414 } 415 415 #else 416 ALWAYS_INLINE bool JSImmediate::toBoolean(JSValue Ptrv)416 ALWAYS_INLINE bool JSImmediate::toBoolean(JSValue v) 417 417 { 418 418 ASSERT(isImmediate(v)); … … 421 421 #endif 422 422 423 ALWAYS_INLINE uint32_t JSImmediate::getTruncatedUInt32(JSValue Ptrv)423 ALWAYS_INLINE uint32_t JSImmediate::getTruncatedUInt32(JSValue v) 424 424 { 425 425 // FIXME: should probably be asserting isPositiveIntegerNumber here. … … 430 430 #if USE(ALTERNATE_JSIMMEDIATE) 431 431 template<typename T> 432 inline JSValue PtrJSImmediate::fromNumberOutsideIntegerRange(T value)432 inline JSValue JSImmediate::fromNumberOutsideIntegerRange(T value) 433 433 { 434 434 return makeDouble(static_cast<double>(value)); … … 436 436 #else 437 437 template<typename T> 438 inline JSValue PtrJSImmediate::fromNumberOutsideIntegerRange(T)438 inline JSValue JSImmediate::fromNumberOutsideIntegerRange(T) 439 439 { 440 440 return noValue(); … … 442 442 #endif 443 443 444 ALWAYS_INLINE JSValue PtrJSImmediate::from(char i)444 ALWAYS_INLINE JSValue JSImmediate::from(char i) 445 445 { 446 446 return makeInt(i); 447 447 } 448 448 449 ALWAYS_INLINE JSValue PtrJSImmediate::from(signed char i)449 ALWAYS_INLINE JSValue JSImmediate::from(signed char i) 450 450 { 451 451 return makeInt(i); 452 452 } 453 453 454 ALWAYS_INLINE JSValue PtrJSImmediate::from(unsigned char i)454 ALWAYS_INLINE JSValue JSImmediate::from(unsigned char i) 455 455 { 456 456 return makeInt(i); 457 457 } 458 458 459 ALWAYS_INLINE JSValue PtrJSImmediate::from(short i)459 ALWAYS_INLINE JSValue JSImmediate::from(short i) 460 460 { 461 461 return makeInt(i); 462 462 } 463 463 464 ALWAYS_INLINE JSValue PtrJSImmediate::from(unsigned short i)464 ALWAYS_INLINE JSValue JSImmediate::from(unsigned short i) 465 465 { 466 466 return makeInt(i); 467 467 } 468 468 469 ALWAYS_INLINE JSValue PtrJSImmediate::from(int i)469 ALWAYS_INLINE JSValue JSImmediate::from(int i) 470 470 { 471 471 #if !USE(ALTERNATE_JSIMMEDIATE) … … 476 476 } 477 477 478 ALWAYS_INLINE JSValue PtrJSImmediate::from(unsigned i)478 ALWAYS_INLINE JSValue JSImmediate::from(unsigned i) 479 479 { 480 480 if (i > maxImmediateUInt) … … 483 483 } 484 484 485 ALWAYS_INLINE JSValue PtrJSImmediate::from(long i)485 ALWAYS_INLINE JSValue JSImmediate::from(long i) 486 486 { 487 487 if ((i < minImmediateInt) | (i > maxImmediateInt)) … … 490 490 } 491 491 492 ALWAYS_INLINE JSValue PtrJSImmediate::from(unsigned long i)492 ALWAYS_INLINE JSValue JSImmediate::from(unsigned long i) 493 493 { 494 494 if (i > maxImmediateUInt) … … 497 497 } 498 498 499 ALWAYS_INLINE JSValue PtrJSImmediate::from(long long i)499 ALWAYS_INLINE JSValue JSImmediate::from(long long i) 500 500 { 501 501 if ((i < minImmediateInt) | (i > maxImmediateInt)) … … 504 504 } 505 505 506 ALWAYS_INLINE JSValue PtrJSImmediate::from(unsigned long long i)506 ALWAYS_INLINE JSValue JSImmediate::from(unsigned long long i) 507 507 { 508 508 if (i > maxImmediateUInt) … … 511 511 } 512 512 513 ALWAYS_INLINE JSValue PtrJSImmediate::from(double d)513 ALWAYS_INLINE JSValue JSImmediate::from(double d) 514 514 { 515 515 const int intVal = static_cast<int>(d); … … 522 522 } 523 523 524 ALWAYS_INLINE int32_t JSImmediate::getTruncatedInt32(JSValue Ptrv)524 ALWAYS_INLINE int32_t JSImmediate::getTruncatedInt32(JSValue v) 525 525 { 526 526 ASSERT(isIntegerNumber(v)); … … 528 528 } 529 529 530 ALWAYS_INLINE double JSImmediate::toDouble(JSValue Ptrv)530 ALWAYS_INLINE double JSImmediate::toDouble(JSValue v) 531 531 { 532 532 ASSERT(isImmediate(v)); … … 551 551 } 552 552 553 ALWAYS_INLINE bool JSImmediate::getUInt32(JSValue Ptrv, uint32_t& i)553 ALWAYS_INLINE bool JSImmediate::getUInt32(JSValue v, uint32_t& i) 554 554 { 555 555 i = uintValue(v); … … 557 557 } 558 558 559 ALWAYS_INLINE bool JSImmediate::getTruncatedInt32(JSValue Ptrv, int32_t& i)559 ALWAYS_INLINE bool JSImmediate::getTruncatedInt32(JSValue v, int32_t& i) 560 560 { 561 561 i = intValue(v); … … 563 563 } 564 564 565 ALWAYS_INLINE bool JSImmediate::getTruncatedUInt32(JSValue Ptrv, uint32_t& i)565 ALWAYS_INLINE bool JSImmediate::getTruncatedUInt32(JSValue v, uint32_t& i) 566 566 { 567 567 return getUInt32(v, i); … … 574 574 uint32_t toUInt32SlowCase(double, bool& ok); 575 575 576 inline JSValue Ptr::JSValuePtr(ImpossibleValueTag)576 inline JSValue::JSValue(ImpossibleValueTag) 577 577 { 578 578 *this = JSImmediate::impossibleValue(); 579 579 } 580 580 581 inline JSValue Ptr::JSValuePtr(JSNullTag)581 inline JSValue::JSValue(JSNullTag) 582 582 { 583 583 *this = JSImmediate::nullImmediate(); 584 584 } 585 585 586 inline JSValue Ptr::JSValuePtr(JSUndefinedTag)586 inline JSValue::JSValue(JSUndefinedTag) 587 587 { 588 588 *this = JSImmediate::undefinedImmediate(); 589 589 } 590 590 591 inline JSValue Ptr::JSValuePtr(JSTrueTag)591 inline JSValue::JSValue(JSTrueTag) 592 592 { 593 593 *this = JSImmediate::trueImmediate(); 594 594 } 595 595 596 inline JSValue Ptr::JSValuePtr(JSFalseTag)596 inline JSValue::JSValue(JSFalseTag) 597 597 { 598 598 *this = JSImmediate::falseImmediate(); 599 599 } 600 600 601 inline bool JSValue Ptr::isUndefinedOrNull() const601 inline bool JSValue::isUndefinedOrNull() const 602 602 { 603 603 return JSImmediate::isUndefinedOrNull(asValue()); 604 604 } 605 605 606 inline bool JSValue Ptr::isBoolean() const606 inline bool JSValue::isBoolean() const 607 607 { 608 608 return JSImmediate::isBoolean(asValue()); 609 609 } 610 610 611 inline bool JSValue Ptr::getBoolean(bool& v) const611 inline bool JSValue::getBoolean(bool& v) const 612 612 { 613 613 if (JSImmediate::isBoolean(asValue())) { … … 619 619 } 620 620 621 inline bool JSValue Ptr::getBoolean() const621 inline bool JSValue::getBoolean() const 622 622 { 623 623 return asValue() == jsBoolean(true); 624 624 } 625 625 626 ALWAYS_INLINE int32_t JSValue Ptr::toInt32(ExecState* exec) const626 ALWAYS_INLINE int32_t JSValue::toInt32(ExecState* exec) const 627 627 { 628 628 int32_t i; … … 633 633 } 634 634 635 inline uint32_t JSValue Ptr::toUInt32(ExecState* exec) const635 inline uint32_t JSValue::toUInt32(ExecState* exec) const 636 636 { 637 637 uint32_t i; … … 660 660 } 661 661 662 inline int32_t JSValue Ptr::toInt32(ExecState* exec, bool& ok) const662 inline int32_t JSValue::toInt32(ExecState* exec, bool& ok) const 663 663 { 664 664 int32_t i; … … 670 670 } 671 671 672 inline uint32_t JSValue Ptr::toUInt32(ExecState* exec, bool& ok) const672 inline uint32_t JSValue::toUInt32(ExecState* exec, bool& ok) const 673 673 { 674 674 uint32_t i; … … 680 680 } 681 681 682 inline bool JSValue Ptr::isCell() const682 inline bool JSValue::isCell() const 683 683 { 684 684 return !JSImmediate::isImmediate(asValue()); 685 685 } 686 686 687 inline bool JSValue Ptr::isInt32Fast() const687 inline bool JSValue::isInt32Fast() const 688 688 { 689 689 return JSImmediate::isIntegerNumber(asValue()); 690 690 } 691 691 692 inline int32_t JSValue Ptr::getInt32Fast() const692 inline int32_t JSValue::getInt32Fast() const 693 693 { 694 694 ASSERT(isInt32Fast()); … … 696 696 } 697 697 698 inline bool JSValue Ptr::isUInt32Fast() const698 inline bool JSValue::isUInt32Fast() const 699 699 { 700 700 return JSImmediate::isPositiveIntegerNumber(asValue()); 701 701 } 702 702 703 inline uint32_t JSValue Ptr::getUInt32Fast() const703 inline uint32_t JSValue::getUInt32Fast() const 704 704 { 705 705 ASSERT(isUInt32Fast()); … … 707 707 } 708 708 709 inline JSValue Ptr JSValuePtr::makeInt32Fast(int32_t i)709 inline JSValue JSValue::makeInt32Fast(int32_t i) 710 710 { 711 711 return JSImmediate::from(i); 712 712 } 713 713 714 inline bool JSValue Ptr::areBothInt32Fast(JSValuePtr v1, JSValuePtrv2)714 inline bool JSValue::areBothInt32Fast(JSValue v1, JSValue v2) 715 715 { 716 716 return JSImmediate::areBothImmediateIntegerNumbers(v1, v2); … … 719 719 class JSFastMath { 720 720 public: 721 static ALWAYS_INLINE bool canDoFastBitwiseOperations(JSValue Ptr v1, JSValuePtrv2)721 static ALWAYS_INLINE bool canDoFastBitwiseOperations(JSValue v1, JSValue v2) 722 722 { 723 723 return JSImmediate::areBothImmediateIntegerNumbers(v1, v2); 724 724 } 725 725 726 static ALWAYS_INLINE JSValue Ptr equal(JSValuePtr v1, JSValuePtrv2)726 static ALWAYS_INLINE JSValue equal(JSValue v1, JSValue v2) 727 727 { 728 728 ASSERT(canDoFastBitwiseOperations(v1, v2)); … … 730 730 } 731 731 732 static ALWAYS_INLINE JSValue Ptr notEqual(JSValuePtr v1, JSValuePtrv2)732 static ALWAYS_INLINE JSValue notEqual(JSValue v1, JSValue v2) 733 733 { 734 734 ASSERT(canDoFastBitwiseOperations(v1, v2)); … … 736 736 } 737 737 738 static ALWAYS_INLINE JSValue Ptr andImmediateNumbers(JSValuePtr v1, JSValuePtrv2)738 static ALWAYS_INLINE JSValue andImmediateNumbers(JSValue v1, JSValue v2) 739 739 { 740 740 ASSERT(canDoFastBitwiseOperations(v1, v2)); … … 742 742 } 743 743 744 static ALWAYS_INLINE JSValue Ptr xorImmediateNumbers(JSValuePtr v1, JSValuePtrv2)744 static ALWAYS_INLINE JSValue xorImmediateNumbers(JSValue v1, JSValue v2) 745 745 { 746 746 ASSERT(canDoFastBitwiseOperations(v1, v2)); … … 748 748 } 749 749 750 static ALWAYS_INLINE JSValue Ptr orImmediateNumbers(JSValuePtr v1, JSValuePtrv2)750 static ALWAYS_INLINE JSValue orImmediateNumbers(JSValue v1, JSValue v2) 751 751 { 752 752 ASSERT(canDoFastBitwiseOperations(v1, v2)); … … 754 754 } 755 755 756 static ALWAYS_INLINE bool canDoFastRshift(JSValue Ptr v1, JSValuePtrv2)756 static ALWAYS_INLINE bool canDoFastRshift(JSValue v1, JSValue v2) 757 757 { 758 758 return JSImmediate::areBothImmediateIntegerNumbers(v1, v2); 759 759 } 760 760 761 static ALWAYS_INLINE bool canDoFastUrshift(JSValue Ptr v1, JSValuePtrv2)761 static ALWAYS_INLINE bool canDoFastUrshift(JSValue v1, JSValue v2) 762 762 { 763 763 return JSImmediate::areBothImmediateIntegerNumbers(v1, v2) && !(JSImmediate::rawValue(v1) & JSImmediate::signBit); 764 764 } 765 765 766 static ALWAYS_INLINE JSValue Ptr rightShiftImmediateNumbers(JSValuePtr val, JSValuePtrshift)766 static ALWAYS_INLINE JSValue rightShiftImmediateNumbers(JSValue val, JSValue shift) 767 767 { 768 768 ASSERT(canDoFastRshift(val, shift) || canDoFastUrshift(val, shift)); … … 774 774 } 775 775 776 static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValue Ptrv)776 static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValue v) 777 777 { 778 778 // Number is non-negative and an operation involving two of these can't overflow. … … 781 781 } 782 782 783 static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValue Ptr v1, JSValuePtrv2)783 static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValue v1, JSValue v2) 784 784 { 785 785 // Number is non-negative and an operation involving two of these can't overflow. … … 788 788 } 789 789 790 static ALWAYS_INLINE JSValue Ptr addImmediateNumbers(JSValuePtr v1, JSValuePtrv2)790 static ALWAYS_INLINE JSValue addImmediateNumbers(JSValue v1, JSValue v2) 791 791 { 792 792 ASSERT(canDoFastAdditiveOperations(v1, v2)); … … 794 794 } 795 795 796 static ALWAYS_INLINE JSValue Ptr subImmediateNumbers(JSValuePtr v1, JSValuePtrv2)796 static ALWAYS_INLINE JSValue subImmediateNumbers(JSValue v1, JSValue v2) 797 797 { 798 798 ASSERT(canDoFastAdditiveOperations(v1, v2)); … … 800 800 } 801 801 802 static ALWAYS_INLINE JSValue Ptr incImmediateNumber(JSValuePtrv)802 static ALWAYS_INLINE JSValue incImmediateNumber(JSValue v) 803 803 { 804 804 ASSERT(canDoFastAdditiveOperations(v)); … … 806 806 } 807 807 808 static ALWAYS_INLINE JSValue Ptr decImmediateNumber(JSValuePtrv)808 static ALWAYS_INLINE JSValue decImmediateNumber(JSValue v) 809 809 { 810 810 ASSERT(canDoFastAdditiveOperations(v)); -
trunk/JavaScriptCore/runtime/JSNotAnObject.cpp
r39809 r43122 38 38 39 39 // JSValue methods 40 JSValue PtrJSNotAnObject::toPrimitive(ExecState* exec, PreferredPrimitiveType) const40 JSValue JSNotAnObject::toPrimitive(ExecState* exec, PreferredPrimitiveType) const 41 41 { 42 42 ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception); … … 44 44 } 45 45 46 bool JSNotAnObject::getPrimitiveNumber(ExecState* exec, double&, JSValue Ptr&)46 bool JSNotAnObject::getPrimitiveNumber(ExecState* exec, double&, JSValue&) 47 47 { 48 48 ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception); … … 95 95 } 96 96 97 void JSNotAnObject::put(ExecState* exec, const Identifier& , JSValue Ptr, PutPropertySlot&)97 void JSNotAnObject::put(ExecState* exec, const Identifier& , JSValue, PutPropertySlot&) 98 98 { 99 99 ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception); 100 100 } 101 101 102 void JSNotAnObject::put(ExecState* exec, unsigned, JSValue Ptr)102 void JSNotAnObject::put(ExecState* exec, unsigned, JSValue) 103 103 { 104 104 ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception); -
trunk/JavaScriptCore/runtime/JSNotAnObject.h
r39670 r43122 61 61 } 62 62 63 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)63 static PassRefPtr<Structure> createStructure(JSValue prototype) 64 64 { 65 65 return Structure::create(prototype, TypeInfo(ObjectType)); … … 68 68 private: 69 69 // JSValue methods 70 virtual JSValue PtrtoPrimitive(ExecState*, PreferredPrimitiveType) const;71 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue Ptr&);70 virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const; 71 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue&); 72 72 virtual bool toBoolean(ExecState*) const; 73 73 virtual double toNumber(ExecState*) const; … … 82 82 virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&); 83 83 84 virtual void put(ExecState*, const Identifier& propertyName, JSValue Ptr, PutPropertySlot&);85 virtual void put(ExecState*, unsigned propertyName, JSValue Ptr);84 virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 85 virtual void put(ExecState*, unsigned propertyName, JSValue); 86 86 87 87 virtual bool deleteProperty(ExecState*, const Identifier& propertyName); -
trunk/JavaScriptCore/runtime/JSNumberCell.cpp
r39958 r43122 31 31 #if !USE(ALTERNATE_JSIMMEDIATE) 32 32 33 JSValue PtrJSNumberCell::toPrimitive(ExecState*, PreferredPrimitiveType) const33 JSValue JSNumberCell::toPrimitive(ExecState*, PreferredPrimitiveType) const 34 34 { 35 35 return const_cast<JSNumberCell*>(this); 36 36 } 37 37 38 bool JSNumberCell::getPrimitiveNumber(ExecState*, double& number, JSValue Ptr& value)38 bool JSNumberCell::getPrimitiveNumber(ExecState*, double& number, JSValue& value) 39 39 { 40 40 number = m_value; … … 99 99 } 100 100 101 JSValue PtrJSNumberCell::getJSNumber()101 JSValue JSNumberCell::getJSNumber() 102 102 { 103 103 return this; 104 104 } 105 105 106 JSValue PtrjsNumberCell(ExecState* exec, double d)106 JSValue jsNumberCell(ExecState* exec, double d) 107 107 { 108 108 return new (exec) JSNumberCell(exec, d); 109 109 } 110 110 111 JSValue PtrjsNumberCell(JSGlobalData* globalData, double d)111 JSValue jsNumberCell(JSGlobalData* globalData, double d) 112 112 { 113 113 return new (globalData) JSNumberCell(globalData, d); … … 116 116 #else 117 117 118 JSValue PtrjsNumberCell(ExecState*, double)118 JSValue jsNumberCell(ExecState*, double) 119 119 { 120 120 ASSERT_NOT_REACHED(); -
trunk/JavaScriptCore/runtime/JSNumberCell.h
r40174 r43122 36 36 extern const double Inf; 37 37 38 JSValue PtrjsNumberCell(ExecState*, double);38 JSValue jsNumberCell(ExecState*, double); 39 39 40 40 #if !USE(ALTERNATE_JSIMMEDIATE) … … 51 51 class JSNumberCell : public JSCell { 52 52 friend class JIT; 53 friend JSValue PtrjsNumberCell(JSGlobalData*, double);54 friend JSValue PtrjsNumberCell(ExecState*, double);53 friend JSValue jsNumberCell(JSGlobalData*, double); 54 friend JSValue jsNumberCell(ExecState*, double); 55 55 public: 56 56 double value() const { return m_value; } 57 57 58 virtual JSValue PtrtoPrimitive(ExecState*, PreferredPrimitiveType) const;59 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue Ptr& value);58 virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const; 59 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue& value); 60 60 virtual bool toBoolean(ExecState*) const; 61 61 virtual double toNumber(ExecState*) const; … … 65 65 virtual UString toThisString(ExecState*) const; 66 66 virtual JSObject* toThisObject(ExecState*) const; 67 virtual JSValue PtrgetJSNumber();67 virtual JSValue getJSNumber(); 68 68 69 69 void* operator new(size_t size, ExecState* exec) … … 85 85 } 86 86 87 static PassRefPtr<Structure> createStructure(JSValue Ptrproto) { return Structure::create(proto, TypeInfo(NumberType, NeedsThisConversion)); }87 static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(NumberType, NeedsThisConversion)); } 88 88 89 89 private: … … 107 107 }; 108 108 109 JSValue PtrjsNumberCell(JSGlobalData*, double);110 111 inline bool isNumberCell(JSValue Ptrv)109 JSValue jsNumberCell(JSGlobalData*, double); 110 111 inline bool isNumberCell(JSValue v) 112 112 { 113 113 return v.isCell() && v.asCell()->isNumber(); 114 114 } 115 115 116 inline JSNumberCell* asNumberCell(JSValue Ptrv)116 inline JSNumberCell* asNumberCell(JSValue v) 117 117 { 118 118 ASSERT(isNumberCell(v)); … … 120 120 } 121 121 122 ALWAYS_INLINE JSValue PtrjsNumber(ExecState* exec, double d)123 { 124 JSValue Ptrv = JSImmediate::from(d);122 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, double d) 123 { 124 JSValue v = JSImmediate::from(d); 125 125 return v ? v : jsNumberCell(exec, d); 126 126 } 127 127 128 ALWAYS_INLINE JSValue PtrjsNumber(ExecState* exec, int i)129 { 130 JSValue Ptrv = JSImmediate::from(i);128 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, int i) 129 { 130 JSValue v = JSImmediate::from(i); 131 131 return v ? v : jsNumberCell(exec, i); 132 132 } 133 133 134 ALWAYS_INLINE JSValue PtrjsNumber(ExecState* exec, unsigned i)135 { 136 JSValue Ptrv = JSImmediate::from(i);134 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned i) 135 { 136 JSValue v = JSImmediate::from(i); 137 137 return v ? v : jsNumberCell(exec, i); 138 138 } 139 139 140 ALWAYS_INLINE JSValue PtrjsNumber(ExecState* exec, long i)141 { 142 JSValue Ptrv = JSImmediate::from(i);140 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, long i) 141 { 142 JSValue v = JSImmediate::from(i); 143 143 return v ? v : jsNumberCell(exec, i); 144 144 } 145 145 146 ALWAYS_INLINE JSValue PtrjsNumber(ExecState* exec, unsigned long i)147 { 148 JSValue Ptrv = JSImmediate::from(i);146 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned long i) 147 { 148 JSValue v = JSImmediate::from(i); 149 149 return v ? v : jsNumberCell(exec, i); 150 150 } 151 151 152 ALWAYS_INLINE JSValue PtrjsNumber(ExecState* exec, long long i)153 { 154 JSValue Ptrv = JSImmediate::from(i);152 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, long long i) 153 { 154 JSValue v = JSImmediate::from(i); 155 155 return v ? v : jsNumberCell(exec, static_cast<double>(i)); 156 156 } 157 157 158 ALWAYS_INLINE JSValue PtrjsNumber(ExecState* exec, unsigned long long i)159 { 160 JSValue Ptrv = JSImmediate::from(i);158 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned long long i) 159 { 160 JSValue v = JSImmediate::from(i); 161 161 return v ? v : jsNumberCell(exec, static_cast<double>(i)); 162 162 } 163 163 164 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData* globalData, double d)165 { 166 JSValue Ptrv = JSImmediate::from(d);164 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, double d) 165 { 166 JSValue v = JSImmediate::from(d); 167 167 return v ? v : jsNumberCell(globalData, d); 168 168 } 169 169 170 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData* globalData, int i)171 { 172 JSValue Ptrv = JSImmediate::from(i);170 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, int i) 171 { 172 JSValue v = JSImmediate::from(i); 173 173 return v ? v : jsNumberCell(globalData, i); 174 174 } 175 175 176 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData* globalData, unsigned i)177 { 178 JSValue Ptrv = JSImmediate::from(i);176 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, unsigned i) 177 { 178 JSValue v = JSImmediate::from(i); 179 179 return v ? v : jsNumberCell(globalData, i); 180 180 } 181 181 182 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData* globalData, long i)183 { 184 JSValue Ptrv = JSImmediate::from(i);182 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, long i) 183 { 184 JSValue v = JSImmediate::from(i); 185 185 return v ? v : jsNumberCell(globalData, i); 186 186 } 187 187 188 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData* globalData, unsigned long i)189 { 190 JSValue Ptrv = JSImmediate::from(i);188 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, unsigned long i) 189 { 190 JSValue v = JSImmediate::from(i); 191 191 return v ? v : jsNumberCell(globalData, i); 192 192 } 193 193 194 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData* globalData, long long i)195 { 196 JSValue Ptrv = JSImmediate::from(i);194 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, long long i) 195 { 196 JSValue v = JSImmediate::from(i); 197 197 return v ? v : jsNumberCell(globalData, static_cast<double>(i)); 198 198 } 199 199 200 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData* globalData, unsigned long long i)201 { 202 JSValue Ptrv = JSImmediate::from(i);200 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, unsigned long long i) 201 { 202 JSValue v = JSImmediate::from(i); 203 203 return v ? v : jsNumberCell(globalData, static_cast<double>(i)); 204 204 } 205 205 206 inline bool JSValue Ptr::isDoubleNumber() const206 inline bool JSValue::isDoubleNumber() const 207 207 { 208 208 return isNumberCell(asValue()); 209 209 } 210 210 211 inline double JSValue Ptr::getDoubleNumber() const211 inline double JSValue::getDoubleNumber() const 212 212 { 213 213 return asNumberCell(asValue())->value(); 214 214 } 215 215 216 inline bool JSValue Ptr::isNumber() const216 inline bool JSValue::isNumber() const 217 217 { 218 218 return JSImmediate::isNumber(asValue()) || isDoubleNumber(); 219 219 } 220 220 221 inline double JSValue Ptr::uncheckedGetNumber() const221 inline double JSValue::uncheckedGetNumber() const 222 222 { 223 223 ASSERT(isNumber()); … … 227 227 #else 228 228 229 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, double d)230 { 231 JSValue Ptrv = JSImmediate::from(d);232 ASSERT(v); 233 return v; 234 } 235 236 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, int i)237 { 238 JSValue Ptrv = JSImmediate::from(i);239 ASSERT(v); 240 return v; 241 } 242 243 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, unsigned i)244 { 245 JSValue Ptrv = JSImmediate::from(i);246 ASSERT(v); 247 return v; 248 } 249 250 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, long i)251 { 252 JSValue Ptrv = JSImmediate::from(i);253 ASSERT(v); 254 return v; 255 } 256 257 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, unsigned long i)258 { 259 JSValue Ptrv = JSImmediate::from(i);260 ASSERT(v); 261 return v; 262 } 263 264 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, long long i)265 { 266 JSValue Ptrv = JSImmediate::from(static_cast<double>(i));267 ASSERT(v); 268 return v; 269 } 270 271 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, unsigned long long i)272 { 273 JSValue Ptrv = JSImmediate::from(static_cast<double>(i));274 ASSERT(v); 275 return v; 276 } 277 278 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData*, double d)279 { 280 JSValue Ptrv = JSImmediate::from(d);281 ASSERT(v); 282 return v; 283 } 284 285 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData*, int i)286 { 287 JSValue Ptrv = JSImmediate::from(i);288 ASSERT(v); 289 return v; 290 } 291 292 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData*, unsigned i)293 { 294 JSValue Ptrv = JSImmediate::from(i);295 ASSERT(v); 296 return v; 297 } 298 299 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData*, long i)300 { 301 JSValue Ptrv = JSImmediate::from(i);302 ASSERT(v); 303 return v; 304 } 305 306 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData*, unsigned long i)307 { 308 JSValue Ptrv = JSImmediate::from(i);309 ASSERT(v); 310 return v; 311 } 312 313 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData*, long long i)314 { 315 JSValue Ptrv = JSImmediate::from(static_cast<double>(i));316 ASSERT(v); 317 return v; 318 } 319 320 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData*, unsigned long long i)321 { 322 JSValue Ptrv = JSImmediate::from(static_cast<double>(i));323 ASSERT(v); 324 return v; 325 } 326 327 inline bool JSValue Ptr::isDoubleNumber() const229 ALWAYS_INLINE JSValue jsNumber(ExecState*, double d) 230 { 231 JSValue v = JSImmediate::from(d); 232 ASSERT(v); 233 return v; 234 } 235 236 ALWAYS_INLINE JSValue jsNumber(ExecState*, int i) 237 { 238 JSValue v = JSImmediate::from(i); 239 ASSERT(v); 240 return v; 241 } 242 243 ALWAYS_INLINE JSValue jsNumber(ExecState*, unsigned i) 244 { 245 JSValue v = JSImmediate::from(i); 246 ASSERT(v); 247 return v; 248 } 249 250 ALWAYS_INLINE JSValue jsNumber(ExecState*, long i) 251 { 252 JSValue v = JSImmediate::from(i); 253 ASSERT(v); 254 return v; 255 } 256 257 ALWAYS_INLINE JSValue jsNumber(ExecState*, unsigned long i) 258 { 259 JSValue v = JSImmediate::from(i); 260 ASSERT(v); 261 return v; 262 } 263 264 ALWAYS_INLINE JSValue jsNumber(ExecState*, long long i) 265 { 266 JSValue v = JSImmediate::from(static_cast<double>(i)); 267 ASSERT(v); 268 return v; 269 } 270 271 ALWAYS_INLINE JSValue jsNumber(ExecState*, unsigned long long i) 272 { 273 JSValue v = JSImmediate::from(static_cast<double>(i)); 274 ASSERT(v); 275 return v; 276 } 277 278 ALWAYS_INLINE JSValue jsNumber(JSGlobalData*, double d) 279 { 280 JSValue v = JSImmediate::from(d); 281 ASSERT(v); 282 return v; 283 } 284 285 ALWAYS_INLINE JSValue jsNumber(JSGlobalData*, int i) 286 { 287 JSValue v = JSImmediate::from(i); 288 ASSERT(v); 289 return v; 290 } 291 292 ALWAYS_INLINE JSValue jsNumber(JSGlobalData*, unsigned i) 293 { 294 JSValue v = JSImmediate::from(i); 295 ASSERT(v); 296 return v; 297 } 298 299 ALWAYS_INLINE JSValue jsNumber(JSGlobalData*, long i) 300 { 301 JSValue v = JSImmediate::from(i); 302 ASSERT(v); 303 return v; 304 } 305 306 ALWAYS_INLINE JSValue jsNumber(JSGlobalData*, unsigned long i) 307 { 308 JSValue v = JSImmediate::from(i); 309 ASSERT(v); 310 return v; 311 } 312 313 ALWAYS_INLINE JSValue jsNumber(JSGlobalData*, long long i) 314 { 315 JSValue v = JSImmediate::from(static_cast<double>(i)); 316 ASSERT(v); 317 return v; 318 } 319 320 ALWAYS_INLINE JSValue jsNumber(JSGlobalData*, unsigned long long i) 321 { 322 JSValue v = JSImmediate::from(static_cast<double>(i)); 323 ASSERT(v); 324 return v; 325 } 326 327 inline bool JSValue::isDoubleNumber() const 328 328 { 329 329 return JSImmediate::isDoubleNumber(asValue()); 330 330 } 331 331 332 inline double JSValue Ptr::getDoubleNumber() const332 inline double JSValue::getDoubleNumber() const 333 333 { 334 334 return JSImmediate::doubleValue(asValue()); 335 335 } 336 336 337 inline bool JSValue Ptr::isNumber() const337 inline bool JSValue::isNumber() const 338 338 { 339 339 return JSImmediate::isNumber(asValue()); 340 340 } 341 341 342 inline double JSValue Ptr::uncheckedGetNumber() const342 inline double JSValue::uncheckedGetNumber() const 343 343 { 344 344 ASSERT(isNumber()); … … 348 348 #endif 349 349 350 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, char i)351 { 352 ASSERT(JSImmediate::from(i)); 353 return JSImmediate::from(i); 354 } 355 356 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, unsigned char i)357 { 358 ASSERT(JSImmediate::from(i)); 359 return JSImmediate::from(i); 360 } 361 362 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, short i)363 { 364 ASSERT(JSImmediate::from(i)); 365 return JSImmediate::from(i); 366 } 367 368 ALWAYS_INLINE JSValue PtrjsNumber(ExecState*, unsigned short i)369 { 370 ASSERT(JSImmediate::from(i)); 371 return JSImmediate::from(i); 372 } 373 374 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData*, short i)375 { 376 ASSERT(JSImmediate::from(i)); 377 return JSImmediate::from(i); 378 } 379 380 ALWAYS_INLINE JSValue PtrjsNumber(JSGlobalData*, unsigned short i)381 { 382 ASSERT(JSImmediate::from(i)); 383 return JSImmediate::from(i); 384 } 385 386 inline JSValue PtrjsNaN(ExecState* exec)350 ALWAYS_INLINE JSValue jsNumber(ExecState*, char i) 351 { 352 ASSERT(JSImmediate::from(i)); 353 return JSImmediate::from(i); 354 } 355 356 ALWAYS_INLINE JSValue jsNumber(ExecState*, unsigned char i) 357 { 358 ASSERT(JSImmediate::from(i)); 359 return JSImmediate::from(i); 360 } 361 362 ALWAYS_INLINE JSValue jsNumber(ExecState*, short i) 363 { 364 ASSERT(JSImmediate::from(i)); 365 return JSImmediate::from(i); 366 } 367 368 ALWAYS_INLINE JSValue jsNumber(ExecState*, unsigned short i) 369 { 370 ASSERT(JSImmediate::from(i)); 371 return JSImmediate::from(i); 372 } 373 374 ALWAYS_INLINE JSValue jsNumber(JSGlobalData*, short i) 375 { 376 ASSERT(JSImmediate::from(i)); 377 return JSImmediate::from(i); 378 } 379 380 ALWAYS_INLINE JSValue jsNumber(JSGlobalData*, unsigned short i) 381 { 382 ASSERT(JSImmediate::from(i)); 383 return JSImmediate::from(i); 384 } 385 386 inline JSValue jsNaN(ExecState* exec) 387 387 { 388 388 return jsNumber(exec, NaN); 389 389 } 390 390 391 inline JSValue PtrjsNaN(JSGlobalData* globalData)391 inline JSValue jsNaN(JSGlobalData* globalData) 392 392 { 393 393 return jsNumber(globalData, NaN); … … 396 396 // --- JSValue inlines ---------------------------- 397 397 398 ALWAYS_INLINE JSValue Ptr JSValuePtr::toJSNumber(ExecState* exec) const398 ALWAYS_INLINE JSValue JSValue::toJSNumber(ExecState* exec) const 399 399 { 400 400 return isNumber() ? asValue() : jsNumber(exec, this->toNumber(exec)); 401 401 } 402 402 403 inline bool JSValue Ptr::getNumber(double &result) const403 inline bool JSValue::getNumber(double &result) const 404 404 { 405 405 if (isInt32Fast()) … … 414 414 } 415 415 416 inline bool JSValue Ptr::numberToInt32(int32_t& arg)416 inline bool JSValue::numberToInt32(int32_t& arg) 417 417 { 418 418 if (isInt32Fast()) … … 427 427 } 428 428 429 inline bool JSValue Ptr::numberToUInt32(uint32_t& arg)429 inline bool JSValue::numberToUInt32(uint32_t& arg) 430 430 { 431 431 if (isUInt32Fast()) -
trunk/JavaScriptCore/runtime/JSObject.cpp
r43037 r43122 72 72 size_t storageSize = m_structure->propertyStorageSize(); 73 73 for (size_t i = 0; i < storageSize; ++i) { 74 JSValue Ptrv = m_propertyStorage[i];74 JSValue v = m_propertyStorage[i]; 75 75 if (!v.marked()) 76 76 v.mark(); … … 99 99 100 100 // ECMA 8.6.2.2 101 void JSObject::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)101 void JSObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 102 102 { 103 103 ASSERT(value); … … 109 109 return; 110 110 111 JSValue PtrnextPrototypeValue = value;111 JSValue nextPrototypeValue = value; 112 112 while (nextPrototypeValue && nextPrototypeValue.isObject()) { 113 113 JSObject* nextPrototype = asObject(nextPrototypeValue)->unwrappedObject(); … … 124 124 125 125 // Check if there are any setters or getters in the prototype chain 126 JSValue Ptrprototype;126 JSValue prototype; 127 127 for (JSObject* obj = this; !obj->structure()->hasGetterSetterProperties(); obj = asObject(prototype)) { 128 128 prototype = obj->prototype(); … … 138 138 139 139 for (JSObject* obj = this; ; obj = asObject(prototype)) { 140 if (JSValue Ptrgs = obj->getDirect(propertyName)) {140 if (JSValue gs = obj->getDirect(propertyName)) { 141 141 if (gs.isGetterSetter()) { 142 142 JSObject* setterFunc = asGetterSetter(gs)->setter(); … … 168 168 } 169 169 170 void JSObject::put(ExecState* exec, unsigned propertyName, JSValue Ptrvalue)170 void JSObject::put(ExecState* exec, unsigned propertyName, JSValue value) 171 171 { 172 172 PutPropertySlot slot; … … 174 174 } 175 175 176 void JSObject::putWithAttributes(ExecState*, const Identifier& propertyName, JSValue Ptrvalue, unsigned attributes)176 void JSObject::putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes) 177 177 { 178 178 putDirect(propertyName, value, attributes); 179 179 } 180 180 181 void JSObject::putWithAttributes(ExecState* exec, unsigned propertyName, JSValue Ptrvalue, unsigned attributes)181 void JSObject::putWithAttributes(ExecState* exec, unsigned propertyName, JSValue value, unsigned attributes) 182 182 { 183 183 putWithAttributes(exec, Identifier::from(exec, propertyName), value, attributes); … … 227 227 } 228 228 229 static ALWAYS_INLINE JSValue PtrcallDefaultValueFunction(ExecState* exec, const JSObject* object, const Identifier& propertyName)230 { 231 JSValue Ptrfunction = object->get(exec, propertyName);229 static ALWAYS_INLINE JSValue callDefaultValueFunction(ExecState* exec, const JSObject* object, const Identifier& propertyName) 230 { 231 JSValue function = object->get(exec, propertyName); 232 232 CallData callData; 233 233 CallType callType = function.getCallData(callData); … … 240 240 return exec->exception(); 241 241 242 JSValue Ptrresult = call(exec, function, callType, callData, const_cast<JSObject*>(object), exec->emptyList());242 JSValue result = call(exec, function, callType, callData, const_cast<JSObject*>(object), exec->emptyList()); 243 243 ASSERT(!result.isGetterSetter()); 244 244 if (exec->hadException()) … … 249 249 } 250 250 251 bool JSObject::getPrimitiveNumber(ExecState* exec, double& number, JSValue Ptr& result)251 bool JSObject::getPrimitiveNumber(ExecState* exec, double& number, JSValue& result) 252 252 { 253 253 result = defaultValue(exec, PreferNumber); … … 257 257 258 258 // ECMA 8.6.2.6 259 JSValue PtrJSObject::defaultValue(ExecState* exec, PreferredPrimitiveType hint) const259 JSValue JSObject::defaultValue(ExecState* exec, PreferredPrimitiveType hint) const 260 260 { 261 261 // Must call toString first for Date objects. 262 262 if ((hint == PreferString) || (hint != PreferNumber && prototype() == exec->lexicalGlobalObject()->datePrototype())) { 263 JSValue Ptrvalue = callDefaultValueFunction(exec, this, exec->propertyNames().toString);263 JSValue value = callDefaultValueFunction(exec, this, exec->propertyNames().toString); 264 264 if (value) 265 265 return value; … … 268 268 return value; 269 269 } else { 270 JSValue Ptrvalue = callDefaultValueFunction(exec, this, exec->propertyNames().valueOf);270 JSValue value = callDefaultValueFunction(exec, this, exec->propertyNames().valueOf); 271 271 if (value) 272 272 return value; … … 294 294 void JSObject::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction) 295 295 { 296 JSValue Ptrobject = getDirect(propertyName);296 JSValue object = getDirect(propertyName); 297 297 if (object && object.isGetterSetter()) { 298 298 ASSERT(m_structure->hasGetterSetterProperties()); … … 321 321 void JSObject::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunction) 322 322 { 323 JSValue Ptrobject = getDirect(propertyName);323 JSValue object = getDirect(propertyName); 324 324 if (object && object.isGetterSetter()) { 325 325 ASSERT(m_structure->hasGetterSetterProperties()); … … 346 346 } 347 347 348 JSValue PtrJSObject::lookupGetter(ExecState*, const Identifier& propertyName)348 JSValue JSObject::lookupGetter(ExecState*, const Identifier& propertyName) 349 349 { 350 350 JSObject* object = this; 351 351 while (true) { 352 if (JSValue Ptrvalue = object->getDirect(propertyName)) {352 if (JSValue value = object->getDirect(propertyName)) { 353 353 if (!value.isGetterSetter()) 354 354 return jsUndefined(); … … 365 365 } 366 366 367 JSValue PtrJSObject::lookupSetter(ExecState*, const Identifier& propertyName)367 JSValue JSObject::lookupSetter(ExecState*, const Identifier& propertyName) 368 368 { 369 369 JSObject* object = this; 370 370 while (true) { 371 if (JSValue Ptrvalue = object->getDirect(propertyName)) {371 if (JSValue value = object->getDirect(propertyName)) { 372 372 if (!value.isGetterSetter()) 373 373 return jsUndefined(); … … 384 384 } 385 385 386 bool JSObject::hasInstance(ExecState* exec, JSValue Ptr value, JSValuePtrproto)386 bool JSObject::hasInstance(ExecState* exec, JSValue value, JSValue proto) 387 387 { 388 388 if (!proto.isObject()) { … … 437 437 double JSObject::toNumber(ExecState* exec) const 438 438 { 439 JSValue Ptrprimitive = toPrimitive(exec, PreferNumber);439 JSValue primitive = toPrimitive(exec, PreferNumber); 440 440 if (exec->hadException()) // should be picked up soon in Nodes.cpp 441 441 return 0.0; … … 445 445 UString JSObject::toString(ExecState* exec) const 446 446 { 447 JSValue Ptrprimitive = toPrimitive(exec, PreferString);447 JSValue primitive = toPrimitive(exec, PreferString); 448 448 if (exec->hadException()) 449 449 return ""; … … 492 492 } 493 493 494 NEVER_INLINE void JSObject::fillGetterPropertySlot(PropertySlot& slot, JSValue Ptr* location)494 NEVER_INLINE void JSObject::fillGetterPropertySlot(PropertySlot& slot, JSValue* location) 495 495 { 496 496 if (JSObject* getterFunction = asGetterSetter(*location)->getter()) -
trunk/JavaScriptCore/runtime/JSObject.h
r40332 r43122 52 52 }; 53 53 54 typedef JSValue Ptr* PropertyStorage;54 typedef JSValue* PropertyStorage; 55 55 56 56 class JSObject : public JSCell { … … 70 70 bool inherits(const ClassInfo* classInfo) const { return JSCell::isObject(classInfo); } 71 71 72 JSValue Ptrprototype() const;73 void setPrototype(JSValue Ptrprototype);72 JSValue prototype() const; 73 void setPrototype(JSValue prototype); 74 74 75 75 void setStructure(PassRefPtr<Structure>); … … 80 80 virtual UString className() const; 81 81 82 JSValue Ptrget(ExecState*, const Identifier& propertyName) const;83 JSValue Ptrget(ExecState*, unsigned propertyName) const;82 JSValue get(ExecState*, const Identifier& propertyName) const; 83 JSValue get(ExecState*, unsigned propertyName) const; 84 84 85 85 bool getPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); … … 89 89 virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&); 90 90 91 virtual void put(ExecState*, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot&);92 virtual void put(ExecState*, unsigned propertyName, JSValue Ptrvalue);93 94 virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue Ptrvalue, unsigned attributes);95 virtual void putWithAttributes(ExecState*, unsigned propertyName, JSValue Ptrvalue, unsigned attributes);91 virtual void put(ExecState*, const Identifier& propertyName, JSValue value, PutPropertySlot&); 92 virtual void put(ExecState*, unsigned propertyName, JSValue value); 93 94 virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes); 95 virtual void putWithAttributes(ExecState*, unsigned propertyName, JSValue value, unsigned attributes); 96 96 97 97 bool propertyIsEnumerable(ExecState*, const Identifier& propertyName) const; … … 104 104 virtual bool deleteProperty(ExecState*, unsigned propertyName); 105 105 106 virtual JSValue PtrdefaultValue(ExecState*, PreferredPrimitiveType) const;107 108 virtual bool hasInstance(ExecState*, JSValue Ptr, JSValuePtrprototypeProperty);106 virtual JSValue defaultValue(ExecState*, PreferredPrimitiveType) const; 107 108 virtual bool hasInstance(ExecState*, JSValue, JSValue prototypeProperty); 109 109 110 110 virtual void getPropertyNames(ExecState*, PropertyNameArray&); 111 111 112 virtual JSValue PtrtoPrimitive(ExecState*, PreferredPrimitiveType = NoPreference) const;113 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue Ptr& value);112 virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType = NoPreference) const; 113 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue& value); 114 114 virtual bool toBoolean(ExecState*) const; 115 115 virtual double toNumber(ExecState*) const; … … 123 123 124 124 // This get function only looks at the property map. 125 JSValue PtrgetDirect(const Identifier& propertyName) const125 JSValue getDirect(const Identifier& propertyName) const 126 126 { 127 127 size_t offset = m_structure->get(propertyName); … … 129 129 } 130 130 131 JSValue Ptr* getDirectLocation(const Identifier& propertyName)131 JSValue* getDirectLocation(const Identifier& propertyName) 132 132 { 133 133 size_t offset = m_structure->get(propertyName); … … 135 135 } 136 136 137 JSValue Ptr* getDirectLocation(const Identifier& propertyName, unsigned& attributes)137 JSValue* getDirectLocation(const Identifier& propertyName, unsigned& attributes) 138 138 { 139 139 size_t offset = m_structure->get(propertyName, attributes); … … 141 141 } 142 142 143 size_t offsetForLocation(JSValue Ptr* location)143 size_t offsetForLocation(JSValue* location) 144 144 { 145 145 return location - m_propertyStorage; 146 146 } 147 147 148 JSValue Ptr* locationForOffset(size_t offset)148 JSValue* locationForOffset(size_t offset) 149 149 { 150 150 return &m_propertyStorage[offset]; … … 157 157 bool hasGetterSetterProperties() { return m_structure->hasGetterSetterProperties(); } 158 158 159 void putDirect(const Identifier& propertyName, JSValue Ptrvalue, unsigned attr = 0);160 void putDirect(const Identifier& propertyName, JSValue Ptrvalue, unsigned attr, bool checkReadOnly, PutPropertySlot& slot);159 void putDirect(const Identifier& propertyName, JSValue value, unsigned attr = 0); 160 void putDirect(const Identifier& propertyName, JSValue value, unsigned attr, bool checkReadOnly, PutPropertySlot& slot); 161 161 void putDirectFunction(ExecState* exec, InternalFunction* function, unsigned attr = 0); 162 void putDirectWithoutTransition(const Identifier& propertyName, JSValue Ptrvalue, unsigned attr = 0);162 void putDirectWithoutTransition(const Identifier& propertyName, JSValue value, unsigned attr = 0); 163 163 void putDirectFunctionWithoutTransition(ExecState* exec, InternalFunction* function, unsigned attr = 0); 164 164 165 165 // Fast access to known property offsets. 166 JSValue PtrgetDirectOffset(size_t offset) { return m_propertyStorage[offset]; }167 void putDirectOffset(size_t offset, JSValue Ptrvalue) { m_propertyStorage[offset] = value; }168 169 void fillGetterPropertySlot(PropertySlot&, JSValue Ptr* location);166 JSValue getDirectOffset(size_t offset) { return m_propertyStorage[offset]; } 167 void putDirectOffset(size_t offset, JSValue value) { m_propertyStorage[offset] = value; } 168 169 void fillGetterPropertySlot(PropertySlot&, JSValue* location); 170 170 171 171 virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction); 172 172 virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction); 173 virtual JSValue PtrlookupGetter(ExecState*, const Identifier& propertyName);174 virtual JSValue PtrlookupSetter(ExecState*, const Identifier& propertyName);173 virtual JSValue lookupGetter(ExecState*, const Identifier& propertyName); 174 virtual JSValue lookupSetter(ExecState*, const Identifier& propertyName); 175 175 176 176 virtual bool isGlobalObject() const { return false; } … … 187 187 static const size_t nonInlineBaseStorageCapacity = 16; 188 188 189 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)189 static PassRefPtr<Structure> createStructure(JSValue prototype) 190 190 { 191 191 return Structure::create(prototype, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot)); … … 204 204 205 205 PropertyStorage m_propertyStorage; 206 JSValue Ptrm_inlineStorage[inlineStorageCapacity];206 JSValue m_inlineStorage[inlineStorageCapacity]; 207 207 }; 208 208 209 JSObject* asObject(JSValue Ptr);209 JSObject* asObject(JSValue); 210 210 211 211 JSObject* constructEmptyObject(ExecState*); 212 212 213 inline JSObject* asObject(JSValue Ptrvalue)213 inline JSObject* asObject(JSValue value) 214 214 { 215 215 ASSERT(asCell(value)->isObject()); … … 235 235 } 236 236 237 inline JSValue PtrJSObject::prototype() const237 inline JSValue JSObject::prototype() const 238 238 { 239 239 return m_structure->storedPrototype(); 240 240 } 241 241 242 inline void JSObject::setPrototype(JSValue Ptrprototype)242 inline void JSObject::setPrototype(JSValue prototype) 243 243 { 244 244 ASSERT(prototype); … … 270 270 271 271 // this method is here to be after the inline declaration of JSCell::isObject 272 inline bool JSValue Ptr::isObject(const ClassInfo* classInfo) const272 inline bool JSValue::isObject(const ClassInfo* classInfo) const 273 273 { 274 274 return isCell() && asCell()->isObject(classInfo); … … 277 277 ALWAYS_INLINE bool JSObject::inlineGetOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 278 278 { 279 if (JSValue Ptr* location = getDirectLocation(propertyName)) {279 if (JSValue* location = getDirectLocation(propertyName)) { 280 280 if (m_structure->hasGetterSetterProperties() && location[0].isGetterSetter()) 281 281 fillGetterPropertySlot(slot, location); … … 297 297 { 298 298 unsigned attributes; 299 if (JSValue Ptr* location = getDirectLocation(propertyName, attributes)) {299 if (JSValue* location = getDirectLocation(propertyName, attributes)) { 300 300 if (m_structure->hasGetterSetterProperties() && location[0].isGetterSetter()) { 301 301 slotIsWriteable = false; … … 341 341 if (object->fastGetOwnPropertySlot(exec, propertyName, slot)) 342 342 return true; 343 JSValue Ptrprototype = object->prototype();343 JSValue prototype = object->prototype(); 344 344 if (!prototype.isObject()) 345 345 return false; … … 354 354 if (object->getOwnPropertySlot(exec, propertyName, slot)) 355 355 return true; 356 JSValue Ptrprototype = object->prototype();356 JSValue prototype = object->prototype(); 357 357 if (!prototype.isObject()) 358 358 return false; … … 361 361 } 362 362 363 inline JSValue PtrJSObject::get(ExecState* exec, const Identifier& propertyName) const363 inline JSValue JSObject::get(ExecState* exec, const Identifier& propertyName) const 364 364 { 365 365 PropertySlot slot(this); … … 370 370 } 371 371 372 inline JSValue PtrJSObject::get(ExecState* exec, unsigned propertyName) const372 inline JSValue JSObject::get(ExecState* exec, unsigned propertyName) const 373 373 { 374 374 PropertySlot slot(this); … … 379 379 } 380 380 381 inline void JSObject::putDirect(const Identifier& propertyName, JSValue Ptrvalue, unsigned attr)381 inline void JSObject::putDirect(const Identifier& propertyName, JSValue value, unsigned attr) 382 382 { 383 383 PutPropertySlot slot; … … 385 385 } 386 386 387 inline void JSObject::putDirect(const Identifier& propertyName, JSValue Ptrvalue, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot)387 inline void JSObject::putDirect(const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot) 388 388 { 389 389 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); … … 446 446 } 447 447 448 inline void JSObject::putDirectWithoutTransition(const Identifier& propertyName, JSValue Ptrvalue, unsigned attributes)448 inline void JSObject::putDirectWithoutTransition(const Identifier& propertyName, JSValue value, unsigned attributes) 449 449 { 450 450 size_t currentCapacity = m_structure->propertyStorageCapacity(); … … 462 462 } 463 463 464 inline JSValue PtrJSObject::toPrimitive(ExecState* exec, PreferredPrimitiveType preferredType) const464 inline JSValue JSObject::toPrimitive(ExecState* exec, PreferredPrimitiveType preferredType) const 465 465 { 466 466 return defaultValue(exec, preferredType); 467 467 } 468 468 469 inline JSValue Ptr JSValuePtr::get(ExecState* exec, const Identifier& propertyName) const469 inline JSValue JSValue::get(ExecState* exec, const Identifier& propertyName) const 470 470 { 471 471 PropertySlot slot(asValue()); … … 473 473 } 474 474 475 inline JSValue Ptr JSValuePtr::get(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) const475 inline JSValue JSValue::get(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) const 476 476 { 477 477 if (UNLIKELY(!isCell())) { … … 486 486 return slot.getValue(exec, propertyName); 487 487 ASSERT(cell->isObject()); 488 JSValue Ptrprototype = static_cast<JSObject*>(cell)->prototype();488 JSValue prototype = static_cast<JSObject*>(cell)->prototype(); 489 489 if (!prototype.isObject()) 490 490 return jsUndefined(); … … 493 493 } 494 494 495 inline JSValue Ptr JSValuePtr::get(ExecState* exec, unsigned propertyName) const495 inline JSValue JSValue::get(ExecState* exec, unsigned propertyName) const 496 496 { 497 497 PropertySlot slot(asValue()); … … 499 499 } 500 500 501 inline JSValue Ptr JSValuePtr::get(ExecState* exec, unsigned propertyName, PropertySlot& slot) const501 inline JSValue JSValue::get(ExecState* exec, unsigned propertyName, PropertySlot& slot) const 502 502 { 503 503 if (UNLIKELY(!isCell())) { … … 512 512 return slot.getValue(exec, propertyName); 513 513 ASSERT(cell->isObject()); 514 JSValue Ptrprototype = static_cast<JSObject*>(cell)->prototype();514 JSValue prototype = static_cast<JSObject*>(cell)->prototype(); 515 515 if (!prototype.isObject()) 516 516 return jsUndefined(); … … 519 519 } 520 520 521 inline void JSValue Ptr::put(ExecState* exec, const Identifier& propertyName, JSValuePtrvalue, PutPropertySlot& slot)521 inline void JSValue::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 522 522 { 523 523 if (UNLIKELY(!isCell())) { … … 528 528 } 529 529 530 inline void JSValue Ptr::put(ExecState* exec, unsigned propertyName, JSValuePtrvalue)530 inline void JSValue::put(ExecState* exec, unsigned propertyName, JSValue value) 531 531 { 532 532 if (UNLIKELY(!isCell())) { … … 541 541 ASSERT(newSize > oldSize); 542 542 543 JSValue Ptr* oldPropertyStorage = m_propertyStorage;544 m_propertyStorage = new JSValue Ptr[newSize];543 JSValue* oldPropertyStorage = m_propertyStorage; 544 m_propertyStorage = new JSValue[newSize]; 545 545 546 546 for (unsigned i = 0; i < oldSize; ++i) -
trunk/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
r39670 r43122 38 38 } 39 39 40 JSValue PtrJSPropertyNameIterator::toPrimitive(ExecState*, PreferredPrimitiveType) const40 JSValue JSPropertyNameIterator::toPrimitive(ExecState*, PreferredPrimitiveType) const 41 41 { 42 42 ASSERT_NOT_REACHED(); … … 44 44 } 45 45 46 bool JSPropertyNameIterator::getPrimitiveNumber(ExecState*, double&, JSValue Ptr&)46 bool JSPropertyNameIterator::getPrimitiveNumber(ExecState*, double&, JSValue&) 47 47 { 48 48 ASSERT_NOT_REACHED(); -
trunk/JavaScriptCore/runtime/JSPropertyNameIterator.h
r41232 r43122 41 41 class JSPropertyNameIterator : public JSCell { 42 42 public: 43 static JSPropertyNameIterator* create(ExecState*, JSValue Ptr);43 static JSPropertyNameIterator* create(ExecState*, JSValue); 44 44 45 45 virtual ~JSPropertyNameIterator(); 46 46 47 virtual JSValue PtrtoPrimitive(ExecState*, PreferredPrimitiveType) const;48 virtual bool getPrimitiveNumber(ExecState*, double&, JSValue Ptr&);47 virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const; 48 virtual bool getPrimitiveNumber(ExecState*, double&, JSValue&); 49 49 virtual bool toBoolean(ExecState*) const; 50 50 virtual double toNumber(ExecState*) const; … … 54 54 virtual void mark(); 55 55 56 JSValue Ptrnext(ExecState*);56 JSValue next(ExecState*); 57 57 void invalidate(); 58 58 … … 84 84 } 85 85 86 inline JSPropertyNameIterator* JSPropertyNameIterator::create(ExecState* exec, JSValue Ptrv)86 inline JSPropertyNameIterator* JSPropertyNameIterator::create(ExecState* exec, JSValue v) 87 87 { 88 88 if (v.isUndefinedOrNull()) … … 95 95 } 96 96 97 inline JSValue PtrJSPropertyNameIterator::next(ExecState* exec)97 inline JSValue JSPropertyNameIterator::next(ExecState* exec) 98 98 { 99 99 if (m_position == m_end) -
trunk/JavaScriptCore/runtime/JSStaticScopeObject.cpp
r39670 r43122 45 45 } 46 46 47 void JSStaticScopeObject::put(ExecState*, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot&)47 void JSStaticScopeObject::put(ExecState*, const Identifier& propertyName, JSValue value, PutPropertySlot&) 48 48 { 49 49 if (symbolTablePut(propertyName, value)) … … 53 53 } 54 54 55 void JSStaticScopeObject::putWithAttributes(ExecState*, const Identifier& propertyName, JSValue Ptrvalue, unsigned attributes)55 void JSStaticScopeObject::putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes) 56 56 { 57 57 if (symbolTablePutWithAttributes(propertyName, value, attributes)) -
trunk/JavaScriptCore/runtime/JSStaticScopeObject.h
r39670 r43122 44 44 45 45 public: 46 JSStaticScopeObject(ExecState* exec, const Identifier& ident, JSValue Ptrvalue, unsigned attributes)46 JSStaticScopeObject(ExecState* exec, const Identifier& ident, JSValue value, unsigned attributes) 47 47 : JSVariableObject(exec->globalData().staticScopeStructure, new JSStaticScopeObjectData()) 48 48 { … … 56 56 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 57 57 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&, bool& slotIsWriteable); 58 virtual void put(ExecState*, const Identifier&, JSValue Ptr, PutPropertySlot&);59 void putWithAttributes(ExecState*, const Identifier&, JSValue Ptr, unsigned attributes);58 virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); 59 void putWithAttributes(ExecState*, const Identifier&, JSValue, unsigned attributes); 60 60 61 static PassRefPtr<Structure> createStructure(JSValue Ptrproto) { return Structure::create(proto, TypeInfo(ObjectType, NeedsThisConversion)); }61 static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, NeedsThisConversion)); } 62 62 63 63 private: -
trunk/JavaScriptCore/runtime/JSString.cpp
r40046 r43122 31 31 namespace JSC { 32 32 33 JSValue PtrJSString::toPrimitive(ExecState*, PreferredPrimitiveType) const33 JSValue JSString::toPrimitive(ExecState*, PreferredPrimitiveType) const 34 34 { 35 35 return const_cast<JSString*>(this); 36 36 } 37 37 38 bool JSString::getPrimitiveNumber(ExecState*, double& number, JSValue Ptr& value)38 bool JSString::getPrimitiveNumber(ExecState*, double& number, JSValue& value) 39 39 { 40 40 value = this; … … 91 91 slot.setBase(this); 92 92 JSObject* object; 93 for (JSValue Ptrprototype = exec->lexicalGlobalObject()->stringPrototype(); !prototype.isNull(); prototype = object->prototype()) {93 for (JSValue prototype = exec->lexicalGlobalObject()->stringPrototype(); !prototype.isNull(); prototype = object->prototype()) { 94 94 object = asObject(prototype); 95 95 if (object->getOwnPropertySlot(exec, propertyName, slot)) -
trunk/JavaScriptCore/runtime/JSString.h
r41168 r43122 91 91 JSString* getIndex(JSGlobalData*, unsigned); 92 92 93 static PassRefPtr<Structure> createStructure(JSValue Ptrproto) { return Structure::create(proto, TypeInfo(StringType, NeedsThisConversion)); }93 static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(StringType, NeedsThisConversion)); } 94 94 95 95 private: … … 100 100 } 101 101 102 virtual JSValue PtrtoPrimitive(ExecState*, PreferredPrimitiveType) const;103 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue Ptr& value);102 virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const; 103 virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue& value); 104 104 virtual bool toBoolean(ExecState*) const; 105 105 virtual double toNumber(ExecState*) const; … … 118 118 }; 119 119 120 JSString* asString(JSValue Ptr);121 122 inline JSString* asString(JSValue Ptrvalue)120 JSString* asString(JSValue); 121 122 inline JSString* asString(JSValue value) 123 123 { 124 124 ASSERT(asCell(value)->isString()); … … 203 203 } 204 204 205 inline bool isJSString(JSGlobalData* globalData, JSValue Ptrv) { return v.isCell() && v.asCell()->vptr() == globalData->jsStringVPtr; }205 inline bool isJSString(JSGlobalData* globalData, JSValue v) { return v.isCell() && v.asCell()->vptr() == globalData->jsStringVPtr; } 206 206 207 207 // --- JSValue inlines ---------------------------- 208 208 209 inline JSString* JSValue Ptr::toThisJSString(ExecState* exec)209 inline JSString* JSValue::toThisJSString(ExecState* exec) 210 210 { 211 211 return JSImmediate::isImmediate(asValue()) ? jsString(exec, JSImmediate::toString(asValue())) : asCell()->toThisJSString(exec); -
trunk/JavaScriptCore/runtime/JSValue.cpp
r39851 r43122 32 32 33 33 // ECMA 9.4 34 double JSValue Ptr::toInteger(ExecState* exec) const34 double JSValue::toInteger(ExecState* exec) const 35 35 { 36 36 if (isInt32Fast()) … … 40 40 } 41 41 42 double JSValue Ptr::toIntegerPreserveNaN(ExecState* exec) const42 double JSValue::toIntegerPreserveNaN(ExecState* exec) const 43 43 { 44 44 if (isInt32Fast()) -
trunk/JavaScriptCore/runtime/JSValue.h
r43121 r43122 46 46 enum PreferredPrimitiveType { NoPreference, PreferNumber, PreferString }; 47 47 48 typedef void* EncodedJSValue Ptr;49 50 class JSValue Ptr{48 typedef void* EncodedJSValue; 49 50 class JSValue { 51 51 friend class JSImmediate; 52 52 53 static JSValue PtrmakeImmediate(intptr_t value)53 static JSValue makeImmediate(intptr_t value) 54 54 { 55 return JSValue Ptr(reinterpret_cast<JSCell*>(value));55 return JSValue(reinterpret_cast<JSCell*>(value)); 56 56 } 57 57 … … 68 68 enum JSFalseTag { JSFalse }; 69 69 70 static EncodedJSValue Ptr encode(JSValuePtrvalue);71 static JSValue Ptr decode(EncodedJSValuePtrptr);72 73 JSValue Ptr();74 JSValue Ptr(ImpossibleValueTag);75 JSValue Ptr(JSNullTag);76 JSValue Ptr(JSUndefinedTag);77 JSValue Ptr(JSTrueTag);78 JSValue Ptr(JSFalseTag);79 JSValue Ptr(JSCell* ptr);80 JSValue Ptr(const JSCell* ptr);70 static EncodedJSValue encode(JSValue value); 71 static JSValue decode(EncodedJSValue ptr); 72 73 JSValue(); 74 JSValue(ImpossibleValueTag); 75 JSValue(JSNullTag); 76 JSValue(JSUndefinedTag); 77 JSValue(JSTrueTag); 78 JSValue(JSFalseTag); 79 JSValue(JSCell* ptr); 80 JSValue(const JSCell* ptr); 81 81 82 82 operator bool() const; 83 bool operator==(const JSValue Ptrother) const;84 bool operator!=(const JSValue Ptrother) const;83 bool operator==(const JSValue other) const; 84 bool operator!=(const JSValue other) const; 85 85 86 86 // Querying the type. … … 113 113 114 114 // Basic conversions. 115 JSValue PtrtoPrimitive(ExecState*, PreferredPrimitiveType = NoPreference) const;116 bool getPrimitiveNumber(ExecState*, double& number, JSValue Ptr&);115 JSValue toPrimitive(ExecState*, PreferredPrimitiveType = NoPreference) const; 116 bool getPrimitiveNumber(ExecState*, double& number, JSValue&); 117 117 118 118 bool toBoolean(ExecState*) const; … … 121 121 // been set in the ExecState already. 122 122 double toNumber(ExecState*) const; 123 JSValue PtrtoJSNumber(ExecState*) const; // Fast path for when you expect that the value is an immediate number.123 JSValue toJSNumber(ExecState*) const; // Fast path for when you expect that the value is an immediate number. 124 124 UString toString(ExecState*) const; 125 125 JSObject* toObject(ExecState*) const; … … 144 144 bool isUInt32Fast() const; 145 145 uint32_t getUInt32Fast() const; 146 static JSValue PtrmakeInt32Fast(int32_t);147 static bool areBothInt32Fast(JSValue Ptr, JSValuePtr);146 static JSValue makeInt32Fast(int32_t); 147 static bool areBothInt32Fast(JSValue, JSValue); 148 148 149 149 // Floating point conversions (this is a convenience method for webcore; … … 156 156 157 157 // Object operations, with the toObject operation included. 158 JSValue Ptrget(ExecState*, const Identifier& propertyName) const;159 JSValue Ptrget(ExecState*, const Identifier& propertyName, PropertySlot&) const;160 JSValue Ptrget(ExecState*, unsigned propertyName) const;161 JSValue Ptrget(ExecState*, unsigned propertyName, PropertySlot&) const;162 void put(ExecState*, const Identifier& propertyName, JSValue Ptr, PutPropertySlot&);163 void put(ExecState*, unsigned propertyName, JSValue Ptr);158 JSValue get(ExecState*, const Identifier& propertyName) const; 159 JSValue get(ExecState*, const Identifier& propertyName, PropertySlot&) const; 160 JSValue get(ExecState*, unsigned propertyName) const; 161 JSValue get(ExecState*, unsigned propertyName, PropertySlot&) const; 162 void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 163 void put(ExecState*, unsigned propertyName, JSValue); 164 164 165 165 bool needsThisConversion() const; … … 168 168 JSString* toThisJSString(ExecState*); 169 169 170 static bool equal(ExecState* exec, JSValue Ptr v1, JSValuePtrv2);171 static bool equalSlowCase(ExecState* exec, JSValue Ptr v1, JSValuePtrv2);172 static bool equalSlowCaseInline(ExecState* exec, JSValue Ptr v1, JSValuePtrv2);173 static bool strictEqual(JSValue Ptr v1, JSValuePtrv2);174 static bool strictEqualSlowCase(JSValue Ptr v1, JSValuePtrv2);175 static bool strictEqualSlowCaseInline(JSValue Ptr v1, JSValuePtrv2);176 177 JSValue PtrgetJSNumber(); // noValue() if this is not a JSNumber or number object170 static bool equal(ExecState* exec, JSValue v1, JSValue v2); 171 static bool equalSlowCase(ExecState* exec, JSValue v1, JSValue v2); 172 static bool equalSlowCaseInline(ExecState* exec, JSValue v1, JSValue v2); 173 static bool strictEqual(JSValue v1, JSValue v2); 174 static bool strictEqualSlowCase(JSValue v1, JSValue v2); 175 static bool strictEqualSlowCaseInline(JSValue v1, JSValue v2); 176 177 JSValue getJSNumber(); // noValue() if this is not a JSNumber or number object 178 178 179 179 bool isCell() const; … … 181 181 182 182 private: 183 inline const JSValue PtrasValue() const { return *this; }183 inline const JSValue asValue() const { return *this; } 184 184 185 185 bool isDoubleNumber() const; … … 190 190 191 191 // Stand-alone helper functions. 192 inline JSValue PtrnoValue()193 { 194 return JSValue Ptr();195 } 196 197 inline JSValue PtrjsImpossibleValue()198 { 199 return JSValue Ptr(JSValuePtr::ImpossibleValue);200 } 201 202 inline JSValue PtrjsNull()203 { 204 return JSValue Ptr(JSValuePtr::JSNull);205 } 206 207 inline JSValue PtrjsUndefined()208 { 209 return JSValue Ptr(JSValuePtr::JSUndefined);210 } 211 212 inline JSValue PtrjsBoolean(bool b)213 { 214 return b ? JSValue Ptr(JSValuePtr::JSTrue) : JSValuePtr(JSValuePtr::JSFalse);215 } 216 217 inline bool operator==(const JSValue Ptr a, const JSCell* b) { return a == JSValuePtr(b); }218 inline bool operator==(const JSCell* a, const JSValue Ptr b) { return JSValuePtr(a) == b; }219 220 inline bool operator!=(const JSValue Ptr a, const JSCell* b) { return a != JSValuePtr(b); }221 inline bool operator!=(const JSCell* a, const JSValue Ptr b) { return JSValuePtr(a) != b; }222 223 // JSValue Ptrmember functions.224 inline EncodedJSValue Ptr JSValuePtr::encode(JSValuePtrvalue)225 { 226 return reinterpret_cast<EncodedJSValue Ptr>(value.m_ptr);227 } 228 229 inline JSValue Ptr JSValuePtr::decode(EncodedJSValuePtrptr)230 { 231 return JSValue Ptr(reinterpret_cast<JSCell*>(ptr));232 } 233 234 inline JSValue Ptr::JSValuePtr()192 inline JSValue noValue() 193 { 194 return JSValue(); 195 } 196 197 inline JSValue jsImpossibleValue() 198 { 199 return JSValue(JSValue::ImpossibleValue); 200 } 201 202 inline JSValue jsNull() 203 { 204 return JSValue(JSValue::JSNull); 205 } 206 207 inline JSValue jsUndefined() 208 { 209 return JSValue(JSValue::JSUndefined); 210 } 211 212 inline JSValue jsBoolean(bool b) 213 { 214 return b ? JSValue(JSValue::JSTrue) : JSValue(JSValue::JSFalse); 215 } 216 217 inline bool operator==(const JSValue a, const JSCell* b) { return a == JSValue(b); } 218 inline bool operator==(const JSCell* a, const JSValue b) { return JSValue(a) == b; } 219 220 inline bool operator!=(const JSValue a, const JSCell* b) { return a != JSValue(b); } 221 inline bool operator!=(const JSCell* a, const JSValue b) { return JSValue(a) != b; } 222 223 // JSValue member functions. 224 inline EncodedJSValue JSValue::encode(JSValue value) 225 { 226 return reinterpret_cast<EncodedJSValue>(value.m_ptr); 227 } 228 229 inline JSValue JSValue::decode(EncodedJSValue ptr) 230 { 231 return JSValue(reinterpret_cast<JSCell*>(ptr)); 232 } 233 234 inline JSValue::JSValue() 235 235 : m_ptr(0) 236 236 { 237 237 } 238 238 239 inline JSValue Ptr::JSValuePtr(JSCell* ptr)239 inline JSValue::JSValue(JSCell* ptr) 240 240 : m_ptr(ptr) 241 241 { 242 242 } 243 243 244 inline JSValue Ptr::JSValuePtr(const JSCell* ptr)244 inline JSValue::JSValue(const JSCell* ptr) 245 245 : m_ptr(const_cast<JSCell*>(ptr)) 246 246 { 247 247 } 248 248 249 inline JSValue Ptr::operator bool() const249 inline JSValue::operator bool() const 250 250 { 251 251 return m_ptr; 252 252 } 253 253 254 inline bool JSValue Ptr::operator==(const JSValuePtrother) const254 inline bool JSValue::operator==(const JSValue other) const 255 255 { 256 256 return m_ptr == other.m_ptr; 257 257 } 258 258 259 inline bool JSValue Ptr::operator!=(const JSValuePtrother) const259 inline bool JSValue::operator!=(const JSValue other) const 260 260 { 261 261 return m_ptr != other.m_ptr; 262 262 } 263 263 264 inline bool JSValue Ptr::isUndefined() const264 inline bool JSValue::isUndefined() const 265 265 { 266 266 return asValue() == jsUndefined(); 267 267 } 268 268 269 inline bool JSValue Ptr::isNull() const269 inline bool JSValue::isNull() const 270 270 { 271 271 return asValue() == jsNull(); -
trunk/JavaScriptCore/runtime/JSVariableObject.h
r39670 r43122 47 47 SymbolTable& symbolTable() const { return *d->symbolTable; } 48 48 49 virtual void putWithAttributes(ExecState*, const Identifier&, JSValue Ptr, unsigned attributes) = 0;49 virtual void putWithAttributes(ExecState*, const Identifier&, JSValue, unsigned attributes) = 0; 50 50 51 51 virtual bool deleteProperty(ExecState*, const Identifier&); … … 91 91 bool symbolTableGet(const Identifier&, PropertySlot&); 92 92 bool symbolTableGet(const Identifier&, PropertySlot&, bool& slotIsWriteable); 93 bool symbolTablePut(const Identifier&, JSValue Ptr);94 bool symbolTablePutWithAttributes(const Identifier&, JSValue Ptr, unsigned attributes);93 bool symbolTablePut(const Identifier&, JSValue); 94 bool symbolTablePutWithAttributes(const Identifier&, JSValue, unsigned attributes); 95 95 96 96 JSVariableObjectData* d; … … 118 118 } 119 119 120 inline bool JSVariableObject::symbolTablePut(const Identifier& propertyName, JSValue Ptrvalue)120 inline bool JSVariableObject::symbolTablePut(const Identifier& propertyName, JSValue value) 121 121 { 122 122 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); … … 131 131 } 132 132 133 inline bool JSVariableObject::symbolTablePutWithAttributes(const Identifier& propertyName, JSValue Ptrvalue, unsigned attributes)133 inline bool JSVariableObject::symbolTablePutWithAttributes(const Identifier& propertyName, JSValue value, unsigned attributes) 134 134 { 135 135 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); -
trunk/JavaScriptCore/runtime/JSWrapperObject.h
r40046 r43122 34 34 35 35 public: 36 JSValue PtrinternalValue() const { return m_internalValue; }37 void setInternalValue(JSValue Ptr);36 JSValue internalValue() const { return m_internalValue; } 37 void setInternalValue(JSValue); 38 38 39 39 virtual void mark(); 40 40 41 41 private: 42 JSValue Ptrm_internalValue;42 JSValue m_internalValue; 43 43 }; 44 44 … … 49 49 } 50 50 51 inline void JSWrapperObject::setInternalValue(JSValue Ptrvalue)51 inline void JSWrapperObject::setInternalValue(JSValue value) 52 52 { 53 53 ASSERT(value); -
trunk/JavaScriptCore/runtime/Lookup.cpp
r42606 r43122 67 67 { 68 68 ASSERT(entry->attributes() & Function); 69 JSValue Ptr* location = thisObj->getDirectLocation(propertyName);69 JSValue* location = thisObj->getDirectLocation(propertyName); 70 70 71 71 if (!location) { -
trunk/JavaScriptCore/runtime/Lookup.h
r42606 r43122 42 42 43 43 // FIXME: There is no reason this get function can't be simpler. 44 // ie. typedef JSValue Ptr(*GetFunction)(ExecState*, JSObject* baseObject)44 // ie. typedef JSValue (*GetFunction)(ExecState*, JSObject* baseObject) 45 45 typedef PropertySlot::GetValueFunc GetFunction; 46 typedef void (*PutFunction)(ExecState*, JSObject* baseObject, JSValue Ptrvalue);46 typedef void (*PutFunction)(ExecState*, JSObject* baseObject, JSValue value); 47 47 48 48 class HashEntry { … … 224 224 */ 225 225 template <class ThisImp> 226 inline bool lookupPut(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, const HashTable* table, ThisImp* thisObj)226 inline bool lookupPut(ExecState* exec, const Identifier& propertyName, JSValue value, const HashTable* table, ThisImp* thisObj) 227 227 { 228 228 const HashEntry* entry = table->entry(exec, propertyName); … … 246 246 */ 247 247 template <class ThisImp, class ParentImp> 248 inline void lookupPut(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, const HashTable* table, ThisImp* thisObj, PutPropertySlot& slot)248 inline void lookupPut(ExecState* exec, const Identifier& propertyName, JSValue value, const HashTable* table, ThisImp* thisObj, PutPropertySlot& slot) 249 249 { 250 250 if (!lookupPut<ThisImp>(exec, propertyName, value, table, thisObj)) -
trunk/JavaScriptCore/runtime/MathObject.cpp
r42989 r43122 34 34 ASSERT_CLASS_FITS_IN_CELL(MathObject); 35 35 36 static JSValue Ptr mathProtoFuncAbs(ExecState*, JSObject*, JSValuePtr, const ArgList&);37 static JSValue Ptr mathProtoFuncACos(ExecState*, JSObject*, JSValuePtr, const ArgList&);38 static JSValue Ptr mathProtoFuncASin(ExecState*, JSObject*, JSValuePtr, const ArgList&);39 static JSValue Ptr mathProtoFuncATan(ExecState*, JSObject*, JSValuePtr, const ArgList&);40 static JSValue Ptr mathProtoFuncATan2(ExecState*, JSObject*, JSValuePtr, const ArgList&);41 static JSValue Ptr mathProtoFuncCeil(ExecState*, JSObject*, JSValuePtr, const ArgList&);42 static JSValue Ptr mathProtoFuncCos(ExecState*, JSObject*, JSValuePtr, const ArgList&);43 static JSValue Ptr mathProtoFuncExp(ExecState*, JSObject*, JSValuePtr, const ArgList&);44 static JSValue Ptr mathProtoFuncFloor(ExecState*, JSObject*, JSValuePtr, const ArgList&);45 static JSValue Ptr mathProtoFuncLog(ExecState*, JSObject*, JSValuePtr, const ArgList&);46 static JSValue Ptr mathProtoFuncMax(ExecState*, JSObject*, JSValuePtr, const ArgList&);47 static JSValue Ptr mathProtoFuncMin(ExecState*, JSObject*, JSValuePtr, const ArgList&);48 static JSValue Ptr mathProtoFuncPow(ExecState*, JSObject*, JSValuePtr, const ArgList&);49 static JSValue Ptr mathProtoFuncRandom(ExecState*, JSObject*, JSValuePtr, const ArgList&);50 static JSValue Ptr mathProtoFuncRound(ExecState*, JSObject*, JSValuePtr, const ArgList&);51 static JSValue Ptr mathProtoFuncSin(ExecState*, JSObject*, JSValuePtr, const ArgList&);52 static JSValue Ptr mathProtoFuncSqrt(ExecState*, JSObject*, JSValuePtr, const ArgList&);53 static JSValue Ptr mathProtoFuncTan(ExecState*, JSObject*, JSValuePtr, const ArgList&);36 static JSValue mathProtoFuncAbs(ExecState*, JSObject*, JSValue, const ArgList&); 37 static JSValue mathProtoFuncACos(ExecState*, JSObject*, JSValue, const ArgList&); 38 static JSValue mathProtoFuncASin(ExecState*, JSObject*, JSValue, const ArgList&); 39 static JSValue mathProtoFuncATan(ExecState*, JSObject*, JSValue, const ArgList&); 40 static JSValue mathProtoFuncATan2(ExecState*, JSObject*, JSValue, const ArgList&); 41 static JSValue mathProtoFuncCeil(ExecState*, JSObject*, JSValue, const ArgList&); 42 static JSValue mathProtoFuncCos(ExecState*, JSObject*, JSValue, const ArgList&); 43 static JSValue mathProtoFuncExp(ExecState*, JSObject*, JSValue, const ArgList&); 44 static JSValue mathProtoFuncFloor(ExecState*, JSObject*, JSValue, const ArgList&); 45 static JSValue mathProtoFuncLog(ExecState*, JSObject*, JSValue, const ArgList&); 46 static JSValue mathProtoFuncMax(ExecState*, JSObject*, JSValue, const ArgList&); 47 static JSValue mathProtoFuncMin(ExecState*, JSObject*, JSValue, const ArgList&); 48 static JSValue mathProtoFuncPow(ExecState*, JSObject*, JSValue, const ArgList&); 49 static JSValue mathProtoFuncRandom(ExecState*, JSObject*, JSValue, const ArgList&); 50 static JSValue mathProtoFuncRound(ExecState*, JSObject*, JSValue, const ArgList&); 51 static JSValue mathProtoFuncSin(ExecState*, JSObject*, JSValue, const ArgList&); 52 static JSValue mathProtoFuncSqrt(ExecState*, JSObject*, JSValue, const ArgList&); 53 static JSValue mathProtoFuncTan(ExecState*, JSObject*, JSValue, const ArgList&); 54 54 55 55 } … … 116 116 // ------------------------------ Functions -------------------------------- 117 117 118 JSValue Ptr mathProtoFuncAbs(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)118 JSValue mathProtoFuncAbs(ExecState* exec, JSObject*, JSValue, const ArgList& args) 119 119 { 120 120 return jsNumber(exec, fabs(args.at(0).toNumber(exec))); 121 121 } 122 122 123 JSValue Ptr mathProtoFuncACos(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)123 JSValue mathProtoFuncACos(ExecState* exec, JSObject*, JSValue, const ArgList& args) 124 124 { 125 125 return jsNumber(exec, acos(args.at(0).toNumber(exec))); 126 126 } 127 127 128 JSValue Ptr mathProtoFuncASin(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)128 JSValue mathProtoFuncASin(ExecState* exec, JSObject*, JSValue, const ArgList& args) 129 129 { 130 130 return jsNumber(exec, asin(args.at(0).toNumber(exec))); 131 131 } 132 132 133 JSValue Ptr mathProtoFuncATan(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)133 JSValue mathProtoFuncATan(ExecState* exec, JSObject*, JSValue, const ArgList& args) 134 134 { 135 135 return jsNumber(exec, atan(args.at(0).toNumber(exec))); 136 136 } 137 137 138 JSValue Ptr mathProtoFuncATan2(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)138 JSValue mathProtoFuncATan2(ExecState* exec, JSObject*, JSValue, const ArgList& args) 139 139 { 140 140 return jsNumber(exec, atan2(args.at(0).toNumber(exec), args.at(1).toNumber(exec))); 141 141 } 142 142 143 JSValue Ptr mathProtoFuncCeil(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)143 JSValue mathProtoFuncCeil(ExecState* exec, JSObject*, JSValue, const ArgList& args) 144 144 { 145 145 return jsNumber(exec, ceil(args.at(0).toNumber(exec))); 146 146 } 147 147 148 JSValue Ptr mathProtoFuncCos(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)148 JSValue mathProtoFuncCos(ExecState* exec, JSObject*, JSValue, const ArgList& args) 149 149 { 150 150 return jsNumber(exec, cos(args.at(0).toNumber(exec))); 151 151 } 152 152 153 JSValue Ptr mathProtoFuncExp(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)153 JSValue mathProtoFuncExp(ExecState* exec, JSObject*, JSValue, const ArgList& args) 154 154 { 155 155 return jsNumber(exec, exp(args.at(0).toNumber(exec))); 156 156 } 157 157 158 JSValue Ptr mathProtoFuncFloor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)158 JSValue mathProtoFuncFloor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 159 159 { 160 160 return jsNumber(exec, floor(args.at(0).toNumber(exec))); 161 161 } 162 162 163 JSValue Ptr mathProtoFuncLog(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)163 JSValue mathProtoFuncLog(ExecState* exec, JSObject*, JSValue, const ArgList& args) 164 164 { 165 165 return jsNumber(exec, log(args.at(0).toNumber(exec))); 166 166 } 167 167 168 JSValue Ptr mathProtoFuncMax(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)168 JSValue mathProtoFuncMax(ExecState* exec, JSObject*, JSValue, const ArgList& args) 169 169 { 170 170 unsigned argsCount = args.size(); … … 182 182 } 183 183 184 JSValue Ptr mathProtoFuncMin(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)184 JSValue mathProtoFuncMin(ExecState* exec, JSObject*, JSValue, const ArgList& args) 185 185 { 186 186 unsigned argsCount = args.size(); … … 198 198 } 199 199 200 JSValue Ptr mathProtoFuncPow(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)200 JSValue mathProtoFuncPow(ExecState* exec, JSObject*, JSValue, const ArgList& args) 201 201 { 202 202 // ECMA 15.8.2.1.13 … … 212 212 } 213 213 214 JSValue Ptr mathProtoFuncRandom(ExecState* exec, JSObject*, JSValuePtr, const ArgList&)214 JSValue mathProtoFuncRandom(ExecState* exec, JSObject*, JSValue, const ArgList&) 215 215 { 216 216 return jsNumber(exec, WTF::weakRandomNumber()); 217 217 } 218 218 219 JSValue Ptr mathProtoFuncRound(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)219 JSValue mathProtoFuncRound(ExecState* exec, JSObject*, JSValue, const ArgList& args) 220 220 { 221 221 double arg = args.at(0).toNumber(exec); … … 225 225 } 226 226 227 JSValue Ptr mathProtoFuncSin(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)227 JSValue mathProtoFuncSin(ExecState* exec, JSObject*, JSValue, const ArgList& args) 228 228 { 229 229 return jsNumber(exec, sin(args.at(0).toNumber(exec))); 230 230 } 231 231 232 JSValue Ptr mathProtoFuncSqrt(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)232 JSValue mathProtoFuncSqrt(ExecState* exec, JSObject*, JSValue, const ArgList& args) 233 233 { 234 234 return jsNumber(exec, sqrt(args.at(0).toNumber(exec))); 235 235 } 236 236 237 JSValue Ptr mathProtoFuncTan(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)237 JSValue mathProtoFuncTan(ExecState* exec, JSObject*, JSValue, const ArgList& args) 238 238 { 239 239 return jsNumber(exec, tan(args.at(0).toNumber(exec))); -
trunk/JavaScriptCore/runtime/MathObject.h
r39670 r43122 35 35 static const ClassInfo info; 36 36 37 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)37 static PassRefPtr<Structure> createStructure(JSValue prototype) 38 38 { 39 39 return Structure::create(prototype, TypeInfo(ObjectType)); -
trunk/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r42989 r43122 60 60 } 61 61 62 static JSValue Ptr callNativeErrorConstructor(ExecState* exec, JSObject* constructor, JSValuePtr, const ArgList& args)62 static JSValue callNativeErrorConstructor(ExecState* exec, JSObject* constructor, JSValue, const ArgList& args) 63 63 { 64 64 return static_cast<NativeErrorConstructor*>(constructor)->construct(exec, args); -
trunk/JavaScriptCore/runtime/NumberConstructor.cpp
r42989 r43122 30 30 ASSERT_CLASS_FITS_IN_CELL(NumberConstructor); 31 31 32 static JSValue PtrnumberConstructorNaNValue(ExecState*, const Identifier&, const PropertySlot&);33 static JSValue PtrnumberConstructorNegInfinity(ExecState*, const Identifier&, const PropertySlot&);34 static JSValue PtrnumberConstructorPosInfinity(ExecState*, const Identifier&, const PropertySlot&);35 static JSValue PtrnumberConstructorMaxValue(ExecState*, const Identifier&, const PropertySlot&);36 static JSValue PtrnumberConstructorMinValue(ExecState*, const Identifier&, const PropertySlot&);32 static JSValue numberConstructorNaNValue(ExecState*, const Identifier&, const PropertySlot&); 33 static JSValue numberConstructorNegInfinity(ExecState*, const Identifier&, const PropertySlot&); 34 static JSValue numberConstructorPosInfinity(ExecState*, const Identifier&, const PropertySlot&); 35 static JSValue numberConstructorMaxValue(ExecState*, const Identifier&, const PropertySlot&); 36 static JSValue numberConstructorMinValue(ExecState*, const Identifier&, const PropertySlot&); 37 37 38 38 } // namespace JSC … … 69 69 } 70 70 71 static JSValue PtrnumberConstructorNaNValue(ExecState* exec, const Identifier&, const PropertySlot&)71 static JSValue numberConstructorNaNValue(ExecState* exec, const Identifier&, const PropertySlot&) 72 72 { 73 73 return jsNaN(exec); 74 74 } 75 75 76 static JSValue PtrnumberConstructorNegInfinity(ExecState* exec, const Identifier&, const PropertySlot&)76 static JSValue numberConstructorNegInfinity(ExecState* exec, const Identifier&, const PropertySlot&) 77 77 { 78 78 return jsNumber(exec, -Inf); 79 79 } 80 80 81 static JSValue PtrnumberConstructorPosInfinity(ExecState* exec, const Identifier&, const PropertySlot&)81 static JSValue numberConstructorPosInfinity(ExecState* exec, const Identifier&, const PropertySlot&) 82 82 { 83 83 return jsNumber(exec, Inf); 84 84 } 85 85 86 static JSValue PtrnumberConstructorMaxValue(ExecState* exec, const Identifier&, const PropertySlot&)86 static JSValue numberConstructorMaxValue(ExecState* exec, const Identifier&, const PropertySlot&) 87 87 { 88 88 return jsNumber(exec, 1.7976931348623157E+308); 89 89 } 90 90 91 static JSValue PtrnumberConstructorMinValue(ExecState* exec, const Identifier&, const PropertySlot&)91 static JSValue numberConstructorMinValue(ExecState* exec, const Identifier&, const PropertySlot&) 92 92 { 93 93 return jsNumber(exec, 5E-324); … … 110 110 111 111 // ECMA 15.7.2 112 static JSValue Ptr callNumberConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)112 static JSValue callNumberConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 113 113 { 114 114 return jsNumber(exec, args.isEmpty() ? 0 : args.at(0).toNumber(exec)); -
trunk/JavaScriptCore/runtime/NumberConstructor.h
r39670 r43122 33 33 34 34 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 35 JSValue PtrgetValueProperty(ExecState*, int token) const;35 JSValue getValueProperty(ExecState*, int token) const; 36 36 37 37 static const ClassInfo info; 38 38 39 static PassRefPtr<Structure> createStructure(JSValue Ptrproto)39 static PassRefPtr<Structure> createStructure(JSValue proto) 40 40 { 41 41 return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); -
trunk/JavaScriptCore/runtime/NumberObject.cpp
r39958 r43122 37 37 } 38 38 39 JSValue PtrNumberObject::getJSNumber()39 JSValue NumberObject::getJSNumber() 40 40 { 41 41 return internalValue(); 42 42 } 43 43 44 NumberObject* constructNumber(ExecState* exec, JSValue Ptrnumber)44 NumberObject* constructNumber(ExecState* exec, JSValue number) 45 45 { 46 46 NumberObject* object = new (exec) NumberObject(exec->lexicalGlobalObject()->numberObjectStructure()); -
trunk/JavaScriptCore/runtime/NumberObject.h
r39958 r43122 35 35 virtual const ClassInfo* classInfo() const { return &info; } 36 36 37 virtual JSValue PtrgetJSNumber();37 virtual JSValue getJSNumber(); 38 38 }; 39 39 40 NumberObject* constructNumber(ExecState*, JSValue Ptr);40 NumberObject* constructNumber(ExecState*, JSValue); 41 41 42 42 } // namespace JSC -
trunk/JavaScriptCore/runtime/NumberPrototype.cpp
r42989 r43122 36 36 ASSERT_CLASS_FITS_IN_CELL(NumberPrototype); 37 37 38 static JSValue Ptr numberProtoFuncToString(ExecState*, JSObject*, JSValuePtr, const ArgList&);39 static JSValue Ptr numberProtoFuncToLocaleString(ExecState*, JSObject*, JSValuePtr, const ArgList&);40 static JSValue Ptr numberProtoFuncValueOf(ExecState*, JSObject*, JSValuePtr, const ArgList&);41 static JSValue Ptr numberProtoFuncToFixed(ExecState*, JSObject*, JSValuePtr, const ArgList&);42 static JSValue Ptr numberProtoFuncToExponential(ExecState*, JSObject*, JSValuePtr, const ArgList&);43 static JSValue Ptr numberProtoFuncToPrecision(ExecState*, JSObject*, JSValuePtr, const ArgList&);38 static JSValue numberProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 39 static JSValue numberProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&); 40 static JSValue numberProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&); 41 static JSValue numberProtoFuncToFixed(ExecState*, JSObject*, JSValue, const ArgList&); 42 static JSValue numberProtoFuncToExponential(ExecState*, JSObject*, JSValue, const ArgList&); 43 static JSValue numberProtoFuncToPrecision(ExecState*, JSObject*, JSValue, const ArgList&); 44 44 45 45 // ECMA 15.7.4 … … 134 134 } 135 135 136 JSValue Ptr numberProtoFuncToString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)137 { 138 JSValue Ptrv = thisValue.getJSNumber();136 JSValue numberProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 137 { 138 JSValue v = thisValue.getJSNumber(); 139 139 if (!v) 140 140 return throwError(exec, TypeError); … … 198 198 } 199 199 200 JSValue Ptr numberProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)200 JSValue numberProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 201 201 { 202 202 // FIXME: Not implemented yet. 203 203 204 JSValue Ptrv = thisValue.getJSNumber();204 JSValue v = thisValue.getJSNumber(); 205 205 if (!v) 206 206 return throwError(exec, TypeError); … … 209 209 } 210 210 211 JSValue Ptr numberProtoFuncValueOf(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)212 { 213 JSValue Ptrv = thisValue.getJSNumber();211 JSValue numberProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 212 { 213 JSValue v = thisValue.getJSNumber(); 214 214 if (!v) 215 215 return throwError(exec, TypeError); … … 218 218 } 219 219 220 JSValue Ptr numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)221 { 222 JSValue Ptrv = thisValue.getJSNumber();223 if (!v) 224 return throwError(exec, TypeError); 225 226 JSValue PtrfractionDigits = args.at(0);220 JSValue numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 221 { 222 JSValue v = thisValue.getJSNumber(); 223 if (!v) 224 return throwError(exec, TypeError); 225 226 JSValue fractionDigits = args.at(0); 227 227 double df = fractionDigits.toInteger(exec); 228 228 if (!(df >= 0 && df <= 20)) … … 303 303 } 304 304 305 JSValue Ptr numberProtoFuncToExponential(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)306 { 307 JSValue Ptrv = thisValue.getJSNumber();305 JSValue numberProtoFuncToExponential(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 306 { 307 JSValue v = thisValue.getJSNumber(); 308 308 if (!v) 309 309 return throwError(exec, TypeError); … … 314 314 return jsString(exec, UString::from(x)); 315 315 316 JSValue PtrfractionalDigitsValue = args.at(0);316 JSValue fractionalDigitsValue = args.at(0); 317 317 double df = fractionalDigitsValue.toInteger(exec); 318 318 if (!(df >= 0 && df <= 20)) … … 373 373 } 374 374 375 JSValue Ptr numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)376 { 377 JSValue Ptrv = thisValue.getJSNumber();375 JSValue numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 376 { 377 JSValue v = thisValue.getJSNumber(); 378 378 if (!v) 379 379 return throwError(exec, TypeError); -
trunk/JavaScriptCore/runtime/ObjectConstructor.cpp
r42989 r43122 42 42 static ALWAYS_INLINE JSObject* constructObject(ExecState* exec, const ArgList& args) 43 43 { 44 JSValue Ptrarg = args.at(0);44 JSValue arg = args.at(0); 45 45 if (arg.isUndefinedOrNull()) 46 46 return new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure()); … … 59 59 } 60 60 61 static JSValue Ptr callObjectConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)61 static JSValue callObjectConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 62 62 { 63 63 return constructObject(exec, args); -
trunk/JavaScriptCore/runtime/ObjectPrototype.cpp
r42989 r43122 30 30 ASSERT_CLASS_FITS_IN_CELL(ObjectPrototype); 31 31 32 static JSValue Ptr objectProtoFuncValueOf(ExecState*, JSObject*, JSValuePtr, const ArgList&);33 static JSValue Ptr objectProtoFuncHasOwnProperty(ExecState*, JSObject*, JSValuePtr, const ArgList&);34 static JSValue Ptr objectProtoFuncIsPrototypeOf(ExecState*, JSObject*, JSValuePtr, const ArgList&);35 static JSValue Ptr objectProtoFuncDefineGetter(ExecState*, JSObject*, JSValuePtr, const ArgList&);36 static JSValue Ptr objectProtoFuncDefineSetter(ExecState*, JSObject*, JSValuePtr, const ArgList&);37 static JSValue Ptr objectProtoFuncLookupGetter(ExecState*, JSObject*, JSValuePtr, const ArgList&);38 static JSValue Ptr objectProtoFuncLookupSetter(ExecState*, JSObject*, JSValuePtr, const ArgList&);39 static JSValue Ptr objectProtoFuncPropertyIsEnumerable(ExecState*, JSObject*, JSValuePtr, const ArgList&);40 static JSValue Ptr objectProtoFuncToLocaleString(ExecState*, JSObject*, JSValuePtr, const ArgList&);32 static JSValue objectProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&); 33 static JSValue objectProtoFuncHasOwnProperty(ExecState*, JSObject*, JSValue, const ArgList&); 34 static JSValue objectProtoFuncIsPrototypeOf(ExecState*, JSObject*, JSValue, const ArgList&); 35 static JSValue objectProtoFuncDefineGetter(ExecState*, JSObject*, JSValue, const ArgList&); 36 static JSValue objectProtoFuncDefineSetter(ExecState*, JSObject*, JSValue, const ArgList&); 37 static JSValue objectProtoFuncLookupGetter(ExecState*, JSObject*, JSValue, const ArgList&); 38 static JSValue objectProtoFuncLookupSetter(ExecState*, JSObject*, JSValue, const ArgList&); 39 static JSValue objectProtoFuncPropertyIsEnumerable(ExecState*, JSObject*, JSValue, const ArgList&); 40 static JSValue objectProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&); 41 41 42 42 ObjectPrototype::ObjectPrototype(ExecState* exec, PassRefPtr<Structure> stucture, Structure* prototypeFunctionStructure) … … 61 61 // ECMA 15.2.4.2, 15.2.4.4, 15.2.4.5, 15.2.4.7 62 62 63 JSValue Ptr objectProtoFuncValueOf(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)63 JSValue objectProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 64 64 { 65 65 return thisValue.toThisObject(exec); 66 66 } 67 67 68 JSValue Ptr objectProtoFuncHasOwnProperty(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)68 JSValue objectProtoFuncHasOwnProperty(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 69 69 { 70 70 return jsBoolean(thisValue.toThisObject(exec)->hasOwnProperty(exec, Identifier(exec, args.at(0).toString(exec)))); 71 71 } 72 72 73 JSValue Ptr objectProtoFuncIsPrototypeOf(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)73 JSValue objectProtoFuncIsPrototypeOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 74 74 { 75 75 JSObject* thisObj = thisValue.toThisObject(exec); … … 78 78 return jsBoolean(false); 79 79 80 JSValue Ptrv = asObject(args.at(0))->prototype();80 JSValue v = asObject(args.at(0))->prototype(); 81 81 82 82 while (true) { … … 90 90 } 91 91 92 JSValue Ptr objectProtoFuncDefineGetter(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)92 JSValue objectProtoFuncDefineGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 93 93 { 94 94 CallData callData; … … 99 99 } 100 100 101 JSValue Ptr objectProtoFuncDefineSetter(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)101 JSValue objectProtoFuncDefineSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 102 102 { 103 103 CallData callData; … … 108 108 } 109 109 110 JSValue Ptr objectProtoFuncLookupGetter(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)110 JSValue objectProtoFuncLookupGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 111 111 { 112 112 return thisValue.toThisObject(exec)->lookupGetter(exec, Identifier(exec, args.at(0).toString(exec))); 113 113 } 114 114 115 JSValue Ptr objectProtoFuncLookupSetter(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)115 JSValue objectProtoFuncLookupSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 116 116 { 117 117 return thisValue.toThisObject(exec)->lookupSetter(exec, Identifier(exec, args.at(0).toString(exec))); 118 118 } 119 119 120 JSValue Ptr objectProtoFuncPropertyIsEnumerable(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)120 JSValue objectProtoFuncPropertyIsEnumerable(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 121 121 { 122 122 return jsBoolean(thisValue.toThisObject(exec)->propertyIsEnumerable(exec, Identifier(exec, args.at(0).toString(exec)))); 123 123 } 124 124 125 JSValue Ptr objectProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)125 JSValue objectProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 126 126 { 127 127 return thisValue.toThisJSString(exec); 128 128 } 129 129 130 JSValue Ptr objectProtoFuncToString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)130 JSValue objectProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 131 131 { 132 132 return jsNontrivialString(exec, "[object " + thisValue.toThisObject(exec)->className() + "]"); -
trunk/JavaScriptCore/runtime/ObjectPrototype.h
r39670 r43122 31 31 }; 32 32 33 JSValue Ptr objectProtoFuncToString(ExecState*, JSObject*, JSValuePtr, const ArgList&);33 JSValue objectProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 34 34 35 35 } // namespace JSC -
trunk/JavaScriptCore/runtime/Operations.cpp
r41100 r43122 36 36 namespace JSC { 37 37 38 bool JSValue Ptr::equalSlowCase(ExecState* exec, JSValuePtr v1, JSValuePtrv2)38 bool JSValue::equalSlowCase(ExecState* exec, JSValue v1, JSValue v2) 39 39 { 40 40 return equalSlowCaseInline(exec, v1, v2); 41 41 } 42 42 43 bool JSValue Ptr::strictEqualSlowCase(JSValuePtr v1, JSValuePtrv2)43 bool JSValue::strictEqualSlowCase(JSValue v1, JSValue v2) 44 44 { 45 45 return strictEqualSlowCaseInline(v1, v2); 46 46 } 47 47 48 NEVER_INLINE JSValue PtrthrowOutOfMemoryError(ExecState* exec)48 NEVER_INLINE JSValue throwOutOfMemoryError(ExecState* exec) 49 49 { 50 50 JSObject* error = Error::create(exec, GeneralError, "Out of memory"); … … 53 53 } 54 54 55 NEVER_INLINE JSValue Ptr jsAddSlowCase(CallFrame* callFrame, JSValuePtr v1, JSValuePtrv2)55 NEVER_INLINE JSValue jsAddSlowCase(CallFrame* callFrame, JSValue v1, JSValue v2) 56 56 { 57 57 // exception for the Date exception in defaultValue() 58 JSValue Ptrp1 = v1.toPrimitive(callFrame);59 JSValue Ptrp2 = v2.toPrimitive(callFrame);58 JSValue p1 = v1.toPrimitive(callFrame); 59 JSValue p2 = v2.toPrimitive(callFrame); 60 60 61 61 if (p1.isString() || p2.isString()) { … … 69 69 } 70 70 71 JSValue Ptr jsTypeStringForValue(CallFrame* callFrame, JSValuePtrv)71 JSValue jsTypeStringForValue(CallFrame* callFrame, JSValue v) 72 72 { 73 73 if (v.isUndefined()) … … 91 91 } 92 92 93 bool jsIsObjectType(JSValue Ptrv)93 bool jsIsObjectType(JSValue v) 94 94 { 95 95 if (!v.isCell()) … … 109 109 } 110 110 111 bool jsIsFunctionType(JSValue Ptrv)111 bool jsIsFunctionType(JSValue v) 112 112 { 113 113 if (v.isObject()) { -
trunk/JavaScriptCore/runtime/Operations.h
r41232 r43122 30 30 namespace JSC { 31 31 32 NEVER_INLINE JSValue PtrthrowOutOfMemoryError(ExecState*);33 NEVER_INLINE JSValue Ptr jsAddSlowCase(CallFrame*, JSValuePtr, JSValuePtr);34 JSValue Ptr jsTypeStringForValue(CallFrame*, JSValuePtr);35 bool jsIsObjectType(JSValue Ptr);36 bool jsIsFunctionType(JSValue Ptr);32 NEVER_INLINE JSValue throwOutOfMemoryError(ExecState*); 33 NEVER_INLINE JSValue jsAddSlowCase(CallFrame*, JSValue, JSValue); 34 JSValue jsTypeStringForValue(CallFrame*, JSValue); 35 bool jsIsObjectType(JSValue); 36 bool jsIsFunctionType(JSValue); 37 37 38 38 // ECMA 11.9.3 39 inline bool JSValue Ptr::equal(ExecState* exec, JSValuePtr v1, JSValuePtrv2)39 inline bool JSValue::equal(ExecState* exec, JSValue v1, JSValue v2) 40 40 { 41 41 if (JSImmediate::areBothImmediateIntegerNumbers(v1, v2)) … … 45 45 } 46 46 47 ALWAYS_INLINE bool JSValue Ptr::equalSlowCaseInline(ExecState* exec, JSValuePtr v1, JSValuePtrv2)47 ALWAYS_INLINE bool JSValue::equalSlowCaseInline(ExecState* exec, JSValue v1, JSValue v2) 48 48 { 49 49 ASSERT(!JSImmediate::areBothImmediateIntegerNumbers(v1, v2)); … … 75 75 if (v2.isObject()) 76 76 return v1 == v2; 77 JSValue Ptrp1 = v1.toPrimitive(exec);77 JSValue p1 = v1.toPrimitive(exec); 78 78 if (exec->hadException()) 79 79 return false; … … 85 85 86 86 if (v2.isObject()) { 87 JSValue Ptrp2 = v2.toPrimitive(exec);87 JSValue p2 = v2.toPrimitive(exec); 88 88 if (exec->hadException()) 89 89 return false; … … 113 113 114 114 // ECMA 11.9.3 115 inline bool JSValue Ptr::strictEqual(JSValuePtr v1, JSValuePtrv2)115 inline bool JSValue::strictEqual(JSValue v1, JSValue v2) 116 116 { 117 117 if (JSImmediate::areBothImmediateIntegerNumbers(v1, v2)) … … 127 127 } 128 128 129 ALWAYS_INLINE bool JSValue Ptr::strictEqualSlowCaseInline(JSValuePtr v1, JSValuePtrv2)129 ALWAYS_INLINE bool JSValue::strictEqualSlowCaseInline(JSValue v1, JSValue v2) 130 130 { 131 131 ASSERT(!JSImmediate::isEitherImmediate(v1, v2)); … … 137 137 } 138 138 139 inline bool jsLess(CallFrame* callFrame, JSValue Ptr v1, JSValuePtrv2)140 { 141 if (JSValue Ptr::areBothInt32Fast(v1, v2))139 inline bool jsLess(CallFrame* callFrame, JSValue v1, JSValue v2) 140 { 141 if (JSValue::areBothInt32Fast(v1, v2)) 142 142 return v1.getInt32Fast() < v2.getInt32Fast(); 143 143 … … 151 151 return asString(v1)->value() < asString(v2)->value(); 152 152 153 JSValue Ptrp1;154 JSValue Ptrp2;153 JSValue p1; 154 JSValue p2; 155 155 bool wasNotString1 = v1.getPrimitiveNumber(callFrame, n1, p1); 156 156 bool wasNotString2 = v2.getPrimitiveNumber(callFrame, n2, p2); … … 162 162 } 163 163 164 inline bool jsLessEq(CallFrame* callFrame, JSValue Ptr v1, JSValuePtrv2)165 { 166 if (JSValue Ptr::areBothInt32Fast(v1, v2))164 inline bool jsLessEq(CallFrame* callFrame, JSValue v1, JSValue v2) 165 { 166 if (JSValue::areBothInt32Fast(v1, v2)) 167 167 return v1.getInt32Fast() <= v2.getInt32Fast(); 168 168 … … 176 176 return !(asString(v2)->value() < asString(v1)->value()); 177 177 178 JSValue Ptrp1;179 JSValue Ptrp2;178 JSValue p1; 179 JSValue p2; 180 180 bool wasNotString1 = v1.getPrimitiveNumber(callFrame, n1, p1); 181 181 bool wasNotString2 = v2.getPrimitiveNumber(callFrame, n2, p2); … … 196 196 // 4000 Add case: 3 5 197 197 198 ALWAYS_INLINE JSValue Ptr jsAdd(CallFrame* callFrame, JSValuePtr v1, JSValuePtrv2)198 ALWAYS_INLINE JSValue jsAdd(CallFrame* callFrame, JSValue v1, JSValue v2) 199 199 { 200 200 double left; … … 227 227 } 228 228 229 inline size_t countPrototypeChainEntriesAndCheckForProxies(CallFrame* callFrame, JSValue PtrbaseValue, const PropertySlot& slot)229 inline size_t countPrototypeChainEntriesAndCheckForProxies(CallFrame* callFrame, JSValue baseValue, const PropertySlot& slot) 230 230 { 231 231 JSCell* cell = asCell(baseValue); … … 233 233 234 234 while (slot.slotBase() != cell) { 235 JSValue Ptrv = cell->structure()->prototypeForLookup(callFrame);235 JSValue v = cell->structure()->prototypeForLookup(callFrame); 236 236 237 237 // If we didn't find slotBase in baseValue's prototype chain, then baseValue … … 255 255 } 256 256 257 ALWAYS_INLINE JSValue PtrresolveBase(CallFrame* callFrame, Identifier& property, ScopeChainNode* scopeChain)257 ALWAYS_INLINE JSValue resolveBase(CallFrame* callFrame, Identifier& property, ScopeChainNode* scopeChain) 258 258 { 259 259 ScopeChainIterator iter = scopeChain->begin(); -
trunk/JavaScriptCore/runtime/PropertySlot.cpp
r39670 r43122 28 28 namespace JSC { 29 29 30 JSValue PtrPropertySlot::functionGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)30 JSValue PropertySlot::functionGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) 31 31 { 32 32 // Prevent getter functions from observing execution if an exception is pending. -
trunk/JavaScriptCore/runtime/PropertySlot.h
r42989 r43122 46 46 } 47 47 48 explicit PropertySlot(const JSValue Ptrbase)48 explicit PropertySlot(const JSValue base) 49 49 : m_slotBase(base) 50 50 , m_offset(WTF::notFound) … … 53 53 } 54 54 55 typedef JSValue Ptr(*GetValueFunc)(ExecState*, const Identifier&, const PropertySlot&);56 57 JSValue PtrgetValue(ExecState* exec, const Identifier& propertyName) const55 typedef JSValue (*GetValueFunc)(ExecState*, const Identifier&, const PropertySlot&); 56 57 JSValue getValue(ExecState* exec, const Identifier& propertyName) const 58 58 { 59 59 if (m_getValue == JSC_VALUE_SLOT_MARKER) … … 64 64 } 65 65 66 JSValue PtrgetValue(ExecState* exec, unsigned propertyName) const66 JSValue getValue(ExecState* exec, unsigned propertyName) const 67 67 { 68 68 if (m_getValue == JSC_VALUE_SLOT_MARKER) … … 80 80 } 81 81 82 void putValue(JSValue Ptrvalue)82 void putValue(JSValue value) 83 83 { 84 84 if (m_getValue == JSC_VALUE_SLOT_MARKER) { … … 87 87 } 88 88 ASSERT(m_getValue == JSC_REGISTER_SLOT_MARKER); 89 *m_data.registerSlot = JSValue Ptr(value);90 } 91 92 void setValueSlot(JSValue Ptr* valueSlot)89 *m_data.registerSlot = JSValue(value); 90 } 91 92 void setValueSlot(JSValue* valueSlot) 93 93 { 94 94 ASSERT(valueSlot); … … 98 98 } 99 99 100 void setValueSlot(JSValue Ptr slotBase, JSValuePtr* valueSlot)100 void setValueSlot(JSValue slotBase, JSValue* valueSlot) 101 101 { 102 102 ASSERT(valueSlot); … … 106 106 } 107 107 108 void setValueSlot(JSValue Ptr slotBase, JSValuePtr* valueSlot, size_t offset)108 void setValueSlot(JSValue slotBase, JSValue* valueSlot, size_t offset) 109 109 { 110 110 ASSERT(valueSlot); … … 115 115 } 116 116 117 void setValue(JSValue Ptrvalue)117 void setValue(JSValue value) 118 118 { 119 119 ASSERT(value); … … 132 132 } 133 133 134 void setCustom(JSValue PtrslotBase, GetValueFunc getValue)134 void setCustom(JSValue slotBase, GetValueFunc getValue) 135 135 { 136 136 ASSERT(slotBase); … … 140 140 } 141 141 142 void setCustomIndex(JSValue PtrslotBase, unsigned index, GetValueFunc getValue)142 void setCustomIndex(JSValue slotBase, unsigned index, GetValueFunc getValue) 143 143 { 144 144 ASSERT(slotBase); … … 162 162 } 163 163 164 JSValue PtrslotBase() const164 JSValue slotBase() const 165 165 { 166 166 ASSERT(m_slotBase); … … 168 168 } 169 169 170 void setBase(JSValue Ptrbase)170 void setBase(JSValue base) 171 171 { 172 172 ASSERT(m_slotBase); … … 192 192 193 193 private: 194 static JSValue PtrfunctionGetter(ExecState*, const Identifier&, const PropertySlot&);194 static JSValue functionGetter(ExecState*, const Identifier&, const PropertySlot&); 195 195 196 196 GetValueFunc m_getValue; 197 197 198 JSValue Ptrm_slotBase;198 JSValue m_slotBase; 199 199 union { 200 200 JSObject* getterFunc; 201 JSValue Ptr* valueSlot;201 JSValue* valueSlot; 202 202 Register* registerSlot; 203 203 unsigned index; 204 204 } m_data; 205 205 206 JSValue Ptrm_value;206 JSValue m_value; 207 207 208 208 size_t m_offset; -
trunk/JavaScriptCore/runtime/Protect.h
r40046 r43122 50 50 } 51 51 52 inline void gcProtect(JSValue Ptrvalue)52 inline void gcProtect(JSValue value) 53 53 { 54 54 if (value && value.isCell()) … … 56 56 } 57 57 58 inline void gcUnprotect(JSValue Ptrvalue)58 inline void gcUnprotect(JSValue value) 59 59 { 60 60 if (value && value.isCell()) … … 75 75 T* get() const { return m_ptr; } 76 76 operator T*() const { return m_ptr; } 77 operator JSValue Ptr() const { return JSValuePtr(m_ptr); }77 operator JSValue() const { return JSValue(m_ptr); } 78 78 T* operator->() const { return m_ptr; } 79 79 … … 88 88 }; 89 89 90 class ProtectedJSValue Ptr{90 class ProtectedJSValue { 91 91 public: 92 ProtectedJSValue Ptr() {}93 ProtectedJSValue Ptr(JSValuePtrvalue);94 ProtectedJSValue Ptr(const ProtectedJSValuePtr&);95 ~ProtectedJSValue Ptr();96 97 template <class U> ProtectedJSValue Ptr(const ProtectedPtr<U>&);98 99 JSValue Ptrget() const { return m_value; }100 operator JSValue Ptr() const { return m_value; }101 JSValue Ptroperator->() const { return m_value; }92 ProtectedJSValue() {} 93 ProtectedJSValue(JSValue value); 94 ProtectedJSValue(const ProtectedJSValue&); 95 ~ProtectedJSValue(); 96 97 template <class U> ProtectedJSValue(const ProtectedPtr<U>&); 98 99 JSValue get() const { return m_value; } 100 operator JSValue() const { return m_value; } 101 JSValue operator->() const { return m_value; } 102 102 103 103 operator bool() const { return m_value; } 104 104 bool operator!() const { return !m_value; } 105 105 106 ProtectedJSValue Ptr& operator=(const ProtectedJSValuePtr&);107 ProtectedJSValue Ptr& operator=(JSValuePtr);106 ProtectedJSValue& operator=(const ProtectedJSValue&); 107 ProtectedJSValue& operator=(JSValue); 108 108 109 109 private: 110 JSValue Ptrm_value;110 JSValue m_value; 111 111 }; 112 112 … … 151 151 } 152 152 153 inline ProtectedJSValue Ptr::ProtectedJSValuePtr(JSValuePtrvalue)153 inline ProtectedJSValue::ProtectedJSValue(JSValue value) 154 154 : m_value(value) 155 155 { … … 157 157 } 158 158 159 inline ProtectedJSValue Ptr::ProtectedJSValuePtr(const ProtectedJSValuePtr& o)159 inline ProtectedJSValue::ProtectedJSValue(const ProtectedJSValue& o) 160 160 : m_value(o.get()) 161 161 { … … 163 163 } 164 164 165 inline ProtectedJSValue Ptr::~ProtectedJSValuePtr()165 inline ProtectedJSValue::~ProtectedJSValue() 166 166 { 167 167 gcUnprotect(m_value); 168 168 } 169 169 170 template <class U> ProtectedJSValue Ptr::ProtectedJSValuePtr(const ProtectedPtr<U>& o)170 template <class U> ProtectedJSValue::ProtectedJSValue(const ProtectedPtr<U>& o) 171 171 : m_value(o.get()) 172 172 { … … 174 174 } 175 175 176 inline ProtectedJSValue Ptr& ProtectedJSValuePtr::operator=(const ProtectedJSValuePtr& o)177 { 178 JSValue Ptrovalue = o.m_value;176 inline ProtectedJSValue& ProtectedJSValue::operator=(const ProtectedJSValue& o) 177 { 178 JSValue ovalue = o.m_value; 179 179 gcProtect(ovalue); 180 180 gcUnprotect(m_value); … … 183 183 } 184 184 185 inline ProtectedJSValue Ptr& ProtectedJSValuePtr::operator=(JSValuePtrovalue)185 inline ProtectedJSValue& ProtectedJSValue::operator=(JSValue ovalue) 186 186 { 187 187 gcProtect(ovalue); … … 199 199 template <class T> inline bool operator!=(const T* a, const ProtectedPtr<T>& b) { return a != b.get(); } 200 200 201 inline bool operator==(const ProtectedJSValue Ptr& a, const ProtectedJSValuePtr& b) { return a.get() == b.get(); }202 inline bool operator==(const ProtectedJSValue Ptr& a, const JSValuePtrb) { return a.get() == b; }203 template <class T> inline bool operator==(const ProtectedJSValue Ptr& a, const ProtectedPtr<T>& b) { return a.get() == JSValuePtr(b.get()); }204 inline bool operator==(const JSValue Ptr a, const ProtectedJSValuePtr& b) { return a == b.get(); }205 template <class T> inline bool operator==(const ProtectedPtr<T>& a, const ProtectedJSValue Ptr& b) { return JSValuePtr(a.get()) == b.get(); }206 207 inline bool operator!=(const ProtectedJSValue Ptr& a, const ProtectedJSValuePtr& b) { return a.get() != b.get(); }208 inline bool operator!=(const ProtectedJSValue Ptr& a, const JSValuePtrb) { return a.get() != b; }209 template <class T> inline bool operator!=(const ProtectedJSValue Ptr& a, const ProtectedPtr<T>& b) { return a.get() != JSValuePtr(b.get()); }210 inline bool operator!=(const JSValue Ptr a, const ProtectedJSValuePtr& b) { return a != b.get(); }211 template <class T> inline bool operator!=(const ProtectedPtr<T>& a, const ProtectedJSValue Ptr& b) { return JSValuePtr(a.get()) != b.get(); }201 inline bool operator==(const ProtectedJSValue& a, const ProtectedJSValue& b) { return a.get() == b.get(); } 202 inline bool operator==(const ProtectedJSValue& a, const JSValue b) { return a.get() == b; } 203 template <class T> inline bool operator==(const ProtectedJSValue& a, const ProtectedPtr<T>& b) { return a.get() == JSValue(b.get()); } 204 inline bool operator==(const JSValue a, const ProtectedJSValue& b) { return a == b.get(); } 205 template <class T> inline bool operator==(const ProtectedPtr<T>& a, const ProtectedJSValue& b) { return JSValue(a.get()) == b.get(); } 206 207 inline bool operator!=(const ProtectedJSValue& a, const ProtectedJSValue& b) { return a.get() != b.get(); } 208 inline bool operator!=(const ProtectedJSValue& a, const JSValue b) { return a.get() != b; } 209 template <class T> inline bool operator!=(const ProtectedJSValue& a, const ProtectedPtr<T>& b) { return a.get() != JSValue(b.get()); } 210 inline bool operator!=(const JSValue a, const ProtectedJSValue& b) { return a != b.get(); } 211 template <class T> inline bool operator!=(const ProtectedPtr<T>& a, const ProtectedJSValue& b) { return JSValue(a.get()) != b.get(); } 212 212 213 213 } // namespace JSC -
trunk/JavaScriptCore/runtime/RegExpConstructor.cpp
r42989 r43122 34 34 namespace JSC { 35 35 36 static JSValue PtrregExpConstructorInput(ExecState*, const Identifier&, const PropertySlot&);37 static JSValue PtrregExpConstructorMultiline(ExecState*, const Identifier&, const PropertySlot&);38 static JSValue PtrregExpConstructorLastMatch(ExecState*, const Identifier&, const PropertySlot&);39 static JSValue PtrregExpConstructorLastParen(ExecState*, const Identifier&, const PropertySlot&);40 static JSValue PtrregExpConstructorLeftContext(ExecState*, const Identifier&, const PropertySlot&);41 static JSValue PtrregExpConstructorRightContext(ExecState*, const Identifier&, const PropertySlot&);42 static JSValue PtrregExpConstructorDollar1(ExecState*, const Identifier&, const PropertySlot&);43 static JSValue PtrregExpConstructorDollar2(ExecState*, const Identifier&, const PropertySlot&);44 static JSValue PtrregExpConstructorDollar3(ExecState*, const Identifier&, const PropertySlot&);45 static JSValue PtrregExpConstructorDollar4(ExecState*, const Identifier&, const PropertySlot&);46 static JSValue PtrregExpConstructorDollar5(ExecState*, const Identifier&, const PropertySlot&);47 static JSValue PtrregExpConstructorDollar6(ExecState*, const Identifier&, const PropertySlot&);48 static JSValue PtrregExpConstructorDollar7(ExecState*, const Identifier&, const PropertySlot&);49 static JSValue PtrregExpConstructorDollar8(ExecState*, const Identifier&, const PropertySlot&);50 static JSValue PtrregExpConstructorDollar9(ExecState*, const Identifier&, const PropertySlot&);51 52 static void setRegExpConstructorInput(ExecState*, JSObject*, JSValue Ptr);53 static void setRegExpConstructorMultiline(ExecState*, JSObject*, JSValue Ptr);36 static JSValue regExpConstructorInput(ExecState*, const Identifier&, const PropertySlot&); 37 static JSValue regExpConstructorMultiline(ExecState*, const Identifier&, const PropertySlot&); 38 static JSValue regExpConstructorLastMatch(ExecState*, const Identifier&, const PropertySlot&); 39 static JSValue regExpConstructorLastParen(ExecState*, const Identifier&, const PropertySlot&); 40 static JSValue regExpConstructorLeftContext(ExecState*, const Identifier&, const PropertySlot&); 41 static JSValue regExpConstructorRightContext(ExecState*, const Identifier&, const PropertySlot&); 42 static JSValue regExpConstructorDollar1(ExecState*, const Identifier&, const PropertySlot&); 43 static JSValue regExpConstructorDollar2(ExecState*, const Identifier&, const PropertySlot&); 44 static JSValue regExpConstructorDollar3(ExecState*, const Identifier&, const PropertySlot&); 45 static JSValue regExpConstructorDollar4(ExecState*, const Identifier&, const PropertySlot&); 46 static JSValue regExpConstructorDollar5(ExecState*, const Identifier&, const PropertySlot&); 47 static JSValue regExpConstructorDollar6(ExecState*, const Identifier&, const PropertySlot&); 48 static JSValue regExpConstructorDollar7(ExecState*, const Identifier&, const PropertySlot&); 49 static JSValue regExpConstructorDollar8(ExecState*, const Identifier&, const PropertySlot&); 50 static JSValue regExpConstructorDollar9(ExecState*, const Identifier&, const PropertySlot&); 51 52 static void setRegExpConstructorInput(ExecState*, JSObject*, JSValue); 53 static void setRegExpConstructorMultiline(ExecState*, JSObject*, JSValue); 54 54 55 55 } // namespace JSC … … 186 186 } 187 187 188 JSValue PtrRegExpConstructor::getBackref(ExecState* exec, unsigned i) const188 JSValue RegExpConstructor::getBackref(ExecState* exec, unsigned i) const 189 189 { 190 190 if (d->lastOvector && i <= d->lastNumSubPatterns) { … … 196 196 } 197 197 198 JSValue PtrRegExpConstructor::getLastParen(ExecState* exec) const198 JSValue RegExpConstructor::getLastParen(ExecState* exec) const 199 199 { 200 200 unsigned i = d->lastNumSubPatterns; … … 208 208 } 209 209 210 JSValue PtrRegExpConstructor::getLeftContext(ExecState* exec) const210 JSValue RegExpConstructor::getLeftContext(ExecState* exec) const 211 211 { 212 212 if (d->lastOvector) … … 215 215 } 216 216 217 JSValue PtrRegExpConstructor::getRightContext(ExecState* exec) const217 JSValue RegExpConstructor::getRightContext(ExecState* exec) const 218 218 { 219 219 if (d->lastOvector) … … 227 227 } 228 228 229 JSValue PtrregExpConstructorDollar1(ExecState* exec, const Identifier&, const PropertySlot& slot)229 JSValue regExpConstructorDollar1(ExecState* exec, const Identifier&, const PropertySlot& slot) 230 230 { 231 231 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 1); 232 232 } 233 233 234 JSValue PtrregExpConstructorDollar2(ExecState* exec, const Identifier&, const PropertySlot& slot)234 JSValue regExpConstructorDollar2(ExecState* exec, const Identifier&, const PropertySlot& slot) 235 235 { 236 236 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 2); 237 237 } 238 238 239 JSValue PtrregExpConstructorDollar3(ExecState* exec, const Identifier&, const PropertySlot& slot)239 JSValue regExpConstructorDollar3(ExecState* exec, const Identifier&, const PropertySlot& slot) 240 240 { 241 241 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 3); 242 242 } 243 243 244 JSValue PtrregExpConstructorDollar4(ExecState* exec, const Identifier&, const PropertySlot& slot)244 JSValue regExpConstructorDollar4(ExecState* exec, const Identifier&, const PropertySlot& slot) 245 245 { 246 246 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 4); 247 247 } 248 248 249 JSValue PtrregExpConstructorDollar5(ExecState* exec, const Identifier&, const PropertySlot& slot)249 JSValue regExpConstructorDollar5(ExecState* exec, const Identifier&, const PropertySlot& slot) 250 250 { 251 251 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 5); 252 252 } 253 253 254 JSValue PtrregExpConstructorDollar6(ExecState* exec, const Identifier&, const PropertySlot& slot)254 JSValue regExpConstructorDollar6(ExecState* exec, const Identifier&, const PropertySlot& slot) 255 255 { 256 256 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 6); 257 257 } 258 258 259 JSValue PtrregExpConstructorDollar7(ExecState* exec, const Identifier&, const PropertySlot& slot)259 JSValue regExpConstructorDollar7(ExecState* exec, const Identifier&, const PropertySlot& slot) 260 260 { 261 261 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 7); 262 262 } 263 263 264 JSValue PtrregExpConstructorDollar8(ExecState* exec, const Identifier&, const PropertySlot& slot)264 JSValue regExpConstructorDollar8(ExecState* exec, const Identifier&, const PropertySlot& slot) 265 265 { 266 266 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 8); 267 267 } 268 268 269 JSValue PtrregExpConstructorDollar9(ExecState* exec, const Identifier&, const PropertySlot& slot)269 JSValue regExpConstructorDollar9(ExecState* exec, const Identifier&, const PropertySlot& slot) 270 270 { 271 271 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 9); 272 272 } 273 273 274 JSValue PtrregExpConstructorInput(ExecState* exec, const Identifier&, const PropertySlot& slot)274 JSValue regExpConstructorInput(ExecState* exec, const Identifier&, const PropertySlot& slot) 275 275 { 276 276 return jsString(exec, asRegExpConstructor(slot.slotBase())->input()); 277 277 } 278 278 279 JSValue PtrregExpConstructorMultiline(ExecState*, const Identifier&, const PropertySlot& slot)279 JSValue regExpConstructorMultiline(ExecState*, const Identifier&, const PropertySlot& slot) 280 280 { 281 281 return jsBoolean(asRegExpConstructor(slot.slotBase())->multiline()); 282 282 } 283 283 284 JSValue PtrregExpConstructorLastMatch(ExecState* exec, const Identifier&, const PropertySlot& slot)284 JSValue regExpConstructorLastMatch(ExecState* exec, const Identifier&, const PropertySlot& slot) 285 285 { 286 286 return asRegExpConstructor(slot.slotBase())->getBackref(exec, 0); 287 287 } 288 288 289 JSValue PtrregExpConstructorLastParen(ExecState* exec, const Identifier&, const PropertySlot& slot)289 JSValue regExpConstructorLastParen(ExecState* exec, const Identifier&, const PropertySlot& slot) 290 290 { 291 291 return asRegExpConstructor(slot.slotBase())->getLastParen(exec); 292 292 } 293 293 294 JSValue PtrregExpConstructorLeftContext(ExecState* exec, const Identifier&, const PropertySlot& slot)294 JSValue regExpConstructorLeftContext(ExecState* exec, const Identifier&, const PropertySlot& slot) 295 295 { 296 296 return asRegExpConstructor(slot.slotBase())->getLeftContext(exec); 297 297 } 298 298 299 JSValue PtrregExpConstructorRightContext(ExecState* exec, const Identifier&, const PropertySlot& slot)299 JSValue regExpConstructorRightContext(ExecState* exec, const Identifier&, const PropertySlot& slot) 300 300 { 301 301 return asRegExpConstructor(slot.slotBase())->getRightContext(exec); 302 302 } 303 303 304 void RegExpConstructor::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)304 void RegExpConstructor::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 305 305 { 306 306 lookupPut<RegExpConstructor, InternalFunction>(exec, propertyName, value, ExecState::regExpConstructorTable(exec), this, slot); 307 307 } 308 308 309 void setRegExpConstructorInput(ExecState* exec, JSObject* baseObject, JSValue Ptrvalue)309 void setRegExpConstructorInput(ExecState* exec, JSObject* baseObject, JSValue value) 310 310 { 311 311 asRegExpConstructor(baseObject)->setInput(value.toString(exec)); 312 312 } 313 313 314 void setRegExpConstructorMultiline(ExecState* exec, JSObject* baseObject, JSValue Ptrvalue)314 void setRegExpConstructorMultiline(ExecState* exec, JSObject* baseObject, JSValue value) 315 315 { 316 316 asRegExpConstructor(baseObject)->setMultiline(value.toBoolean(exec)); … … 320 320 JSObject* constructRegExp(ExecState* exec, const ArgList& args) 321 321 { 322 JSValue Ptrarg0 = args.at(0);323 JSValue Ptrarg1 = args.at(1);322 JSValue arg0 = args.at(0); 323 JSValue arg1 = args.at(1); 324 324 325 325 if (arg0.isObject(&RegExpObject::info)) { … … 350 350 351 351 // ECMA 15.10.3 352 static JSValue Ptr callRegExpConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)352 static JSValue callRegExpConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 353 353 { 354 354 return constructRegExp(exec, args); -
trunk/JavaScriptCore/runtime/RegExpConstructor.h
r39670 r43122 35 35 RegExpConstructor(ExecState*, PassRefPtr<Structure>, RegExpPrototype*); 36 36 37 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)37 static PassRefPtr<Structure> createStructure(JSValue prototype) 38 38 { 39 39 return Structure::create(prototype, TypeInfo(ObjectType, ImplementsHasInstance)); 40 40 } 41 41 42 virtual void put(ExecState*, const Identifier& propertyName, JSValue Ptr, PutPropertySlot&);42 virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 43 43 virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); 44 44 … … 54 54 bool multiline() const; 55 55 56 JSValue PtrgetBackref(ExecState*, unsigned) const;57 JSValue PtrgetLastParen(ExecState*) const;58 JSValue PtrgetLeftContext(ExecState*) const;59 JSValue PtrgetRightContext(ExecState*) const;56 JSValue getBackref(ExecState*, unsigned) const; 57 JSValue getLastParen(ExecState*) const; 58 JSValue getLeftContext(ExecState*) const; 59 JSValue getRightContext(ExecState*) const; 60 60 61 61 private: … … 68 68 }; 69 69 70 RegExpConstructor* asRegExpConstructor(JSValue Ptr);70 RegExpConstructor* asRegExpConstructor(JSValue); 71 71 72 72 JSObject* constructRegExp(ExecState*, const ArgList&); 73 73 74 inline RegExpConstructor* asRegExpConstructor(JSValue Ptrvalue)74 inline RegExpConstructor* asRegExpConstructor(JSValue value) 75 75 { 76 76 ASSERT(asObject(value)->inherits(&RegExpConstructor::info)); -
trunk/JavaScriptCore/runtime/RegExpMatchesArray.h
r39670 r43122 45 45 } 46 46 47 virtual void put(ExecState* exec, const Identifier& propertyName, JSValue Ptrv, PutPropertySlot& slot)47 virtual void put(ExecState* exec, const Identifier& propertyName, JSValue v, PutPropertySlot& slot) 48 48 { 49 49 if (lazyCreationData()) … … 52 52 } 53 53 54 virtual void put(ExecState* exec, unsigned propertyName, JSValue Ptrv)54 virtual void put(ExecState* exec, unsigned propertyName, JSValue v) 55 55 { 56 56 if (lazyCreationData()) -
trunk/JavaScriptCore/runtime/RegExpObject.cpp
r42989 r43122 30 30 namespace JSC { 31 31 32 static JSValue PtrregExpObjectGlobal(ExecState*, const Identifier&, const PropertySlot&);33 static JSValue PtrregExpObjectIgnoreCase(ExecState*, const Identifier&, const PropertySlot&);34 static JSValue PtrregExpObjectMultiline(ExecState*, const Identifier&, const PropertySlot&);35 static JSValue PtrregExpObjectSource(ExecState*, const Identifier&, const PropertySlot&);36 static JSValue PtrregExpObjectLastIndex(ExecState*, const Identifier&, const PropertySlot&);37 static void setRegExpObjectLastIndex(ExecState*, JSObject*, JSValue Ptr);32 static JSValue regExpObjectGlobal(ExecState*, const Identifier&, const PropertySlot&); 33 static JSValue regExpObjectIgnoreCase(ExecState*, const Identifier&, const PropertySlot&); 34 static JSValue regExpObjectMultiline(ExecState*, const Identifier&, const PropertySlot&); 35 static JSValue regExpObjectSource(ExecState*, const Identifier&, const PropertySlot&); 36 static JSValue regExpObjectLastIndex(ExecState*, const Identifier&, const PropertySlot&); 37 static void setRegExpObjectLastIndex(ExecState*, JSObject*, JSValue); 38 38 39 39 } // namespace JSC … … 72 72 } 73 73 74 JSValue PtrregExpObjectGlobal(ExecState*, const Identifier&, const PropertySlot& slot)74 JSValue regExpObjectGlobal(ExecState*, const Identifier&, const PropertySlot& slot) 75 75 { 76 76 return jsBoolean(asRegExpObject(slot.slotBase())->regExp()->global()); 77 77 } 78 78 79 JSValue PtrregExpObjectIgnoreCase(ExecState*, const Identifier&, const PropertySlot& slot)79 JSValue regExpObjectIgnoreCase(ExecState*, const Identifier&, const PropertySlot& slot) 80 80 { 81 81 return jsBoolean(asRegExpObject(slot.slotBase())->regExp()->ignoreCase()); 82 82 } 83 83 84 JSValue PtrregExpObjectMultiline(ExecState*, const Identifier&, const PropertySlot& slot)84 JSValue regExpObjectMultiline(ExecState*, const Identifier&, const PropertySlot& slot) 85 85 { 86 86 return jsBoolean(asRegExpObject(slot.slotBase())->regExp()->multiline()); 87 87 } 88 88 89 JSValue PtrregExpObjectSource(ExecState* exec, const Identifier&, const PropertySlot& slot)89 JSValue regExpObjectSource(ExecState* exec, const Identifier&, const PropertySlot& slot) 90 90 { 91 91 return jsString(exec, asRegExpObject(slot.slotBase())->regExp()->pattern()); 92 92 } 93 93 94 JSValue PtrregExpObjectLastIndex(ExecState* exec, const Identifier&, const PropertySlot& slot)94 JSValue regExpObjectLastIndex(ExecState* exec, const Identifier&, const PropertySlot& slot) 95 95 { 96 96 return jsNumber(exec, asRegExpObject(slot.slotBase())->lastIndex()); 97 97 } 98 98 99 void RegExpObject::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)99 void RegExpObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 100 100 { 101 101 lookupPut<RegExpObject, JSObject>(exec, propertyName, value, ExecState::regExpTable(exec), this, slot); 102 102 } 103 103 104 void setRegExpObjectLastIndex(ExecState* exec, JSObject* baseObject, JSValue Ptrvalue)104 void setRegExpObjectLastIndex(ExecState* exec, JSObject* baseObject, JSValue value) 105 105 { 106 106 asRegExpObject(baseObject)->setLastIndex(value.toInteger(exec)); 107 107 } 108 108 109 JSValue PtrRegExpObject::test(ExecState* exec, const ArgList& args)109 JSValue RegExpObject::test(ExecState* exec, const ArgList& args) 110 110 { 111 111 return jsBoolean(match(exec, args)); 112 112 } 113 113 114 JSValue PtrRegExpObject::exec(ExecState* exec, const ArgList& args)114 JSValue RegExpObject::exec(ExecState* exec, const ArgList& args) 115 115 { 116 116 if (match(exec, args)) … … 119 119 } 120 120 121 static JSValue Ptr callRegExpObject(ExecState* exec, JSObject* function, JSValuePtr, const ArgList& args)121 static JSValue callRegExpObject(ExecState* exec, JSObject* function, JSValue, const ArgList& args) 122 122 { 123 123 return asRegExpObject(function)->exec(exec, args); -
trunk/JavaScriptCore/runtime/RegExpObject.h
r39670 r43122 38 38 double lastIndex() const { return d->lastIndex; } 39 39 40 JSValue Ptrtest(ExecState*, const ArgList&);41 JSValue Ptrexec(ExecState*, const ArgList&);40 JSValue test(ExecState*, const ArgList&); 41 JSValue exec(ExecState*, const ArgList&); 42 42 43 43 virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); 44 virtual void put(ExecState*, const Identifier& propertyName, JSValue Ptr, PutPropertySlot&);44 virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 45 45 46 46 virtual const ClassInfo* classInfo() const { return &info; } 47 47 static const ClassInfo info; 48 48 49 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)49 static PassRefPtr<Structure> createStructure(JSValue prototype) 50 50 { 51 51 return Structure::create(prototype, TypeInfo(ObjectType)); … … 71 71 }; 72 72 73 RegExpObject* asRegExpObject(JSValue Ptr);73 RegExpObject* asRegExpObject(JSValue); 74 74 75 inline RegExpObject* asRegExpObject(JSValue Ptrvalue)75 inline RegExpObject* asRegExpObject(JSValue value) 76 76 { 77 77 ASSERT(asObject(value)->inherits(&RegExpObject::info)); -
trunk/JavaScriptCore/runtime/RegExpPrototype.cpp
r42989 r43122 36 36 ASSERT_CLASS_FITS_IN_CELL(RegExpPrototype); 37 37 38 static JSValue Ptr regExpProtoFuncTest(ExecState*, JSObject*, JSValuePtr, const ArgList&);39 static JSValue Ptr regExpProtoFuncExec(ExecState*, JSObject*, JSValuePtr, const ArgList&);40 static JSValue Ptr regExpProtoFuncCompile(ExecState*, JSObject*, JSValuePtr, const ArgList&);41 static JSValue Ptr regExpProtoFuncToString(ExecState*, JSObject*, JSValuePtr, const ArgList&);38 static JSValue regExpProtoFuncTest(ExecState*, JSObject*, JSValue, const ArgList&); 39 static JSValue regExpProtoFuncExec(ExecState*, JSObject*, JSValue, const ArgList&); 40 static JSValue regExpProtoFuncCompile(ExecState*, JSObject*, JSValue, const ArgList&); 41 static JSValue regExpProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 42 42 43 43 // ECMA 15.10.5 … … 56 56 // ------------------------------ Functions --------------------------- 57 57 58 JSValue Ptr regExpProtoFuncTest(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)58 JSValue regExpProtoFuncTest(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 59 59 { 60 60 if (!thisValue.isObject(&RegExpObject::info)) … … 63 63 } 64 64 65 JSValue Ptr regExpProtoFuncExec(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)65 JSValue regExpProtoFuncExec(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 66 66 { 67 67 if (!thisValue.isObject(&RegExpObject::info)) … … 70 70 } 71 71 72 JSValue Ptr regExpProtoFuncCompile(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)72 JSValue regExpProtoFuncCompile(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 73 73 { 74 74 if (!thisValue.isObject(&RegExpObject::info)) … … 76 76 77 77 RefPtr<RegExp> regExp; 78 JSValue Ptrarg0 = args.at(0);79 JSValue Ptrarg1 = args.at(1);78 JSValue arg0 = args.at(0); 79 JSValue arg1 = args.at(1); 80 80 81 81 if (arg0.isObject(&RegExpObject::info)) { … … 97 97 } 98 98 99 JSValue Ptr regExpProtoFuncToString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)99 JSValue regExpProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 100 100 { 101 101 if (!thisValue.isObject(&RegExpObject::info)) { -
trunk/JavaScriptCore/runtime/StringConstructor.cpp
r43037 r43122 28 28 namespace JSC { 29 29 30 static NEVER_INLINE JSValue PtrstringFromCharCodeSlowCase(ExecState* exec, const ArgList& args)30 static NEVER_INLINE JSValue stringFromCharCodeSlowCase(ExecState* exec, const ArgList& args) 31 31 { 32 32 UChar* buf = static_cast<UChar*>(fastMalloc(args.size() * sizeof(UChar))); … … 38 38 } 39 39 40 static JSValue Ptr stringFromCharCode(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)40 static JSValue stringFromCharCode(ExecState* exec, JSObject*, JSValue, const ArgList& args) 41 41 { 42 42 if (LIKELY(args.size() == 1)) … … 75 75 76 76 // ECMA 15.5.1 77 static JSValue Ptr callStringConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)77 static JSValue callStringConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 78 78 { 79 79 if (args.isEmpty()) -
trunk/JavaScriptCore/runtime/StringObject.cpp
r39670 r43122 62 62 } 63 63 64 void StringObject::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)64 void StringObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 65 65 { 66 66 if (propertyName == exec->propertyNames().length) -
trunk/JavaScriptCore/runtime/StringObject.h
r42680 r43122 37 37 virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&); 38 38 39 virtual void put(ExecState* exec, const Identifier& propertyName, JSValue Ptr, PutPropertySlot&);39 virtual void put(ExecState* exec, const Identifier& propertyName, JSValue, PutPropertySlot&); 40 40 virtual bool deleteProperty(ExecState*, const Identifier& propertyName); 41 41 virtual void getPropertyNames(ExecState*, PropertyNameArray&); … … 46 46 JSString* internalValue() const { return asString(JSWrapperObject::internalValue());} 47 47 48 static PassRefPtr<Structure> createStructure(JSValue Ptrprototype)48 static PassRefPtr<Structure> createStructure(JSValue prototype) 49 49 { 50 50 return Structure::create(prototype, TypeInfo(ObjectType)); … … 60 60 }; 61 61 62 StringObject* asStringObject(JSValue Ptr);62 StringObject* asStringObject(JSValue); 63 63 64 inline StringObject* asStringObject(JSValue Ptrvalue)64 inline StringObject* asStringObject(JSValue value) 65 65 { 66 66 ASSERT(asObject(value)->inherits(&StringObject::info)); -
trunk/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h
r39670 r43122 43 43 } 44 44 45 static PassRefPtr<Structure> createStructure(JSValue Ptrproto)45 static PassRefPtr<Structure> createStructure(JSValue proto) 46 46 { 47 47 return Structure::create(proto, TypeInfo(ObjectType, MasqueradesAsUndefined)); -
trunk/JavaScriptCore/runtime/StringPrototype.cpp
r43104 r43122 39 39 ASSERT_CLASS_FITS_IN_CELL(StringPrototype); 40 40 41 static JSValue Ptr stringProtoFuncToString(ExecState*, JSObject*, JSValuePtr, const ArgList&);42 static JSValue Ptr stringProtoFuncCharAt(ExecState*, JSObject*, JSValuePtr, const ArgList&);43 static JSValue Ptr stringProtoFuncCharCodeAt(ExecState*, JSObject*, JSValuePtr, const ArgList&);44 static JSValue Ptr stringProtoFuncConcat(ExecState*, JSObject*, JSValuePtr, const ArgList&);45 static JSValue Ptr stringProtoFuncIndexOf(ExecState*, JSObject*, JSValuePtr, const ArgList&);46 static JSValue Ptr stringProtoFuncLastIndexOf(ExecState*, JSObject*, JSValuePtr, const ArgList&);47 static JSValue Ptr stringProtoFuncMatch(ExecState*, JSObject*, JSValuePtr, const ArgList&);48 static JSValue Ptr stringProtoFuncReplace(ExecState*, JSObject*, JSValuePtr, const ArgList&);49 static JSValue Ptr stringProtoFuncSearch(ExecState*, JSObject*, JSValuePtr, const ArgList&);50 static JSValue Ptr stringProtoFuncSlice(ExecState*, JSObject*, JSValuePtr, const ArgList&);51 static JSValue Ptr stringProtoFuncSplit(ExecState*, JSObject*, JSValuePtr, const ArgList&);52 static JSValue Ptr stringProtoFuncSubstr(ExecState*, JSObject*, JSValuePtr, const ArgList&);53 static JSValue Ptr stringProtoFuncSubstring(ExecState*, JSObject*, JSValuePtr, const ArgList&);54 static JSValue Ptr stringProtoFuncToLowerCase(ExecState*, JSObject*, JSValuePtr, const ArgList&);55 static JSValue Ptr stringProtoFuncToUpperCase(ExecState*, JSObject*, JSValuePtr, const ArgList&);56 static JSValue Ptr stringProtoFuncLocaleCompare(ExecState*, JSObject*, JSValuePtr, const ArgList&);57 58 static JSValue Ptr stringProtoFuncBig(ExecState*, JSObject*, JSValuePtr, const ArgList&);59 static JSValue Ptr stringProtoFuncSmall(ExecState*, JSObject*, JSValuePtr, const ArgList&);60 static JSValue Ptr stringProtoFuncBlink(ExecState*, JSObject*, JSValuePtr, const ArgList&);61 static JSValue Ptr stringProtoFuncBold(ExecState*, JSObject*, JSValuePtr, const ArgList&);62 static JSValue Ptr stringProtoFuncFixed(ExecState*, JSObject*, JSValuePtr, const ArgList&);63 static JSValue Ptr stringProtoFuncItalics(ExecState*, JSObject*, JSValuePtr, const ArgList&);64 static JSValue Ptr stringProtoFuncStrike(ExecState*, JSObject*, JSValuePtr, const ArgList&);65 static JSValue Ptr stringProtoFuncSub(ExecState*, JSObject*, JSValuePtr, const ArgList&);66 static JSValue Ptr stringProtoFuncSup(ExecState*, JSObject*, JSValuePtr, const ArgList&);67 static JSValue Ptr stringProtoFuncFontcolor(ExecState*, JSObject*, JSValuePtr, const ArgList&);68 static JSValue Ptr stringProtoFuncFontsize(ExecState*, JSObject*, JSValuePtr, const ArgList&);69 static JSValue Ptr stringProtoFuncAnchor(ExecState*, JSObject*, JSValuePtr, const ArgList&);70 static JSValue Ptr stringProtoFuncLink(ExecState*, JSObject*, JSValuePtr, const ArgList&);41 static JSValue stringProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 42 static JSValue stringProtoFuncCharAt(ExecState*, JSObject*, JSValue, const ArgList&); 43 static JSValue stringProtoFuncCharCodeAt(ExecState*, JSObject*, JSValue, const ArgList&); 44 static JSValue stringProtoFuncConcat(ExecState*, JSObject*, JSValue, const ArgList&); 45 static JSValue stringProtoFuncIndexOf(ExecState*, JSObject*, JSValue, const ArgList&); 46 static JSValue stringProtoFuncLastIndexOf(ExecState*, JSObject*, JSValue, const ArgList&); 47 static JSValue stringProtoFuncMatch(ExecState*, JSObject*, JSValue, const ArgList&); 48 static JSValue stringProtoFuncReplace(ExecState*, JSObject*, JSValue, const ArgList&); 49 static JSValue stringProtoFuncSearch(ExecState*, JSObject*, JSValue, const ArgList&); 50 static JSValue stringProtoFuncSlice(ExecState*, JSObject*, JSValue, const ArgList&); 51 static JSValue stringProtoFuncSplit(ExecState*, JSObject*, JSValue, const ArgList&); 52 static JSValue stringProtoFuncSubstr(ExecState*, JSObject*, JSValue, const ArgList&); 53 static JSValue stringProtoFuncSubstring(ExecState*, JSObject*, JSValue, const ArgList&); 54 static JSValue stringProtoFuncToLowerCase(ExecState*, JSObject*, JSValue, const ArgList&); 55 static JSValue stringProtoFuncToUpperCase(ExecState*, JSObject*, JSValue, const ArgList&); 56 static JSValue stringProtoFuncLocaleCompare(ExecState*, JSObject*, JSValue, const ArgList&); 57 58 static JSValue stringProtoFuncBig(ExecState*, JSObject*, JSValue, const ArgList&); 59 static JSValue stringProtoFuncSmall(ExecState*, JSObject*, JSValue, const ArgList&); 60 static JSValue stringProtoFuncBlink(ExecState*, JSObject*, JSValue, const ArgList&); 61 static JSValue stringProtoFuncBold(ExecState*, JSObject*, JSValue, const ArgList&); 62 static JSValue stringProtoFuncFixed(ExecState*, JSObject*, JSValue, const ArgList&); 63 static JSValue stringProtoFuncItalics(ExecState*, JSObject*, JSValue, const ArgList&); 64 static JSValue stringProtoFuncStrike(ExecState*, JSObject*, JSValue, const ArgList&); 65 static JSValue stringProtoFuncSub(ExecState*, JSObject*, JSValue, const ArgList&); 66 static JSValue stringProtoFuncSup(ExecState*, JSObject*, JSValue, const ArgList&); 67 static JSValue stringProtoFuncFontcolor(ExecState*, JSObject*, JSValue, const ArgList&); 68 static JSValue stringProtoFuncFontsize(ExecState*, JSObject*, JSValue, const ArgList&); 69 static JSValue stringProtoFuncAnchor(ExecState*, JSObject*, JSValue, const ArgList&); 70 static JSValue stringProtoFuncLink(ExecState*, JSObject*, JSValue, const ArgList&); 71 71 72 72 } … … 206 206 } 207 207 208 JSValue Ptr stringProtoFuncReplace(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)208 JSValue stringProtoFuncReplace(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 209 209 { 210 210 JSString* sourceVal = thisValue.toThisJSString(exec); 211 211 const UString& source = sourceVal->value(); 212 212 213 JSValue Ptrpattern = args.at(0);214 215 JSValue Ptrreplacement = args.at(1);213 JSValue pattern = args.at(0); 214 215 JSValue replacement = args.at(1); 216 216 UString replacementString; 217 217 CallData callData; … … 355 355 } 356 356 357 JSValue Ptr stringProtoFuncToString(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)357 JSValue stringProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 358 358 { 359 359 // Also used for valueOf. … … 368 368 } 369 369 370 JSValue Ptr stringProtoFuncCharAt(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)370 JSValue stringProtoFuncCharAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 371 371 { 372 372 UString s = thisValue.toThisString(exec); 373 373 unsigned len = s.size(); 374 JSValue Ptra0 = args.at(0);374 JSValue a0 = args.at(0); 375 375 if (a0.isUInt32Fast()) { 376 376 uint32_t i = a0.getUInt32Fast(); … … 385 385 } 386 386 387 JSValue Ptr stringProtoFuncCharCodeAt(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)387 JSValue stringProtoFuncCharCodeAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 388 388 { 389 389 UString s = thisValue.toThisString(exec); 390 390 unsigned len = s.size(); 391 JSValue Ptra0 = args.at(0);391 JSValue a0 = args.at(0); 392 392 if (a0.isUInt32Fast()) { 393 393 uint32_t i = a0.getUInt32Fast(); … … 402 402 } 403 403 404 JSValue Ptr stringProtoFuncConcat(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)404 JSValue stringProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 405 405 { 406 406 UString s = thisValue.toThisString(exec); … … 412 412 } 413 413 414 JSValue Ptr stringProtoFuncIndexOf(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)414 JSValue stringProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 415 415 { 416 416 UString s = thisValue.toThisString(exec); 417 417 int len = s.size(); 418 418 419 JSValue Ptra0 = args.at(0);420 JSValue Ptra1 = args.at(1);419 JSValue a0 = args.at(0); 420 JSValue a1 = args.at(1); 421 421 UString u2 = a0.toString(exec); 422 422 int pos; … … 437 437 } 438 438 439 JSValue Ptr stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)439 JSValue stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 440 440 { 441 441 UString s = thisValue.toThisString(exec); 442 442 int len = s.size(); 443 443 444 JSValue Ptra0 = args.at(0);445 JSValue Ptra1 = args.at(1);444 JSValue a0 = args.at(0); 445 JSValue a1 = args.at(1); 446 446 447 447 UString u2 = a0.toString(exec); … … 454 454 } 455 455 456 JSValue Ptr stringProtoFuncMatch(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)457 { 458 UString s = thisValue.toThisString(exec); 459 460 JSValue Ptra0 = args.at(0);456 JSValue stringProtoFuncMatch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 457 { 458 UString s = thisValue.toThisString(exec); 459 460 JSValue a0 = args.at(0); 461 461 462 462 UString u = s; … … 505 505 } 506 506 507 JSValue Ptr stringProtoFuncSearch(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)508 { 509 UString s = thisValue.toThisString(exec); 510 511 JSValue Ptra0 = args.at(0);507 JSValue stringProtoFuncSearch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 508 { 509 UString s = thisValue.toThisString(exec); 510 511 JSValue a0 = args.at(0); 512 512 513 513 UString u = s; … … 530 530 } 531 531 532 JSValue Ptr stringProtoFuncSlice(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)532 JSValue stringProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 533 533 { 534 534 UString s = thisValue.toThisString(exec); 535 535 int len = s.size(); 536 536 537 JSValue Ptra0 = args.at(0);538 JSValue Ptra1 = args.at(1);537 JSValue a0 = args.at(0); 538 JSValue a1 = args.at(1); 539 539 540 540 // The arg processing is very much like ArrayProtoFunc::Slice … … 554 554 } 555 555 556 JSValue Ptr stringProtoFuncSplit(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)557 { 558 UString s = thisValue.toThisString(exec); 559 560 JSValue Ptra0 = args.at(0);561 JSValue Ptra1 = args.at(1);556 JSValue stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 557 { 558 UString s = thisValue.toThisString(exec); 559 560 JSValue a0 = args.at(0); 561 JSValue a1 = args.at(1); 562 562 563 563 JSArray* result = constructEmptyArray(exec); … … 616 616 } 617 617 618 JSValue Ptr stringProtoFuncSubstr(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)618 JSValue stringProtoFuncSubstr(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 619 619 { 620 620 UString s = thisValue.toThisString(exec); 621 621 int len = s.size(); 622 622 623 JSValue Ptra0 = args.at(0);624 JSValue Ptra1 = args.at(1);623 JSValue a0 = args.at(0); 624 JSValue a1 = args.at(1); 625 625 626 626 double start = a0.toInteger(exec); … … 638 638 } 639 639 640 JSValue Ptr stringProtoFuncSubstring(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)640 JSValue stringProtoFuncSubstring(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 641 641 { 642 642 UString s = thisValue.toThisString(exec); 643 643 int len = s.size(); 644 644 645 JSValue Ptra0 = args.at(0);646 JSValue Ptra1 = args.at(1);645 JSValue a0 = args.at(0); 646 JSValue a1 = args.at(1); 647 647 648 648 double start = a0.toNumber(exec); … … 670 670 } 671 671 672 JSValue Ptr stringProtoFuncToLowerCase(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)672 JSValue stringProtoFuncToLowerCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 673 673 { 674 674 JSString* sVal = thisValue.toThisJSString(exec); … … 704 704 } 705 705 706 JSValue Ptr stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)706 JSValue stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 707 707 { 708 708 JSString* sVal = thisValue.toThisJSString(exec); … … 738 738 } 739 739 740 JSValue Ptr stringProtoFuncLocaleCompare(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)740 JSValue stringProtoFuncLocaleCompare(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 741 741 { 742 742 if (args.size() < 1) … … 744 744 745 745 UString s = thisValue.toThisString(exec); 746 JSValue Ptra0 = args.at(0);746 JSValue a0 = args.at(0); 747 747 return jsNumber(exec, localeCompare(s, a0.toString(exec))); 748 748 } 749 749 750 JSValue Ptr stringProtoFuncBig(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)750 JSValue stringProtoFuncBig(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 751 751 { 752 752 UString s = thisValue.toThisString(exec); … … 754 754 } 755 755 756 JSValue Ptr stringProtoFuncSmall(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)756 JSValue stringProtoFuncSmall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 757 757 { 758 758 UString s = thisValue.toThisString(exec); … … 760 760 } 761 761 762 JSValue Ptr stringProtoFuncBlink(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)762 JSValue stringProtoFuncBlink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 763 763 { 764 764 UString s = thisValue.toThisString(exec); … … 766 766 } 767 767 768 JSValue Ptr stringProtoFuncBold(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)768 JSValue stringProtoFuncBold(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 769 769 { 770 770 UString s = thisValue.toThisString(exec); … … 772 772 } 773 773 774 JSValue Ptr stringProtoFuncFixed(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)774 JSValue stringProtoFuncFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 775 775 { 776 776 UString s = thisValue.toThisString(exec); … … 778 778 } 779 779 780 JSValue Ptr stringProtoFuncItalics(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)780 JSValue stringProtoFuncItalics(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 781 781 { 782 782 UString s = thisValue.toThisString(exec); … … 784 784 } 785 785 786 JSValue Ptr stringProtoFuncStrike(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)786 JSValue stringProtoFuncStrike(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 787 787 { 788 788 UString s = thisValue.toThisString(exec); … … 790 790 } 791 791 792 JSValue Ptr stringProtoFuncSub(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)792 JSValue stringProtoFuncSub(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 793 793 { 794 794 UString s = thisValue.toThisString(exec); … … 796 796 } 797 797 798 JSValue Ptr stringProtoFuncSup(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList&)798 JSValue stringProtoFuncSup(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 799 799 { 800 800 UString s = thisValue.toThisString(exec); … … 802 802 } 803 803 804 JSValue Ptr stringProtoFuncFontcolor(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)805 { 806 UString s = thisValue.toThisString(exec); 807 JSValue Ptra0 = args.at(0);804 JSValue stringProtoFuncFontcolor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 805 { 806 UString s = thisValue.toThisString(exec); 807 JSValue a0 = args.at(0); 808 808 return jsNontrivialString(exec, "<font color=\"" + a0.toString(exec) + "\">" + s + "</font>"); 809 809 } 810 810 811 JSValue Ptr stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)812 { 813 UString s = thisValue.toThisString(exec); 814 JSValue Ptra0 = args.at(0);811 JSValue stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 812 { 813 UString s = thisValue.toThisString(exec); 814 JSValue a0 = args.at(0); 815 815 816 816 uint32_t smallInteger; … … 850 850 } 851 851 852 JSValue Ptr stringProtoFuncAnchor(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)853 { 854 UString s = thisValue.toThisString(exec); 855 JSValue Ptra0 = args.at(0);852 JSValue stringProtoFuncAnchor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 853 { 854 UString s = thisValue.toThisString(exec); 855 JSValue a0 = args.at(0); 856 856 return jsNontrivialString(exec, "<a name=\"" + a0.toString(exec) + "\">" + s + "</a>"); 857 857 } 858 858 859 JSValue Ptr stringProtoFuncLink(ExecState* exec, JSObject*, JSValuePtrthisValue, const ArgList& args)860 { 861 UString s = thisValue.toThisString(exec); 862 JSValue Ptra0 = args.at(0);859 JSValue stringProtoFuncLink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 860 { 861 UString s = thisValue.toThisString(exec); 862 JSValue a0 = args.at(0); 863 863 UString linkText = a0.toString(exec); 864 864 -
trunk/JavaScriptCore/runtime/Structure.cpp
r42606 r43122 121 121 } 122 122 123 Structure::Structure(JSValue Ptrprototype, const TypeInfo& typeInfo)123 Structure::Structure(JSValue prototype, const TypeInfo& typeInfo) 124 124 : m_typeInfo(typeInfo) 125 125 , m_prototype(prototype) … … 419 419 } 420 420 421 PassRefPtr<Structure> Structure::changePrototypeTransition(Structure* structure, JSValue Ptrprototype)421 PassRefPtr<Structure> Structure::changePrototypeTransition(Structure* structure, JSValue prototype) 422 422 { 423 423 RefPtr<Structure> transition = create(prototype, structure->typeInfo()); -
trunk/JavaScriptCore/runtime/Structure.h
r41232 r43122 52 52 public: 53 53 friend class JIT; 54 static PassRefPtr<Structure> create(JSValue Ptrprototype, const TypeInfo& typeInfo)54 static PassRefPtr<Structure> create(JSValue prototype, const TypeInfo& typeInfo) 55 55 { 56 56 return adoptRef(new Structure(prototype, typeInfo)); … … 65 65 static PassRefPtr<Structure> addPropertyTransitionToExistingStructure(Structure*, const Identifier& propertyName, unsigned attributes, size_t& offset); 66 66 static PassRefPtr<Structure> removePropertyTransition(Structure*, const Identifier& propertyName, size_t& offset); 67 static PassRefPtr<Structure> changePrototypeTransition(Structure*, JSValue Ptrprototype);67 static PassRefPtr<Structure> changePrototypeTransition(Structure*, JSValue prototype); 68 68 static PassRefPtr<Structure> getterSetterTransition(Structure*); 69 69 static PassRefPtr<Structure> toDictionaryTransition(Structure*); … … 81 81 size_t addPropertyWithoutTransition(const Identifier& propertyName, unsigned attributes); 82 82 size_t removePropertyWithoutTransition(const Identifier& propertyName); 83 void setPrototypeWithoutTransition(JSValue Ptrprototype) { m_prototype = prototype; }83 void setPrototypeWithoutTransition(JSValue prototype) { m_prototype = prototype; } 84 84 85 85 bool isDictionary() const { return m_isDictionary; } … … 87 87 const TypeInfo& typeInfo() const { return m_typeInfo; } 88 88 89 JSValue PtrstoredPrototype() const { return m_prototype; }90 JSValue PtrprototypeForLookup(ExecState*) const;89 JSValue storedPrototype() const { return m_prototype; } 90 JSValue prototypeForLookup(ExecState*) const; 91 91 StructureChain* prototypeChain(ExecState*) const; 92 92 … … 107 107 108 108 private: 109 Structure(JSValue Ptrprototype, const TypeInfo&);109 Structure(JSValue prototype, const TypeInfo&); 110 110 111 111 size_t put(const Identifier& propertyName, unsigned attributes); … … 154 154 TypeInfo m_typeInfo; 155 155 156 JSValue Ptrm_prototype;156 JSValue m_prototype; 157 157 mutable RefPtr<StructureChain> m_cachedPrototypeChain; 158 158
Note:
See TracChangeset
for help on using the changeset viewer.