Title: [169920] trunk/Source/_javascript_Core
Revision
169920
Author
[email protected]
Date
2014-06-12 16:30:51 -0700 (Thu, 12 Jun 2014)

Log Message

Remove some dead / unused code.
<https://webkit.org/b/133828>

Reviewed by Filip Pizlo.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createBuiltinExecutable):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedFunctionExecutable::create):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::makeFunction):
* parser/Parser.h:
(JSC::DepthManager::DepthManager): Deleted.
(JSC::DepthManager::~DepthManager): Deleted.
* runtime/CodeCache.cpp:
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (169919 => 169920)


--- trunk/Source/_javascript_Core/ChangeLog	2014-06-12 23:10:29 UTC (rev 169919)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-06-12 23:30:51 UTC (rev 169920)
@@ -1,3 +1,24 @@
+2014-06-12  Mark Lam  <[email protected]>
+
+        Remove some dead / unused code.
+        <https://webkit.org/b/133828>
+
+        Reviewed by Filip Pizlo.
+
+        * builtins/BuiltinExecutables.cpp:
+        (JSC::BuiltinExecutables::createBuiltinExecutable):
+        * bytecode/UnlinkedCodeBlock.cpp:
+        (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
+        * bytecode/UnlinkedCodeBlock.h:
+        (JSC::UnlinkedFunctionExecutable::create):
+        * bytecompiler/BytecodeGenerator.h:
+        (JSC::BytecodeGenerator::makeFunction):
+        * parser/Parser.h:
+        (JSC::DepthManager::DepthManager): Deleted.
+        (JSC::DepthManager::~DepthManager): Deleted.
+        * runtime/CodeCache.cpp:
+        (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
+
 2014-06-12  Mark Hahnenberg  <[email protected]>
 
         Move structureHasRareData out of TypeInfo

Modified: trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp (169919 => 169920)


--- trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp	2014-06-12 23:10:29 UTC (rev 169919)
+++ trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp	2014-06-12 23:30:51 UTC (rev 169920)
@@ -78,7 +78,7 @@
         RELEASE_ASSERT(closedVariable->isEmptyUnique());
     }
     body->overrideName(name);
-    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&m_vm, source, body, true, UnlinkedBuiltinFunction);
+    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&m_vm, source, body, UnlinkedBuiltinFunction);
     functionExecutable->m_nameValue.set(m_vm, functionExecutable, jsString(&m_vm, name.string()));
     return functionExecutable;
 }

Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp (169919 => 169920)


--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp	2014-06-12 23:10:29 UTC (rev 169919)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp	2014-06-12 23:30:51 UTC (rev 169920)
@@ -82,13 +82,12 @@
     return addConstant(v);
 }
 
-UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, FunctionBodyNode* node, bool isFromGlobalCode, UnlinkedFunctionKind kind)
+UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, FunctionBodyNode* node, UnlinkedFunctionKind kind)
     : Base(*vm, structure)
     , m_numCapturedVariables(node->capturedVariableCount())
     , m_forceUsesArguments(node->usesArguments())
     , m_isInStrictContext(node->isStrictMode())
     , m_hasCapturedVariables(node->hasCapturedVariables())
-    , m_isFromGlobalCode(isFromGlobalCode)
     , m_isBuiltinFunction(kind == UnlinkedBuiltinFunction)
     , m_name(node->ident())
     , m_inferredName(node->inferredName())

Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h (169919 => 169920)


--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h	2014-06-12 23:10:29 UTC (rev 169919)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h	2014-06-12 23:30:51 UTC (rev 169920)
@@ -92,9 +92,9 @@
     friend class CodeCache;
     friend class VM;
     typedef JSCell Base;
-    static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode& source, FunctionBodyNode* node, bool isFromGlobalCode, UnlinkedFunctionKind unlinkedFunctionKind)
+    static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode& source, FunctionBodyNode* node, UnlinkedFunctionKind unlinkedFunctionKind)
     {
-        UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell<UnlinkedFunctionExecutable>(vm->heap)) UnlinkedFunctionExecutable(vm, vm->unlinkedFunctionExecutableStructure.get(), source, node, isFromGlobalCode, unlinkedFunctionKind);
+        UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell<UnlinkedFunctionExecutable>(vm->heap)) UnlinkedFunctionExecutable(vm, vm->unlinkedFunctionExecutableStructure.get(), source, node, unlinkedFunctionKind);
         instance->finishCreation(*vm);
         return instance;
     }
@@ -162,7 +162,7 @@
     bool isBuiltinFunction() const { return m_isBuiltinFunction; }
 
 private:
-    UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&, FunctionBodyNode*, bool isFromGlobalCode, UnlinkedFunctionKind);
+    UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&, FunctionBodyNode*, UnlinkedFunctionKind);
     WriteBarrier<UnlinkedFunctionCodeBlock> m_codeBlockForCall;
     WriteBarrier<UnlinkedFunctionCodeBlock> m_codeBlockForConstruct;
 
@@ -170,7 +170,6 @@
     bool m_forceUsesArguments : 1;
     bool m_isInStrictContext : 1;
     bool m_hasCapturedVariables : 1;
-    bool m_isFromGlobalCode : 1;
     bool m_isBuiltinFunction : 1;
 
     Identifier m_name;

Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h (169919 => 169920)


--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h	2014-06-12 23:10:29 UTC (rev 169919)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h	2014-06-12 23:30:51 UTC (rev 169920)
@@ -547,7 +547,7 @@
         
         UnlinkedFunctionExecutable* makeFunction(FunctionBodyNode* body)
         {
-            return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode->source(), body, false, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction);
+            return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode->source(), body, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction);
         }
 
         RegisterID* emitInitLazyRegister(RegisterID*);

Modified: trunk/Source/_javascript_Core/parser/Parser.h (169919 => 169920)


--- trunk/Source/_javascript_Core/parser/Parser.h	2014-06-12 23:10:29 UTC (rev 169919)
+++ trunk/Source/_javascript_Core/parser/Parser.h	2014-06-12 23:30:51 UTC (rev 169920)
@@ -88,23 +88,6 @@
 template <typename T> inline bool isEvalNode() { return false; }
 template <> inline bool isEvalNode<EvalNode>() { return true; }
 
-struct DepthManager {
-    DepthManager(int* depth)
-        : m_originalDepth(*depth)
-        , m_depth(depth)
-    {
-    }
-
-    ~DepthManager()
-    {
-        *m_depth = m_originalDepth;
-    }
-
-private:
-    int m_originalDepth;
-    int* m_depth;
-};
-
 struct ScopeLabelInfo {
     ScopeLabelInfo(StringImpl* ident, bool isLoop)
         : m_ident(ident)

Modified: trunk/Source/_javascript_Core/runtime/CodeCache.cpp (169919 => 169920)


--- trunk/Source/_javascript_Core/runtime/CodeCache.cpp	2014-06-12 23:10:29 UTC (rev 169919)
+++ trunk/Source/_javascript_Core/runtime/CodeCache.cpp	2014-06-12 23:30:51 UTC (rev 169920)
@@ -163,7 +163,7 @@
     RELEASE_ASSERT(body);
     RELEASE_ASSERT(body->ident().isNull());
 
-    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, body, true, UnlinkedNormalFunction);
+    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, body, UnlinkedNormalFunction);
     functionExecutable->m_nameValue.set(vm, functionExecutable, jsString(&vm, name.string()));
 
     addResult.iterator->value = SourceCodeValue(vm, functionExecutable, m_sourceCode.age());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to