Changeset 37678 in webkit
- Timestamp:
- Oct 18, 2008 2:44:50 AM (15 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r37674 r37678 1 2008-10-18 Cameron Zwarich <zwarich@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Bug 21702: Special op_create_activation for the case where there are no named parameters 6 <https://bugs.webkit.org/show_bug.cgi?id=21702> 7 8 This is a 2.5% speedup on the V8 Raytrace benchmark and a 1.1% speedup 9 on the V8 Earley-Boyer benchmark. 10 11 * VM/CTI.cpp: 12 (JSC::CTI::privateCompileMainPass): 13 * VM/Machine.cpp: 14 (JSC::Machine::cti_op_create_arguments_no_params): 15 * VM/Machine.h: 16 * kjs/Arguments.h: 17 (JSC::Arguments::): 18 (JSC::Arguments::Arguments): 19 1 20 2008-10-17 Maciej Stachowiak <mjs@apple.com> 2 21 -
trunk/JavaScriptCore/VM/CTI.cpp
r37670 r37678 2085 2085 } 2086 2086 case op_create_arguments: { 2087 emitCTICall(i, Machine::cti_op_create_arguments);2087 emitCTICall(i, (m_codeBlock->numParameters == 1) ? Machine::cti_op_create_arguments_no_params : Machine::cti_op_create_arguments); 2088 2088 i += 1; 2089 2089 break; -
trunk/JavaScriptCore/VM/Machine.cpp
r37674 r37678 4776 4776 } 4777 4777 4778 void Machine::cti_op_create_arguments_no_params(CTI_ARGS) 4779 { 4780 Arguments* arguments = new (ARG_globalData) Arguments(ARG_callFrame, Arguments::ArgumentsNoParameters); 4781 ARG_callFrame->setCalleeArguments(arguments); 4782 ARG_callFrame[RegisterFile::ArgumentsRegister] = arguments; 4783 } 4784 4778 4785 void Machine::cti_op_tear_off_activation(CTI_ARGS) 4779 4786 { -
trunk/JavaScriptCore/VM/Machine.h
r37670 r37678 187 187 static JSValue* SFX_CALL cti_op_call_NotJSFunction(CTI_ARGS); 188 188 static void SFX_CALL cti_op_create_arguments(CTI_ARGS); 189 static void SFX_CALL cti_op_create_arguments_no_params(CTI_ARGS); 189 190 static void SFX_CALL cti_op_tear_off_activation(CTI_ARGS); 190 191 static void SFX_CALL cti_op_tear_off_arguments(CTI_ARGS); -
trunk/JavaScriptCore/kjs/Arguments.h
r37576 r37678 54 54 class Arguments : public JSObject { 55 55 public: 56 enum ArgumentsParameters { 57 ArgumentsNoParameters 58 }; 59 56 60 Arguments(CallFrame*); 61 Arguments(CallFrame*, enum ArgumentsParameters); 57 62 virtual ~Arguments(); 58 63 … … 141 146 } 142 147 148 inline Arguments::Arguments(CallFrame* callFrame, enum ArgumentsParameters) 149 : JSObject(callFrame->lexicalGlobalObject()->argumentsStructure()) 150 , d(new ArgumentsData) 151 { 152 unsigned numArguments = callFrame->argumentCount() - 1; 153 154 d->numParameters = 0; 155 d->numArguments = numArguments; 156 d->activation = 0; 157 158 Register* extraArguments; 159 if (numArguments > sizeof(d->extraArgumentsFixedBuffer) / sizeof(Register)) 160 extraArguments = new Register[numArguments]; 161 else 162 extraArguments = d->extraArgumentsFixedBuffer; 163 164 Register* argv = callFrame->registers() - RegisterFile::CallFrameHeaderSize - numArguments - 1; 165 for (unsigned i = 0; i < numArguments; ++i) 166 extraArguments[i] = argv[i]; 167 168 d->extraArguments = extraArguments; 169 170 d->callee = callFrame->callee(); 171 d->overrodeLength = false; 172 d->overrodeCallee = false; 173 } 174 143 175 inline void Arguments::copyRegisters() 144 176 {
Note: See TracChangeset
for help on using the changeset viewer.