Simplify/speed up retrieving of properties
authorLars Knoll <lars.knoll@digia.com>
Fri, 14 Dec 2012 08:57:02 +0000 (09:57 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Fri, 14 Dec 2012 09:07:25 +0000 (10:07 +0100)
commitad1e9fb11927d470184b0f5bb2d702e563ff68d1
tree38eab3dacbe5300cf5a287f21e436f7203125060
parent21d90ca005700fe01bddda28b94db32421d59808
Simplify/speed up retrieving of properties

The hasProperty()/get() sequence used so far is as in the
spec, but requires us to lookup the name twice. Instead add
a bool hasProperty() to Object::__get__() and use that.

Speeds up fact.2.js by ~20%

Change-Id: Ic8c84718f1a702c3da9487010c0d6dd0fee44609
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_environment.cpp
qmljs_objects.cpp
qmljs_objects.h
qv4ecmaobjects.cpp
qv4ecmaobjects_p.h