Correctly bind varibles in the global context
Correctly bind varibles in the global context

Variables need to be bound to the execution context
before entering the method. For the global scope this
implies that declared variables are available, but may
be undefined. The lines:

print(x)
var x = 1;

has to print 'undefined' and not throw a type error.

Change-Id: I9d7062823da83cd4c4e74588693bb0ce8dc85c6b
Reviewed-by: Simon Hausmann <a975102812d593b3191088e3d0aeaeb6f11dbcf5@digia.com>

mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,qmlc/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative