Commit db21682a authored by Alberto Garcia's avatar Alberto Garcia
Browse files

New upstream version 2.29.4

parent feae61a5

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">JavaScriptCore GLib Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for JavaScriptCore 2.29.3</p></div>
<div><p class="releaseinfo">for JavaScriptCore 2.29.4</p></div>
</div>
<hr>
</div>
......
......@@ -175,7 +175,7 @@ have included when compiling your code.</p>
<hr>
<div class="refsect2">
<a name="JSC-MICRO-VERSION:CAPS"></a><h3>JSC_MICRO_VERSION</h3>
<pre class="programlisting">#define JSC_MICRO_VERSION (3)
<pre class="programlisting">#define JSC_MICRO_VERSION (4)
</pre>
</div>
</div>
......
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKitGTK Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKitGTK 2.29.3</p></div>
<div><p class="releaseinfo">for WebKitGTK 2.29.4</p></div>
</div>
<hr>
</div>
......
......@@ -213,7 +213,7 @@ against at application run time.</p>
<hr>
<div class="refsect2">
<a name="WEBKIT-MICRO-VERSION:CAPS"></a><h3>WEBKIT_MICRO_VERSION</h3>
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (3)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (4)
</pre>
<p>Like <a class="link" href="webkit2gtk-4.0-WebKitVersion.html#webkit-get-micro-version" title="webkit_get_micro_version ()"><code class="function">webkit_get_micro_version()</code></a>, but from the headers used at
application compile time, rather than from the library linked
......
......@@ -995,7 +995,20 @@
<keyword type="function" name="webkit_website_data_manager_remove_finish ()" link="WebKitWebsiteDataManager.html#webkit-website-data-manager-remove-finish" since="2.16"/>
<keyword type="function" name="webkit_website_data_manager_clear ()" link="WebKitWebsiteDataManager.html#webkit-website-data-manager-clear" since="2.16"/>
<keyword type="function" name="webkit_website_data_manager_clear_finish ()" link="WebKitWebsiteDataManager.html#webkit-website-data-manager-clear-finish" since="2.16"/>
<keyword type="function" name="webkit_itp_first_party_ref ()" link="WebKitWebsiteDataManager.html#webkit-itp-first-party-ref" since="2.30"/>
<keyword type="function" name="webkit_itp_first_party_unref ()" link="WebKitWebsiteDataManager.html#webkit-itp-first-party-unref" since="2.30"/>
<keyword type="function" name="webkit_itp_first_party_get_domain ()" link="WebKitWebsiteDataManager.html#webkit-itp-first-party-get-domain" since="2.30"/>
<keyword type="function" name="webkit_itp_first_party_get_website_data_access_allowed ()" link="WebKitWebsiteDataManager.html#webkit-itp-first-party-get-website-data-access-allowed" since="2.30"/>
<keyword type="function" name="webkit_itp_first_party_get_last_update_time ()" link="WebKitWebsiteDataManager.html#webkit-itp-first-party-get-last-update-time" since="2.30"/>
<keyword type="function" name="webkit_itp_third_party_ref ()" link="WebKitWebsiteDataManager.html#webkit-itp-third-party-ref" since="2.30"/>
<keyword type="function" name="webkit_itp_third_party_unref ()" link="WebKitWebsiteDataManager.html#webkit-itp-third-party-unref" since="2.30"/>
<keyword type="function" name="webkit_itp_third_party_get_domain ()" link="WebKitWebsiteDataManager.html#webkit-itp-third-party-get-domain" since="2.30"/>
<keyword type="function" name="webkit_itp_third_party_get_first_parties ()" link="WebKitWebsiteDataManager.html#webkit-itp-third-party-get-first-parties" since="2.30"/>
<keyword type="function" name="webkit_website_data_manager_get_itp_summary ()" link="WebKitWebsiteDataManager.html#webkit-website-data-manager-get-itp-summary" since="2.30"/>
<keyword type="function" name="webkit_website_data_manager_get_itp_summary_finish ()" link="WebKitWebsiteDataManager.html#webkit-website-data-manager-get-itp-summary-finish" since="2.30"/>
<keyword type="struct" name="struct WebKitWebsiteDataManager" link="WebKitWebsiteDataManager.html#WebKitWebsiteDataManager-struct"/>
<keyword type="struct" name="WebKitITPFirstParty" link="WebKitWebsiteDataManager.html#WebKitITPFirstParty-struct"/>
<keyword type="struct" name="WebKitITPThirdParty" link="WebKitWebsiteDataManager.html#WebKitITPThirdParty-struct"/>
<keyword type="property" name="The “base-cache-directory” property" link="WebKitWebsiteDataManager.html#WebKitWebsiteDataManager--base-cache-directory"/>
<keyword type="property" name="The “base-data-directory” property" link="WebKitWebsiteDataManager.html#WebKitWebsiteDataManager--base-data-directory"/>
<keyword type="property" name="The “disk-cache-directory” property" link="WebKitWebsiteDataManager.html#WebKitWebsiteDataManager--disk-cache-directory"/>
......
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKitDOMGTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.29.3</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.29.4</p></div>
</div>
<hr>
</div>
......
================
WebKitGTK 2.29.4
================
What's new in WebKitGTK 2.29.4?
- Add support for backdrop filters.
- Add support for text-underline-offset and text-decoration-thickness.
- Add OpenCDM and AV1 support to media backend.
- Add new API to get ITP data summary.
- Use mobile user-agent on tablets.
- Fix several crashes and rendering issues.
================
WebKitGTK 2.29.3
================
......
......@@ -44,11 +44,17 @@ const GlobalObjectMethodTable JSAPIGlobalObject::s_globalObjectMethodTable = {
nullptr, // moduleLoaderCreateImportMetaProperties
nullptr, // moduleLoaderEvaluate
nullptr, // promiseRejectionTracker
&reportUncaughtExceptionAtEventLoop,
nullptr, // defaultLanguage
nullptr, // compileStreaming
nullptr, // instantiateStreaming
};
void JSAPIGlobalObject::reportUncaughtExceptionAtEventLoop(JSGlobalObject* globalObject, Exception* exception)
{
Base::reportUncaughtExceptionAtEventLoop(globalObject, exception);
}
}
#endif
......@@ -59,6 +59,8 @@ public:
return result;
}
static void reportUncaughtExceptionAtEventLoop(JSGlobalObject*, Exception*);
static JSInternalPromise* moduleLoaderImportModule(JSGlobalObject*, JSModuleLoader*, JSString* moduleNameValue, JSValue parameters, const SourceOrigin&);
static Identifier moduleLoaderResolve(JSGlobalObject*, JSModuleLoader*, JSValue keyValue, JSValue referrerValue, JSValue);
static JSInternalPromise* moduleLoaderFetch(JSGlobalObject*, JSModuleLoader*, JSValue, JSValue, JSValue);
......
......@@ -73,7 +73,7 @@ JSValueRef JSEvaluateScriptInternal(const JSLockHolder&, JSContextRef ctx, JSObj
return toRef(globalObject, jsUndefined());
}
JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURLString, int startingLineNumber, JSValueRef* exception)
{
if (!ctx) {
ASSERT_NOT_REACHED();
......@@ -85,13 +85,13 @@ JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef th
startingLineNumber = std::max(1, startingLineNumber);
auto sourceURLString = sourceURL ? sourceURL->string() : String();
SourceCode source = makeSource(script->string(), SourceOrigin { sourceURLString }, URL({ }, sourceURLString), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()));
auto sourceURL = sourceURLString ? URL({ }, sourceURLString->string()) : URL();
SourceCode source = makeSource(script->string(), SourceOrigin { sourceURL }, sourceURL.string(), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()));
return JSEvaluateScriptInternal(locker, ctx, thisObject, source, exception);
}
bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURLString, int startingLineNumber, JSValueRef* exception)
{
if (!ctx) {
ASSERT_NOT_REACHED();
......@@ -103,8 +103,8 @@ bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourc
startingLineNumber = std::max(1, startingLineNumber);
auto sourceURLString = sourceURL ? sourceURL->string() : String();
SourceCode source = makeSource(script->string(), SourceOrigin { sourceURLString }, URL({ }, sourceURLString), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()));
auto sourceURL = sourceURLString ? URL({ }, sourceURLString->string()) : URL();
SourceCode source = makeSource(script->string(), SourceOrigin { sourceURL }, sourceURL.string(), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()));
JSValue syntaxException;
bool isValidSyntax = checkSyntax(globalObject, source, &syntaxException);
......
......@@ -298,8 +298,10 @@ bool JSCallbackObject<Parent>::put(JSCell* cell, JSGlobalObject* globalObject, P
if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(globalObject)) {
if (StaticFunctionEntry* entry = staticFunctions->get(name)) {
PropertySlot getSlot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
if (Parent::getOwnPropertySlot(thisObject, globalObject, propertyName, getSlot))
PropertySlot getSlot(thisObject, PropertySlot::InternalMethodType::VMInquiry, &vm);
bool found = Parent::getOwnPropertySlot(thisObject, globalObject, propertyName, getSlot);
getSlot.disallowVMEntry.reset();
if (found)
return Parent::put(thisObject, globalObject, propertyName, value, slot);
if (entry->attributes & kJSPropertyAttributeReadOnly)
return false;
......@@ -668,8 +670,10 @@ EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(JSGlobalObject* gl
JSCallbackObject* thisObj = asCallbackObject(thisValue);
// Check for cached or override property.
PropertySlot slot2(thisObj, PropertySlot::InternalMethodType::VMInquiry);
if (Parent::getOwnPropertySlot(thisObj, globalObject, propertyName, slot2))
PropertySlot slot2(thisObj, PropertySlot::InternalMethodType::VMInquiry, &vm);
bool found = Parent::getOwnPropertySlot(thisObj, globalObject, propertyName, slot2);
slot2.disallowVMEntry.reset();
if (found)
return JSValue::encode(slot2.getValue(globalObject, propertyName));
if (StringImpl* name = propertyName.uid()) {
......
......@@ -126,7 +126,7 @@ JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObje
return toRef(constructor);
}
JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURLString, int startingLineNumber, JSValueRef* exception)
{
if (!ctx) {
ASSERT_NOT_REACHED();
......@@ -151,8 +151,8 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa
return nullptr;
}
auto sourceURLString = sourceURL ? sourceURL->string() : String();
JSObject* result = constructFunction(globalObject, args, nameID, SourceOrigin { sourceURLString }, sourceURLString, TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()));
auto sourceURL = sourceURLString ? URL({ }, sourceURLString->string()) : URL();
JSObject* result = constructFunction(globalObject, args, nameID, SourceOrigin { sourceURL }, sourceURL.string(), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()));
if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow)
result = nullptr;
return toRef(result);
......
......@@ -39,9 +39,9 @@ using namespace JSC;
struct OpaqueJSScript final : public SourceProvider {
public:
static WTF::Ref<OpaqueJSScript> create(VM& vm, const SourceOrigin& sourceOrigin, URL&& url, int startingLineNumber, const String& source)
static WTF::Ref<OpaqueJSScript> create(VM& vm, const SourceOrigin& sourceOrigin, String filename, int startingLineNumber, const String& source)
{
return WTF::adoptRef(*new OpaqueJSScript(vm, sourceOrigin, WTFMove(url), startingLineNumber, source));
return WTF::adoptRef(*new OpaqueJSScript(vm, sourceOrigin, WTFMove(filename), startingLineNumber, source));
}
unsigned hash() const final
......@@ -57,8 +57,8 @@ public:
VM& vm() const { return m_vm; }
private:
OpaqueJSScript(VM& vm, const SourceOrigin& sourceOrigin, URL&& url, int startingLineNumber, const String& source)
: SourceProvider(sourceOrigin, WTFMove(url), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()), SourceProviderSourceType::Program)
OpaqueJSScript(VM& vm, const SourceOrigin& sourceOrigin, String&& filename, int startingLineNumber, const String& source)
: SourceProvider(sourceOrigin, WTFMove(filename), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()), SourceProviderSourceType::Program)
, m_vm(vm)
, m_source(source.isNull() ? *StringImpl::empty() : *source.impl())
{
......@@ -80,7 +80,7 @@ static bool parseScript(VM& vm, const SourceCode& source, ParserError& error)
extern "C" {
JSScriptRef JSScriptCreateReferencingImmortalASCIIText(JSContextGroupRef contextGroup, JSStringRef url, int startingLineNumber, const char* source, size_t length, JSStringRef* errorMessage, int* errorLine)
JSScriptRef JSScriptCreateReferencingImmortalASCIIText(JSContextGroupRef contextGroup, JSStringRef urlString, int startingLineNumber, const char* source, size_t length, JSStringRef* errorMessage, int* errorLine)
{
auto& vm = *toJS(contextGroup);
JSLockHolder locker(&vm);
......@@ -91,8 +91,8 @@ JSScriptRef JSScriptCreateReferencingImmortalASCIIText(JSContextGroupRef context
startingLineNumber = std::max(1, startingLineNumber);
auto sourceURLString = url ? url->string() : String();
auto result = OpaqueJSScript::create(vm, SourceOrigin { sourceURLString }, URL({ }, sourceURLString), startingLineNumber, String(StringImpl::createFromLiteral(source, length)));
auto sourceURL = urlString ? URL({ }, urlString->string()) : URL();
auto result = OpaqueJSScript::create(vm, SourceOrigin { sourceURL }, sourceURL.string(), startingLineNumber, String(StringImpl::createFromLiteral(source, length)));
ParserError error;
if (!parseScript(vm, SourceCode(result.copyRef()), error)) {
......@@ -106,15 +106,15 @@ JSScriptRef JSScriptCreateReferencingImmortalASCIIText(JSContextGroupRef context
return &result.leakRef();
}
JSScriptRef JSScriptCreateFromString(JSContextGroupRef contextGroup, JSStringRef url, int startingLineNumber, JSStringRef source, JSStringRef* errorMessage, int* errorLine)
JSScriptRef JSScriptCreateFromString(JSContextGroupRef contextGroup, JSStringRef urlString, int startingLineNumber, JSStringRef source, JSStringRef* errorMessage, int* errorLine)
{
auto& vm = *toJS(contextGroup);
JSLockHolder locker(&vm);
startingLineNumber = std::max(1, startingLineNumber);
auto sourceURLString = url ? url->string() : String();
auto result = OpaqueJSScript::create(vm, SourceOrigin { sourceURLString }, URL({ }, sourceURLString), startingLineNumber, source->string());
auto sourceURL = urlString ? URL({ }, urlString->string()) : URL();
auto result = OpaqueJSScript::create(vm, SourceOrigin { sourceURL }, sourceURL.string(), startingLineNumber, source->string());
ParserError error;
if (!parseScript(vm, SourceCode(result.copyRef()), error)) {
......
......@@ -956,9 +956,9 @@ JSCCheckSyntaxResult jsc_context_check_syntax(JSCContext* context, const char* c
JSC::VM& vm = globalObject->vm();
JSC::JSLockHolder locker(vm);
String sourceURLString = uri ? String::fromUTF8(uri) : String();
JSC::SourceCode source = JSC::makeSource(String::fromUTF8(code, length < 0 ? strlen(code) : length), JSC::SourceOrigin { sourceURLString },
URL({ }, sourceURLString), TextPosition(OrdinalNumber::fromOneBasedInt(lineNumber), OrdinalNumber()));
URL sourceURL = uri ? URL({ }, uri) : URL();
JSC::SourceCode source = JSC::makeSource(String::fromUTF8(code, length < 0 ? strlen(code) : length), JSC::SourceOrigin { sourceURL },
sourceURL.string() , TextPosition(OrdinalNumber::fromOneBasedInt(lineNumber), OrdinalNumber()));
bool success = false;
JSC::ParserError error;
switch (mode) {
......
......@@ -70,6 +70,8 @@ set(JavaScriptCore_OBJECT_LUT_SOURCES
runtime/IntlCollatorPrototype.cpp
runtime/IntlDateTimeFormatConstructor.cpp
runtime/IntlDateTimeFormatPrototype.cpp
runtime/IntlDisplayNamesConstructor.cpp
runtime/IntlDisplayNamesPrototype.cpp
runtime/IntlLocalePrototype.cpp
runtime/IntlNumberFormatConstructor.cpp
runtime/IntlNumberFormatPrototype.cpp
......@@ -830,12 +832,13 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
runtime/DataView.h
runtime/DateInstance.h
runtime/DateInstanceCache.h
runtime/DeferredWorkTimer.h
runtime/DefinePropertyAttributes.h
runtime/DeletePropertySlot.h
runtime/DirectArgumentsOffset.h
runtime/DirectEvalExecutable.h
runtime/DisallowScope.h
runtime/DisallowVMReentry.h
runtime/DisallowVMEntry.h
runtime/DumpContext.h
runtime/ECMAMode.h
runtime/EnsureStillAliveHere.h
......@@ -968,7 +971,6 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
runtime/ParseInt.h
runtime/PrivateName.h
runtime/ProgramExecutable.h
runtime/PromiseTimer.h
runtime/PropertyDescriptor.h
runtime/PropertyMapHashTable.h
runtime/PropertyName.h
......@@ -1410,8 +1412,8 @@ endif ()
# Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
add_custom_target(stageSharedScripts DEPENDS ${JavaScriptCore_SCRIPTS})
add_dependencies(JavaScriptCore stageSharedScripts ${JavaScriptCore_EXTRA_DEPENDENCIES})
add_custom_target(JavaScriptCoreSharedScripts DEPENDS ${JavaScriptCore_SCRIPTS})
add_dependencies(JavaScriptCore JavaScriptCoreSharedScripts ${JavaScriptCore_EXTRA_DEPENDENCIES})
# JavaScriptCore target needs to have a direct or indirect dependency
# of InspectorBackendCommands for CMake Visual Studio generator to
......
......@@ -137,6 +137,8 @@ $(PROJECT_DIR)/runtime/IntlCollatorConstructor.cpp
$(PROJECT_DIR)/runtime/IntlCollatorPrototype.cpp
$(PROJECT_DIR)/runtime/IntlDateTimeFormatConstructor.cpp
$(PROJECT_DIR)/runtime/IntlDateTimeFormatPrototype.cpp
$(PROJECT_DIR)/runtime/IntlDisplayNamesConstructor.cpp
$(PROJECT_DIR)/runtime/IntlDisplayNamesPrototype.cpp
$(PROJECT_DIR)/runtime/IntlLocalePrototype.cpp
$(PROJECT_DIR)/runtime/IntlNumberFormatConstructor.cpp
$(PROJECT_DIR)/runtime/IntlNumberFormatPrototype.cpp
......
......@@ -27,6 +27,8 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/IntlCollatorConstructor.lut.
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/IntlCollatorPrototype.lut.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/IntlDateTimeFormatConstructor.lut.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/IntlDateTimeFormatPrototype.lut.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/IntlDisplayNamesConstructor.lut.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/IntlDisplayNamesPrototype.lut.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/IntlLocalePrototype.lut.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/IntlNumberFormatConstructor.lut.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/IntlNumberFormatPrototype.lut.h
......
......@@ -158,6 +158,8 @@ OBJECT_LUT_HEADERS = \
IntlCollatorPrototype.lut.h \
IntlDateTimeFormatConstructor.lut.h \
IntlDateTimeFormatPrototype.lut.h \
IntlDisplayNamesConstructor.lut.h \
IntlDisplayNamesPrototype.lut.h \
IntlLocalePrototype.lut.h \
IntlNumberFormatConstructor.lut.h \
IntlNumberFormatPrototype.lut.h \
......
......@@ -766,7 +766,6 @@ runtime/DatePrototype.cpp
runtime/DirectArguments.cpp
runtime/DirectArgumentsOffset.cpp
runtime/DirectEvalExecutable.cpp
runtime/DisallowVMReentry.cpp
runtime/DoublePredictionFuzzerAgent.cpp
runtime/DumpContext.cpp
runtime/ECMAMode.cpp
......@@ -786,6 +785,8 @@ runtime/ExceptionScope.cpp
runtime/ExecutableBase.cpp
runtime/FileBasedFuzzerAgent.cpp
runtime/FileBasedFuzzerAgentBase.cpp
runtime/FinalizationRegistryConstructor.cpp
runtime/FinalizationRegistryPrototype.cpp
runtime/FunctionConstructor.cpp
runtime/FunctionExecutable.cpp
runtime/FunctionExecutableDump.cpp
......@@ -814,6 +815,9 @@ runtime/IntlCollatorPrototype.cpp
runtime/IntlDateTimeFormat.cpp
runtime/IntlDateTimeFormatConstructor.cpp
runtime/IntlDateTimeFormatPrototype.cpp
runtime/IntlDisplayNames.cpp
runtime/IntlDisplayNamesConstructor.cpp
runtime/IntlDisplayNamesPrototype.cpp
runtime/IntlLocale.cpp
runtime/IntlLocaleConstructor.cpp
runtime/IntlLocalePrototype.cpp
......@@ -850,6 +854,7 @@ runtime/JSDataView.cpp
runtime/JSDataViewPrototype.cpp
runtime/JSDateMath.cpp
runtime/JSDestructibleObjectHeapCellType.cpp
runtime/JSFinalizationRegistry.cpp
runtime/JSFunction.cpp
runtime/JSGenerator.cpp
runtime/JSGeneratorFunction.cpp
......@@ -932,7 +937,7 @@ runtime/Operations.cpp
runtime/Options.cpp
runtime/PredictionFileCreatingFuzzerAgent.cpp
runtime/ProgramExecutable.cpp
runtime/PromiseTimer.cpp
runtime/DeferredWorkTimer.cpp
runtime/PropertyDescriptor.cpp
runtime/PropertySlot.cpp
runtime/PropertyTable.cpp
......
......@@ -595,6 +595,8 @@ private:
OP_VSQRT_T1 = 0xEEB0,
OP_VCVTSD_T1 = 0xEEB0,
OP_VCVTDS_T1 = 0xEEB0,
OP_VAND_T1 = 0xEF00,
OP_VORR_T1 = 0xEF20,
OP_B_T3a = 0xF000,
OP_B_T4a = 0xF000,
OP_AND_imm_T1 = 0xF000,
......@@ -653,6 +655,8 @@ private:
} OpcodeID1;
typedef enum {
OP_VAND_T1b = 0x0010,
OP_VORR_T1b = 0x0010,
OP_VADD_T2b = 0x0A00,
OP_VDIVb = 0x0A00,
OP_FLDSb = 0x0A00,
......@@ -1823,6 +1827,16 @@ public:
}
#endif
void vand(FPDoubleRegisterID rd, FPDoubleRegisterID rn, FPDoubleRegisterID rm)
{
m_formatter.vfpOp(OP_VAND_T1, OP_VAND_T1b, true, rn, rd, rm);
}
void vorr(FPDoubleRegisterID rd, FPDoubleRegisterID rn, FPDoubleRegisterID rm)
{
m_formatter.vfpOp(OP_VORR_T1, OP_VORR_T1b, true, rn, rd, rm);
}
void vadd(FPDoubleRegisterID rd, FPDoubleRegisterID rn, FPDoubleRegisterID rm)
{
m_formatter.vfpOp(OP_VADD_T2, OP_VADD_T2b, true, rn, rd, rm);
......
......@@ -711,7 +711,9 @@ public:
void loadPtr(BaseIndex address, RegisterID dest)
{
#if CPU(NEEDS_ALIGNED_ACCESS)
ASSERT(address.scale == ScalePtr || address.scale == TimesOne);
#endif
load32(address, dest);
}
......@@ -1057,7 +1059,9 @@ public:
void loadPtr(BaseIndex address, RegisterID dest)
{
#if CPU(NEEDS_ALIGNED_ACCESS)
ASSERT(address.scale == ScalePtr || address.scale == TimesOne);
#endif
load64(address, dest);
}
......
......@@ -1162,6 +1162,16 @@ public:
m_assembler.vmul(dest, op1, op2);
}
void andDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest)
{
m_assembler.vand(op1, op2, dest);
}
void orDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest)
{
m_assembler.vorr(op1, op2, dest);
}
void sqrtDouble(FPRegisterID src, FPRegisterID dest)
{
m_assembler.vsqrt(dest, src);
......
......@@ -529,9 +529,7 @@ inline FunctionPtr<tag>::FunctionPtr(MacroAssemblerCodePtr<tag> ptr)
namespace WTF {
template<typename T> struct DefaultHash;
template<JSC::PtrTag tag> struct DefaultHash<JSC::MacroAssemblerCodePtr<tag>> {
typedef JSC::MacroAssemblerCodePtrHash<tag> Hash;
};
template<JSC::PtrTag tag> struct DefaultHash<JSC::MacroAssemblerCodePtr<tag>> : JSC::MacroAssemblerCodePtrHash<tag> { };
template<typename T> struct HashTraits;
template<JSC::PtrTag tag> struct HashTraits<JSC::MacroAssemblerCodePtr<tag>> : public CustomHashTraits<JSC::MacroAssemblerCodePtr<tag>> { };
......
......@@ -3080,6 +3080,54 @@ public:
m_assembler.addd(dest, dest, fpTempRegister);
}
// andDouble and orDouble are a bit convoluted to implement
// because we don't have FP instructions for those
// operations. That means we'll have to go back and forth between
// the FPU and the CPU, which accounts for most of the code here.
void andDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest)
{
m_assembler.mfc1(immTempRegister, op1);
m_assembler.mfc1(dataTempRegister, op2);
m_assembler.andInsn(cmpTempRegister, immTempRegister, dataTempRegister);
m_assembler.mtc1(cmpTempRegister, dest);
#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64
m_assembler.mfhc1(immTempRegister, op1);
m_assembler.mfhc1(dataTempRegister, op2);
#else
m_assembler.mfc1(immTempRegister, FPRegisterID(op1+1));
m_assembler.mfc1(dataTempRegister, FPRegisterID(op2+1));
#endif
m_assembler.andInsn(cmpTempRegister, immTempRegister, dataTempRegister);
#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64
m_assembler.mthc1(cmpTempRegister, dest);
#else
m_assembler.mtc1(cmpTempRegister, FPRegisterID(dest+1));
#endif
}
void orDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest)
{
m_assembler.mfc1(immTempRegister, op1);
m_assembler.mfc1(dataTempRegister, op2);
m_assembler.orInsn(cmpTempRegister, immTempRegister, dataTempRegister);
m_assembler.mtc1(cmpTempRegister, dest);
#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64
m_assembler.mfhc1(immTempRegister, op1);
m_assembler.mfhc1(dataTempRegister, op2);
#else
m_assembler.mfc1(immTempRegister, FPRegisterID(op1+1));
m_assembler.mfc1(dataTempRegister, FPRegisterID(op2+1));
#endif
m_assembler.orInsn(cmpTempRegister, immTempRegister, dataTempRegister);
#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64
m_assembler.mthc1(cmpTempRegister, dest);
#else
m_assembler.mtc1(cmpTempRegister, FPRegisterID(dest+1));
#endif
}
void subDouble(FPRegisterID src, FPRegisterID dest)
{
m_assembler.subd(dest, dest, src);
......
......@@ -2291,6 +2291,52 @@ void testOrImmMem()
CHECK_EQ(memoryLocation, 0x12341234);
}
void testAndOrDouble()
{
double arg1, arg2;
auto andDouble = compile([&] (CCallHelpers& jit) {
emitFunctionPrologue(jit);
jit.loadDouble(CCallHelpers::TrustedImmPtr(&arg1), FPRInfo::fpRegT1);
jit.loadDouble(CCallHelpers::TrustedImmPtr(&arg2), FPRInfo::fpRegT2);
jit.andDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT2, FPRInfo::returnValueFPR);
emitFunctionEpilogue(jit);
jit.ret();
});