Skip to content

Commit b68576c

Browse files
committed
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 Canonical link: https://commits.webkit.org/12242@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent e2b305d commit b68576c

4 files changed

Lines changed: 28 additions & 117 deletions

File tree

JavaScriptCore/ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2006-05-22 Timothy Hatcher <timothy@apple.com>
2+
3+
Reviewed by Eric, Kevin and Geoff.
4+
5+
Merge open source build fixes. <rdar://problem/4555500>
6+
7+
* kjs/collector.cpp: look at the rsp register in x86_64
8+
(KJS::Collector::markOtherThreadConservatively):
9+
* wtf/Platform.h: add x86_64 to the platform list
10+
111
2006-05-19 Anders Carlsson <acarlsson@apple.com>
212

313
Reviewed by Geoff.

JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
buildConfigurationList = 149C276C08902AFE008A9EFC /* Build configuration list for PBXAggregateTarget "All" */;
2222
buildPhases = (
2323
);
24-
buildSettings = {
25-
PRODUCT_NAME = All;
26-
};
2724
dependencies = (
2825
932F5BE70822A1C700736975 /* PBXTargetDependency */,
2926
932F5BE90822A1C700736975 /* PBXTargetDependency */,
@@ -232,43 +229,6 @@
232229
E195679909E7CF1200B89D13 /* UnicodeCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = E195679509E7CF1200B89D13 /* UnicodeCategory.h */; };
233230
/* End PBXBuildFile section */
234231

