Changeset 12300 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jan 22, 2006, 9:44:33 PM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r12296 r12300 1 2006-01-22 George Staikos <[email protected]> 2 3 Reviewed by Maciej. 4 5 * kjs/collector.cpp: merge major speedup from KDE on Linux 6 patch by Maks Orlovich, bug #6145 7 Also unify cpu detection 8 * kjs/config.h: define simpler CPU macros 9 1 10 2006-01-22 George Staikos <[email protected]> 2 11 -
trunk/JavaScriptCore/kjs/collector.cpp
r12296 r12300 314 314 void *stackBase = (void *)pTib->StackBase; 315 315 #else 316 void *stackBase = 0; 317 pthread_attr_t sattr; 316 static void *stackBase = 0; 317 static pthread_t stackThread; 318 pthread_t thread = pthread_self(); 319 if (stackBase == 0 || thread != stackThread) { 320 pthread_attr_t sattr; 318 321 #ifdef HAVE_PTHREAD_NP_H 319 // e.g. on FreeBSD 5.4, [email protected]320 pthread_attr_get_np(thread, &sattr);322 // e.g. on FreeBSD 5.4, [email protected] 323 pthread_attr_get_np(thread, &sattr); 321 324 #else 322 // FIXME: this function is non-portable; other POSIX systems may have different np alternatives 323 pthread_getattr_np(pthread_self(), &sattr); 324 #endif 325 // Should work but fails on Linux (?) 326 // pthread_attr_getstack(&sattr, &stackBase, &stackSize); 327 pthread_attr_getstackaddr(&sattr, &stackBase); 328 assert(stackBase); 325 // FIXME: this function is non-portable; other POSIX systems may have different np alternatives 326 pthread_getattr_np(thread, &sattr); 327 #endif 328 // Should work but fails on Linux (?) 329 // pthread_attr_getstack(&sattr, &stackBase, &stackSize); 330 pthread_attr_getstackaddr(&sattr, &stackBase); 331 assert(stackBase); 332 stackThread = thread; 333 } 329 334 #endif 330 335 … … 343 348 thread_suspend(thread->machThread); 344 349 345 #if __i386__350 #if KJS_CPU_X86 346 351 i386_thread_state_t regs; 347 352 unsigned user_count = sizeof(regs)/sizeof(int); 348 353 thread_state_flavor_t flavor = i386_THREAD_STATE; 349 #elif __ppc__354 #elif KJS_CPU_PPC 350 355 ppc_thread_state_t regs; 351 356 unsigned user_count = PPC_THREAD_STATE_COUNT; 352 357 thread_state_flavor_t flavor = PPC_THREAD_STATE; 353 #elif __ppc64__358 #elif KJS_CPU_PPC64 354 359 ppc_thread_state64_t regs; 355 360 unsigned user_count = PPC_THREAD_STATE64_COUNT; … … 365 370 366 371 // scan the stack 367 #if __i386__372 #if KJS_CPU_X86 368 373 markStackObjectsConservatively((void *)regs.esp, pthread_get_stackaddr_np(thread->posixThread)); 369 #elif defined(__ppc__) || defined(__ppc64__)374 #elif KJS_CPU_PPC || KJS_CPU_PPC64 370 375 markStackObjectsConservatively((void *)regs.r1, pthread_get_stackaddr_np(thread->posixThread)); 371 376 #else -
trunk/JavaScriptCore/kjs/config.h
r11998 r12300 41 41 #define HAVE_STRING_H 1 42 42 43 #ifdef __ppc__ 43 #ifdef __ppc__ || __PPC__ || __powerpc__ 44 #define KJS_CPU_PPC 1 44 45 #define WORDS_BIGENDIAN 1 46 #elif __ppc64__ || __PPC64__ 47 #define KJS_CPU_PPC64 1 48 #define WORDS_BIGENDIAN 1 49 #elif __i386__ 50 #define KJS_CPU_X86 1 45 51 #endif 46 52
Note:
See TracChangeset
for help on using the changeset viewer.