Changeset 102811 in webkit
- Timestamp:
- Dec 14, 2011 12:51:14 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r102808 r102811 1 2011-12-14 Gavin Barraclough <barraclough@apple.com> 2 3 DFG relies on returning a struct in registers 4 https://bugs.webkit.org/show_bug.cgi?id=74527 5 6 Reviewed by Geoff Garen. 7 8 This will not work on all platforms. Returning a uint64_t will more reliably achieve 9 what we want, on 32-bit platforms (on 64-bit, stick with the struct return). 10 11 * dfg/DFGOperations.cpp: 12 * dfg/DFGOperations.h: 13 (JSC::DFG::DFGHandler::dfgHandlerEncoded): 14 1 15 2011-12-14 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r102545 r102811 796 796 } 797 797 798 DFGHandler DFG_OPERATION lookupExceptionHandler(ExecState* exec, ReturnAddressPtr faultLocation)798 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandler(ExecState* exec, ReturnAddressPtr faultLocation) 799 799 { 800 800 JSValue exceptionValue = exec->exception(); … … 806 806 void* catchRoutine = handler ? handler->nativeCode.executableAddress() : (void*)ctiOpThrowNotCaught; 807 807 ASSERT(catchRoutine); 808 return DFGHandler(exec, catchRoutine);808 return dfgHandlerEncoded(exec, catchRoutine); 809 809 } 810 810 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.h
r101298 r102811 147 147 struct DFGHandler { 148 148 DFGHandler(ExecState* exec, void* handler) 149 : exec(exec)150 , handler(handler)151 149 { 150 u.s.exec = exec; 151 u.s.handler = handler; 152 152 } 153 153 154 ExecState* exec; 155 void* handler; 154 #if !CPU(X86_64) 155 uint64_t encoded() 156 { 157 COMPILE_ASSERT(sizeof(Union) == sizeof(uint64_t), DFGHandler_Union_is_64bit); 158 return u.encoded; 159 } 160 #endif 161 162 union Union { 163 struct Struct { 164 ExecState* exec; 165 void* handler; 166 } s; 167 uint64_t encoded; 168 } u; 156 169 }; 157 DFGHandler DFG_OPERATION lookupExceptionHandler(ExecState*, ReturnAddressPtr faultLocation); 170 #if CPU(X86_64) 171 typedef DFGHandler DFGHandlerEncoded; 172 inline DFGHandlerEncoded dfgHandlerEncoded(ExecState* exec, void* handler) 173 { 174 return DFGHandler(exec, handler); 175 } 176 #else 177 typedef uint64_t DFGHandlerEncoded; 178 inline DFGHandlerEncoded dfgHandlerEncoded(ExecState* exec, void* handler) 179 { 180 return DFGHandler(exec, handler).encoded(); 181 } 182 #endif 183 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandler(ExecState*, ReturnAddressPtr faultLocation); 158 184 159 185 // These operations implement the implicitly called ToInt32, ToNumber, and ToBoolean conversions from ES5.
Note: See TracChangeset
for help on using the changeset viewer.