Reviewed by Eric, Kevin and Geoff.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 May 2006 18:20:15 +0000 (18:20 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 May 2006 18:20:15 +0000 (18:20 +0000)
        Merge open source build fixes. <rdar://problem/4555500>

        * kjs/collector.cpp: look at the rsp register in x86_64
        (KJS::Collector::markOtherThreadConservatively):
        * wtf/Platform.h: add x86_64 to the platform list

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14515 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/kjs/collector.cpp
JavaScriptCore/wtf/Platform.h

index 4ab80327709301469e83ebf7aa4a2d32eef5293f..5226b5083f6cb8930b070d3ecb1d2f53fe261a1d 100644 (file)
@@ -1,3 +1,13 @@
+2006-05-22  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Eric, Kevin and Geoff.
+
+        Merge open source build fixes. <rdar://problem/4555500>
+
+        * kjs/collector.cpp: look at the rsp register in x86_64 
+        (KJS::Collector::markOtherThreadConservatively):
+        * wtf/Platform.h: add x86_64 to the platform list
+
 2006-05-19  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Geoff.
index ed661d92e9ebfcfd22cf72402231a28a9390b512..9a6306dad5810ec344be219d4230c95ac02c7a3f 100644 (file)
@@ -21,9 +21,6 @@
                        buildConfigurationList = 149C276C08902AFE008A9EFC /* Build configuration list for PBXAggregateTarget "All" */;
                        buildPhases = (
                        );
-                       buildSettings = {
-                               PRODUCT_NAME = All;
-                       };
                        dependencies = (
                                932F5BE70822A1C700736975 /* PBXTargetDependency */,
                                932F5BE90822A1C700736975 /* PBXTargetDependency */,
                E195679909E7CF1200B89D13 /* UnicodeCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = E195679509E7CF1200B89D13 /* UnicodeCategory.h */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildStyle section */
-               014CEA440018CDF011CA2923 /* Development */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               DEBUG_DEFINES = "";
-                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                               GCC_OPTIMIZATION_LEVEL = 0;
-                               MACOSX_DEPLOYMENT_TARGET = 10.3;
-                               PREBINDING = NO;
-                               SECTORDER_FLAGS = "";
-                               STYLE_LDFLAGS = "";
-                       };
-                       name = Development;
-               };
-               014CEA450018CDF011CA2923 /* Deployment */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               MACOSX_DEPLOYMENT_TARGET = 10.3;
-                               PREBINDING = NO;
-                               SECTORDER_FLAGS = "";
-                               STYLE_LDFLAGS = "";
-                       };
-                       name = Deployment;
-               };
-               F58C8A1D025BD408018635CA /* OptimizedWithSymbols */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                               MACOSX_DEPLOYMENT_TARGET = 10.3;
-                               PREBINDING = NO;
-                               SECTORDER_FLAGS = "";
-                               STYLE_LDFLAGS = "";
-                       };
-                       name = OptimizedWithSymbols;
-               };
-/* End PBXBuildStyle section */
-
 /* Begin PBXContainerItemProxy section */
                65FB3F7D09D11EF300F49DEB /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        );
                        buildRules = (
                        );
-                       buildSettings = {
-                               DEBUG_DEFINES = NDEBUG;
-                               DYLIB_COMPATIBILITY_VERSION = 1;
-                               DYLIB_CURRENT_VERSION = 1;
-                               GCC_ENABLE_CPP_EXCEPTIONS = NO;
-                               GCC_ENABLE_CPP_RTTI = NO;
-                               GCC_ENABLE_OBJC_GC = YES;
-                               GCC_FAST_OBJC_DISPATCH = YES;
-                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                               GCC_OPTIMIZATION_LEVEL = s;
-                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
-                               GCC_PREFIX_HEADER = JavaScriptCorePrefix.h;
-                               GCC_PREPROCESSOR_DEFINITIONS = "$(DEBUG_DEFINES)";
-                               GCC_TREAT_WARNINGS_AS_ERRORS = YES;
-                               GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-                               GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-                               HEADER_SEARCH_PATHS = icu;
-                               INFOPLIST_FILE = Info.plist;
-                               INSTALL_PATH = /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks;
-                               OTHER_LDFLAGS = (
-                                       "$(STYLE_LDFLAGS)",
-                                       "-sub_library",
-                                       libobjc,
-                               );
-                               PRODUCT_NAME = JavaScriptCore;
-                               SECTORDER_FLAGS = (
-                                       "-sectorder",
-                                       __TEXT,
-                                       __text,
-                                       /AppleInternal/OrderFiles/JavaScriptCore.order,
-                               );
-                               STYLE_LDFLAGS = "-umbrella WebKit -allowable_client JavaScriptGlue";
-                               WARNING_CFLAGS = (
-                                       "-Wall",
-                                       "-W",
-                                       "-Wcast-align",
-                                       "-Wchar-subscripts",
-                                       "-Wformat-security",
-                                       "-Wmissing-format-attribute",
-                                       "-Wpointer-arith",
-                                       "-Wwrite-strings",
-                                       "-Wno-format-y2k",
-                                       "-Wno-unused-parameter",
-                                       "-Wno-long-double",
-                               );
-                       };
                        dependencies = (
                                93396B9D082450C500AB803D /* PBXTargetDependency */,
                                65FB3F7E09D11EF300F49DEB /* PBXTargetDependency */,
                        );
                        buildRules = (
                        );
