Title: [262667] trunk/Source/_javascript_Core
- Revision
- 262667
- Author
- ysuz...@apple.com
- Date
- 2020-06-05 18:59:04 -0700 (Fri, 05 Jun 2020)
Log Message
[JSC] Put dfgOpNames in __DATA,__const section instead of __DATA,__data
https://bugs.webkit.org/show_bug.cgi?id=212840
Reviewed by Saam Barati.
dfgOpNames array itself is not const annotated, and the compiler makes it __DATA,__data instead of __DATA,__const.
We should annotate it with const to ensure that this is compiled into __DATA,__const. We also remove unused CallFrame::describeFrame
since it allocates some bss memory, while we have more sophisticated mechanism (VMInspector) for this functionality and this function
is no longer used.
* dfg/DFGDoesGCCheck.cpp:
(JSC::DFG::DoesGCCheck::verifyCanGC):
* dfg/DFGGraph.cpp:
* dfg/DFGGraph.h:
* interpreter/CallFrame.cpp:
(JSC::CallFrame::describeFrame): Deleted.
* interpreter/CallFrame.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (262666 => 262667)
--- trunk/Source/_javascript_Core/ChangeLog 2020-06-06 01:26:17 UTC (rev 262666)
+++ trunk/Source/_javascript_Core/ChangeLog 2020-06-06 01:59:04 UTC (rev 262667)
@@ -1,3 +1,23 @@
+2020-06-05 Yusuke Suzuki <ysuz...@apple.com>
+
+ [JSC] Put dfgOpNames in __DATA,__const section instead of __DATA,__data
+ https://bugs.webkit.org/show_bug.cgi?id=212840
+
+ Reviewed by Saam Barati.
+
+ dfgOpNames array itself is not const annotated, and the compiler makes it __DATA,__data instead of __DATA,__const.
+ We should annotate it with const to ensure that this is compiled into __DATA,__const. We also remove unused CallFrame::describeFrame
+ since it allocates some bss memory, while we have more sophisticated mechanism (VMInspector) for this functionality and this function
+ is no longer used.
+
+ * dfg/DFGDoesGCCheck.cpp:
+ (JSC::DFG::DoesGCCheck::verifyCanGC):
+ * dfg/DFGGraph.cpp:
+ * dfg/DFGGraph.h:
+ * interpreter/CallFrame.cpp:
+ (JSC::CallFrame::describeFrame): Deleted.
+ * interpreter/CallFrame.h:
+
2020-06-05 Tadeu Zagallo <tzaga...@apple.com>
REGRESSION(r262523): Fix testb3
Modified: trunk/Source/_javascript_Core/dfg/DFGDoesGCCheck.cpp (262666 => 262667)
--- trunk/Source/_javascript_Core/dfg/DFGDoesGCCheck.cpp 2020-06-06 01:26:17 UTC (rev 262666)
+++ trunk/Source/_javascript_Core/dfg/DFGDoesGCCheck.cpp 2020-06-06 01:59:04 UTC (rev 262667)
@@ -28,6 +28,7 @@
#include "CallFrameInlines.h"
#include "CodeBlock.h"
+#include "DFGGraph.h"
#include "DFGNodeType.h"
#include "Heap.h"
#include "Options.h"
@@ -39,8 +40,6 @@
#if ENABLE(DFG_DOES_GC_VALIDATION)
-extern const char* dfgOpNames[];
-
void DoesGCCheck::verifyCanGC(VM& vm)
{
// We do this check here just so we don't have to #include DFGNodeType.h
@@ -66,7 +65,7 @@
RELEASE_ASSERT_NOT_REACHED();
}
} else
- dataLog(" @ D@", nodeIndex(), " ", DFG::dfgOpNames[nodeOp()]);
+ dataLog(" @ D@", nodeIndex(), " ", DFG::Graph::opName(static_cast<DFG::NodeType>(nodeOp())));
CallFrame* callFrame = vm.topCallFrame;
if (callFrame) {
Modified: trunk/Source/_javascript_Core/dfg/DFGGraph.cpp (262666 => 262667)
--- trunk/Source/_javascript_Core/dfg/DFGGraph.cpp 2020-06-06 01:26:17 UTC (rev 262666)
+++ trunk/Source/_javascript_Core/dfg/DFGGraph.cpp 2020-06-06 01:59:04 UTC (rev 262667)
@@ -62,7 +62,7 @@
static constexpr bool dumpOSRAvailabilityData = false;
// Creates an array of stringized names.
-const char* dfgOpNames[] = {
+static const char* const dfgOpNames[] = {
#define STRINGIZE_DFG_OP_ENUM(opcode, flags) #opcode ,
FOR_EACH_DFG_OP(STRINGIZE_DFG_OP_ENUM)
#undef STRINGIZE_DFG_OP_ENUM
Modified: trunk/Source/_javascript_Core/dfg/DFGGraph.h (262666 => 262667)
--- trunk/Source/_javascript_Core/dfg/DFGGraph.h 2020-06-06 01:26:17 UTC (rev 262666)
+++ trunk/Source/_javascript_Core/dfg/DFGGraph.h 2020-06-06 01:59:04 UTC (rev 262667)
@@ -441,7 +441,7 @@
return arithRound->canSpeculateInt32(pass) && !hasExitSite(arithRound->origin.semantic, Overflow) && !hasExitSite(arithRound->origin.semantic, NegativeZero);
}
- static const char *opName(NodeType);
+ static const char* opName(NodeType);
RegisteredStructureSet* addStructureSet(const StructureSet& structureSet)
{
Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.cpp (262666 => 262667)
--- trunk/Source/_javascript_Core/interpreter/CallFrame.cpp 2020-06-06 01:26:17 UTC (rev 262666)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.cpp 2020-06-06 01:59:04 UTC (rev 262667)
@@ -288,21 +288,6 @@
out.print(returnPC());
}
-const char* CallFrame::describeFrame()
-{
- const size_t bufferSize = 200;
- static char buffer[bufferSize + 1];
-
- WTF::StringPrintStream stringStream;
-
- dump(stringStream);
-
- strncpy(buffer, stringStream.toCString().data(), bufferSize);
- buffer[bufferSize] = '\0';
-
- return buffer;
-}
-
void CallFrame::convertToStackOverflowFrame(VM& vm, CodeBlock* codeBlockToKeepAliveUntilFrameIsUnwound)
{
ASSERT(!isDeprecatedCallFrameForDebugger());
Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.h (262666 => 262667)
--- trunk/Source/_javascript_Core/interpreter/CallFrame.h 2020-06-06 01:26:17 UTC (rev 262666)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.h 2020-06-06 01:59:04 UTC (rev 262667)
@@ -280,7 +280,6 @@
}
void dump(PrintStream&);
- JS_EXPORT_PRIVATE const char* describeFrame();
private:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes