Get rid of JSLexicalEnvironment::argumentsGetter
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Feb 2015 23:50:01 +0000 (23:50 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Feb 2015 23:50:01 +0000 (23:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141930

Reviewed by Mark Lam.

This function is unused, and the way it's written is bizarre - it's a return statement that
dominates a bunch of dead code.

* runtime/JSLexicalEnvironment.cpp:
(JSC::JSLexicalEnvironment::argumentsGetter): Deleted.
* runtime/JSLexicalEnvironment.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180529 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp
Source/JavaScriptCore/runtime/JSLexicalEnvironment.h

index c296baa..1ca558a 100644 (file)
@@ -1,5 +1,19 @@
 2015-02-23  Filip Pizlo  <fpizlo@apple.com>
 
+        Get rid of JSLexicalEnvironment::argumentsGetter
+        https://bugs.webkit.org/show_bug.cgi?id=141930
+
+        Reviewed by Mark Lam.
+        
+        This function is unused, and the way it's written is bizarre - it's a return statement that
+        dominates a bunch of dead code.
+
+        * runtime/JSLexicalEnvironment.cpp:
+        (JSC::JSLexicalEnvironment::argumentsGetter): Deleted.
+        * runtime/JSLexicalEnvironment.h:
+
+2015-02-23  Filip Pizlo  <fpizlo@apple.com>
+
         Remove unused activationCount and allTheThingsCount variable declarations.
 
         Rubber stamped by Mark Lam and Michael Saboff.
index b14a479..84037a3 100644 (file)
@@ -197,23 +197,4 @@ JSValue JSLexicalEnvironment::toThis(JSCell*, ExecState* exec, ECMAMode ecmaMode
     return exec->globalThisValue();
 }
 
-EncodedJSValue JSLexicalEnvironment::argumentsGetter(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName)
-{
-    JSLexicalEnvironment* lexicalEnvironment = jsCast<JSLexicalEnvironment*>(slotBase);
-    CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(lexicalEnvironment->m_registers));
-    return JSValue::encode(jsUndefined());
-
-    VirtualRegister argumentsRegister = callFrame->codeBlock()->argumentsRegister();
-    if (JSValue arguments = callFrame->uncheckedR(argumentsRegister.offset()).jsValue())
-        return JSValue::encode(arguments);
-    int realArgumentsRegister = unmodifiedArgumentsRegister(argumentsRegister).offset();
-
-    JSValue arguments = JSValue(Arguments::create(callFrame->vm(), callFrame, lexicalEnvironment));
-    callFrame->uncheckedR(argumentsRegister.offset()) = arguments;
-    callFrame->uncheckedR(realArgumentsRegister) = arguments;
-    
-    ASSERT(callFrame->uncheckedR(realArgumentsRegister).jsValue().inherits(Arguments::info()));
-    return JSValue::encode(callFrame->uncheckedR(realArgumentsRegister).jsValue());
-}
-
 } // namespace JSC
index f368102..ba2b808 100644 (file)
@@ -97,8 +97,6 @@ private:
     bool symbolTablePut(ExecState*, PropertyName, JSValue, bool shouldThrow);
     bool symbolTablePutWithAttributes(VM&, PropertyName, JSValue, unsigned attributes);
 
-    static EncodedJSValue argumentsGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName);
-
     static size_t allocationSize(SymbolTable*);
     static size_t storageOffset();