Title: [225416] trunk/Source/_javascript_Core
- Revision
- 225416
- Author
- [email protected]
- Date
- 2017-12-01 14:19:03 -0800 (Fri, 01 Dec 2017)
Log Message
WebAssembly: stack trace improvement follow-ups
https://bugs.webkit.org/show_bug.cgi?id=180273
Reviewed by Saam Barati.
* wasm/WasmIndexOrName.cpp:
(JSC::Wasm::makeString):
* wasm/WasmIndexOrName.h:
(JSC::Wasm::IndexOrName::nameSection const):
* wasm/WasmNameSection.h:
(JSC::Wasm::NameSection::NameSection):
(JSC::Wasm::NameSection::get):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (225415 => 225416)
--- trunk/Source/_javascript_Core/ChangeLog 2017-12-01 22:14:55 UTC (rev 225415)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-12-01 22:19:03 UTC (rev 225416)
@@ -1,5 +1,20 @@
2017-12-01 JF Bastien <[email protected]>
+ WebAssembly: stack trace improvement follow-ups
+ https://bugs.webkit.org/show_bug.cgi?id=180273
+
+ Reviewed by Saam Barati.
+
+ * wasm/WasmIndexOrName.cpp:
+ (JSC::Wasm::makeString):
+ * wasm/WasmIndexOrName.h:
+ (JSC::Wasm::IndexOrName::nameSection const):
+ * wasm/WasmNameSection.h:
+ (JSC::Wasm::NameSection::NameSection):
+ (JSC::Wasm::NameSection::get):
+
+2017-12-01 JF Bastien <[email protected]>
+
WebAssembly: restore cached stack limit after out-call
https://bugs.webkit.org/show_bug.cgi?id=179106
<rdar://problem/35337525>
Modified: trunk/Source/_javascript_Core/wasm/WasmIndexOrName.cpp (225415 => 225416)
--- trunk/Source/_javascript_Core/wasm/WasmIndexOrName.cpp 2017-12-01 22:14:55 UTC (rev 225415)
+++ trunk/Source/_javascript_Core/wasm/WasmIndexOrName.cpp 2017-12-01 22:19:03 UTC (rev 225416)
@@ -46,11 +46,11 @@
String makeString(const IndexOrName& ion)
{
if (ion.isEmpty())
- return String("wasm-stub");
+ return ASCIILiteral("wasm-stub");
const String moduleName = ion.nameSection()->moduleName.size() ? String(ion.nameSection()->moduleName.data(), ion.nameSection()->moduleName.size()) : String(ion.nameSection()->moduleHash.data(), ion.nameSection()->moduleHash.size());
if (ion.isIndex())
- return makeString(moduleName, ".wasm-function[", String::number(ion.m_indexName.index & ~IndexOrName::indexTag), "]");
- return makeString(moduleName, ".wasm-function[", String(ion.m_indexName.name->data(), ion.m_indexName.name->size()), "]");
+ return makeString(moduleName, ".wasm-function[", String::number(ion.m_indexName.index & ~IndexOrName::indexTag), ']');
+ return makeString(moduleName, ".wasm-function[", String(ion.m_indexName.name->data(), ion.m_indexName.name->size()), ']');
}
} } // namespace JSC::Wasm
Modified: trunk/Source/_javascript_Core/wasm/WasmIndexOrName.h (225415 => 225416)
--- trunk/Source/_javascript_Core/wasm/WasmIndexOrName.h 2017-12-01 22:14:55 UTC (rev 225415)
+++ trunk/Source/_javascript_Core/wasm/WasmIndexOrName.h 2017-12-01 22:19:03 UTC (rev 225416)
@@ -43,7 +43,7 @@
bool isEmpty() const { return bitwise_cast<Index>(m_indexName) & emptyTag; }
bool isIndex() const { return bitwise_cast<Index>(m_indexName) & indexTag; }
bool isName() const { return !(isEmpty() || isName()); }
- NameSection* nameSection() const { return m_nameSection ? m_nameSection.get() : nullptr; }
+ NameSection* nameSection() const { return m_nameSection.get(); }
friend String makeString(const IndexOrName&);
Modified: trunk/Source/_javascript_Core/wasm/WasmNameSection.h (225415 => 225416)
--- trunk/Source/_javascript_Core/wasm/WasmNameSection.h 2017-12-01 22:14:55 UTC (rev 225415)
+++ trunk/Source/_javascript_Core/wasm/WasmNameSection.h 2017-12-01 22:19:03 UTC (rev 225416)
@@ -26,6 +26,7 @@
#pragma once
#include "WasmName.h"
+#include <wtf/Noncopyable.h>
#include <wtf/text/CString.h>
#include <wtf/ThreadSafeRefCounted.h>
#include <wtf/Vector.h>
@@ -34,6 +35,9 @@
namespace JSC { namespace Wasm {
struct NameSection : public ThreadSafeRefCounted<NameSection> {
+ WTF_MAKE_NONCOPYABLE(NameSection);
+
+public:
NameSection(const CString &hash)
: moduleHash(hash.length())
{
@@ -40,11 +44,10 @@
for (size_t i = 0; i < hash.length(); ++i)
moduleHash[i] = static_cast<uint8_t>(*(hash.data() + i));
}
- NameSection(const NameSection&) = delete;
std::pair<const Name*, RefPtr<NameSection>> get(size_t functionIndexSpace)
{
- return std::make_pair(functionIndexSpace < functionNames.size() ? &functionNames[functionIndexSpace] : nullptr, RefPtr<NameSection>(this));
+ return std::make_pair(functionIndexSpace < functionNames.size() ? &functionNames[functionIndexSpace] : nullptr, makeRefPtr(this));
}
Name moduleName;
Name moduleHash;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes