Bug 72000 - [CMAKE] Add the UseV8.cmake to WebCore.
Summary: [CMAKE] Add the UseV8.cmake to WebCore.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 60244
  Show dependency treegraph
 
Reported: 2011-11-09 22:40 PST by jaehoon jeong
Modified: 2011-11-14 04:20 PST (History)
6 users (show)

See Also:


Attachments
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input. (11.98 KB, patch)
2011-11-09 22:55 PST, jaehoon jeong
no flags Details | Formatted Diff | Diff
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input. (11.75 KB, patch)
2011-11-11 23:24 PST, jaehoon jeong
no flags Details | Formatted Diff | Diff
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input. (11.97 KB, patch)
2011-11-12 00:32 PST, jaehoon jeong
no flags Details | Formatted Diff | Diff
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input. (11.80 KB, patch)
2011-11-12 01:08 PST, jaehoon jeong
dbates: review+
dbates: commit-queue-
Details | Formatted Diff | Diff
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input. (11.79 KB, patch)
2011-11-13 21:18 PST, jaehoon jeong
no flags Details | Formatted Diff | Diff
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input. (11.79 KB, patch)
2011-11-13 22:30 PST, jaehoon jeong
jh4u.jeong: review+
dbates: commit-queue-
Details | Formatted Diff | Diff
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input. (11.79 KB, patch)
2011-11-14 02:50 PST, jaehoon jeong
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jaehoon jeong 2011-11-09 22:40:45 PST
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.
Comment 1 jaehoon jeong 2011-11-09 22:55:28 PST
Created attachment 114440 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.
Comment 2 Raphael Kubo da Costa (:rakuco) 2011-11-10 03:47:14 PST
Comment on attachment 114440 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

View in context: https://bugs.webkit.org/attachment.cgi?id=114440&action=review

> Source/WebCore/UseV8.cmake:229
> +SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1")
> +SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} V8_BINDING=1")

Why not have these in a single call?
Comment 3 Raphael Kubo da Costa (:rakuco) 2011-11-10 03:48:12 PST
CC'ing Patrick in case he has anything to say.
Comment 4 Patrick R. Gansterer 2011-11-10 04:05:07 PST
Comment on attachment 114440 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

View in context: https://bugs.webkit.org/attachment.cgi?id=114440&action=review

> Source/WebCore/UseV8.cmake:19
> +    html/canvas/CanvasPixelArray.idl
> +
> +    storage/IDBVersionChangeEvent.idl
> +    storage/IDBVersionChangeRequest.idl

Are this IDL files part of V8? I don't think so. If you need them you should put them into the CMakeLists.txt

> Source/WebCore/UseV8.cmake:23
> +    bindings/generic/BindingSecurityBase.cpp

If it's generic it should go into the CMakeLists.txt

> Source/WebCore/UseV8.cmake:25
> +    bindings/ScriptControllerBase.cpp

already included in CMakeLists.txt

> Source/WebCore/UseV8.cmake:240
> +ADD_CUSTOM_COMMAND(
> +    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
> +    MAIN_DEPENDENCY bindings/v8/DebuggerScript.js
> +    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl DebuggerScriptSource_js ${WEBCORE_DIR}/bindings/v8/DebuggerScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
> +    VERBATIM)

Please add all other dependencies too, not only the MAIN_DEPENDENCY.

> Source/WebCore/UseV8.cmake:256
> +ADD_CUSTOM_COMMAND(
> +    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
> +    MAIN_DEPENDENCY bindings/v8/custom/V8ArrayBufferViewCustomScript.js
> +    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl V8ArrayBufferViewCustomScript_js ${WEBCORE_DIR}/bindings/v8/custom/V8ArrayBufferViewCustomScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
> +    VERBATIM)

