Bug 28339

Summary: Arguments::initializeStandardProperties prevents JavaScriptCore compilation.
Product: WebKit Reporter: Maxime Simon <simon.maxime>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Other   
Attachments:
Description Flags
Patch v1 darin: review-

Description Maxime Simon 2009-08-15 08:43:04 PDT
Since r47292, we are unable to compile JavaScriptCore under Haiku.
The issue is from the newly introduced function void Arguments::initializeStandardProperties().
Here is the output:
In file included from JavaScriptCore/interpreter/Interpreter.cpp:33:
JavaScriptCore/runtime/Arguments.h: In member function 'void JSC::Arguments::initializeStandardProperties(JSC::CallFrame*)':
JavaScriptCore/runtime/Arguments.h:248: error: no matching function for call to 'JSC::Arguments::putDirectFunction(const JSC::Identifier&, JSC::NativeFunctionWrapper*, JSC::Attribute)'
JavaScriptCore/runtime/JSObject.h:515: note: candidates are: void JSC::JSObject::putDirectFunction(const JSC::Identifier&, JSC::JSCell*, unsigned int)
JavaScriptCore/runtime/JSObject.h:510: note:                 void JSC::JSObject::putDirectFunction(const JSC::Identifier&, JSC::JSCell*, unsigned int, bool, JSC::PutPropertySlot&)
JavaScriptCore/runtime/JSObject.h:173: note:                 void JSC::JSObject::putDirectFunction(JSC::ExecState*, JSC::InternalFunction*, unsigned int)
JavaScriptCore/runtime/Arguments.h:249: error: no matching function for call to 'JSC::Arguments::putDirectFunction(const JSC::Identifier&, JSC::NativeFunctionWrapper*, JSC::Attribute)'
JavaScriptCore/runtime/JSObject.h:515: note: candidates are: void JSC::JSObject::putDirectFunction(const JSC::Identifier&, JSC::JSCell*, unsigned int)
JavaScriptCore/runtime/JSObject.h:510: note:                 void JSC::JSObject::putDirectFunction(const JSC::Identifier&, JSC::JSCell*, unsigned int, bool, JSC::PutPropertySlot&)
JavaScriptCore/runtime/JSObject.h:173: note:                 void JSC::JSObject::putDirectFunction(JSC::ExecState*, JSC::InternalFunction*, unsigned int)

As the other ports don't seem affected, I'm wondering if it is not a simple lack of #ifdef. Also, the only way I found to avoid the problem was to comment out this function.

Regards,
Maxime
Comment 1 Maxime Simon 2009-08-16 00:16:24 PDT
Bug also seen on Leopard PPC.
Comment 2 Maxime Simon 2009-08-17 03:14:20 PDT
Created attachment 34965 [details]
Patch v1
Comment 3 Maxime Simon 2009-08-17 03:21:34 PDT
Corrected at r47330
Comment 4 Darin Adler 2009-08-17 13:11:26 PDT
Comment on attachment 34965 [details]
Patch v1

I believe this patch is wrong.

I am almost sure these properties of the Arguments object are needed with or without a JIT and this has nothing specific to do with JIT. Maybe the build failure you're seeing has some other cause.

Also, you included Haiku additions to lots of scripts -- that's unrelated to the rest of the patch.
Comment 5 Darin Adler 2009-08-17 13:18:19 PDT
(In reply to comment #4)
> I am almost sure these properties of the Arguments object are needed with or
> without a JIT and this has nothing specific to do with JIT. Maybe the build
> failure you're seeing has some other cause.

The real problem is a lack of include. The fix is to include "PrototypeFunction.h" in Arguments.h.

But not that if there was going to be an ifdef, the #ifdef would need to match the one in NativeFunctionWrapper.h. It needs to be "#if ENABLE(JIT) && ENABLE(JIT_OPTIMIZE_NATIVE_CALL)" not just "#if ENABLE(JIT)".
Comment 6 Maxime Simon 2009-08-17 16:45:07 PDT
(In reply to comment #4)
> (From update of attachment 34965 [details])
> I believe this patch is wrong.
> 
> I am almost sure these properties of the Arguments object are needed with or
> without a JIT and this has nothing specific to do with JIT. Maybe the build
> failure you're seeing has some other cause.

Didn't I closed this bug?
If not, really sorry, this bug was fixed in a recent changeset.
Actually I used the wrong way to avoid this problem.

> Also, you included Haiku additions to lots of scripts -- that's unrelated to
> the rest of the patch.

Erf, also sorry about that, I did a bugzilla-tool post-diff.
But it shouldn't add content which isn't marked to commit,
should it?

Anyway, sorry for the unnecessary disturbing noise.