Changeset 118240 in webkit for trunk/Source/JavaScriptCore/runtime/Arguments.h
- Timestamp:
- May 23, 2012, 1:52:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Arguments.h
r118030 r118240 68 68 return arguments; 69 69 } 70 71 static Arguments* create(JSGlobalData& globalData, CallFrame* callFrame, InlineCallFrame* inlineCallFrame) 72 { 73 Arguments* arguments = new (NotNull, allocateCell<Arguments>(globalData.heap)) Arguments(callFrame); 74 arguments->finishCreation(callFrame, inlineCallFrame); 75 return arguments; 76 } 70 77 71 78 enum { MaxArguments = 0x10000 }; … … 76 83 Arguments(CallFrame*); 77 84 Arguments(CallFrame*, NoParametersType); 85 86 void tearOffForInlineCallFrame(JSGlobalData& globalData, Register*, InlineCallFrame*); 78 87 79 88 public: … … 93 102 void copyToArguments(ExecState*, CallFrame*, uint32_t length); 94 103 void tearOff(CallFrame*); 104 void tearOff(CallFrame*, InlineCallFrame*); 95 105 bool isTornOff() const { return d->registerArray; } 96 106 void didTearOffActivation(JSGlobalData& globalData, JSActivation* activation) … … 113 123 114 124 void finishCreation(CallFrame*); 125 void finishCreation(CallFrame*, InlineCallFrame*); 115 126 116 127 private: … … 180 191 } 181 192 193 inline void Arguments::finishCreation(CallFrame* callFrame, InlineCallFrame* inlineCallFrame) 194 { 195 Base::finishCreation(callFrame->globalData()); 196 ASSERT(inherits(&s_info)); 197 198 JSFunction* callee = inlineCallFrame->callee.get(); 199 d->numArguments = inlineCallFrame->arguments.size() - 1; 200 d->registers = reinterpret_cast<WriteBarrier<Unknown>*>(callFrame->registers()) + inlineCallFrame->stackOffset; 201 d->callee.set(callFrame->globalData(), this, callee); 202 d->overrodeLength = false; 203 d->overrodeCallee = false; 204 d->overrodeCaller = false; 205 d->isStrictMode = jsCast<FunctionExecutable*>(inlineCallFrame->executable.get())->isStrictMode(); 206 207 // The bytecode generator omits op_tear_off_activation in cases of no 208 // declared parameters, so we need to tear off immediately. 209 if (d->isStrictMode || !callee->jsExecutable()->parameterCount()) 210 tearOff(callFrame, inlineCallFrame); 211 } 212 182 213 } // namespace JSC 183 214
Note:
See TracChangeset
for help on using the changeset viewer.