diff options
Diffstat (limited to 'Source/JavaScriptCore/jit/JITInlineMethods.h')
-rw-r--r-- | Source/JavaScriptCore/jit/JITInlineMethods.h | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/Source/JavaScriptCore/jit/JITInlineMethods.h b/Source/JavaScriptCore/jit/JITInlineMethods.h index 40985ac90..d1cee7ef7 100644 --- a/Source/JavaScriptCore/jit/JITInlineMethods.h +++ b/Source/JavaScriptCore/jit/JITInlineMethods.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2012 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -429,8 +429,7 @@ template <typename ClassType, bool destructor, typename StructureType> inline vo storePtr(TrustedImmPtr(0), Address(result, JSObject::offsetOfInheritorID())); // initialize the object's property storage pointer - addPtr(TrustedImm32(sizeof(JSObject)), result, storagePtr); - storePtr(storagePtr, Address(result, ClassType::offsetOfPropertyStorage())); + storePtr(TrustedImmPtr(0), Address(result, ClassType::offsetOfOutOfLineStorage())); } template <typename T> inline void JIT::emitAllocateJSFinalObject(T structure, RegisterID result, RegisterID scratch) @@ -438,28 +437,6 @@ template <typename T> inline void JIT::emitAllocateJSFinalObject(T structure, Re emitAllocateBasicJSObject<JSFinalObject, false, T>(structure, result, scratch); } -inline void JIT::emitAllocateJSFunction(FunctionExecutable* executable, RegisterID scopeChain, RegisterID result, RegisterID storagePtr) -{ - emitAllocateBasicJSObject<JSFunction, true>(TrustedImmPtr(m_codeBlock->globalObject()->namedFunctionStructure()), result, storagePtr); - - // store the function's scope chain - storePtr(scopeChain, Address(result, JSFunction::offsetOfScopeChain())); - - // store the function's executable member - storePtr(TrustedImmPtr(executable), Address(result, JSFunction::offsetOfExecutable())); - - // clear the function's inheritorID - storePtr(TrustedImmPtr(0), Address(result, JSFunction::offsetOfCachedInheritorID())); - - // store the function's name - ASSERT(executable->nameValue()); - int functionNameOffset = sizeof(JSValue) * m_codeBlock->globalObject()->functionNameOffset(); - storePtr(TrustedImmPtr(executable->nameValue()), Address(regT1, functionNameOffset + OBJECT_OFFSETOF(JSValue, u.asBits.payload))); -#if USE(JSVALUE32_64) - store32(TrustedImm32(JSValue::CellTag), Address(regT1, functionNameOffset + OBJECT_OFFSETOF(JSValue, u.asBits.tag))); -#endif -} - inline void JIT::emitAllocateBasicStorage(size_t size, RegisterID result, RegisterID storagePtr) { CopiedAllocator* allocator = &m_globalData->heap.storageAllocator(); |