Missing dependecies?
Comment 5 Raphael Kubo da Costa (:rakuco) 2011-11-10 04:05:39 PST
And CC'ing dbates too, as he's been doing CMake stuff lately.
Comment 6 jaehoon jeong 2011-11-11 22:23:35 PST
(In reply to comment #2)
> (From update of attachment 114440 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=114440&action=review
> 
> > Source/WebCore/UseV8.cmake:229
> > +SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1")
> > +SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} V8_BINDING=1")
> 
> Why not have these in a single call?

I will replace these with belows 

+SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1")
+FOREACH (_feature ${FEATURE_DEFINES})
+    SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} ${_feature}")
+    SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} V8_BINDING=1")
+ENDFOREACH ()
Comment 7 Patrick R. Gansterer 2011-11-11 22:25:38 PST
(In reply to comment #6)
> (In reply to comment #2)
> > (From update of attachment 114440 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=114440&action=review
> > 
> > > Source/WebCore/UseV8.cmake:229
> > > +SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1")
> > > +SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} V8_BINDING=1")
> > 
> > Why not have these in a single call?
> 
> I will replace these with belows 
> 
> +SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1")
> +FOREACH (_feature ${FEATURE_DEFINES})
> +    SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} ${_feature}")
> +    SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} V8_BINDING=1")
> +ENDFOREACH ()

Why do you add V8_BINDING=1 not only once?
Comment 8 jaehoon jeong 2011-11-11 23:11:43 PST
(In reply to comment #4)
> (From update of attachment 114440 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=114440&action=review
> 
> > Source/WebCore/UseV8.cmake:19
> > +    html/canvas/CanvasPixelArray.idl
> > +
> > +    storage/IDBVersionChangeEvent.idl
> > +    storage/IDBVersionChangeRequest.idl
> 
> Are this IDL files part of V8? I don't think so. If you need them you should put them into the CMakeLists.txt
> 
> > Source/WebCore/UseV8.cmake:23
> > +    bindings/generic/BindingSecurityBase.cpp
> 
> If it's generic it should go into the CMakeLists.txt
> 
> > Source/WebCore/UseV8.cmake:25
> > +    bindings/ScriptControllerBase.cpp
> 
> already included in CMakeLists.txt
> 
> > Source/WebCore/UseV8.cmake:240
> > +ADD_CUSTOM_COMMAND(
> > +    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
> > +    MAIN_DEPENDENCY bindings/v8/DebuggerScript.js
> > +    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl DebuggerScriptSource_js ${WEBCORE_DIR}/bindings/v8/DebuggerScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
> > +    VERBATIM)
> 
> Please add all other dependencies too, not only the MAIN_DEPENDENCY.
> 
> > Source/WebCore/UseV8.cmake:256
> > +ADD_CUSTOM_COMMAND(
> > +    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
> > +    MAIN_DEPENDENCY bindings/v8/custom/V8ArrayBufferViewCustomScript.js
> > +    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl V8ArrayBufferViewCustomScript_js ${WEBCORE_DIR}/bindings/v8/custom/V8ArrayBufferViewCustomScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
> > +    VERBATIM)
> 
> Missing dependecies?

Thanks for your feedback.
I have check it, whether there are missing dependencies in bindings/v8
but there are no other dependencies related with generating DebuggerScriptSource.h and V8ArrayBufferViewCustomScript.h. so they have just one dependency.

Belows are not part of V8. I will put them into CMakeLists.txt. 

Source/WebCore/UseV8.cmake:19
+    html/canvas/CanvasPixelArray.idl

Source/WebCore/UseV8.cmake:23
+    bindings/generic/BindingSecurityBase.cpp

ScriptControllerBase.cpp is already included in CMakeLists.txt and IDBVersion*.idl files are not necessary. so I will remove belows from UseV8.cmake

Source/WebCore/UseV8.cmake:23
+    storage/IDBVersionChangeEvent.idl
+    storage/IDBVersionChangeRequest.idl

Source/WebCore/UseV8.cmake:25
+    bindings/ScriptControllerBase.cpp
Comment 9 jaehoon jeong 2011-11-11 23:24:37 PST
Created attachment 114821 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.
Comment 10 WebKit Review Bot 2011-11-11 23:28:04 PST
Attachment 114821 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Patrick R. Gansterer 2011-11-11 23:36:09 PST
Comment on attachment 114821 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

View in context: https://bugs.webkit.org/attachment.cgi?id=114821&action=review

> Source/WebCore/ChangeLog:6
> +        https://bugs.webkit.org/show_bug.cgi?id=XXXXX

Pleas add a VALID bug number! ;-)

> Source/WebCore/UseV8.cmake:220
> +    SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} V8_BINDING=1")

