src/compiler/Scopes.cpp
changeset 256 3c184218462d
parent 195 c1ba166f3fc4
child 259 99ab8b19f0b9
     1.1 --- a/src/compiler/Scopes.cpp	Tue Jan 01 20:08:34 2013 -0800
     1.2 +++ b/src/compiler/Scopes.cpp	Sun Jan 06 13:52:21 2013 -0800
     1.3 @@ -168,47 +168,6 @@
     1.4      return scope;
     1.5  }
     1.6  
     1.7 -bool
     1.8 -GlobalScope::addPublic(Symbol *sym)
     1.9 -{
    1.10 -    return publics_.append(sym);
    1.11 -}
    1.12 -
    1.13 -Symbol *
    1.14 -GlobalScope::findPublic(Handle<String> name)
    1.15 -{
    1.16 -    for (size_t i = 0; i < publics_.length(); i++) {
    1.17 -        if (publics_[i]->name() == name)
    1.18 -            return publics_[i];
    1.19 -    }
    1.20 -    return NULL;
    1.21 -}
    1.22 -
    1.23 -Struct *
    1.24 -GlobalScope::build(Zone *zone)
    1.25 -{
    1.26 -    Local<FixedArray> descriptors(zone, FixedArray::New(zone, names_.length(), Heap::Tenure_Old));
    1.27 -
    1.28 -    for (size_t i = 0; i < names_.length(); i++) {
    1.29 -        Handle<String> name = names_[i]->name();
    1.30 -        Handle<Type> type = names_[i]->type();
    1.31 -        assert(type);
    1.32 -
    1.33 -        Local<Descriptor> desc(zone, Descriptor::New(zone, name, type));
    1.34 -        if (!desc)
    1.35 -            return NULL;
    1.36 -        
    1.37 -        descriptors->set(zone, i, desc);
    1.38 -    }
    1.39 -
    1.40 -    Local<StructType> type(zone, StructType::New(zone, Handle<String>::Null(), descriptors));
    1.41 -    if (!type)
    1.42 -        return NULL;
    1.43 -
    1.44 -    Local<StructMap> map(zone, type->newMap());
    1.45 -    return Struct::New(zone, map, Heap::Tenure_Old);
    1.46 -}
    1.47 -
    1.48  ImportScope::ImportScope(PoolAllocator &pool)
    1.49    : Scope(pool, Scope::IMPORT, NULL)
    1.50  {