comparison src/share/vm/interpreter/interpreterRuntime.hpp @ 726:be93aad57795

6655646: dynamic languages need dynamically linked call sites Summary: invokedynamic instruction (JSR 292 RI) Reviewed-by: twisti, never
author jrose
date Tue, 21 Apr 2009 23:21:04 -0700
parents e5b0439ef4ae
children 8b46c4d82093
comparison
equal deleted inserted replaced
725:928912ce8438 726:be93aad57795
40 return Bytecodes::code_at(bcp(thread), method(thread)); 40 return Bytecodes::code_at(bcp(thread), method(thread));
41 } 41 }
42 static bool already_resolved(JavaThread *thread) { return cache_entry(thread)->is_resolved(code(thread)); } 42 static bool already_resolved(JavaThread *thread) { return cache_entry(thread)->is_resolved(code(thread)); }
43 static int one_byte_index(JavaThread *thread) { return bcp(thread)[1]; } 43 static int one_byte_index(JavaThread *thread) { return bcp(thread)[1]; }
44 static int two_byte_index(JavaThread *thread) { return Bytes::get_Java_u2(bcp(thread) + 1); } 44 static int two_byte_index(JavaThread *thread) { return Bytes::get_Java_u2(bcp(thread) + 1); }
45 static int four_byte_index(JavaThread *thread) { return Bytes::get_native_u4(bcp(thread) + 1); }
45 static int number_of_dimensions(JavaThread *thread) { return bcp(thread)[3]; } 46 static int number_of_dimensions(JavaThread *thread) { return bcp(thread)[3]; }
46 static ConstantPoolCacheEntry* cache_entry(JavaThread *thread) { return method(thread)->constants()->cache()->entry_at(Bytes::get_native_u2(bcp(thread) + 1)); } 47
48 static ConstantPoolCacheEntry* cache_entry_at(JavaThread *thread, int i) { return method(thread)->constants()->cache()->entry_at(i); }
49 static ConstantPoolCacheEntry* cache_entry(JavaThread *thread) { return cache_entry_at(thread, Bytes::get_native_u2(bcp(thread) + 1)); }
47 static void note_trap(JavaThread *thread, int reason, TRAPS); 50 static void note_trap(JavaThread *thread, int reason, TRAPS);
48 51
49 public: 52 public:
50 // Constants 53 // Constants
51 static void ldc (JavaThread* thread, bool wide); 54 static void ldc (JavaThread* thread, bool wide);
81 84
82 static void throw_illegal_monitor_state_exception(JavaThread* thread); 85 static void throw_illegal_monitor_state_exception(JavaThread* thread);
83 static void new_illegal_monitor_state_exception(JavaThread* thread); 86 static void new_illegal_monitor_state_exception(JavaThread* thread);
84 87
85 // Calls 88 // Calls
86 static void resolve_invoke (JavaThread* thread, Bytecodes::Code bytecode); 89 static void resolve_invoke (JavaThread* thread, Bytecodes::Code bytecode);
90 static void resolve_invokedynamic(JavaThread* thread);
91 static void bootstrap_invokedynamic(JavaThread* thread, oopDesc* call_site);
87 92
88 // Breakpoints 93 // Breakpoints
89 static void _breakpoint(JavaThread* thread, methodOopDesc* method, address bcp); 94 static void _breakpoint(JavaThread* thread, methodOopDesc* method, address bcp);
90 static Bytecodes::Code get_original_bytecode_at(JavaThread* thread, methodOopDesc* method, address bcp); 95 static Bytecodes::Code get_original_bytecode_at(JavaThread* thread, methodOopDesc* method, address bcp);
91 static void set_original_bytecode_at(JavaThread* thread, methodOopDesc* method, address bcp, Bytecodes::Code new_code); 96 static void set_original_bytecode_at(JavaThread* thread, methodOopDesc* method, address bcp, Bytecodes::Code new_code);