why do you add the in the loop? if you really need to add it for every feature you can add it the the set statement in the line before.

> Source/WebCore/UseV8.cmake:228
> +ADD_CUSTOM_COMMAND(
> +    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
> +    MAIN_DEPENDENCY bindings/v8/DebuggerScript.js
> +    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl DebuggerScriptSource_js ${WEBCORE_DIR}/bindings/v8/DebuggerScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
> +    VERBATIM)

you need to add DEPENDS ${WEBCORE_DIR}/inspector/xxd.pl (and all file it maybe includes) if you want to regenerate the output when xxd.pl changes

> Source/WebCore/UseV8.cmake:244
> +ADD_CUSTOM_COMMAND(
> +    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
> +    MAIN_DEPENDENCY bindings/v8/custom/V8ArrayBufferViewCustomScript.js
> +    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl V8ArrayBufferViewCustomScript_js ${WEBCORE_DIR}/bindings/v8/custom/V8ArrayBufferViewCustomScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
> +    VERBATIM)

missing dependency to xxd.pl
Comment 12 jaehoon jeong 2011-11-12 00:32:02 PST
Created attachment 114824 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.
Comment 13 Patrick R. Gansterer 2011-11-12 00:35:46 PST
Comment on attachment 114824 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

View in context: https://bugs.webkit.org/attachment.cgi?id=114824&action=review

> Source/WebCore/UseV8.cmake:218
> +SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1")
> +SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} V8_BINDING=1")

Why not SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 V8_BINDING=1") ?

> Source/WebCore/UseV8.cmake:227
> +    DEPENDS ${WEBCORE_DIR}/inspector/xxd.pl ${WEBCORE_DIR}/bindings/v8/DebuggerScript.js

You don't need to add DebuggerScript.js, since it's already the MAIN_DEPENDENCY

> Source/WebCore/UseV8.cmake:244
> +    DEPENDS ${WEBCORE_DIR}/inspector/xxd.pl ${WEBCORE_DIR}/bindings/v8/custom/V8ArrayBufferViewCustomScript.js

no need for V8ArrayBufferViewCustomScript.js
Comment 14 jaehoon jeong 2011-11-12 00:46:08 PST
(In reply to comment #11)
> (From update of attachment 114821 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=114821&action=review
> 
> > Source/WebCore/ChangeLog:6
> > +        https://bugs.webkit.org/show_bug.cgi?id=XXXXX
> 
> Pleas add a VALID bug number! ;-)
> 
> > Source/WebCore/UseV8.cmake:220
> > +    SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} V8_BINDING=1")
> 
> why do you add the in the loop? if you really need to add it for every feature you can add it the the set statement in the line before.
> 
> > Source/WebCore/UseV8.cmake:228
> > +ADD_CUSTOM_COMMAND(
> > +    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
> > +    MAIN_DEPENDENCY bindings/v8/DebuggerScript.js
> > +    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl DebuggerScriptSource_js ${WEBCORE_DIR}/bindings/v8/DebuggerScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/DebuggerScriptSource.h
> > +    VERBATIM)
> 
> you need to add DEPENDS ${WEBCORE_DIR}/inspector/xxd.pl (and all file it maybe includes) if you want to regenerate the output when xxd.pl changes
> 
> > Source/WebCore/UseV8.cmake:244
> > +ADD_CUSTOM_COMMAND(
> > +    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
> > +    MAIN_DEPENDENCY bindings/v8/custom/V8ArrayBufferViewCustomScript.js
> > +    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl V8ArrayBufferViewCustomScript_js ${WEBCORE_DIR}/bindings/v8/custom/V8ArrayBufferViewCustomScript.js ${DERIVED_SOURCES_WEBCORE_DIR}/V8ArrayBufferViewCustomScript.h
> > +    VERBATIM)
> 
> missing dependency to xxd.pl

