Changeset 129827 in webkit for trunk/Source/JavaScriptCore/interpreter
- Timestamp:
- Sep 27, 2012, 5:50:34 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore/interpreter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/CallFrame.h
r129453 r129827 191 191 static int argumentOffsetIncludingThis(int argument) { return s_thisArgumentOffset - argument; } 192 192 193 // In the following (argument() and setArgument()), the 'argument' 194 // parameter is the index of the arguments of the target function of 195 // this frame. The index starts at 0 for the first arg, 1 for the 196 // second, etc. 197 // 198 // The arguments (in this case) do not include the 'this' value. 199 // arguments(0) will not fetch the 'this' value. To get/set 'this', 200 // use thisValue() and setThisValue() below. 201 193 202 JSValue argument(size_t argument) 194 203 { -
trunk/Source/JavaScriptCore/interpreter/CallFrameClosure.h
r127202 r129827 53 53 { 54 54 newCallFrame->setScope(scope); 55 for (int i = argumentCountIncludingThis; i < parameterCountIncludingThis; ++i) 55 // setArgument() takes an arg index that starts from 0 for the first 56 // argument after the 'this' value. Since both argumentCountIncludingThis 57 // and parameterCountIncludingThis includes the 'this' value, we need to 58 // subtract 1 from them to make i a valid argument index for setArgument(). 59 for (int i = argumentCountIncludingThis-1; i < parameterCountIncludingThis-1; ++i) 56 60 newCallFrame->setArgument(i, jsUndefined()); 57 61 }
Note:
See TracChangeset
for help on using the changeset viewer.