aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-19 16:36:17 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-23 12:30:47 +0100
commitb35227f2354b3525631c6421e7d100480e77ca33 (patch)
treef032e4941edae0e5aed7f15cf35e2ad2c0e6c476
parentd24b7fb904771ba078ac52e05984b23327ddff3b (diff)
Better align data members in ExecutionContext
Saves another 4-8 bytes per object. Change-Id: Iaeb013abd20733cd7a5d9a5e0d42b92da8153da9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/qml/jsruntime/qv4context_p.h6
-rw-r--r--src/qml/jsruntime/qv4engine_p.h6
2 files changed, 5 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h
index 93cd9d4ea9..46c5904eba 100644
--- a/src/qml/jsruntime/qv4context_p.h
+++ b/src/qml/jsruntime/qv4context_p.h
@@ -81,9 +81,6 @@ struct ExecutionContext : Base {
inline ExecutionContext(ExecutionEngine *engine, ContextType t);
- ContextType type;
- bool strictMode;
-
CallData *callData;
ExecutionEngine *engine;
@@ -92,8 +89,9 @@ struct ExecutionContext : Base {
Lookup *lookups;
CompiledData::CompilationUnit *compilationUnit;
+ ContextType type : 8;
+ bool strictMode : 8;
int lineNumber;
-
};
struct CallContext : ExecutionContext {
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 5709ca909d..d7dbb464cc 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -358,13 +358,13 @@ inline Heap::ExecutionContext *ExecutionEngine::popContext()
inline
Heap::ExecutionContext::ExecutionContext(ExecutionEngine *engine, ContextType t)
- : type(t)
- , strictMode(false)
- , engine(engine)
+ : engine(engine)
, parent(engine->currentContext())
, outer(0)
, lookups(0)
, compilationUnit(0)
+ , type(t)
+ , strictMode(false)
, lineNumber(-1)
{
engine->current = this;