Project

General

Profile

Feature #6817

replace INSTANTIATING-PROCEDURE and other handle<ExternalProgram> with the actual referrent

Added by Constantin Asofiei over 1 year ago. Updated over 1 year ago.

Status:
Test
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD

6817a.diff Magnifier (71.1 KB) Hynek Cihlar, 01/13/2023 05:23 PM


Related issues

Related to Base Language - Feature #6826: reduce the BDT usage in FWD runtime Review

History

#1 Updated by Constantin Asofiei over 1 year ago

The referent (which is held in an ExternalProgram) needs to be kept as a WeakReference.

The part which needs special attention are cases when the handle references a DeferredProgramWrapper or a ProxyProcedureWrapper - these cases need to remain as 'handle'.

#2 Updated by Constantin Asofiei over 1 year ago

Some work related to this has already been done in 6129a.

#3 Updated by Constantin Asofiei over 1 year ago

  • Related to Feature #6826: reduce the BDT usage in FWD runtime added

#4 Updated by Greg Shah over 1 year ago

  • Assignee set to Hynek Cihlar

#5 Updated by Constantin Asofiei over 1 year ago

In Eclipse, there is a way to look for a field or local variable of a certain type. Other IDEs should have something similar. This search resulted in lots of handle defined fields or local variables, which can be replaced with the actual WrappedResource instance - this avoids having to call unwrap and other kind of checks when working directly with a handle instance.

Of course, this can be done only in cases where the FWD runtime knows for sure the type of the underlying WrappedResource. And as a reminder, handles referencing an ExternalProgramWrapper instance need special attention, as they can't always be replaced with the actual instance held by ExternalProgramWrapper.

The start should be the p2j.persist package followed by p2j.util.

#6 Updated by Hynek Cihlar over 1 year ago

  • Status changed from New to WIP

#7 Updated by Hynek Cihlar over 1 year ago

The attached diff contains handle replacements for the com.goldencode.p2j.persist Java package. I left several comments marked as 'HC' at the places I wasn't entirely clear about. Somebody from the DB department, please review.

#8 Updated by Constantin Asofiei over 1 year ago

Hynek, I don't see any issue with the patch. Also, the comments don't introduce anything new. Please add header entries and commit it to 6129b.

#9 Updated by Hynek Cihlar over 1 year ago

  • Status changed from WIP to Review
  • % Done changed from 0 to 100

I checked in the changes in 6129b revision 14364. In addition to the attached 6817a.diff I also modified the following files:

  src/com/goldencode/p2j/oo/lang/OerequestInfo.java
  src/com/goldencode/p2j/persist/DataSet.java
  src/com/goldencode/p2j/util/AppServerHelper.java
  src/com/goldencode/p2j/util/HandleOps.java
  src/com/goldencode/p2j/util/InvokeConfig.java

Please review.

#10 Updated by Constantin Asofiei over 1 year ago

  • Status changed from Review to Test

6129b/14365 fixes a problem related to WidgetPool .

#11 Updated by Hynek Cihlar over 1 year ago

Constantin Asofiei wrote:

6129b/14365 fixes a problem related to WidgetPool .

The change is good, thanks!

Also available in: Atom PDF