Example #1
0
FunctionParameters::FunctionParameters(ParameterNode* firstParameter, unsigned size)
    : m_size(size)
{
    unsigned i = 0;
    for (ParameterNode* parameter = firstParameter; parameter; parameter = parameter->nextParam())
        new (&identifiers()[i++]) Identifier(parameter->ident());
}
Example #2
0
FunctionParameters::FunctionParameters(ParameterNode* firstParameter, unsigned size)
    : m_size(size)
{
    unsigned i = 0;
    for (ParameterNode* parameter = firstParameter; parameter; parameter = parameter->nextParam()) {
        auto pattern = parameter->pattern();
        pattern->ref();
        patterns()[i++] = pattern;
    }
}
Example #3
0
PassRefPtr<FunctionParameters> FunctionParameters::create(ParameterNode* firstParameter)
{
    unsigned parameterCount = 0;
    for (ParameterNode* parameter = firstParameter; parameter; parameter = parameter->nextParam())
        ++parameterCount;

    size_t objectSize = sizeof(FunctionParameters) - sizeof(void*) + sizeof(DeconstructionPatternNode*) * parameterCount;
    void* slot = fastMalloc(objectSize);
    return adoptRef(new (slot) FunctionParameters(firstParameter, parameterCount));
}
Example #4
0
FunctionParameters::FunctionParameters(ParameterNode* firstParameter)
{
    for (ParameterNode* parameter = firstParameter; parameter; parameter = parameter->nextParam())
        append(parameter->ident());
}