comparison src/share/vm/ci/ciUtilities.hpp @ 3555:22d11b3bc561

Various hacks to be able to install machine code from a Java thread.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 24 Aug 2011 01:05:02 +0200
parents f95d63e2154a
children 2cb439954abf
comparison
equal deleted inserted replaced
3554:b20889b42d12 3555:22d11b3bc561
34 34
35 // Add a ci native entry wrapper? 35 // Add a ci native entry wrapper?
36 36
37 // Bring the compilation thread into the VM state. 37 // Bring the compilation thread into the VM state.
38 #define VM_ENTRY_MARK \ 38 #define VM_ENTRY_MARK \
39 CompilerThread* thread=CompilerThread::current(); \ 39 JavaThread* thread=JavaThread::current(); \
40 ThreadInVMfromNative __tiv(thread); \ 40 ThreadInVMfromNative __tiv(thread); \
41 ResetNoHandleMark rnhm; \ 41 ResetNoHandleMark rnhm; \
42 HandleMarkCleaner __hm(thread); \ 42 HandleMarkCleaner __hm(thread); \
43 Thread* THREAD = thread; \ 43 Thread* THREAD = thread; \
44 debug_only(VMNativeEntryWrapper __vew;) 44 debug_only(VMNativeEntryWrapper __vew;)
45 45
46 46
47 47
48 // Bring the compilation thread into the VM state. No handle mark. 48 // Bring the compilation thread into the VM state. No handle mark.
49 #define VM_QUICK_ENTRY_MARK \ 49 #define VM_QUICK_ENTRY_MARK \
50 CompilerThread* thread=CompilerThread::current(); \ 50 JavaThread* thread=JavaThread::current(); \
51 ThreadInVMfromNative __tiv(thread); \ 51 ThreadInVMfromNative __tiv(thread); \
52 /* \ 52 /* \
53 * [TODO] The NoHandleMark line does nothing but declare a function prototype \ 53 * [TODO] The NoHandleMark line does nothing but declare a function prototype \
54 * The NoHandkeMark constructor is NOT executed. If the ()'s are \ 54 * The NoHandkeMark constructor is NOT executed. If the ()'s are \
55 * removed, causes the NoHandleMark assert to trigger. \ 55 * removed, causes the NoHandleMark assert to trigger. \
58 Thread* THREAD = thread; \ 58 Thread* THREAD = thread; \
59 debug_only(VMNativeEntryWrapper __vew;) 59 debug_only(VMNativeEntryWrapper __vew;)
60 60
61 61
62 #define EXCEPTION_CONTEXT \ 62 #define EXCEPTION_CONTEXT \
63 CompilerThread* thread=CompilerThread::current(); \ 63 JavaThread* thread=JavaThread::current(); \
64 Thread* THREAD = thread; 64 Thread* THREAD = thread;
65 65
66 66
67 #define CURRENT_ENV \ 67 #define CURRENT_ENV \
68 ciEnv::current() 68 ciEnv::current()