diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-10-04 16:06:16 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-10 09:54:24 +0200 |
commit | a967a9bdcc2c75a0270c2be48d845ded5332e4f0 (patch) | |
tree | bb19264f0e045239103678d568d506d8094bbcd9 /src/qml/jsruntime/qv4runtime.cpp | |
parent | dcec03166c93fcbc9aa1ca97f53a6f436faa482c (diff) |
V4 JIT: generate some strict (not) equal conditions
Checks for strict (not) equal to null, undefined, or a boolean value
can be generated without reserving extra registers, or doing a call.
This reduces the amount of runtime calls from >25mln to ~6500 for
v8-bench.js
Change-Id: If08d1124b2869227654b1233a89833c5b5e7b40c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index b8b62c1bb7..6e566953c7 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -139,6 +139,7 @@ struct RuntimeCounters::Data { }; void dump() const { + QTextStream outs(stderr, QIODevice::WriteOnly); QList<Line> lines; foreach (const char *func, counters.keys()) { const Counters &fCount = counters[func]; @@ -154,9 +155,13 @@ struct RuntimeCounters::Data { } } qSort(lines.begin(), lines.end(), Line::less); - qDebug() << "Counters:"; + outs << lines.size() << " counters:" << endl; foreach (const Line &line, lines) - qDebug("%10ld | %s | %s | %s", line.count, line.func, pretty(line.tag1), pretty(line.tag2)); + outs << qSetFieldWidth(10) << line.count << qSetFieldWidth(0) + << " | " << line.func + << " | " << pretty(line.tag1) + << " | " << pretty(line.tag2) + << endl; } }; @@ -172,6 +177,7 @@ RuntimeCounters::RuntimeCounters() RuntimeCounters::~RuntimeCounters() { d->dump(); + delete d; } void RuntimeCounters::count(const char *func, uint tag) |