Changeset 37294 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 4, 2008, 1:32:21 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-04 Cameron Zwarich <[email protected]>

Reviewed by Darin Adler.

Bug 21369: Add opcode documentation for all undocumented opcodes
<https://bugs.webkit.org/show_bug.cgi?id=21369>

This patch adds opcode documentation for all undocumented opcodes, and
it also renames op_init_arguments to op_create_arguments.

  • VM/CTI.cpp: (JSC::CTI::privateCompileMainPass):
  • VM/CodeBlock.cpp: (JSC::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (JSC::CodeGenerator::CodeGenerator):
  • VM/Machine.cpp: (JSC::Machine::privateExecute): (JSC::Machine::cti_op_create_arguments):
  • VM/Machine.h:
  • VM/Opcode.h:
Location:
trunk/JavaScriptCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r37285 r37294  
     12008-10-04  Cameron Zwarich  <[email protected]>
     2
     3        Reviewed by Darin Adler.
     4
     5        Bug 21369: Add opcode documentation for all undocumented opcodes
     6        <https://bugs.webkit.org/show_bug.cgi?id=21369>
     7
     8        This patch adds opcode documentation for all undocumented opcodes, and
     9        it also renames op_init_arguments to op_create_arguments.
     10
     11        * VM/CTI.cpp:
     12        (JSC::CTI::privateCompileMainPass):
     13        * VM/CodeBlock.cpp:
     14        (JSC::CodeBlock::dump):
     15        * VM/CodeGenerator.cpp:
     16        (JSC::CodeGenerator::CodeGenerator):
     17        * VM/Machine.cpp:
     18        (JSC::Machine::privateExecute):
     19        (JSC::Machine::cti_op_create_arguments):
     20        * VM/Machine.h:
     21        * VM/Opcode.h:
     22
    1232008-10-03  Maciej Stachowiak  <[email protected]>
    224
  • trunk/JavaScriptCore/VM/CTI.cpp

    r37285 r37294  
    19891989            break;
    19901990        }
    1991         case op_init_arguments: {
    1992             emitCall(i, Machine::cti_op_init_arguments);
     1991        case op_create_arguments: {
     1992            emitCall(i, Machine::cti_op_create_arguments);
    19931993            i += 1;
    19941994            break;
  • trunk/JavaScriptCore/VM/CodeBlock.cpp

    r37285 r37294  
    357357            break;
    358358        }
    359         case op_init_arguments: {
    360             printf("[%4d] init_arguments\n", location);
     359        case op_create_arguments: {
     360            printf("[%4d] create_arguments\n", location);
    361361            break;
    362362        }
  • trunk/JavaScriptCore/VM/CodeGenerator.cpp

    r37285 r37294  
    296296    codeBlock->usesArguments = usesArguments;
    297297    if (usesArguments) {
    298         emitOpcode(op_init_arguments);
     298        emitOpcode(op_create_arguments);
    299299        m_argumentsRegister.setIndex(RegisterFile::OptionalCalleeArguments);
    300300        addVar(propertyNames().arguments, false);
  • trunk/JavaScriptCore/VM/Machine.cpp

    r37285 r37294  
    33433343           register base to those of the calling function.
    33443344        */
    3345            
     3345
    33463346        int result = (++vPC)->u.operand;
    33473347
     
    33773377    }
    33783378    BEGIN_OPCODE(op_enter) {
     3379        /* enter
     3380
     3381           Initializes local variables to undefined and fills constant
     3382           registers with their values. If the code block requires an
     3383           activation, enter_with_activation should be used instead.
     3384
     3385           This opcode should only be used at the beginning of a code
     3386           block.
     3387        */
     3388
    33793389        size_t i = 0;
    33803390        CodeBlock* codeBlock = this->codeBlock(r);
     
    33903400    }
    33913401    BEGIN_OPCODE(op_enter_with_activation) {
     3402        /* enter_with_activation
     3403
     3404           Initializes local variables to undefined, fills constant
     3405           registers with their values, creates an activation object,
     3406           and places the new activation both in the activation slot
     3407           in the call frame and at the top of the scope chain. If the
     3408           code block does not require an activation, enter should be
     3409           used instead.
     3410
     3411           This opcode should only be used at the beginning of a code
     3412           block.
     3413        */
     3414
    33923415        size_t i = 0;
    33933416        CodeBlock* codeBlock = this->codeBlock(r);
     
    34153438        NEXT_OPCODE;
    34163439    }
    3417     BEGIN_OPCODE(op_init_arguments) {
     3440    BEGIN_OPCODE(op_create_arguments) {
     3441        /* create_arguments
     3442
     3443           Creates the 'arguments' object and places it in both the
     3444           'arguments' call frame slot and the local 'arguments'
     3445           register.
     3446
     3447           This opcode should only be used at the beginning of a code
     3448           block.
     3449        */
     3450
    34183451        JSValue* activation = r[RegisterFile::OptionalCalleeActivation].getJSValue();
    34193452        Arguments* arguments;
     
    46264659}
    46274660
    4628 void Machine::cti_op_init_arguments(CTI_ARGS)
     4661void Machine::cti_op_create_arguments(CTI_ARGS)
    46294662{
    46304663    ExecState* exec = ARG_exec;
  • trunk/JavaScriptCore/VM/Machine.h

    r37285 r37294  
    165165        static void* SFX_CALL cti_op_call_JSFunction(CTI_ARGS);
    166166        static JSValue* SFX_CALL cti_op_call_NotJSFunction(CTI_ARGS);
    167         static void SFX_CALL cti_op_init_arguments(CTI_ARGS);
     167        static void SFX_CALL cti_op_create_arguments(CTI_ARGS);
    168168        static void SFX_CALL cti_op_ret_activation_arguments(CTI_ARGS);
    169169        static void SFX_CALL cti_op_ret_profiler(CTI_ARGS);
  • trunk/JavaScriptCore/VM/Opcode.h

    r37285 r37294  
    4343        macro(op_enter) \
    4444        macro(op_enter_with_activation) \
    45         macro(op_init_arguments) \
     45        macro(op_create_arguments) \
    4646        macro(op_convert_this) \
    4747        \
Note: See TracChangeset for help on using the changeset viewer.