diff --git a/.hgtags b/.hgtags index 94e176f4007f9112c033b4cb04b03f515139b623..091c1795b891247d7b76a78bc4843dc32accf13b 100644 --- a/.hgtags +++ b/.hgtags @@ -819,6 +819,7 @@ ca3b8c8e390ab0540b0cc2e5def869b38e460d86 jdk8u75-b01 e4a935cb6f7178912fd653e2a9514eadec7935ab jdk8u75-b08 e97c45c377eb8d022cfe24b73737fa312107e0a5 jdk8u75-b09 d44c7e324682a30e064503ef9582d83a41f4173e jdk8u75-b10 +cc78c97abff85062d6844fa253081e26a0a60150 jdk8u75-b12 d7b01fb81aa8a5437cb03bc36afe15cf0e55fb89 jdk8u76-b00 c1679cc87ba045219169cabb6b9b378c2b5cc578 jdk8u76-b01 218483967e52b419d885d34af4488a81c5133804 jdk8u76-b02 diff --git a/src/cpu/zero/vm/cppInterpreter_zero.cpp b/src/cpu/zero/vm/cppInterpreter_zero.cpp index ee6836b9c69f5ebf1e3a94f3919ae76dc9eaecf8..15cfc86aaa42ba2bc1ed5933a0471f44465b5db5 100644 --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -93,6 +93,7 @@ intptr_t narrow(BasicType type, intptr_t result) { case T_SHORT: return (intptr_t)(jshort)result; case T_OBJECT: // nothing to do fall through + case T_ARRAY: case T_LONG: case T_INT: case T_FLOAT: @@ -183,7 +184,7 @@ void CppInterpreter::main_loop(int recurse, TRAPS) { } else if (istate->msg() == BytecodeInterpreter::return_from_method) { // Copy the result into the caller's frame - result_slots = type2size[result_type_of(method)]; + result_slots = type2size[method->result_type()]; assert(result_slots >= 0 && result_slots <= 2, "what?"); result = istate->stack() + result_slots; break; @@ -221,7 +222,7 @@ void CppInterpreter::main_loop(int recurse, TRAPS) { // Adjust result to smaller intptr_t res = result[-i]; if (result_slots == 1) { - res = narrow(result_type_of(method), res); + res = narrow(method->result_type(), res); } stack->push(res); } @@ -435,7 +436,7 @@ int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) { // Push our result if (!HAS_PENDING_EXCEPTION) { - BasicType type = result_type_of(method); + BasicType type = method->result_type(); stack->set_sp(stack->sp() - type2size[type]); switch (type) { @@ -795,26 +796,6 @@ int AbstractInterpreter::BasicType_as_index(BasicType type) { return i; } -BasicType CppInterpreter::result_type_of(Method* method) { - BasicType t; - switch (method->result_index()) { - case 0 : t = T_BOOLEAN; break; - case 1 : t = T_CHAR; break; - case 2 : t = T_BYTE; break; - case 3 : t = T_SHORT; break; - case 4 : t = T_INT; break; - case 5 : t = T_LONG; break; - case 6 : t = T_VOID; break; - case 7 : t = T_FLOAT; break; - case 8 : t = T_DOUBLE; break; - case 9 : t = T_OBJECT; break; - default: ShouldNotReachHere(); - } - assert(AbstractInterpreter::BasicType_as_index(t) == method->result_index(), - "out of step with AbstractInterpreter::BasicType_as_index"); - return t; -} - address InterpreterGenerator::generate_empty_entry() { if (!UseFastEmptyMethods) return NULL; diff --git a/src/cpu/zero/vm/cppInterpreter_zero.hpp b/src/cpu/zero/vm/cppInterpreter_zero.hpp index 3a6bd52f2cbb0a100c0aa5362150155db4a89ec4..9c0a2a010910327510e70961ed63a1bbd0fb6427 100644 --- a/src/cpu/zero/vm/cppInterpreter_zero.hpp +++ b/src/cpu/zero/vm/cppInterpreter_zero.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2010, 2011 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -49,8 +49,4 @@ static intptr_t* calculate_unwind_sp(ZeroStack* stack, oop method_handle); static void throw_exception(JavaThread* thread, Symbol* name,char *msg=NULL); - private: - // Fast result type determination - static BasicType result_type_of(Method* method); - #endif // CPU_ZERO_VM_CPPINTERPRETER_ZERO_HPP diff --git a/src/share/vm/oops/method.cpp b/src/share/vm/oops/method.cpp index ae3f9d71a3aee779bca83e7f6c490e74eda42945..ffc9e9cd0929d79fec0954b9b6b366e54e2689c0 100644 --- a/src/share/vm/oops/method.cpp +++ b/src/share/vm/oops/method.cpp @@ -84,9 +84,6 @@ Method::Method(ConstMethod* xconst, AccessFlags access_flags, int size) { set_constMethod(xconst); set_access_flags(access_flags); set_method_size(size); -#ifdef CC_INTERP - set_result_index(T_VOID); -#endif set_intrinsic_id(vmIntrinsics::_none); set_jfr_towrite(false); set_force_inline(false); @@ -412,12 +409,6 @@ void Method::compute_size_of_parameters(Thread *thread) { set_size_of_parameters(asc.size() + (is_static() ? 0 : 1)); } -#ifdef CC_INTERP -void Method::set_result_index(BasicType type) { - _result_index = Interpreter::BasicType_as_index(type); -} -#endif - BasicType Method::result_type() const { ResultTypeFinder rtf(signature()); return rtf.type(); diff --git a/src/share/vm/oops/method.hpp b/src/share/vm/oops/method.hpp index 8cef629c5bc7621a6fe97e5e2193326975f87e5c..56bd46a273682205c22da7adf605b8000b01b971 100644 --- a/src/share/vm/oops/method.hpp +++ b/src/share/vm/oops/method.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -105,9 +105,6 @@ class Method : public Metadata { AccessFlags _access_flags; // Access flags int _vtable_index; // vtable index of this method (see VtableIndexFlag) // note: can have vtables with >2**16 elements (because of inheritance) -#ifdef CC_INTERP - int _result_index; // C++ interpreter needs for converting results to/from stack -#endif u2 _method_size; // size of this object u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) u1 _jfr_towrite : 1, // Flags @@ -202,11 +199,6 @@ class Method : public Metadata { return constMethod()->type_annotations(); } -#ifdef CC_INTERP - void set_result_index(BasicType type); - int result_index() { return _result_index; } -#endif - // Helper routine: get klass name + "." + method name + signature as // C string, for the purpose of providing more useful NoSuchMethodErrors // and fatal error handling. The string is allocated in resource @@ -559,7 +551,6 @@ class Method : public Metadata { void compute_size_of_parameters(Thread *thread); // word size of parameters (receiver if any + arguments) Symbol* klass_name() const; // returns the name of the method holder BasicType result_type() const; // type of the method result - int result_type_index() const; // type index of the method result bool is_returning_oop() const { BasicType r = result_type(); return (r == T_OBJECT || r == T_ARRAY); } bool is_returning_fp() const { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); } @@ -652,9 +643,6 @@ class Method : public Metadata { // interpreter support static ByteSize const_offset() { return byte_offset_of(Method, _constMethod ); } static ByteSize access_flags_offset() { return byte_offset_of(Method, _access_flags ); } -#ifdef CC_INTERP - static ByteSize result_index_offset() { return byte_offset_of(Method, _result_index ); } -#endif /* CC_INTERP */ static ByteSize from_compiled_offset() { return byte_offset_of(Method, _from_compiled_entry); } static ByteSize code_offset() { return byte_offset_of(Method, _code); } static ByteSize method_data_offset() {