]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - dfg/DFGMinifiedNode.cpp
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / dfg / DFGMinifiedNode.cpp
index 4d433aa773f4777feb145a5a4f53914cc38cef23..80795c2fe70f03cf1939db317f5309cc76a9272b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2015 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -39,13 +39,11 @@ MinifiedNode MinifiedNode::fromNode(Node* node)
     MinifiedNode result;
     result.m_id = MinifiedID(node);
     result.m_op = node->op();
-    if (hasConstantNumber(node->op()))
-        result.m_info = node->constantNumber();
-    else if (hasWeakConstant(node->op()))
-        result.m_info = bitwise_cast<uintptr_t>(node->weakConstant());
+    if (hasConstant(node->op()))
+        result.m_info = JSValue::encode(node->asJSValue());
     else {
-        ASSERT(node->op() == PhantomArguments);
-        result.m_info = 0;
+        ASSERT(node->op() == PhantomDirectArguments || node->op() == PhantomClonedArguments);
+        result.m_info = bitwise_cast<uintptr_t>(node->origin.semantic.inlineCallFrame);
     }
     return result;
 }