Show
Ignore:
Timestamp:
08/04/08 12:23:14 (5 months ago)
Author:
mbensi
Message:

merge with webkit revision 35534

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/JavaScriptCore/VM/Machine.cpp

    r427 r429  
    4141#include "JSNotAnObject.h" 
    4242#include "JSPropertyNameIterator.h" 
     43#include "JSStaticScopeObject.h" 
    4344#include "JSString.h" 
    4445#include "ObjectPrototype.h" 
     
    9991000} 
    10001001 
     1002static NEVER_INLINE ScopeChainNode* createExceptionScope(ExecState* exec, CodeBlock* codeBlock, const Instruction* vPC, Register* r, ScopeChainNode* scopeChain) 
     1003{ 
     1004    int dst = (++vPC)->u.operand; 
     1005    Identifier& property = codeBlock->identifiers[(++vPC)->u.operand]; 
     1006    JSValue* value = r[(++vPC)->u.operand].jsValue(exec); 
     1007    JSObject* scope = new (exec) JSStaticScopeObject(property, value, DontDelete); 
     1008    r[dst] = scope; 
     1009    return scopeChain->push(scope); 
     1010} 
     1011 
    10011012JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFile* registerFile, Register* r, ScopeChainNode* scopeChain, CodeBlock* codeBlock, JSValue** exception) 
    10021013{ 
     
    26032614        NEXT_OPCODE; 
    26042615    } 
     2616#if HAVE(COMPUTED_GOTO) 
     2617    // Appease GCC 
     2618    goto *(&&skip_new_scope); 
     2619#endif 
     2620    BEGIN_OPCODE(op_push_new_scope) { 
     2621        /* new_scope dst(r) property(id) value(r) 
     2622          
     2623           Constructs a new StaticScopeObject with property set to value.  That scope 
     2624           object is then pushed onto the ScopeChain.  The scope object is then stored 
     2625           in dst for GC. 
     2626         */ 
     2627        setScopeChain(exec, scopeChain, createExceptionScope(exec, codeBlock, vPC, r, scopeChain)); 
     2628        vPC += 4; 
     2629        NEXT_OPCODE; 
     2630    } 
     2631#if HAVE(COMPUTED_GOTO) 
     2632    skip_new_scope: 
     2633#endif 
    26052634    BEGIN_OPCODE(op_catch) { 
    26062635        /* catch ex(r)