Changeset 26620 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 15, 2007, 1:41:39 PM (18 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r26619 r26620 1 2007-10-15 Geoffrey Garen <[email protected]> 2 3 Reviewed by Darin Adler. 4 5 Removed the concept of AnonymousCode. It was unused, and it doesn't 6 exist in the ECMA spec. 7 8 [ Patch broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ] 9 10 * kjs/Context.cpp: 11 (KJS::Context::Context): 12 * kjs/function.h: 13 (KJS::): 14 * kjs/nodes.cpp: 15 (ReturnNode::execute): 16 1 17 2007-10-15 Geoffrey Garen <[email protected]> 2 18 -
trunk/JavaScriptCore/kjs/Context.cpp
r25534 r26620 43 43 44 44 // create and initialize activation object (ECMA 10.1.6) 45 if (type == FunctionCode || type == AnonymousCode) {45 if (type == FunctionCode) { 46 46 m_activation = new ActivationImp(func, *args); 47 47 m_variable = m_activation; … … 66 66 break; 67 67 case FunctionCode: 68 case AnonymousCode: 69 if (type == FunctionCode) { 70 scope = func->scope(); 71 scope.push(m_activation); 72 } else { 73 scope.clear(); 74 scope.push(glob); 75 scope.push(m_activation); 76 } 68 scope = func->scope(); 69 scope.push(m_activation); 77 70 m_variable = m_activation; // TODO: DontDelete ? (ECMA 10.2.3) 78 71 m_thisVal = thisV; 79 72 break; 80 73 } 81 74 82 75 m_interpreter->setContext(this); 83 76 } -
trunk/JavaScriptCore/kjs/function.h
r24394 r26620 35 35 class FunctionPrototype; 36 36 37 enum CodeType { GlobalCode, 38 EvalCode, 39 FunctionCode, 40 AnonymousCode }; 37 enum CodeType { 38 GlobalCode, 39 EvalCode, 40 FunctionCode, 41 }; 41 42 42 43 class InternalFunctionImp : public JSObject { -
trunk/JavaScriptCore/kjs/nodes.cpp
r26617 r26620 2108 2108 2109 2109 CodeType codeType = exec->context()->codeType(); 2110 if (codeType != FunctionCode && codeType != AnonymousCode ) {2110 if (codeType != FunctionCode) 2111 2111 return createErrorCompletion(exec, SyntaxError, "Invalid return statement."); 2112 }2113 2112 2114 2113 if (!value)
Note:
See TracChangeset
for help on using the changeset viewer.