Changeset 108908 in webkit for trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
- Timestamp:
- Feb 25, 2012, 3:05:38 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r108444 r108908 34 34 #include "InlineASM.h" 35 35 #include "Interpreter.h" 36 #include "JSActivation.h" 36 37 #include "JSByteArray.h" 37 38 #include "JSGlobalData.h" 39 #include "JSStaticScopeObject.h" 38 40 #include "Operations.h" 39 41 … … 973 975 974 976 return JSValue::encode(RegExpObject::create(exec->globalData(), exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->regExpStructure(), regexp)); 977 } 978 979 JSCell* DFG_OPERATION operationCreateActivation(ExecState* exec) 980 { 981 JSGlobalData& globalData = exec->globalData(); 982 JSActivation* activation = JSActivation::create( 983 globalData, exec, static_cast<FunctionExecutable*>(exec->codeBlock()->ownerExecutable())); 984 exec->setScopeChain(exec->scopeChain()->push(activation)); 985 return activation; 986 } 987 988 void DFG_OPERATION operationTearOffActivation(ExecState* exec, JSCell* activation) 989 { 990 ASSERT(activation); 991 ASSERT(activation->inherits(&JSActivation::s_info)); 992 static_cast<JSActivation*>(activation)->tearOff(exec->globalData()); 993 } 994 995 JSCell* DFG_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable) 996 { 997 ASSERT(functionExecutable->inherits(&FunctionExecutable::s_info)); 998 return static_cast<FunctionExecutable*>(functionExecutable)->make(exec, exec->scopeChain()); 999 } 1000 1001 JSCell* DFG_OPERATION operationNewFunctionExpression(ExecState* exec, JSCell* functionExecutableAsCell) 1002 { 1003 ASSERT(functionExecutableAsCell->inherits(&FunctionExecutable::s_info)); 1004 FunctionExecutable* functionExecutable = 1005 static_cast<FunctionExecutable*>(functionExecutableAsCell); 1006 JSFunction *function = functionExecutable->make(exec, exec->scopeChain()); 1007 if (!functionExecutable->name().isNull()) { 1008 JSStaticScopeObject* functionScopeObject = 1009 JSStaticScopeObject::create( 1010 exec, functionExecutable->name(), function, ReadOnly | DontDelete); 1011 function->setScope(exec->globalData(), function->scope()->push(functionScopeObject)); 1012 } 1013 return function; 975 1014 } 976 1015
Note:
See TracChangeset
for help on using the changeset viewer.