comparison src/share/vm/ci/ciObjectFactory.cpp @ 1507:cd5dbf694d45

6939134: JSR 292 adjustments to method handle invocation Summary: split MethodHandle.invoke into invokeExact and invokeGeneric; also clean up JVM-to-Java interfaces Reviewed-by: twisti
author jrose
date Sat, 01 May 2010 02:42:18 -0700
parents 4ce7240d622c
children c18cbe5936b8
comparison
equal deleted inserted replaced
1506:2338d41fbd81 1507:cd5dbf694d45
101 // Create the shared symbols, but not in _shared_ci_objects. 101 // Create the shared symbols, but not in _shared_ci_objects.
102 int i; 102 int i;
103 for (i = vmSymbols::FIRST_SID; i < vmSymbols::SID_LIMIT; i++) { 103 for (i = vmSymbols::FIRST_SID; i < vmSymbols::SID_LIMIT; i++) {
104 symbolHandle sym_handle = vmSymbolHandles::symbol_handle_at((vmSymbols::SID) i); 104 symbolHandle sym_handle = vmSymbolHandles::symbol_handle_at((vmSymbols::SID) i);
105 assert(vmSymbols::find_sid(sym_handle()) == i, "1-1 mapping"); 105 assert(vmSymbols::find_sid(sym_handle()) == i, "1-1 mapping");
106 ciSymbol* sym = new (_arena) ciSymbol(sym_handle); 106 ciSymbol* sym = new (_arena) ciSymbol(sym_handle, (vmSymbols::SID) i);
107 init_ident_of(sym); 107 init_ident_of(sym);
108 _shared_ci_symbols[i] = sym; 108 _shared_ci_symbols[i] = sym;
109 } 109 }
110 #ifdef ASSERT 110 #ifdef ASSERT
111 for (i = vmSymbols::FIRST_SID; i < vmSymbols::SID_LIMIT; i++) { 111 for (i = vmSymbols::FIRST_SID; i < vmSymbols::SID_LIMIT; i++) {
271 ciObject* ciObjectFactory::create_new_object(oop o) { 271 ciObject* ciObjectFactory::create_new_object(oop o) {
272 EXCEPTION_CONTEXT; 272 EXCEPTION_CONTEXT;
273 273
274 if (o->is_symbol()) { 274 if (o->is_symbol()) {
275 symbolHandle h_o(THREAD, (symbolOop)o); 275 symbolHandle h_o(THREAD, (symbolOop)o);
276 return new (arena()) ciSymbol(h_o); 276 assert(vmSymbols::find_sid(h_o()) == vmSymbols::NO_SID, "");
277 return new (arena()) ciSymbol(h_o, vmSymbols::NO_SID);
277 } else if (o->is_klass()) { 278 } else if (o->is_klass()) {
278 KlassHandle h_k(THREAD, (klassOop)o); 279 KlassHandle h_k(THREAD, (klassOop)o);
279 Klass* k = ((klassOop)o)->klass_part(); 280 Klass* k = ((klassOop)o)->klass_part();
280 if (k->oop_is_instance()) { 281 if (k->oop_is_instance()) {
281 return new (arena()) ciInstanceKlass(h_k); 282 return new (arena()) ciInstanceKlass(h_k);