changeset 57107:94a84abb873b

8234403: C2: Enable CallSite.target updates in constructors Reviewed-by: psandoz, kvn
author vlivanov
date Tue, 26 Nov 2019 16:09:21 +0300
parents a6e25566cb56
children 31272cef28e2
files src/hotspot/share/opto/parse3.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/parse3.cpp	Tue Nov 26 16:09:17 2019 +0300
+++ b/src/hotspot/share/opto/parse3.cpp	Tue Nov 26 16:09:21 2019 +0300
@@ -55,8 +55,9 @@
     return;
   }
 
-  // Deoptimize on putfield writes to call site target field.
-  if (!is_get && field->is_call_site_target()) {
+  // Deoptimize on putfield writes to call site target field outside of CallSite ctor.
+  if (!is_get && field->is_call_site_target() &&
+      !(method()->holder() == field_holder && method()->is_object_initializer())) {
     uncommon_trap(Deoptimization::Reason_unhandled,
                   Deoptimization::Action_reinterpret,
                   NULL, "put to call site target field");