diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-07-14 20:39:58 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-08-03 08:49:16 +0000 |
commit | c25c95ba22ef843d09b22f9524a04585dc26f2bd (patch) | |
tree | 1da57d1b577a56a0b1c4db530ce4c6fb9b9a8a7f /src/qml/jsruntime/qv4functionobject.cpp | |
parent | 5b620ed68909c63f3a5a892577a07f66d35c2923 (diff) |
Fix endianness in constant handling
When running on a big-endian system, we need to convert the constant values
into big-endian once and then it's possible to access them directly.
Change-Id: I655bad7b7734e3b95e79e5f688f0b4041d0c41c4
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 805087e389..276a069a77 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -535,7 +535,7 @@ void SimpleScriptFunction::construct(const Managed *that, Scope &scope, CallData ctx.function = f->d(); ctx.compilationUnit = f->function()->compilationUnit; ctx.lookups = ctx.compilationUnit->runtimeLookups; - ctx.constantTable = ctx.compilationUnit->data->constants(); + ctx.constantTable = ctx.compilationUnit->constants; ctx.outer = f->scope(); ctx.locals = scope.alloc(f->varCount()); for (int i = callData->argc; i < (int)f->formalParameterCount(); ++i) @@ -573,7 +573,7 @@ void SimpleScriptFunction::call(const Managed *that, Scope &scope, CallData *cal ctx.function = f->d(); ctx.compilationUnit = f->function()->compilationUnit; ctx.lookups = ctx.compilationUnit->runtimeLookups; - ctx.constantTable = ctx.compilationUnit->data->constants(); + ctx.constantTable = ctx.compilationUnit->constants; ctx.outer = f->scope(); ctx.locals = scope.alloc(f->varCount()); for (int i = callData->argc; i < (int)f->formalParameterCount(); ++i) |