equal
deleted
inserted
replaced
34 |
34 |
35 extern "C" { |
35 extern "C" { |
36 address _flush_reg_windows(); // in .s file. |
36 address _flush_reg_windows(); // in .s file. |
37 // Flush registers to stack. In case of error we will need to stack walk. |
37 // Flush registers to stack. In case of error we will need to stack walk. |
38 address bootstrap_flush_windows(void) { |
38 address bootstrap_flush_windows(void) { |
39 Thread* thread = ThreadLocalStorage::get_thread_slow(); |
39 Thread* thread = Thread::current_or_null(); |
40 // Very early in process there is no thread. |
40 // Very early in process there is no thread. |
41 if (thread != NULL) { |
41 if (thread != NULL) { |
42 guarantee(thread->is_Java_thread(), "Not a Java thread."); |
42 guarantee(thread->is_Java_thread(), "Not a Java thread."); |
43 JavaThread* jt = (JavaThread*)thread; |
43 JavaThread* jt = (JavaThread*)thread; |
44 guarantee(!jt->has_last_Java_frame(), "Must be able to flush registers!"); |
44 guarantee(!jt->has_last_Java_frame(), "Must be able to flush registers!"); |