Example #1
0
Symbol* Symbol::create(ExecState* exec, JSString* description)
{
    VM& vm = exec->vm();
    String desc = description->value(exec);
    Symbol* symbol = new (NotNull, allocateCell<Symbol>(vm.heap)) Symbol(vm, desc);
    symbol->finishCreation(vm);
    return symbol;
}
Example #2
0
Symbol* Symbol::create(VM& vm, SymbolImpl& uid)
{
    if (Symbol* symbol = vm.symbolImplToSymbolMap.get(&uid))
        return symbol;

    Symbol* symbol = new (NotNull, allocateCell<Symbol>(vm.heap)) Symbol(vm, uid);
    symbol->finishCreation(vm);
    return symbol;
}
Example #3
0
Symbol* Symbol::create(VM& vm)
{
    Symbol* symbol = new (NotNull, allocateCell<Symbol>(vm.heap)) Symbol(vm);
    symbol->finishCreation(vm);
    return symbol;
}