Skip to content
Permalink
Browse files
8283997: Unused argument in GraphKit::builtin_throw
Reviewed-by: roland, redestad, chagedorn
  • Loading branch information
TobiHartmann committed Mar 31, 2022
1 parent 067b258 commit a11cc97439907439fa2cd65d44c9ffdd0fef241e
Showing 3 changed files with 6 additions and 10 deletions.
@@ -526,7 +526,7 @@ void GraphKit::uncommon_trap_if_should_post_on_exceptions(Deoptimization::DeoptR
}

//------------------------------builtin_throw----------------------------------
void GraphKit::builtin_throw(Deoptimization::DeoptReason reason, Node* arg) {
void GraphKit::builtin_throw(Deoptimization::DeoptReason reason) {
bool must_throw = true;

// If this particular condition has not yet happened at this
@@ -3334,7 +3334,7 @@ Node* GraphKit::gen_checkcast(Node *obj, Node* superklass,
bool is_aastore = (java_bc() == Bytecodes::_aastore);
Deoptimization::DeoptReason reason = is_aastore ?
Deoptimization::Reason_array_check : Deoptimization::Reason_class_check;
builtin_throw(reason, makecon(TypeKlassPtr::make(objtp->klass())));
builtin_throw(reason);
return top();
} else if (!too_many_traps_or_recompiles(Deoptimization::Reason_null_assert)) {
return null_assert(obj);
@@ -3419,7 +3419,7 @@ Node* GraphKit::gen_checkcast(Node *obj, Node* superklass,
bool is_aastore = (java_bc() == Bytecodes::_aastore);
Deoptimization::DeoptReason reason = is_aastore ?
Deoptimization::Reason_array_check : Deoptimization::Reason_class_check;
builtin_throw(reason, load_object_klass(not_null_obj));
builtin_throw(reason);
}
} else {
(*failure_control) = not_subtype_ctrl;
@@ -266,12 +266,8 @@ class GraphKit : public Phase {
JVMState* transfer_exceptions_into_jvms();

// Helper to throw a built-in exception.
// Range checks take the offending index.
// Cast and array store checks take the offending class.
// Others do not take the optional argument.
// The JVMS must allow the bytecode to be re-executed
// via an uncommon trap.
void builtin_throw(Deoptimization::DeoptReason reason, Node* arg = NULL);
// The JVMS must allow the bytecode to be re-executed via an uncommon trap.
void builtin_throw(Deoptimization::DeoptReason reason);

// Helper to check the JavaThread::_should_post_on_exceptions flag
// and branch to an uncommon_trap if it is true (with the specified reason and must_throw)
@@ -194,7 +194,7 @@ Node* Parse::array_addressing(BasicType type, int vals, const Type*& elemtype) {
// If we have already recompiled with the range-check-widening
// heroic optimization turned off, then we must really be throwing
// range check exceptions.
builtin_throw(Deoptimization::Reason_range_check, idx);
builtin_throw(Deoptimization::Reason_range_check);
}
}
}

1 comment on commit a11cc97

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on a11cc97 Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.