Closed Bug 217951 Opened 21 years ago Closed 21 years ago

instruction count reset during a call bytecode

Categories

(Rhino Graveyard :: Core, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: norrisboyd)

Details

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: 

In org.mozilla.javascript.Interpreter.interpret(...), the instruction count 
gets reset during the processing of Token.CALL bytecodes. I'm not sure if this 
behavior is intentional, but it differs from the behavior of the 
Icode_CALLSPECIAL bytecode. 

In any case, I think the solution is to remove line 2322:

   cx.instructionCount = instructionCount;

which does not appear in the handler for the similar Icode_CALLSPECIAL bytecode.

Reproducible: Always

Steps to Reproduce:
1. Create a Context that observes the instruction counts
2. run some Javascript code in an infinite loop that calls a function

Actual Results:  
Context.observeInstructionCount() never gets called


Expected Results:  
Context.observeInstructionCount() should get called occasionally
I committed the fix.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Rubber-stamp vrfy -
Status: RESOLVED → VERIFIED
Trageting as resolved against 1.5R5
Target Milestone: --- → 1.5R5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: