summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-23 14:55:01 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-09-04 10:41:00 (GMT)
commit6f1ff47beeee6a6af489df58813ebd87237c93b0 (patch)
tree22e75699e167533e599c18c5a13ce71cd48d65e4 /src
parent228153b29c3e235fa5d40ff09f8403fa2e8f7226 (diff)
downloadQt-6f1ff47beeee6a6af489df58813ebd87237c93b0.zip
Qt-6f1ff47beeee6a6af489df58813ebd87237c93b0.tar.gz
Qt-6f1ff47beeee6a6af489df58813ebd87237c93b0.tar.bz2
Fix linking with SunCC 5.9: de-inline the operator new and delete in ParserArenaDeletable.
If you mark functions as "inline", the compiler doesn't have to emit out-of-line copies. What happens is that Nodes.h declares these functions, but the inline bodies are in NodeConstructors.h. ParserArena.cpp used these functions, but didn't include NodeConstructor.h. I could have added the missing #include, but this is error-prone, since you have to remember to do that. Moving the bodies into Nodes.h was also not possible, because it requires JSC::Parser to be defined and Parser.h needs to #include "Nodes.h". So the solution is to de-inline.
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h17
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp18
2 files changed, 18 insertions, 17 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h
index c256190..a4374d3 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h
@@ -27,23 +27,6 @@
namespace JSC {
- inline void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData)
- {
- ParserArenaDeletable* deletable = static_cast<ParserArenaDeletable*>(fastMalloc(size));
- globalData->parser->arena().deleteWithArena(deletable);
- return deletable;
- }
-
- inline void* ParserArenaDeletable::operator new(size_t size)
- {
- return fastMalloc(size);
- }
-
- inline void ParserArenaDeletable::operator delete(void* p)
- {
- fastFree(p);
- }
-
inline ParserArenaRefCounted::ParserArenaRefCounted(JSGlobalData* globalData)
{
globalData->parser->arena().derefWithArena(adoptRef(this));
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp
index 2617506..78c5196 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp
@@ -24,6 +24,7 @@
*/
#include "config.h"
+#include "Parser.h"
#include "ParserArena.h"
#include "Nodes.h"
@@ -57,4 +58,21 @@ void ParserArena::reset()
m_refCountedObjects.shrink(0);
}
+void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData)
+{
+ ParserArenaDeletable* deletable = static_cast<ParserArenaDeletable*>(fastMalloc(size));
+ globalData->parser->arena().deleteWithArena(deletable);
+ return deletable;
+}
+
+void* ParserArenaDeletable::operator new(size_t size)
+{
+ return fastMalloc(size);
+}
+
+void ParserArenaDeletable::operator delete(void* p)
+{
+ fastFree(p);
+}
+
}