Changeset 32807 in webkit for trunk/JavaScriptCore/kjs/value.cpp
- Timestamp:
- May 2, 2008, 3:07:53 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/value.cpp
r29243 r32807 81 81 static const double D32 = 4294967296.0; 82 82 83 void *JSCell::operator new(size_t size)84 { 85 return Collector::allocate(size);83 void* JSCell::operator new(size_t size, ExecState* exec) 84 { 85 return exec->heap()->allocate(size); 86 86 } 87 87 … … 208 208 } 209 209 210 JSCell* jsString( const char* s)211 { 212 return new StringImp(s ? s : "");213 } 214 215 JSCell* jsString( const UString& s)216 { 217 return s.isNull() ? new StringImp("") : newStringImp(s);218 } 219 220 JSCell* jsOwnedString( const UString& s)221 { 222 return s.isNull() ? new StringImp("", StringImp::HasOtherOwner) : newStringImp(s, StringImp::HasOtherOwner);210 JSCell* jsString(ExecState* exec, const char* s) 211 { 212 return new (exec) StringImp(s ? s : ""); 213 } 214 215 JSCell* jsString(ExecState* exec, const UString& s) 216 { 217 return s.isNull() ? new (exec) StringImp("") : new (exec) StringImp(s); 218 } 219 220 JSCell* jsOwnedString(ExecState* exec, const UString& s) 221 { 222 return s.isNull() ? new (exec) StringImp("", StringImp::HasOtherOwner) : new (exec) StringImp(s, StringImp::HasOtherOwner); 223 223 } 224 224 225 225 // This method includes a PIC branch to set up the NumberImp's vtable, so we quarantine 226 226 // it in a separate function to keep the normal case speedy. 227 JSValue *jsNumberCell(double d)228 { 229 return new NumberImp(d);227 JSValue* jsNumberCell(ExecState* exec, double d) 228 { 229 return new (exec) NumberImp(d); 230 230 } 231 231
Note:
See TracChangeset
for help on using the changeset viewer.