jitcraft/NameBinding.cpp
changeset 85 06a0015b6a5c
parent 68 b40b0e18a918
     1.1 --- a/jitcraft/NameBinding.cpp	Fri Jul 20 00:03:10 2012 -0700
     1.2 +++ b/jitcraft/NameBinding.cpp	Mon Jul 23 01:19:44 2012 -0700
     1.3 @@ -18,6 +18,7 @@
     1.4  #include "NameBinding.h"
     1.5  #include "Strings.h"
     1.6  #include "Zone.h"
     1.7 +#include "Scopes.h"
     1.8  
     1.9  using namespace ke;
    1.10  
    1.11 @@ -42,3 +43,9 @@
    1.12      location_(UNALLOCATED)
    1.13  {
    1.14  }
    1.15 +
    1.16 +bool
    1.17 +Variable::needsHeapAllocation()
    1.18 +{
    1.19 +    return scope()->kind() == Scope::GLOBAL;
    1.20 +}