Changeset 440 for trunk/JavaScriptCore/VM/Machine.cpp
- Timestamp:
- 08/18/08 11:14:49 (5 months ago)
- Files:
-
- trunk/JavaScriptCore/VM/Machine.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/JavaScriptCore/VM/Machine.cpp
r434 r440 83 83 84 84 // Returns the depth of the scope chain within a given call frame. 85 static int depth(ScopeChain& sc) 86 { 85 static int depth(CodeBlock* codeBlock, ScopeChain& sc) 86 { 87 if (!codeBlock->needsFullScopeChain) 88 return 0; 87 89 int scopeDepth = 0; 88 90 ScopeChainIterator iter = sc.begin(); … … 646 648 647 649 if (Debugger* debugger = exec->dynamicGlobalObject()->debugger()) { 648 DebuggerCallFrame debuggerCallFrame(exec ->dynamicGlobalObject(), codeBlock, scopeChain, r, exceptionValue);650 DebuggerCallFrame debuggerCallFrame(exec, exec->dynamicGlobalObject(), codeBlock, scopeChain, r, exceptionValue); 649 651 if (callFrame[RegisterFile::Callee].jsValue(exec)) 650 652 debugger->returnEvent(debuggerCallFrame, codeBlock->ownerNode->sourceId(), codeBlock->ownerNode->lastLine()); … … 724 726 725 727 if (Debugger* debugger = exec->dynamicGlobalObject()->debugger()) { 726 DebuggerCallFrame debuggerCallFrame(exec ->dynamicGlobalObject(), codeBlock, scopeChain, r, exceptionValue);728 DebuggerCallFrame debuggerCallFrame(exec, exec->dynamicGlobalObject(), codeBlock, scopeChain, r, exceptionValue); 727 729 debugger->exception(debuggerCallFrame, codeBlock->ownerNode->sourceId(), codeBlock->lineNumberForVPC(vPC)); 728 730 } … … 741 743 742 744 ScopeChain sc(scopeChain); 743 int scopeDelta = depth( sc) - scopeDepth;745 int scopeDelta = depth(codeBlock, sc) - scopeDepth; 744 746 ASSERT(scopeDelta >= 0); 745 747 while (scopeDelta--) … … 956 958 return; 957 959 958 DebuggerCallFrame debuggerCallFrame(exec ->dynamicGlobalObject(), codeBlock, scopeChain, r, 0);960 DebuggerCallFrame debuggerCallFrame(exec, exec->dynamicGlobalObject(), codeBlock, scopeChain, r, 0); 959 961 960 962 switch((DebugHookID)debugHookID) { … … 2215 2217 NEXT_OPCODE; 2216 2218 } 2217 BEGIN_OPCODE(op_jless) {2218 /* jless src1(r) src2(r) target(offset)2219 2220 Checks whether register src1 is less than register src2, as2221 with the ECMAScript '<' operator, and then jumps to offset2222 target from the current instruction, if and only if the2223 result of the comparison is true.2224 */2225 JSValue* src1 = r[(++vPC)->u.operand].jsValue(exec);2226 JSValue* src2 = r[(++vPC)->u.operand].jsValue(exec);2227 int target = (++vPC)->u.operand;2228 2229 bool result = jsLess(exec, src1, src2);2230 VM_CHECK_EXCEPTION();2231 2232 if (result) {2233 vPC += target;2234 NEXT_OPCODE;2235 }2236 2237 ++vPC;2238 NEXT_OPCODE;2239 }2240 2219 BEGIN_OPCODE(op_jnless) { 2241 2220 /* jnless src1(r) src2(r) target(offset)