-                       buildSettings = {
-                               GCC_ENABLE_CPP_EXCEPTIONS = NO;
-                               GCC_ENABLE_CPP_RTTI = NO;
-                               GCC_TREAT_WARNINGS_AS_ERRORS = YES;
-                               PRODUCT_NAME = testkjs;
-                               WARNING_CFLAGS = (
-                                       "-Wall",
-                                       "-W",
-                                       "-Wcast-align",
-                                       "-Wchar-subscripts",
-                                       "-Wformat-security",
-                                       "-Wmissing-format-attribute",
-                                       "-Wpointer-arith",
-                                       "-Wwrite-strings",
-                                       "-Wno-format-y2k",
-                                       "-Wno-unused-parameter",
-                                       "-Wno-long-double",
-                               );
-                       };
                        dependencies = (
                        );
                        name = testkjs;
                        );
                        buildRules = (
                        );
-                       buildSettings = {
-                               PRODUCT_NAME = dftables;
-                       };
                        dependencies = (
                        );
                        name = dftables;
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */;
-                       buildSettings = {
-                       };
-                       buildStyles = (
-                               014CEA440018CDF011CA2923 /* Development */,
-                               014CEA450018CDF011CA2923 /* Deployment */,
-                               F58C8A1D025BD408018635CA /* OptimizedWithSymbols */,
-                       );
                        hasScannedForEncodings = 1;
                        mainGroup = 0867D691FE84028FC02AAC07 /* JavaScriptCore */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
index 74b5444bd5185d3bd48e94003e5f52e9e0cf44ee..0d0c664d48210a90c5ea6a18def5aaf1ec16c946 100644 (file)
@@ -351,6 +351,10 @@ void Collector::markOtherThreadConservatively(Thread *thread)
   i386_thread_state_t regs;
   unsigned user_count = sizeof(regs)/sizeof(int);
   thread_state_flavor_t flavor = i386_THREAD_STATE;
+#elif PLATFORM(X86_64)
+  x86_thread_state64_t  regs;
+  unsigned user_count = x86_THREAD_STATE64_COUNT;
+  thread_state_flavor_t flavor = x86_THREAD_STATE64;
 #elif PLATFORM(PPC)
   ppc_thread_state_t  regs;
   unsigned user_count = PPC_THREAD_STATE_COUNT;
@@ -367,10 +371,16 @@ void Collector::markOtherThreadConservatively(Thread *thread)
   
   // scan the registers
   markStackObjectsConservatively((void *)&regs, (void *)((char *)&regs + (user_count * sizeof(usword_t))));
-  
+   
   // scan the stack
-#if PLATFORM(X86)
+#if PLATFORM(X86) && __DARWIN_UNIX03
+  markStackObjectsConservatively((void *)regs.__esp, pthread_get_stackaddr_np(thread->posixThread));
+#elif PLATFORM(X86)
   markStackObjectsConservatively((void *)regs.esp, pthread_get_stackaddr_np(thread->posixThread));
+#elif PLATFORM(X86_64) && __DARWIN_UNIX03
+  markStackObjectsConservatively((void *)regs.__rsp, pthread_get_stackaddr_np(thread->posixThread));
+#elif PLATFORM(X86_64)
+  markStackObjectsConservatively((void *)regs.rsp, pthread_get_stackaddr_np(thread->posixThread));
 #elif (PLATFORM(PPC) || PLATFORM(PPC64)) && __DARWIN_UNIX03
   markStackObjectsConservatively((void *)regs.__r1, pthread_get_stackaddr_np(thread->posixThread));
 #elif PLATFORM(PPC) || PLATFORM(PPC64)
index 5273331eaf33ad51a10b56ccefa4a374686e19e4..276ffaf7859e6aa1c3fbe37964924b4944feb341 100644 (file)
 #define KXMLCORE_PLATFORM_X86 1
 #endif
 
+// PLATFORM(X86_64)
+#if   defined(__x86_64__) \
+   || defined(__ia64__)
+#define KXMLCORE_PLATFORM_X86_64 1
+#endif
+
 // Compiler
 
 // COMPILER(MSVC)