235-
/* Begin PBXBuildStyle section */
236-
014CEA440018CDF011CA2923 /* Development */ = {
237-
isa = PBXBuildStyle;
238-
buildSettings = {
239-
DEBUG_DEFINES = "";
240-
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
241-
GCC_OPTIMIZATION_LEVEL = 0;
242-
MACOSX_DEPLOYMENT_TARGET = 10.3;
243-
PREBINDING = NO;
244-
SECTORDER_FLAGS = "";
245-
STYLE_LDFLAGS = "";
246-
};
247-
name = Development;
248-
};
249-
014CEA450018CDF011CA2923 /* Deployment */ = {
250-
isa = PBXBuildStyle;
251-
buildSettings = {
252-
MACOSX_DEPLOYMENT_TARGET = 10.3;
253-
PREBINDING = NO;
254-
SECTORDER_FLAGS = "";
255-
STYLE_LDFLAGS = "";
256-
};
257-
name = Deployment;
258-
};
259-
F58C8A1D025BD408018635CA /* OptimizedWithSymbols */ = {
260-
isa = PBXBuildStyle;
261-
buildSettings = {
262-
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
263-
MACOSX_DEPLOYMENT_TARGET = 10.3;
264-
PREBINDING = NO;
265-
SECTORDER_FLAGS = "";
266-
STYLE_LDFLAGS = "";
267-
};
268-
name = OptimizedWithSymbols;
269-
};
270-
/* End PBXBuildStyle section */
271-
272232
/* Begin PBXContainerItemProxy section */
273233
65FB3F7D09D11EF300F49DEB /* PBXContainerItemProxy */ = {
274234
isa = PBXContainerItemProxy;
@@ -973,52 +933,6 @@
973933
);
974934
buildRules = (
975935
);
976-
buildSettings = {
977-
DEBUG_DEFINES = NDEBUG;
978-
DYLIB_COMPATIBILITY_VERSION = 1;
979-
DYLIB_CURRENT_VERSION = 1;
980-
GCC_ENABLE_CPP_EXCEPTIONS = NO;
981-
GCC_ENABLE_CPP_RTTI = NO;
982-
GCC_ENABLE_OBJC_GC = YES;
983-
GCC_FAST_OBJC_DISPATCH = YES;
984-
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
985-
GCC_OPTIMIZATION_LEVEL = s;
986-
GCC_PRECOMPILE_PREFIX_HEADER = YES;
987-
GCC_PREFIX_HEADER = JavaScriptCorePrefix.h;
988-
GCC_PREPROCESSOR_DEFINITIONS = "$(DEBUG_DEFINES)";
989-
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
990-
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
991-
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
992-
HEADER_SEARCH_PATHS = icu;
993-
INFOPLIST_FILE = Info.plist;
994-
INSTALL_PATH = /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks;
995-
OTHER_LDFLAGS = (
996-
"$(STYLE_LDFLAGS)",
997-
"-sub_library",
998-
libobjc,
999-
);
1000-
PRODUCT_NAME = JavaScriptCore;
1001-
SECTORDER_FLAGS = (
1002-
"-sectorder",
1003-
__TEXT,
1004-
__text,
1005-
/AppleInternal/OrderFiles/JavaScriptCore.order,
1006-
);
1007-
STYLE_LDFLAGS = "-umbrella WebKit -allowable_client JavaScriptGlue";
1008-
WARNING_CFLAGS = (
1009-
"-Wall",
1010-
"-W",
1011-
"-Wcast-align",
1012-
"-Wchar-subscripts",
1013-
"-Wformat-security",
1014-
"-Wmissing-format-attribute",
1015-
"-Wpointer-arith",
1016-
"-Wwrite-strings",
1017-
"-Wno-format-y2k",
1018-
"-Wno-unused-parameter",
1019-
"-Wno-long-double",
1020-
);
1021-
};
1022936
dependencies = (
1023937
93396B9D082450C500AB803D /* PBXTargetDependency */,
1024938
65FB3F7E09D11EF300F49DEB /* PBXTargetDependency */,
@@ -1038,25 +952,6 @@
1038952
);
1039953
buildRules = (
1040954
);
1041-
buildSettings = {
1042-
GCC_ENABLE_CPP_EXCEPTIONS = NO;
1043-
GCC_ENABLE_CPP_RTTI = NO;
1044-
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
1045-
PRODUCT_NAME = testkjs;
1046-
WARNING_CFLAGS = (
1047-
"-Wall",
1048-
"-W",
1049-
"-Wcast-align",
1050-
"-Wchar-subscripts",
1051-
"-Wformat-security",
1052-
"-Wmissing-format-attribute",
1053-
"-Wpointer-arith",
1054-
"-Wwrite-strings",
1055-
"-Wno-format-y2k",
1056-
"-Wno-unused-parameter",
1057-
"-Wno-long-double",
1058-
);
1059-
};
1060955
dependencies = (
1061956
);
1062957
name = testkjs;
@@ -1074,9 +969,6 @@
1074969
);
1075970
buildRules = (
1076971
);
1077-
buildSettings = {
1078-
PRODUCT_NAME = dftables;
1079-
};
1080972
dependencies = (
1081973
);
1082974
name = dftables;
@@ -1090,13 +982,6 @@
1090982
0867D690FE84028FC02AAC07 /* Project object */ = {
1091983
isa = PBXProject;
1092984
buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */;
1093-
buildSettings = {
1094-
};
1095-
buildStyles = (
1096-
014CEA440018CDF011CA2923 /* Development */,
1097-
014CEA450018CDF011CA2923 /* Deployment */,
1098-
F58C8A1D025BD408018635CA /* OptimizedWithSymbols */,
1099-
);
1100985
hasScannedForEncodings = 1;
1101986
mainGroup = 0867D691FE84028FC02AAC07 /* JavaScriptCore */;
1102987
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;

JavaScriptCore/kjs/collector.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ void Collector::markOtherThreadConservatively(Thread *thread)
351351
i386_thread_state_t regs;
352352
unsigned user_count = sizeof(regs)/sizeof(int);
353353
thread_state_flavor_t flavor = i386_THREAD_STATE;
354+
#elif PLATFORM(X86_64)
355+
x86_thread_state64_t regs;
356+
unsigned user_count = x86_THREAD_STATE64_COUNT;
357+
thread_state_flavor_t flavor = x86_THREAD_STATE64;
354358
#elif PLATFORM(PPC)
355359
ppc_thread_state_t regs;
356360
unsigned user_count = PPC_THREAD_STATE_COUNT;
@@ -367,10 +371,16 @@ void Collector::markOtherThreadConservatively(Thread *thread)
367371

368372
// scan the registers
369373
markStackObjectsConservatively((void *)&regs, (void *)((char *)&regs + (user_count * sizeof(usword_t))));
370-
374+
371375
// scan the stack
372-
#if PLATFORM(X86)
376+
#if PLATFORM(X86) && __DARWIN_UNIX03
377+
markStackObjectsConservatively((void *)regs.__esp, pthread_get_stackaddr_np(thread->posixThread));
378+
#elif PLATFORM(X86)
373379
markStackObjectsConservatively((void *)regs.esp, pthread_get_stackaddr_np(thread->posixThread));
380+
#elif PLATFORM(X86_64) && __DARWIN_UNIX03
381+
markStackObjectsConservatively((void *)regs.__rsp, pthread_get_stackaddr_np(thread->posixThread));
382+
#elif PLATFORM(X86_64)
383+
markStackObjectsConservatively((void *)regs.rsp, pthread_get_stackaddr_np(thread->posixThread));
374384
#elif (PLATFORM(PPC) || PLATFORM(PPC64)) && __DARWIN_UNIX03
375385
markStackObjectsConservatively((void *)regs.__r1, pthread_get_stackaddr_np(thread->posixThread));
376386
#elif PLATFORM(PPC) || PLATFORM(PPC64)

JavaScriptCore/wtf/Platform.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@
112112
#define KXMLCORE_PLATFORM_X86 1
113113
#endif
114114

115+
// PLATFORM(X86_64)
116+
#if defined(__x86_64__) \
117+
|| defined(__ia64__)
118+
#define KXMLCORE_PLATFORM_X86_64 1
119+
#endif
120+
115121
// Compiler
116122

117123
// COMPILER(MSVC)

0 commit comments

Comments
 (0)