Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (221212 => 221213)
--- trunk/Source/_javascript_Core/ChangeLog 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-08-25 23:42:02 UTC (rev 221213)
@@ -1,3 +1,28 @@
+2017-08-25 Daniel Bates <[email protected]>
+
+ Demarcate code added due to lack of NSDMI for aggregates
+ https://bugs.webkit.org/show_bug.cgi?id=175990
+
+ Reviewed by Andy Estes.
+
+ * domjit/DOMJITEffect.h:
+ (JSC::DOMJIT::Effect::Effect):
+ (JSC::DOMJIT::Effect::forWrite):
+ (JSC::DOMJIT::Effect::forRead):
+ (JSC::DOMJIT::Effect::forReadWrite):
+ (JSC::DOMJIT::Effect::forPure):
+ (JSC::DOMJIT::Effect::forDef):
+ * runtime/HasOwnPropertyCache.h:
+ (JSC::HasOwnPropertyCache::Entry::Entry):
+ (JSC::HasOwnPropertyCache::Entry::operator=): Deleted.
+ * wasm/WasmFormat.h: Modernize some of the code while I am here. Also
+ make some comments read well.
+ (JSC::Wasm::CallableFunction::CallableFunction):
+ * wasm/js/WebAssemblyFunction.cpp:
+ (JSC::WebAssemblyFunction::WebAssemblyFunction):
+ * wasm/js/WebAssemblyWrapperFunction.cpp:
+ (JSC::WebAssemblyWrapperFunction::create):
+
2017-08-25 Saam Barati <[email protected]>
Unreviewed. Fix 32-bit after r221196
Modified: trunk/Source/_javascript_Core/domjit/DOMJITEffect.h (221212 => 221213)
--- trunk/Source/_javascript_Core/domjit/DOMJITEffect.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/_javascript_Core/domjit/DOMJITEffect.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -29,54 +29,50 @@
namespace JSC { namespace DOMJIT {
-class Effect {
-public:
- HeapRange reads { HeapRange::top() };
- HeapRange writes { HeapRange::top() };
- HeapRange def { HeapRange::top() };
-
+struct Effect {
+#if !COMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
constexpr Effect() = default;
constexpr Effect(HeapRange reads, HeapRange writes)
- : reads(reads)
- , writes(writes)
+ : reads { reads }
+ , writes { writes }
{
}
-
constexpr Effect(HeapRange reads, HeapRange writes, HeapRange def)
- : reads(reads)
- , writes(writes)
- , def(def)
+ : reads { reads }
+ , writes { writes }
+ , def { def }
{
}
+#endif
constexpr static Effect forWrite(HeapRange writeRange)
{
- return Effect(HeapRange::none(), writeRange);
+ return { HeapRange::none(), writeRange };
}
constexpr static Effect forRead(HeapRange readRange)
{
- return Effect(readRange, HeapRange::none());
+ return { readRange, HeapRange::none() };
}
constexpr static Effect forReadWrite(HeapRange readRange, HeapRange writeRange)
{
- return Effect(readRange, writeRange);
+ return { readRange, writeRange };
}
constexpr static Effect forPure()
{
- return Effect(HeapRange::none(), HeapRange::none(), HeapRange::none());
+ return { HeapRange::none(), HeapRange::none(), HeapRange::none() };
}
constexpr static Effect forDef(HeapRange def)
{
- return Effect(def, HeapRange::none(), def);
+ return { def, HeapRange::none(), def };
}
constexpr static Effect forDef(HeapRange def, HeapRange readRange, HeapRange writeRange)
{
- return Effect(readRange, writeRange, def);
+ return { readRange, writeRange, def };
}
constexpr bool mustGenerate() const
@@ -83,6 +79,10 @@
{
return !!writes;
}
+
+ HeapRange reads { HeapRange::top() };
+ HeapRange writes { HeapRange::top() };
+ HeapRange def { HeapRange::top() };
};
} }
Modified: trunk/Source/_javascript_Core/runtime/HasOwnPropertyCache.h (221212 => 221213)
--- trunk/Source/_javascript_Core/runtime/HasOwnPropertyCache.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/_javascript_Core/runtime/HasOwnPropertyCache.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -42,23 +42,19 @@
static ptrdiff_t offsetOfImpl() { return OBJECT_OFFSETOF(Entry, impl); }
static ptrdiff_t offsetOfResult() { return OBJECT_OFFSETOF(Entry, result); }
+#if !COMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
Entry() = default;
-
Entry(RefPtr<UniquedStringImpl>&& impl, StructureID structureID, bool result)
- : impl(WTFMove(impl))
- , structureID(structureID)
- , result(result)
- { }
-
- Entry& operator=(Entry&& other)
+ : impl { WTFMove(impl) }
+ , structureID { structureID }
+ , result { result }
{
- impl = WTFMove(other.impl);
- structureID = other.structureID;
- result = other.result;
- return *this;
}
- RefPtr<UniquedStringImpl> impl { };
+ Entry& operator=(Entry&& other) = default;
+#endif
+
+ RefPtr<UniquedStringImpl> impl;
StructureID structureID { 0 };
bool result { false };
};
Modified: trunk/Source/_javascript_Core/wasm/WasmFormat.h (221212 => 221213)
--- trunk/Source/_javascript_Core/wasm/WasmFormat.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/_javascript_Core/wasm/WasmFormat.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -282,26 +282,28 @@
MacroAssemblerCodeRef wasmToWasm;
};
-typedef void** WasmEntrypointLoadLocation;
+using WasmEntrypointLoadLocation = void**;
-// WebAssembly direct calls and call_indirect use indices into "function index space". This space starts with all imports, and then all internal functions.
-// CallableFunction and FunctionIndexSpace are only meant as fast lookup tables for these opcodes, and do not own code.
+// WebAssembly direct calls and call_indirect use indices into "function index space". This space starts
+// with all imports, and then all internal functions. CallableFunction and FunctionIndexSpace are only
+// meant as fast lookup tables for these opcodes and do not own code.
struct CallableFunction {
+#if !COMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
CallableFunction() = default;
-
CallableFunction(SignatureIndex signatureIndex, WasmEntrypointLoadLocation code = nullptr)
- : signatureIndex(signatureIndex)
- , code(code)
+ : signatureIndex { signatureIndex }
+ , code { code }
{
}
+#endif
static ptrdiff_t offsetOfWasmEntrypointLoadLocation() { return OBJECT_OFFSETOF(CallableFunction, code); }
- // FIXME pack the SignatureIndex and the code pointer into one 64-bit value. https://bugs.webkit.org/show_bug.cgi?id=165511
+ // FIXME: Pack signature index and code pointer into one 64-bit value. See <https://bugs.webkit.org/show_bug.cgi?id=165511>.
SignatureIndex signatureIndex { Signature::invalidIndex };
WasmEntrypointLoadLocation code { nullptr };
};
-typedef Vector<CallableFunction> FunctionIndexSpace;
+using FunctionIndexSpace = Vector<CallableFunction>;
} } // namespace JSC::Wasm
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp (221212 => 221213)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp 2017-08-25 23:42:02 UTC (rev 221213)
@@ -190,9 +190,9 @@
}
WebAssemblyFunction::WebAssemblyFunction(VM& vm, JSGlobalObject* globalObject, Structure* structure, Wasm::Callee& jsEntrypoint, Wasm::WasmEntrypointLoadLocation wasmEntrypoint, Wasm::SignatureIndex signatureIndex)
- : Base(vm, globalObject, structure)
- , m_jsEntrypoint(jsEntrypoint.entrypoint())
- , m_wasmFunction(Wasm::CallableFunction(signatureIndex, wasmEntrypoint))
+ : Base { vm, globalObject, structure }
+ , m_jsEntrypoint { jsEntrypoint.entrypoint() }
+ , m_wasmFunction { signatureIndex, wasmEntrypoint }
{ }
} // namespace JSC
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyWrapperFunction.cpp (221212 => 221213)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyWrapperFunction.cpp 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyWrapperFunction.cpp 2017-08-25 23:42:02 UTC (rev 221213)
@@ -63,7 +63,7 @@
ASSERT_WITH_MESSAGE(!function->inherits(vm, WebAssemblyWrapperFunction::info()), "We should never double wrap a wrapper function.");
String name = "";
NativeExecutable* executable = vm.getHostFunction(callWebAssemblyWrapperFunction, NoIntrinsic, callHostFunctionAsConstructor, nullptr, name);
- WebAssemblyWrapperFunction* result = new (NotNull, allocateCell<WebAssemblyWrapperFunction>(vm.heap)) WebAssemblyWrapperFunction(vm, globalObject, globalObject->webAssemblyWrapperFunctionStructure(), Wasm::CallableFunction(signatureIndex, instance->codeBlock()->wasmToJsCallStubForImport(importIndex)));
+ WebAssemblyWrapperFunction* result = new (NotNull, allocateCell<WebAssemblyWrapperFunction>(vm.heap)) WebAssemblyWrapperFunction(vm, globalObject, globalObject->webAssemblyWrapperFunctionStructure(), { signatureIndex, instance->codeBlock()->wasmToJsCallStubForImport(importIndex) });
const Wasm::Signature& signature = Wasm::SignatureInformation::get(signatureIndex);
result->finishCreation(vm, executable, signature.argumentCount(), name, function, instance);
return result;
Modified: trunk/Source/WTF/ChangeLog (221212 => 221213)
--- trunk/Source/WTF/ChangeLog 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/WTF/ChangeLog 2017-08-25 23:42:02 UTC (rev 221213)
@@ -1,3 +1,12 @@
+2017-08-25 Daniel Bates <[email protected]>
+
+ Demarcate code added due to lack of NSDMI for aggregates
+ https://bugs.webkit.org/show_bug.cgi?id=175990
+
+ Reviewed by Andy Estes.
+
+ * wtf/Compiler.h:
+
2017-08-25 Don Olmstead <[email protected]>
Define *_GIGACAGE_MASK when Gigacage is not supported
Modified: trunk/Source/WTF/wtf/Compiler.h (221212 => 221213)
--- trunk/Source/WTF/wtf/Compiler.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/WTF/wtf/Compiler.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -150,6 +150,12 @@
#define WTF_COMPILER_SUPPORTS_EABI 1
#endif
+/* Non-static data member initializer (NSDMI) for aggregates */
+
+#if defined(__cpp_aggregate_nsdmi) && __cpp_aggregate_nsdmi >= 201304
+#define WTF_COMPILER_SUPPORTS_NSDMI_FOR_AGGREGATES 1
+#endif
+
/* RELAXED_CONSTEXPR */
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
Modified: trunk/Source/WebCore/ChangeLog (221212 => 221213)
--- trunk/Source/WebCore/ChangeLog 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/WebCore/ChangeLog 2017-08-25 23:42:02 UTC (rev 221213)
@@ -1,5 +1,24 @@
2017-08-25 Daniel Bates <[email protected]>
+ Demarcate code added due to lack of NSDMI for aggregates
+ https://bugs.webkit.org/show_bug.cgi?id=175990
+
+ Reviewed by Andy Estes.
+
+ * html/canvas/CanvasStyle.h:
+ * platform/mediastream/IceCandidate.h:
+ (WebCore::IceCandidate::IceCandidate):
+ * platform/text/StringWithDirection.h: Replace const String& and String&& constructor
+ overloads with a single user-defined constructor that takes a String by value to handle
+ both cases.
+ (WebCore::StringWithDirection::StringWithDirection):
+ (WebCore::truncateFromEnd):
+ * style/StyleUpdate.h:
+ (WebCore::Style::ElementUpdate::ElementUpdate):
+ (WebCore::Style::TextUpdate::TextUpdate):
+
+2017-08-25 Daniel Bates <[email protected]>
+
InlineTextBox::paintDocumentMarker() does not need to special case painting of grammar and
dictation alternatives
https://bugs.webkit.org/show_bug.cgi?id=175966
Modified: trunk/Source/WebCore/html/canvas/CanvasStyle.h (221212 => 221213)
--- trunk/Source/WebCore/html/canvas/CanvasStyle.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/WebCore/html/canvas/CanvasStyle.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -70,12 +70,13 @@
struct Invalid { };
struct CMYKAColor {
+#if !COMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
CMYKAColor() = default;
-
CMYKAColor(Color color, float cyan, float magenta, float yellow, float black, float alpha)
: color(color), c(cyan), m(magenta), y(yellow), k(black), a(alpha)
{
}
+#endif
Color color;
float c { 0 };
Modified: trunk/Source/WebCore/platform/mediastream/IceCandidate.h (221212 => 221213)
--- trunk/Source/WebCore/platform/mediastream/IceCandidate.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/WebCore/platform/mediastream/IceCandidate.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -37,6 +37,23 @@
namespace WebCore {
struct IceCandidate {
+#if !COMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
+ IceCandidate() = default;
+ IceCandidate(String&& type, String&& foundation, unsigned componentId, String&& transport, unsigned long priority, String&& address, unsigned port, String&& tcpType, String&& relatedAddress, unsigned relatedPort)
+ : type { WTFMove(type) }
+ , foundation { WTFMove(foundation) }
+ , componentId { componentId }
+ , transport { WTFMove(transport) }
+ , priority { priority }
+ , address { WTFMove(address) }
+ , port { port }
+ , tcpType { WTFMove(tcpType) }
+ , relatedAddress { WTFMove(relatedAddress) }
+ , relatedPort { relatedPort }
+ {
+ }
+#endif
+
String type;
String foundation;
unsigned componentId { 0 };
@@ -47,20 +64,6 @@
String tcpType;
String relatedAddress;
unsigned relatedPort { 0 };
-
- IceCandidate() = default;
- IceCandidate(String&& type, String&& foundation, unsigned componentId, String&& transport, unsigned long priority, String&& address, unsigned port, String&& tcpType, String&& relatedAddress, unsigned relatedPort)
- : type(WTFMove(type))
- , foundation(WTFMove(foundation))
- , componentId(componentId)
- , transport(WTFMove(transport))
- , priority(priority)
- , address(WTFMove(address))
- , port(port)
- , tcpType(WTFMove(tcpType))
- , relatedAddress(WTFMove(relatedAddress))
- , relatedPort(relatedPort)
- { }
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/text/StringWithDirection.h (221212 => 221213)
--- trunk/Source/WebCore/platform/text/StringWithDirection.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/WebCore/platform/text/StringWithDirection.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -46,9 +46,14 @@
// to the string.
struct StringWithDirection {
+#if !COMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
StringWithDirection() = default;
- StringWithDirection(const String& string, TextDirection direction) : string { string }, direction { direction } { }
- StringWithDirection(String&& string, TextDirection direction) : string { WTFMove(string) }, direction { direction } { }
+ StringWithDirection(String string, TextDirection direction)
+ : string { WTFMove(string) }
+ , direction { direction }
+ {
+ }
+#endif
String string;
TextDirection direction { LTR };
};
@@ -66,8 +71,8 @@
inline StringWithDirection truncateFromEnd(const StringWithDirection& string, unsigned maxLength)
{
if (string.direction == LTR)
- return StringWithDirection(string.string.left(maxLength), LTR);
- return StringWithDirection(string.string.right(maxLength), RTL);
+ return { string.string.left(maxLength), LTR };
+ return { string.string.right(maxLength), RTL };
}
}
Modified: trunk/Source/WebCore/style/StyleUpdate.h (221212 => 221213)
--- trunk/Source/WebCore/style/StyleUpdate.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/WebCore/style/StyleUpdate.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -43,12 +43,15 @@
namespace Style {
struct ElementUpdate {
+#if !COMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
ElementUpdate() = default;
ElementUpdate(std::unique_ptr<RenderStyle> style, Change change, bool recompositeLayer)
- : style(WTFMove(style))
- , change(change)
- , recompositeLayer(recompositeLayer)
- { }
+ : style { WTFMove(style) }
+ , change { change }
+ , recompositeLayer { recompositeLayer }
+ {
+ }
+#endif
std::unique_ptr<RenderStyle> style;
Change change { NoChange };
bool recompositeLayer { false };
@@ -55,11 +58,14 @@
};
struct TextUpdate {
+#if !COMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
TextUpdate() = default;
TextUpdate(unsigned offset, unsigned length)
- : offset(offset)
- , length(length)
- { }
+ : offset { offset }
+ , length { length }
+ {
+ }
+#endif
unsigned offset { 0 };
unsigned length { std::numeric_limits<unsigned>::max() };
Modified: trunk/Source/bmalloc/ChangeLog (221212 => 221213)
--- trunk/Source/bmalloc/ChangeLog 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/bmalloc/ChangeLog 2017-08-25 23:42:02 UTC (rev 221213)
@@ -1,3 +1,14 @@
+2017-08-25 Daniel Bates <[email protected]>
+
+ Demarcate code added due to lack of NSDMI for aggregates
+ https://bugs.webkit.org/show_bug.cgi?id=175990
+
+ Reviewed by Andy Estes.
+
+ * bmalloc/BPlatform.h:
+ * bmalloc/List.h: Be explicit when initializing m_node to improve readability.
+ (bmalloc::ListNode::ListNode):
+
2017-08-23 Filip Pizlo <[email protected]>
Reduce Gigacage sizes
Modified: trunk/Source/bmalloc/bmalloc/BPlatform.h (221212 => 221213)
--- trunk/Source/bmalloc/bmalloc/BPlatform.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/bmalloc/bmalloc/BPlatform.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -62,6 +62,16 @@
/* BUSE() - use a particular third-party library or optional OS service */
#define BUSE(FEATURE) (defined BUSE_##FEATURE && BUSE_##FEATURE)
+/* ==== Compiler adaptation macros: these describe the capabilities of the compiler. ==== */
+
+/* BCOMPILER_SUPPORTS() - check for a compiler feature */
+#define BCOMPILER_SUPPORTS(FEATURE) (defined BCOMPILER_SUPPORTS_##FEATURE && BCOMPILER_SUPPORTS_##FEATURE)
+
+/* BCOMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES) - compiler supports non-static data member initializers for aggregates */
+#if defined(__cpp_aggregate_nsdmi) && __cpp_aggregate_nsdmi >= 201304
+#define BCOMPILER_SUPPORTS_NSDMI_FOR_AGGREGATES 1
+#endif
+
/* ==== Platform adaptation macros: these describe properties of the target environment. ==== */
/* BCPU() - the target CPU architecture */
Modified: trunk/Source/bmalloc/bmalloc/List.h (221212 => 221213)
--- trunk/Source/bmalloc/bmalloc/List.h 2017-08-25 23:41:11 UTC (rev 221212)
+++ trunk/Source/bmalloc/bmalloc/List.h 2017-08-25 23:42:02 UTC (rev 221213)
@@ -30,12 +30,14 @@
template<typename T>
struct ListNode {
+#if !BCOMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
ListNode() = default;
ListNode(ListNode<T>* prev, ListNode<T>* next)
- : prev(prev)
- , next(next)
+ : prev { prev }
+ , next { next }
{
}
+#endif
ListNode<T>* prev { nullptr };
ListNode<T>* next { nullptr };
@@ -46,11 +48,13 @@
static_assert(std::is_trivially_destructible<T>::value, "List must have a trivial destructor.");
struct iterator {
+#if !BCOMPILER_SUPPORTS(NSDMI_FOR_AGGREGATES)
iterator() = default;
iterator(ListNode<T>* node)
: m_node(node)
{
}
+#endif
T* operator*() { return static_cast<T*>(m_node); }
T* operator->() { return static_cast<T*>(m_node); }
@@ -63,7 +67,7 @@
return *this;
}
- ListNode<T>* m_node { };
+ ListNode<T>* m_node { nullptr };
};
public: