Changeset 160186 in webkit for trunk/Source/JavaScriptCore/interpreter/CallFrameClosure.h
- Timestamp:
- Dec 5, 2013, 12:33:35 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/CallFrameClosure.h
r160094 r160186 1 1 /* 2 * Copyright (C) 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2009, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 struct CallFrameClosure { 34 34 CallFrame* oldCallFrame; 35 #if ENABLE(LLINT_C_LOOP) 36 CallFrame* newCallFrame; 37 #else 38 ProtoCallFrame* newCallFrame; 39 #endif 35 ProtoCallFrame* protoCallFrame; 40 36 JSFunction* function; 41 37 FunctionExecutable* functionExecutable; … … 47 43 void setThis(JSValue value) 48 44 { 49 newCallFrame->setThisValue(value);45 protoCallFrame->setThisValue(value); 50 46 } 51 47 52 48 void setArgument(int argument, JSValue value) 53 49 { 54 newCallFrame->setArgument(argument, value);50 protoCallFrame->setArgument(argument, value); 55 51 } 56 52 57 53 void resetCallFrame() 58 54 { 59 newCallFrame->setScope(scope); 60 #if ENABLE(LLINT_C_LOOP) 61 // setArgument() takes an arg index that starts from 0 for the first 62 // argument after the 'this' value. Since both argumentCountIncludingThis 63 // and parameterCountIncludingThis includes the 'this' value, we need to 64 // subtract 1 from them to make it a valid argument index for setArgument(). 65 for (int i = argumentCountIncludingThis-1; i < parameterCountIncludingThis-1; ++i) 66 newCallFrame->setArgument(i, jsUndefined()); 67 #endif 55 protoCallFrame->setScope(scope); 68 56 } 69 57 };
Note:
See TracChangeset
for help on using the changeset viewer.