Skip to content

Commit 4c63e7e

Browse files
author
Dario Segura
committed
-[BUILD] Fixes compilation issues in latest clang version. NOTE: The library should be updated to latest JSC version.
1 parent a7af8ba commit 4c63e7e

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

JavaScriptCore/API/OpaqueJSString.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ PassRefPtr<OpaqueJSString> OpaqueJSString::create(const String& string)
4141

4242
String OpaqueJSString::string() const
4343
{
44+
#pragma clang diagnostic push
45+
#pragma clang diagnostic ignored "-Wundefined-bool-conversion"
4446
if (!this)
47+
#pragma clang diagnostic pop
4548
return String();
4649

4750
// Return a copy of the wrapped string, because the caller may make it an Identifier.
@@ -50,7 +53,10 @@ String OpaqueJSString::string() const
5053

5154
Identifier OpaqueJSString::identifier(VM* vm) const
5255
{
56+
#pragma clang diagnostic push
57+
#pragma clang diagnostic ignored "-Wundefined-bool-conversion"
5358
if (!this || m_string.isNull())
59+
#pragma clang diagnostic pop
5460
return Identifier();
5561

5662
if (m_string.isEmpty())

JavaScriptCore/API/OpaqueJSString.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ struct OpaqueJSString : public ThreadSafeRefCounted<OpaqueJSString> {
5353

5454
JS_EXPORT_PRIVATE static PassRefPtr<OpaqueJSString> create(const String&);
5555

56+
#pragma clang diagnostic push
57+
#pragma clang diagnostic ignored "-Wundefined-bool-conversion"
5658
const UChar* characters() { return !!this ? m_string.characters() : 0; }
5759
unsigned length() { return !!this ? m_string.length() : 0; }
60+
#pragma clang diagnostic pop
5861

5962
JS_EXPORT_PRIVATE String string() const;
6063
JSC::Identifier identifier(JSC::VM*) const;

JavaScriptCore/assembler/MacroAssembler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ class MacroAssembler : public MacroAssemblerBase {
986986
if (bitwise_cast<uint64_t>(value * 1.0) != bitwise_cast<uint64_t>(value))
987987
return shouldConsiderBlinding();
988988

989-
value = abs(value);
989+
value = fabs(value);
990990
// Only allow a limited set of fractional components
991991
double scaledValue = value * 8;
992992
if (scaledValue / 8 != value)

JavaScriptCore/interpreter/CallFrame.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,10 @@ namespace JSC {
269269

270270
bool isVMEntrySentinel() const
271271
{
272+
#pragma clang diagnostic push
273+
#pragma clang diagnostic ignored "-Wundefined-bool-conversion"
272274
return !!this && codeBlock() == vmEntrySentinelCodeBlock();
275+
#pragma clang diagnostic pop
273276
}
274277

275278
CallFrame* vmEntrySentinelCallerFrame() const

JavaScriptCore/parser/SourceProvider.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ namespace JSC {
5555
intptr_t asID()
5656
{
5757
ASSERT(this);
58+
#pragma clang diagnostic push
59+
#pragma clang diagnostic ignored "-Wundefined-bool-conversion"
5860
if (!this) // Be defensive in release mode.
61+
#pragma clang diagnostic pop
5962
return nullID;
6063
if (!m_id)
6164
getID();

0 commit comments

Comments
 (0)