Bug 46572 - Avoid constructing arguments object when accessing length and index properties
Summary: Avoid constructing arguments object when accessing length and index properties
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks: 46690
  Show dependency treegraph
 
Reported: 2010-09-25 11:48 PDT by Oliver Hunt
Modified: 2010-10-17 14:24 PDT (History)
6 users (show)

See Also:


Attachments
Patch (22.04 KB, patch)
2010-09-25 11:52 PDT, Oliver Hunt
zwarich: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2010-09-25 11:48:31 PDT
Avoid constructing arguments object when accessing length and index properties
Comment 1 Oliver Hunt 2010-09-25 11:52:06 PDT
Created attachment 68837 [details]
Patch
Comment 2 Oliver Hunt 2010-09-25 14:42:16 PDT
Committed r68338: <http://trac.webkit.org/changeset/68338>
Comment 3 WebKit Review Bot 2010-09-25 15:05:20 PDT
http://trac.webkit.org/changeset/68338 might have broken Qt Linux Release
Comment 4 David Kilzer (:ddkilzer) 2010-09-29 08:40:46 PDT
(In reply to comment #2)
> Committed r68338: <http://trac.webkit.org/changeset/68338>

This change caused a regression in the Interpreter:  Bug 46690.
Comment 5 Edward Sabol 2010-10-01 20:22:04 PDT
Is this going to be backed out or is a fix in the works?
Comment 6 yonkong 2010-10-16 20:33:52 PDT
I build r69847 code using the following macro
#define WTF_USE_JSVALUE32 1
#define ENABLE_JIT 1
#define ENABLE_JIT_OPTIMIZE_CALL 0
#define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 0
#define ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS 0
#define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 0

Then I used the program the executing the js code:
function foo(){
alert(arguments.length);//the result is 2.
}
foo(1,2,3,4);

when I open www.baidu.com and other urls, the program would be crash.
And the OS is windows xp. I had met the same problem in arm platform.

I had done the same thing using r67643 code, and found no problems. And I had tried to build r69847 code using the macro 
#define ENABLE_JIT 1
#define ENABLE_JIT_OPTIMIZE_CALL 0
#define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 0
#define ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS 0
#define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 0
and nothing problem was found.

By a way, the file JITPropertyAccess.cpp's function emit_op_put_by_id,
a sentence is like that:
JITStubCall stubCall(this, direct ? cti_op_put_by_id_direct_generic, cti_op_put_by_id_generic);
should't it be the next sentence?
JITStubCall stubCall(this, direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic);

please check, thanks.
Comment 7 Oliver Hunt 2010-10-17 14:24:21 PDT
(In reply to comment #6)
> I build r69847 code using the following macro
> #define WTF_USE_JSVALUE32 1

JSVALUE32 is no longer a supported configuration on any platform