# HG changeset patch # User Gilles Duboscq # Date 1428425822 -7200 # Node ID 6ee9b878902be19e0dec1dbc4038136af4506bc6 # Parent 379471b334cbf6acb0573c50be610ee48b277df0 Fix merge mess-ups diff -r 379471b334cb -r 6ee9b878902b src/share/vm/classfile/systemDictionary.cpp --- a/src/share/vm/classfile/systemDictionary.cpp Tue Apr 07 15:00:39 2015 +0200 +++ b/src/share/vm/classfile/systemDictionary.cpp Tue Apr 07 18:57:02 2015 +0200 @@ -1728,7 +1728,7 @@ strong->do_oop(&_java_system_loader); strong->do_oop(&_system_loader_lock_obj); CDS_ONLY(SystemDictionaryShared::roots_oops_do(strong);) - GRAAL_ONLY(blk->do_oop(&_graal_loader);) + GRAAL_ONLY(strong->do_oop(&_graal_loader);) // Adjust dictionary dictionary()->roots_oops_do(strong, weak); diff -r 379471b334cb -r 6ee9b878902b src/share/vm/code/dependencies.hpp --- a/src/share/vm/code/dependencies.hpp Tue Apr 07 15:00:39 2015 +0200 +++ b/src/share/vm/code/dependencies.hpp Tue Apr 07 18:57:02 2015 +0200 @@ -249,6 +249,10 @@ // State for writing a new set of dependencies: GrowableArray* _dep_seen; // (seen[h->ident] & (1<* _deps[TYPE_LIMIT]; +#ifdef GRAAL + bool _using_dep_values; + GrowableArray* _dep_values[TYPE_LIMIT]; +#endif static const char* _dep_name[TYPE_LIMIT]; static int _dep_args[TYPE_LIMIT]; diff -r 379471b334cb -r 6ee9b878902b src/share/vm/runtime/vframe.cpp --- a/src/share/vm/runtime/vframe.cpp Tue Apr 07 15:00:39 2015 +0200 +++ b/src/share/vm/runtime/vframe.cpp Tue Apr 07 18:57:02 2015 +0200 @@ -327,46 +327,46 @@ StackValue* const sv = create_stack_value_from_oop_map(oop_mask, i + max_locals, + addr); + assert(sv != NULL, "sanity check"); -StackValueCollection* interpretedVFrame::expressions() const { - int length = fr().interpreter_frame_expression_stack_size(); - if (method()->is_native()) { - // If the method is native, there is no expression stack - length = 0; + result->add(sv); } +} - int nof_locals = method()->max_locals(); - StackValueCollection* result = new StackValueCollection(length); +StackValueCollection* interpretedVFrame::locals() const { + return stack_data(false); +} + +StackValueCollection* interpretedVFrame::expressions() const { + return stack_data(true); +} + +/* + * Worker routine for fetching references and/or values + * for a particular bci in the interpretedVFrame. + * + * Returns data for either "locals" or "expressions", + * using bci relative oop_map (oop_mask) information. + * + * @param expressions bool switch controlling what data to return + (false == locals / true == expressions) + * + */ +StackValueCollection* interpretedVFrame::stack_data(bool expressions) const { InterpreterOopMap oop_mask; - // Get oopmap describing oops and int for current bci - if (TraceDeoptimization && Verbose) { - methodHandle m_h(method()); + // oopmap for current bci + if ((TraceDeoptimization && Verbose) GRAAL_ONLY( || PrintDeoptimizationDetails)) { + methodHandle m_h(Thread::current(), method()); OopMapCache::compute_one_oop_map(m_h, bci(), &oop_mask); } else { method()->mask_for(bci(), &oop_mask); } - // handle expressions - for(int i=0; i < length; i++) { - // Find stack location - intptr_t *addr = fr().interpreter_frame_expression_stack_at(i); - // Depending on oop/int put it in the right package - StackValue *sv; - if (oop_mask.is_oop(i + nof_locals)) { - // oop value - Handle h(*(oop *)addr); - sv = new StackValue(h); - } else { - // integer - sv = new StackValue(*addr); - } - assert(sv != NULL, "sanity check"); - result->add(sv); - } - return result; -} + const int mask_len = oop_mask.number_of_entries(); + // If the method is native, method()->max_locals() is not telling the truth. // For our purposes, max locals instead equals the size of parameters. const int max_locals = method()->is_native() ? method()->size_of_parameters() : method()->max_locals(); diff -r 379471b334cb -r 6ee9b878902b src/share/vm/runtime/vmStructs.cpp --- a/src/share/vm/runtime/vmStructs.cpp Tue Apr 07 15:00:39 2015 +0200 +++ b/src/share/vm/runtime/vmStructs.cpp Tue Apr 07 18:57:02 2015 +0200 @@ -2663,7 +2663,6 @@ declare_constant(OopMapValue::register_mask_in_place) \ declare_constant(OopMapValue::unused_value) \ declare_constant(OopMapValue::oop_value) \ - declare_constant(OopMapValue::value_value) \ declare_constant(OopMapValue::narrowoop_value) \ declare_constant(OopMapValue::callee_saved_value) \ declare_constant(OopMapValue::derived_oop_value) \