diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 17:27:52 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 17:27:52 +0000 |
commit | 2774db88fd49010757623e9e1a5bd3d1d0cc9372 (patch) | |
tree | 9a5764f4f504784d71f6f668f0d41073d3750243 | |
parent | ccfc1a7b70073eac2d1cf0ec4700e0fae725ea02 (diff) | |
download | chromium_src-2774db88fd49010757623e9e1a5bd3d1d0cc9372.zip chromium_src-2774db88fd49010757623e9e1a5bd3d1d0cc9372.tar.gz chromium_src-2774db88fd49010757623e9e1a5bd3d1d0cc9372.tar.bz2 |
bootstrap v8 js binding/header generation and putting them in a subdir so switching between kjs and v8 doesn't intermingle headers. Also fix v8 codegen to not have ">>" in templates, which gcc doesn't allow.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@871 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | webkit/build/JSConfig/create-config.sh | 20 | ||||
-rw-r--r-- | webkit/config.h.in | 2 | ||||
-rw-r--r-- | webkit/port/DerivedSources.make | 13 | ||||
-rw-r--r-- | webkit/port/bindings/scripts/CodeGeneratorV8.pm | 12 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_binding.h | 1 |
5 files changed, 31 insertions, 17 deletions
diff --git a/webkit/build/JSConfig/create-config.sh b/webkit/build/JSConfig/create-config.sh index 7f6759e..4d07f35 100755 --- a/webkit/build/JSConfig/create-config.sh +++ b/webkit/build/JSConfig/create-config.sh @@ -31,31 +31,43 @@ rm -f $WebCoreObjDir/definitions.h 2> /dev/null if [[ "$2" = "kjs" ]] then + SubDir=/kjs cat > $WebCoreObjDir/definitions.h << -=EOF=- #define WTF_USE_JAVASCRIPTCORE_BINDINGS 1 #define WTF_USE_NPOBJECT 1 -=EOF=- else + SubDir=/v8 cat > $WebCoreObjDir/definitions.h << -=EOF=- #define WTF_USE_V8_BINDING 1 #define WTF_USE_NPOBJECT 1 -=EOF=- fi +if [[ "${OS}" = "Windows_NT" ]] +then + SubDir= +fi + +mkdir -p "${WebCoreObjDir}${SubDir}" + pwd -cat ../../config.h.in $WebCoreObjDir/definitions.h > $WebCoreObjDir/config.h.new +cat ../../config.h.in $WebCoreObjDir/definitions.h > $WebCoreObjDir$SubDir/config.h.new if [[ "${OS}" = "Windows_NT" ]] || \ - ! diff -q $WebCoreObjDir/config.h.new $WebCoreObjDir/config.h >& /dev/null + ! diff -q $WebCoreObjDir$SubDir/config.h.new $WebCoreObjDir$SubDir/config.h >& /dev/null then - mv $WebCoreObjDir/config.h.new $WebCoreObjDir/config.h + mv $WebCoreObjDir$SubDir/config.h.new $WebCoreObjDir$SubDir/config.h else - rm $WebCoreObjDir/config.h.new + rm $WebCoreObjDir$SubDir/config.h.new fi +rm -f "${WebCoreObjDir}/definitions.h" + # # Step 2: Populate the JavaScriptHeaders based on the selected # JavaScript engine. # +JSHeadersDir="${JSHeadersDir}${SubDir}" mkdir -p $JSHeadersDir JavaScriptCoreSrcDir="../../../third_party/WebKit/JavaScriptCore" if [[ "$2" = "kjs" ]] diff --git a/webkit/config.h.in b/webkit/config.h.in index 7ad4fde..fd4d791 100644 --- a/webkit/config.h.in +++ b/webkit/config.h.in @@ -90,7 +90,7 @@ #endif #if PLATFORM(MAC) -#define WTF_USE_JAVASCRIPTCORE_BINDINGS 1 +// #define WTF_USE_JAVASCRIPTCORE_BINDINGS 1 #ifdef __LP64__ #define WTF_USE_NPOBJECT 0 #else diff --git a/webkit/port/DerivedSources.make b/webkit/port/DerivedSources.make index 58daa7dc..b06cf13 100644 --- a/webkit/port/DerivedSources.make +++ b/webkit/port/DerivedSources.make @@ -52,8 +52,11 @@ VPATH = \ ifeq ($(OS),MACOS) all : \ - CharsetData.cpp \ - DOMAbstractView.h \ + CharsetData.cpp +endif + +# Not needed because we don't want obj-c bindings generated +# DOMAbstractView.h\ DOMAttr.h \ DOMCDATASection.h \ DOMCSSCharsetRule.h \ @@ -309,7 +312,7 @@ all : \ DOMWheelEvent.h \ DOMXPathExpression.h \ DOMXPathNSResolver.h \ - DOMXPathResult.h + DOMXPathResult.h \ endif # Not needed for V8\ @@ -996,7 +999,7 @@ UserAgentStyleSheets.h : css/make-css-file-arrays.pl $(USER_AGENT_STYLE_SHEETS) # character set name table -CharsetData.cpp : platform/mac/make-charset-table.pl platform/mac/character-sets.txt $(ENCODINGS_FILE) +CharsetData.cpp : platform/text/mac/make-charset-table.pl platform/text/mac/character-sets.txt $(ENCODINGS_FILE) perl $^ $(ENCODINGS_PREFIX) > $@ # lookup tables for old-style JavaScript bindings @@ -1089,7 +1092,7 @@ OBJC_BINDINGS_SCRIPTS = \ bindings/scripts/generate-bindings.pl \ # -DOM%.h : %.idl $(OBJC_BINDINGS_SCRIPTS) bindings/objc/PublicDOMInterfaces.h +DOM%.h : %.idl $(OBJC_BINDINGS_SCRIPTS) $(PUBLICDOMINTERFACES) perl -I $(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC --include dom --include html --include css --include page --include xml --include svg --include bindings/js --outputdir . $< # new-style JavaScript bindings diff --git a/webkit/port/bindings/scripts/CodeGeneratorV8.pm b/webkit/port/bindings/scripts/CodeGeneratorV8.pm index 5979bef..b77ab0d 100644 --- a/webkit/port/bindings/scripts/CodeGeneratorV8.pm +++ b/webkit/port/bindings/scripts/CodeGeneratorV8.pm @@ -433,7 +433,7 @@ END if ($isPodType) { push(@implContentDecls, <<END); - V8SVGPODTypeWrapper<$implClassName>* imp_wrapper = V8Proxy::FastToNativeObject<V8SVGPODTypeWrapper<$implClassName>>(V8ClassIndex::$classIndex, info.Holder()); + V8SVGPODTypeWrapper<$implClassName>* imp_wrapper = V8Proxy::FastToNativeObject<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder()); $implClassName imp_instance = *imp_wrapper; $implClassName* imp = &imp_instance; END @@ -572,7 +572,7 @@ sub GenerateNormalAttrSetter if ($isPodType) { $implClassName = GetNativeType($implClassName); $implIncludes{"V8SVGPODTypeWrapper.h"} = 1; - push(@implContentDecls, " V8SVGPODTypeWrapper<$implClassName>* wrapper = V8Proxy::FastToNativeObject<V8SVGPODTypeWrapper<$implClassName>>(V8ClassIndex::$classIndex, info.Holder());\n"); + push(@implContentDecls, " V8SVGPODTypeWrapper<$implClassName>* wrapper = V8Proxy::FastToNativeObject<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder());\n"); push(@implContentDecls, " $implClassName imp_instance = *wrapper;\n"); push(@implContentDecls, " $implClassName* imp = &imp_instance;\n"); @@ -688,7 +688,7 @@ sub GenerateFunctionCallback if ($codeGenerator->IsPodType($implClassName)) { my $nativeClassName = GetNativeType($implClassName); - push(@implContentDecls, " V8SVGPODTypeWrapper<$nativeClassName>* imp_wrapper = V8Proxy::FastToNativeObject<V8SVGPODTypeWrapper<$nativeClassName>>(V8ClassIndex::$classIndex, args.Holder());\n"); + push(@implContentDecls, " V8SVGPODTypeWrapper<$nativeClassName>* imp_wrapper = V8Proxy::FastToNativeObject<V8SVGPODTypeWrapper<$nativeClassName> >(V8ClassIndex::$classIndex, args.Holder());\n"); push(@implContentDecls, " $nativeClassName imp_instance = *imp_wrapper;\n"); push(@implContentDecls, " $nativeClassName* imp = &imp_instance;\n"); } else { @@ -1134,7 +1134,7 @@ sub GenerateFunctionCallString() # SVG lists functions that return POD types require special handling if (IsSVGListTypeNeedingSpecialHandling($implClassName) && IsSVGListMethod($name) && $returnsPodType) { $returnsListItemPodType = 1; - $result .= $indent . "SVGList<RefPtr<SVGPODListItem<$nativeReturnType>>>* listImp = imp;\n"; + $result .= $indent . "SVGList<RefPtr<SVGPODListItem<$nativeReturnType> > >* listImp = imp;\n"; $functionString = "listImp->${name}("; } @@ -1196,7 +1196,7 @@ sub GenerateFunctionCallString() $indent . GetNativeType($returnType, 0) . " result = *imp;\n" . $indent . "$functionString;\n"; } elsif ($returnsListItemPodType) { - $result .= $indent . "RefPtr<SVGPODListItem<$nativeReturnType>> result = $functionString;\n"; + $result .= $indent . "RefPtr<SVGPODListItem<$nativeReturnType> > result = $functionString;\n"; } else { $result .= $indent . $nativeReturnType . " result = $functionString;\n"; } @@ -1502,7 +1502,7 @@ sub JSValueToNative $implIncludes{"V8SVGPODTypeWrapper.h"} = 1; # TODO(jhass): perform type checking like others??? - return "*V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<${nativeType}>>(V8ClassIndex::${classIndex}, $value)" + return "*V8Proxy::ToNativeObject<V8SVGPODTypeWrapper<${nativeType}> >(V8ClassIndex::${classIndex}, $value)" } $implIncludes{"V8${type}.h"} = 1; diff --git a/webkit/port/bindings/v8/v8_binding.h b/webkit/port/bindings/v8/v8_binding.h index 66237e8..922205d 100644 --- a/webkit/port/bindings/v8/v8_binding.h +++ b/webkit/port/bindings/v8/v8_binding.h @@ -40,7 +40,6 @@ #pragma warning(push, 0) #include "CString.h" #pragma warning(pop) -#include "windows.h" #include "platform.h" |