Changeset 37995 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 30, 2008, 2:35:24 AM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r37991 r37995 1 2008-10-30 Alp Toker <[email protected]> 2 3 Reviewed by Alexey Proskuryakov. 4 5 https://bugs.webkit.org/show_bug.cgi?id=21571 6 VoidPtrPair breaks CTI on Linux 7 8 The VoidPtrPair return change made in r37457 does not work on Linux 9 since POD structs aren't passed in registers. 10 11 This patch uses a union to vectorize VoidPtrPair to a uint64_t and 12 matches Darwin/MSVC fixing CTI/WREC on Linux. 13 14 Alexey reports no measurable change in Mac performance with this fix. 15 16 * VM/Machine.cpp: 17 (JSC::Machine::cti_op_call_JSFunction): 18 (JSC::Machine::cti_op_construct_JSConstruct): 19 (JSC::Machine::cti_op_resolve_func): 20 (JSC::Machine::cti_op_post_inc): 21 (JSC::Machine::cti_op_resolve_with_base): 22 (JSC::Machine::cti_op_post_dec): 23 * VM/Machine.h: 24 (JSC::): 25 1 26 2008-10-29 Oliver Hunt <[email protected]> 2 27 -
trunk/JavaScriptCore/VM/Machine.cpp
r37991 r37995 4350 4350 do { \ 4351 4351 VM_THROW_EXCEPTION_AT_END(); \ 4352 VoidPtrPair pair = { 0, 0}; \4353 return pair ; \4352 VoidPtrPairValue pair = {{ 0, 0 }}; \ 4353 return pair.i; \ 4354 4354 } while (0) 4355 4355 #define VM_THROW_EXCEPTION_AT_END() \ … … 4725 4725 4726 4726 if (LIKELY(argCount == newCodeBlock->numParameters)) { 4727 VoidPtrPair pair = { newCodeBlock, CallFrame::create(callFrame->registers() + registerOffset)};4728 return pair ;4727 VoidPtrPairValue pair = {{ newCodeBlock, CallFrame::create(callFrame->registers() + registerOffset) }}; 4728 return pair.i; 4729 4729 } 4730 4730 … … 4737 4737 argv[i + argCount] = argv[i]; 4738 4738 4739 VoidPtrPair pair = { newCodeBlock, CallFrame::create(r)};4740 return pair ;4739 VoidPtrPairValue pair = {{ newCodeBlock, CallFrame::create(r) }}; 4740 return pair.i; 4741 4741 } 4742 4742 … … 4753 4753 argv[i] = jsUndefined(); 4754 4754 4755 VoidPtrPair pair = { newCodeBlock, CallFrame::create(r)};4756 return pair ;4755 VoidPtrPairValue pair = {{ newCodeBlock, CallFrame::create(r) }}; 4756 return pair.i; 4757 4757 } 4758 4758 … … 4975 4975 4976 4976 if (LIKELY(argCount == newCodeBlock->numParameters)) { 4977 VoidPtrPair pair = { newCodeBlock, CallFrame::create(callFrame->registers() + registerOffset)};4978 return pair ;4977 VoidPtrPairValue pair = {{ newCodeBlock, CallFrame::create(callFrame->registers() + registerOffset) }}; 4978 return pair.i; 4979 4979 } 4980 4980 … … 4987 4987 argv[i + argCount] = argv[i]; 4988 4988 4989 VoidPtrPair pair = { newCodeBlock, CallFrame::create(r)};4990 return pair ;4989 VoidPtrPairValue pair = {{ newCodeBlock, CallFrame::create(r) }}; 4990 return pair.i; 4991 4991 } 4992 4992 … … 5003 5003 argv[i] = jsUndefined(); 5004 5004 5005 VoidPtrPair pair = { newCodeBlock, CallFrame::create(r)};5006 return pair ;5005 VoidPtrPairValue pair = {{ newCodeBlock, CallFrame::create(r) }}; 5006 return pair.i; 5007 5007 } 5008 5008 … … 5104 5104 VM_CHECK_EXCEPTION_AT_END(); 5105 5105 5106 VoidPtrPair pair = { thisObj, asPointer(result)};5107 return pair ;5106 VoidPtrPairValue pair = {{ thisObj, asPointer(result) }}; 5107 return pair.i; 5108 5108 } 5109 5109 ++iter; … … 5385 5385 VM_CHECK_EXCEPTION_AT_END(); 5386 5386 5387 VoidPtrPair pair = { asPointer(number), asPointer(jsNumber(ARG_globalData, number->uncheckedGetNumber() + 1))};5388 return pair ;5387 VoidPtrPairValue pair = {{ asPointer(number), asPointer(jsNumber(ARG_globalData, number->uncheckedGetNumber() + 1)) }}; 5388 return pair.i; 5389 5389 } 5390 5390 … … 5501 5501 VM_CHECK_EXCEPTION_AT_END(); 5502 5502 5503 VoidPtrPair pair = { base, asPointer(result)};5504 return pair ;5503 VoidPtrPairValue pair = {{ base, asPointer(result) }}; 5504 return pair.i; 5505 5505 } 5506 5506 ++iter; … … 5571 5571 VM_CHECK_EXCEPTION_AT_END(); 5572 5572 5573 VoidPtrPair pair = { asPointer(number), asPointer(jsNumber(ARG_globalData, number->uncheckedGetNumber() - 1))};5574 return pair ;5573 VoidPtrPairValue pair = {{ asPointer(number), asPointer(jsNumber(ARG_globalData, number->uncheckedGetNumber() - 1)) }}; 5574 return pair.i; 5575 5575 } 5576 5576 -
trunk/JavaScriptCore/VM/Machine.h
r37991 r37995 82 82 #endif 83 83 84 struct VoidPtrPair { void* first; void* second; }; 84 typedef uint64_t VoidPtrPair; 85 86 typedef union 87 { 88 struct { void* first; void* second; }; 89 VoidPtrPair i; 90 } VoidPtrPairValue; 85 91 #endif 86 92
Note:
See TracChangeset
for help on using the changeset viewer.