From fbcd0a22f643f0b0ec1404507d63bdf35cd9a195 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 21 Nov 2013 13:15:46 +0100 Subject: Move the vtable pointer from the object to the internal class This saves one pointer per object, and willmake other optimizations easier in the future. Change-Id: I1324cad31998896b5dc76af3c8a7ee9d86283bfe Reviewed-by: Simon Hausmann --- tools/qmljs/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/qmljs/main.cpp b/tools/qmljs/main.cpp index 32a45d9289..9c10851b21 100644 --- a/tools/qmljs/main.cpp +++ b/tools/qmljs/main.cpp @@ -72,7 +72,7 @@ using namespace QV4; struct Print: FunctionObject { Print(ExecutionContext *scope): FunctionObject(scope, QStringLiteral("print")) { - vtbl = &static_vtbl; + setVTable(&static_vtbl); } static ReturnedValue call(Managed *, CallData *callData) @@ -97,7 +97,7 @@ struct GC: public FunctionObject GC(ExecutionContext* scope) : FunctionObject(scope, QStringLiteral("gc")) { - vtbl = &static_vtbl; + setVTable(&static_vtbl); } static ReturnedValue call(Managed *m, CallData *) { -- cgit v1.2.3