summaryrefslogtreecommitdiff
path: root/src/3rdparty/javascriptcore/JavaScriptCore/runtime
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-11-18 11:58:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-18 15:54:56 +0100
commit15bb30b0e90c628cc3812627923d1d459d461505 (patch)
tree9e8ac40f800bcf9d699e1004224fa5c7579599f5 /src/3rdparty/javascriptcore/JavaScriptCore/runtime
parent78985c5c2c4ec8c7d06bf0c59c5534f968d62f07 (diff)
downloadqtscript-15bb30b0e90c628cc3812627923d1d459d461505.tar.gz
Fix compiler errors.v5.2.0-rc1v5.2.0
On Mavericks with Apple's Clang 5.0 (3.3 based): ../3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:320:117: error: non-const reference cannot bind to bit-field 'm_attributesInPrevious' ...add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), exi... ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++11 specific: ../3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h:179:35: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] LineInfo info = { instructions().size(), n->lineNo() }; ^~~~~~~~~~~~~~~~~~~~~ Both occur in multiple places. Task-number: QTBUG-34842 Change-Id: I98a29b51718a6e0db8749ac1b495e071e9fe479d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp2
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp6
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp7
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h6
4 files changed, 14 insertions, 7 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp
index 747c4ac..0702c42 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp
@@ -195,7 +195,7 @@ PassRefPtr<UString::Rep> Identifier::add(JSGlobalData* globalData, const UChar*
UString::Rep::empty().hash();
return &UString::Rep::empty();
}
- UCharBuffer buf = {s, length};
+ UCharBuffer buf = {s, static_cast<unsigned>(length)};
pair<HashSet<UString::Rep*>::iterator, bool> addResult = globalData->identifierTable->add<UCharBuffer, UCharBufferTranslator>(buf);
// If the string is newly-translated, then we need to adopt it.
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp
index b089584..daacbdb 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp
@@ -320,7 +320,11 @@ void Stringifier::appendQuotedString(StringBuilder& builder, const UString& valu
default:
static const char hexDigits[] = "0123456789abcdef";
UChar ch = data[i];
- UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] };
+ UChar hex[] = { '\\', 'u',
+ static_cast<UChar>(hexDigits[(ch >> 12) & 0xF]),
+ static_cast<UChar>(hexDigits[(ch >> 8) & 0xF]),
+ static_cast<UChar>(hexDigits[(ch >> 4) & 0xF]),
+ static_cast<UChar>(hexDigits[ch & 0xF]) };
builder.append(hex, sizeof(hex) / sizeof(UChar));
break;
}
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp
index bf49a15..307b1f7 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp
@@ -156,9 +156,10 @@ Structure::Structure(JSValue prototype, const TypeInfo& typeInfo)
Structure::~Structure()
{
if (m_previous) {
- if (m_nameInPrevious)
- m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(m_nameInPrevious.get()), m_attributesInPrevious), m_specificValueInPrevious);
- else
+ if (m_nameInPrevious) {
+ unsigned attrInPrev = m_attributesInPrevious;
+ m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(m_nameInPrevious.get()), attrInPrev), m_specificValueInPrevious);
+ } else
m_previous->table.removeAnonymousSlotTransition(m_anonymousSlotsInPrevious);
}
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h
index 7571efc..a8deb5e 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h
@@ -316,8 +316,10 @@ namespace JSC {
Structure* existingTransition = singleTransition();
TransitionTable* transitionTable = new TransitionTable;
setTransitionTable(transitionTable);
- if (existingTransition)
- add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious);
+ if (existingTransition) {
+ const unsigned attrsInPrev = existingTransition->m_attributesInPrevious;
+ add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), attrsInPrev), existingTransition, existingTransition->m_specificValueInPrevious);
+ }
}
} // namespace JSC