sorry.. I make a mistake for adding a wrong patch :( 
I add "DEPENDS ${WEBCORE_DIR}/inspector/xxd.pl" and modify other misc.
Comment 15 jaehoon jeong 2011-11-12 01:08:55 PST
Created attachment 114827 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

remove DebuggerScript.js, V8ArrayBufferViewCustomScript.js from DEPENDS.
and change settings of FEATURE_DEFINES_JAVASCRIPT
Comment 16 Patrick R. Gansterer 2011-11-12 01:18:58 PST
Comment on attachment 114827 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

Since I don't know all of the V8 stuff, I can't tell if there are any files missing or wrong. So if this patch works: LGTM
Comment 17 Daniel Bates 2011-11-12 09:10:25 PST
Comment on attachment 114827 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

View in context: https://bugs.webkit.org/attachment.cgi?id=114827&action=review

This looks sane to me. I have some minor nits.

> Source/WebCore/UseV8.cmake:15
> +LIST(APPEND WebCore_SOURCES

Please sort the entires in this list so that they appear in sorted order as produced by the Unix sort command.

> Source/WebCore/UseV8.cmake:167
> +LIST(APPEND WebCore_SOURCES
> +    ${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp
> +    ${JAVASCRIPTCORE_DIR}/yarr/YarrInterpreter.cpp
> +    ${JAVASCRIPTCORE_DIR}/yarr/YarrJIT.cpp
> +    ${JAVASCRIPTCORE_DIR}/yarr/YarrSyntaxChecker.cpp

Ditto.
Comment 18 jaehoon jeong 2011-11-13 21:18:31 PST
Created attachment 114876 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.
Comment 19 jaehoon jeong 2011-11-13 22:30:17 PST
Created attachment 114880 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

I modified the entries of Yarr* and others as a sorted order

Source/WebCore/UseV8.cmake:167
+LIST(APPEND WebCore_SOURCES
+    ${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp
+    ${JAVASCRIPTCORE_DIR}/yarr/YarrInterpreter.cpp
+    ${JAVASCRIPTCORE_DIR}/yarr/YarrJIT.cpp
+    ${JAVASCRIPTCORE_DIR}/yarr/YarrSyntaxChecker.cpp
Comment 20 Daniel Bates 2011-11-13 22:49:37 PST
Comment on attachment 114880 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

View in context: https://bugs.webkit.org/attachment.cgi?id=114880&action=review

> Source/WebCore/UseV8.cmake:15
> +LIST(APPEND WebCore_SOURCES

The first two sections of this list aren't in sorted order as produced by the Unix sort command. The first two sections should look like <http://pastie.org/2860330>.
Comment 21 jaehoon jeong 2011-11-14 02:50:37 PST
Created attachment 114907 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

The entries of v8 bindings are listed in order as you mentioned (the Unix sort commend)
Comment 22 Ryuan Choi 2011-11-14 03:12:52 PST
Comment on attachment 114907 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

I checked Daniel's last comment and it seems well ordered.

BTW, you shouldn't check r+ by yourself although reviewer already gave it.
Comment 23 WebKit Review Bot 2011-11-14 04:20:34 PST
Comment on attachment 114907 [details]
Add the UseV8.cmake to WebCore to build bindings of V8 and generate JavaScript codes given IDL input.

Clearing flags on attachment: 114907

Committed r100126: <http://trac.webkit.org/changeset/100126>
Comment 24 WebKit Review Bot 2011-11-14 04:20:40 PST
All reviewed patches have been landed.  Closing bug.