Skip to content
Snippets Groups Projects
  • Per Hedbor's avatar
    1807c0d7
    Added F_CALL_BUILTIN_N and F_APPLY_N. · 1807c0d7
    Per Hedbor authored
    This calls the constant in arg1 with arg2 arguments from the stack.
    
    These opcodes are used if the number of arguments is known and bigger
    than 1.
    
    It is not really all that big an optimization, it only removes the
    mark stack handling. And, in fact, due to the fact that it removes
    some peep optimizations it might be somewhat slower when not using the
    amd64 machine code (since, as an example, APPLY/ASSIGN_LOCAL/POP is no
    longer an opcode that is used in this case).
    
    However, when using the amd64 code the assign local + pop opcode is
    higly optimized, so it's not an issue that it is not merged into the
    apply opcode. It is in fact more of a feature.
    
    For that reason the code in docode.c is currently conditional.
    The only code generator using it is the amd64 one.
    1807c0d7
    History
    Added F_CALL_BUILTIN_N and F_APPLY_N.
    Per Hedbor authored
    This calls the constant in arg1 with arg2 arguments from the stack.
    
    These opcodes are used if the number of arguments is known and bigger
    than 1.
    
    It is not really all that big an optimization, it only removes the
    mark stack handling. And, in fact, due to the fact that it removes
    some peep optimizations it might be somewhat slower when not using the
    amd64 machine code (since, as an example, APPLY/ASSIGN_LOCAL/POP is no
    longer an opcode that is used in this case).
    
    However, when using the amd64 code the assign local + pop opcode is
    higly optimized, so it's not an issue that it is not merged into the
    apply opcode. It is in fact more of a feature.
    
    For that reason the code in docode.c is currently conditional.
    The only code generator using it is the amd64 one.