Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync 2201.11.x with 2201.11.0-stage #43753

Merged
merged 1,078 commits into from
Feb 14, 2025
Merged
Changes from 1 commit
Commits
Show all changes
1078 commits
Select commit Hold shift + click to select a range
dd1ba1c
Switch to non sparse array to represent SubTypeData
heshanpadmasiri Jun 22, 2024
367872c
Refact: introduce explicit empty class for TypeCheckCache
heshanpadmasiri Jun 24, 2024
0a9a0db
Implement function semtype
heshanpadmasiri Jul 17, 2024
fce02be
Implement object semtype
heshanpadmasiri Jul 23, 2024
3620471
Fix record shape
heshanpadmasiri Jul 28, 2024
2eb02e7
Implement error semtype
heshanpadmasiri Jul 29, 2024
4c80881
Fix unit tests
heshanpadmasiri Aug 2, 2024
97e4d3d
Add workaround to value converter
heshanpadmasiri Aug 5, 2024
74f2712
Use lazy containers to xml types in Builder
heshanpadmasiri Aug 4, 2024
f64b89f
Use lazy suppliers for PredefinedEnv
heshanpadmasiri Aug 4, 2024
8946917
Rename Lazy containers to lazy suppliers
heshanpadmasiri Aug 4, 2024
d142606
Simplify context supplying
heshanpadmasiri Aug 4, 2024
05f32c3
More lazy initialization in predefined env
heshanpadmasiri Aug 4, 2024
72e1045
Get rid of unwanted private methods and rearrange the code
heshanpadmasiri Aug 4, 2024
4472698
Impmlement handle semtype
heshanpadmasiri Aug 6, 2024
e4b7950
Cleanup BSemTypeWrapper
heshanpadmasiri Aug 6, 2024
a992aa7
Re-ennable type check cache
heshanpadmasiri Aug 6, 2024
1cda781
Encapsulate access to all and some
heshanpadmasiri Aug 6, 2024
cdee3ba
Refactor the semtype class hierachy
heshanpadmasiri Aug 6, 2024
c8e1f0e
Move immutable semtype class to internals
heshanpadmasiri Aug 6, 2024
87eb849
Make BTypes proper semtypes
heshanpadmasiri Aug 7, 2024
92143f9
Patch unit tests with clashing type names
heshanpadmasiri Aug 7, 2024
04c1224
Implement future semtype
heshanpadmasiri Aug 7, 2024
fdff0b9
Implement regex type
heshanpadmasiri Aug 7, 2024
15bc7ac
Implement typedesc semtype
heshanpadmasiri Aug 9, 2024
8449519
Implement table and stream types
heshanpadmasiri Aug 9, 2024
ede9857
Remove fallback type checker from type checking
heshanpadmasiri Aug 13, 2024
df7f942
Implement isSimpleBasicType with SemTypes
heshanpadmasiri Aug 13, 2024
e7e7886
Implement isReferenceEqual with semtypes
heshanpadmasiri Aug 13, 2024
cfeef03
Re ennable type result caching
heshanpadmasiri Aug 13, 2024
5679b6b
Implement value conversion
heshanpadmasiri Aug 13, 2024
40930d6
Remove fallback type checker
heshanpadmasiri Aug 13, 2024
78192d0
Make semtype part of the top type
heshanpadmasiri Aug 13, 2024
bbfbd9a
Refactor isSameType
heshanpadmasiri Aug 13, 2024
b19271d
Optimize convertible type for int subtypes
heshanpadmasiri Aug 14, 2024
b83f54a
Introduce SimpleBdd
heshanpadmasiri Aug 14, 2024
cacca7b
Move MutableSemTypeDependencyManager to internal
heshanpadmasiri Aug 14, 2024
35e1941
Make any and readonly types immutable semtypes
heshanpadmasiri Aug 14, 2024
49fe835
Lazy initialize inner BTypes
heshanpadmasiri Aug 14, 2024
e67c217
Cache cell atom creation
heshanpadmasiri Aug 14, 2024
9a22113
Optimize mapping subtype check
heshanpadmasiri Aug 15, 2024
b9379ad
Use semtypes for valuesEquals
heshanpadmasiri Aug 15, 2024
fed5b55
Use semtypes for casting
heshanpadmasiri Aug 15, 2024
a027250
Refact shapeOf to support inlining
heshanpadmasiri Aug 15, 2024
3a47c04
Refactor memoSubtypeIsEmpty to make it inline
heshanpadmasiri Aug 15, 2024
ada2ffc
Fix thread safty issue in createSemType
heshanpadmasiri Aug 15, 2024
f1dc339
Cache BType results as well
heshanpadmasiri Aug 15, 2024
bb380cd
Only hold weak references in the mutable semtype dependency manager
heshanpadmasiri Aug 15, 2024
7c563ed
Make all context memo tables weak hash maps
heshanpadmasiri Aug 16, 2024
433bb04
Make atom table hold only weak references
heshanpadmasiri Aug 16, 2024
a6e9f47
Cache repeated semtype creation
heshanpadmasiri Aug 16, 2024
9075316
Introduce simplified cell subtype
heshanpadmasiri Aug 18, 2024
039d82e
Avoid caching cell semtypes for complex types
heshanpadmasiri Aug 18, 2024
4557342
Avoid unnecessarily checking for shape
heshanpadmasiri Aug 18, 2024
e97c00e
Cache type check results for user defined types
heshanpadmasiri Aug 18, 2024
5891223
Cache runtime type creation
heshanpadmasiri Aug 18, 2024
6669713
Remove unwanted caching logic
heshanpadmasiri Aug 18, 2024
38b1470
Cleanup access to context
heshanpadmasiri Aug 18, 2024
94f5a74
Refactor anydata type creation
heshanpadmasiri Aug 18, 2024
82e4b34
Use a simple weak map for dependency manager
heshanpadmasiri Aug 19, 2024
a8a4d08
Introduce copy of write BMapType
heshanpadmasiri Aug 19, 2024
10ad23b
Simplify getType
heshanpadmasiri Aug 19, 2024
b06ec83
Remove unwanted optimizations
heshanpadmasiri Aug 19, 2024
61017f9
Fix result caching for futures
heshanpadmasiri Aug 19, 2024
972e724
Fix Union type not getting reset correctly
heshanpadmasiri Aug 19, 2024
a96f7bf
Reduce the overhead for calculating couldShapeBeDifferent
heshanpadmasiri Aug 20, 2024
33da1ac
Be lazy about calculating the flags of tuple types
heshanpadmasiri Aug 20, 2024
fe4382d
Be lazy when creating the semtype result cache
heshanpadmasiri Aug 20, 2024
7e52a7b
Get rid of the stream when filtering nulls
heshanpadmasiri Aug 20, 2024
648ae20
Use concurrent lazy suppliers for BSemTypeWrappers
heshanpadmasiri Aug 21, 2024
097bbb8
Reduce contention in dependency manager
heshanpadmasiri Aug 21, 2024
8747624
Fix runtime semtype resolver
heshanpadmasiri Aug 23, 2024
c7868fa
Fix BFunction Equal
heshanpadmasiri Aug 23, 2024
21d5d6c
Add workarounds to make libraries compile
heshanpadmasiri Aug 23, 2024
c9a5ed4
Better caching of the type creator
heshanpadmasiri Aug 25, 2024
ad1bd59
Make shape calculation thread safe
heshanpadmasiri Aug 25, 2024
a22ba53
Add workaround to handle cyclic shapes
heshanpadmasiri Aug 25, 2024
1859892
Add default implementations to make TestUtils work
heshanpadmasiri Aug 25, 2024
32d4d24
Fix type casts in Intersection type
heshanpadmasiri Aug 25, 2024
dbc26d2
Fix error equals
heshanpadmasiri Aug 25, 2024
f220fbb
Add workaround to make SQL work
heshanpadmasiri Aug 26, 2024
5c542c4
Patch runtime resolver to handle dependtly typed func
heshanpadmasiri Aug 26, 2024
2a98e5a
Fix runtime test errors
heshanpadmasiri Aug 26, 2024
3e8dcdc
Change synchronization of atom table
heshanpadmasiri Aug 28, 2024
3456d8d
Remove BasicTypeBitSet
heshanpadmasiri Aug 31, 2024
19cf208
Restructure semtype structure
heshanpadmasiri Aug 31, 2024
09ede0b
Make tag directly accesible
heshanpadmasiri Sep 1, 2024
7c3aefc
Avoid creating BType when trying to calculate hash and equal for wrapper
heshanpadmasiri Sep 1, 2024
b166f5c
Use result caching with all semtypes
heshanpadmasiri Sep 1, 2024
a058102
Add fast path to hasFillerValue
heshanpadmasiri Sep 2, 2024
03dc027
Refactor workarounds to isSubType
heshanpadmasiri Sep 2, 2024
7da4d8f
Remove MutableSemTypeDependencyManager
heshanpadmasiri Sep 2, 2024
67ac35b
Get rid of BType basic type
heshanpadmasiri Sep 3, 2024
827d22b
Refactor shape anlayzer
heshanpadmasiri Sep 3, 2024
4829592
Avoid creating the inner BType with BSemTypeWrapper when possible
heshanpadmasiri Sep 3, 2024
1752ebc
Fix failing windows errors
heshanpadmasiri Sep 3, 2024
c6efe8d
Fix string shape calculation
heshanpadmasiri Sep 4, 2024
6bea345
Avoid result caching for basic types
heshanpadmasiri Sep 4, 2024
262bfda
Avoid unnecessarily calculating inherent type
heshanpadmasiri Sep 4, 2024
95c4b0f
Avoid unnecessarily creating singleton types
heshanpadmasiri Sep 6, 2024
75e4bcc
Refactor atoms
heshanpadmasiri Sep 8, 2024
db0cc8b
Refactor shape calculation
heshanpadmasiri Sep 6, 2024
3c8b6a6
Get rid of unwanted sychronizations
heshanpadmasiri Sep 8, 2024
c4066b7
Move BddMemo to inner
heshanpadmasiri Sep 11, 2024
093542a
Use accepted type for is likeShape
heshanpadmasiri Sep 15, 2024
58ed6d9
Introduce wrapper for bddEvery
heshanpadmasiri Sep 18, 2024
329c349
Move mutable semtype to inner
heshanpadmasiri Sep 18, 2024
32a95a3
Refactor method names
heshanpadmasiri Sep 29, 2024
8aa8128
Use holder classes to avoid initialization costs in TypeChecker
heshanpadmasiri Sep 29, 2024
aa9fc15
Fix invalid accepted type for union and tables
heshanpadmasiri Oct 1, 2024
d60e067
Refactor type check caching
heshanpadmasiri Oct 3, 2024
c85ccb4
Make cache sharable between type descriptors
heshanpadmasiri Oct 4, 2024
fcede96
Avoid necessary caching in TypeCreator
heshanpadmasiri Oct 4, 2024
54223f5
Avoid duplicate record type creation
heshanpadmasiri Oct 6, 2024
054cd60
Fix narrow type getting cached invalidly
heshanpadmasiri Oct 8, 2024
411e485
Fix tests with duplicate type definitions
heshanpadmasiri Oct 9, 2024
33487c5
Fix comments and naming
heshanpadmasiri Oct 11, 2024
3846215
Fix Dependently typed functions
heshanpadmasiri Oct 13, 2024
04293c3
Fix caching of annon types
heshanpadmasiri Nov 9, 2024
0d36359
Avoid unnecessary locking
heshanpadmasiri Nov 10, 2024
4d22d01
Refactor synchronization logic
heshanpadmasiri Nov 10, 2024
c53f877
Fix future equals
heshanpadmasiri Nov 10, 2024
95367ac
Avoid caching for anon types
heshanpadmasiri Nov 10, 2024
8d1aeca
Use DefinitionContainer to maintain concurrentcy invariants
heshanpadmasiri Nov 11, 2024
016da7e
Fix checkstyle violations
heshanpadmasiri Nov 19, 2024
0ca2edc
Merge pull request #43279 from heshanpadmasiri/feat/runtime-stream
lochana-chathura Nov 20, 2024
7e00058
Update test resources
NipunaRanasinghe Nov 20, 2024
1386283
Add test cases
NipunaRanasinghe Nov 20, 2024
e006755
Fix formatting and checkstyle
NipunaRanasinghe Nov 20, 2024
3a9a0de
Increase the timeout value
gimantha Nov 20, 2024
ec8cf5b
Merge branch 'master' into nutcracker
gimantha Nov 20, 2024
25415e4
Address review suggestions
NipunaRanasinghe Nov 20, 2024
3701963
Bump bir version
lochana-chathura Nov 21, 2024
78fe460
Fix merging issue for LangLibRecordTest class
lochana-chathura Nov 21, 2024
2e71207
Merge pull request #43545 from HindujaB/fix-record-field-master
gimantha Nov 21, 2024
43e6737
Merge pull request #43624 from NipunaRanasinghe/master
NipunaRanasinghe Nov 21, 2024
4330bae
Disable debugger test
HindujaB Nov 21, 2024
58727e7
Merge pull request #43637 from HindujaB/disable-debugger-test
warunalakshitha Nov 21, 2024
58fe102
Merge pull request #43558 from NipunaMadhushan/set-span-status
gimantha Nov 22, 2024
7a51dad
Increase server log reading rate
lochana-chathura Nov 22, 2024
1e2ad86
Fix checkStyle failure
lochana-chathura Nov 22, 2024
b9bd73d
Merge pull request #43594 from ballerina-platform/flow_model
dulajdilshan Nov 22, 2024
4e3496c
Merge branch 'master' of https://github.com/ballerina-platform/baller…
gimantha Nov 22, 2024
e049457
Make process local to method
gimantha Nov 22, 2024
1b89090
Fix import order
gimantha Nov 24, 2024
e79f6e8
Increase server reading rate further
lochana-chathura Nov 24, 2024
4a86052
Increment the wait time
gimantha Nov 25, 2024
5299c50
Merge branch 'nutcracker' of https://github.com/ballerina-platform/ba…
gimantha Nov 25, 2024
2ecf8a2
Increment the wait time
gimantha Nov 25, 2024
d2827d0
Disable integration tests temporarily
gimantha Nov 26, 2024
f765e2f
Revert the sleep time
gimantha Nov 26, 2024
72eb483
Revert using threads
gimantha Nov 27, 2024
45094df
Revert "Revert using threads"
gimantha Nov 28, 2024
d239379
Change arrays to maps for keeping the grouping keys in query expressions
gimantha Nov 28, 2024
1c5a1c1
Fix step-over behaviour followed by step-in instructions
NipunaRanasinghe Nov 29, 2024
c775dba
Merge pull request #43661 from gimantha/2201.11.0-stage
gimantha Nov 30, 2024
95e90fe
Merge pull request #43665 from NipunaRanasinghe/2201.11.0-stage
NipunaRanasinghe Nov 30, 2024
f793e5b
Make runtime calls synchronous
gimantha Dec 2, 2024
ce2986d
Fix checkstyle issue
gimantha Dec 2, 2024
ff7837e
Update netty version
NipunaMadhushan Dec 3, 2024
fb67d88
Merge pull request #43669 from NipunaMadhushan/update-netty-version
NipunaMadhushan Dec 3, 2024
5bafe98
Update execution context to support reset state
NipunaRanasinghe Dec 3, 2024
c23e419
Set encoded function name in lambda details
gimantha Dec 3, 2024
0d9e94d
Add support for restart requests
NipunaRanasinghe Dec 3, 2024
cf28096
Add full build pipeline for stage and `2201.x.x` branch pull requests
chiranSachintha Dec 3, 2024
6735dc3
Merge pull request #43680 from chiranSachintha/full-build-pipeline-pu…
chiranSachintha Dec 4, 2024
fc33b75
Merge pull request #43678 from gimantha/2201.11.0-stage-set-encoded-f…
chiranSachintha Dec 4, 2024
fb56dd8
Merge branch '2201.11.0-stage' into nutcracker
chiranSachintha Dec 4, 2024
38a426c
Fix a project caching issue during debugger restarts
NipunaRanasinghe Dec 4, 2024
f2ccd24
Fix #40606
gimantha Nov 17, 2024
9852424
Fix checkstyle issue
gimantha Nov 17, 2024
b860e50
Fix test failure
gimantha Nov 17, 2024
4dd1896
Check specifically the singleton path segments
gimantha Dec 2, 2024
6e2b43d
Refactor code to remove redundancies
NipunaRanasinghe Dec 4, 2024
f762dae
Merge pull request #43606 from ballerina-platform/nutcracker
chiranSachintha Dec 4, 2024
0d1e483
Merge pull request #43683 from gimantha/2201.11.0-stage-#40606
chiranSachintha Dec 4, 2024
ff88b2d
Fix sending vm exit notifications to the client
NipunaRanasinghe Dec 4, 2024
6585e57
Update debug test runner to support debug terminations
NipunaRanasinghe Dec 4, 2024
7aedf9f
Add debug restart tests
NipunaRanasinghe Dec 4, 2024
81b23a6
Fix spotbugs
NipunaRanasinghe Dec 4, 2024
ce89d14
Fix minor issues
NipunaRanasinghe Dec 4, 2024
55cee50
Fix more test failures
NipunaRanasinghe Dec 4, 2024
9b642cc
Merge pull request #43684 from NipunaRanasinghe/2201.11.0-stage
NipunaRanasinghe Dec 5, 2024
972fef9
Add optimization to compiler
heshanpadmasiri Dec 5, 2024
1379b4b
Add optimization to runtime
heshanpadmasiri Dec 5, 2024
0fab35b
Revert "Add optimization to runtime"
heshanpadmasiri Dec 5, 2024
f0d2dde
Update full build pipeline of PR build
chiranSachintha Dec 5, 2024
6e1e5c1
Remove level 11
chiranSachintha Dec 5, 2024
5e99d27
Update levels
chiranSachintha Dec 6, 2024
0c01583
Merge pull request #43689 from heshanpadmasiri/fix/bdd-optim
chiranSachintha Dec 9, 2024
6927813
Make the breakpoint verification configurable
NipunaRanasinghe Dec 6, 2024
fefc76c
Add tests
NipunaRanasinghe Dec 6, 2024
6c67206
Fix verification when the feature is enabled
NipunaRanasinghe Dec 6, 2024
6644b9c
Apply review suggestions
NipunaRanasinghe Dec 10, 2024
c4fe578
Merge pull request #43693 from NipunaRanasinghe/2201.11.0-stage
NipunaRanasinghe Dec 11, 2024
f0875b7
Improve perf of array add
warunalakshitha Dec 11, 2024
7e5f313
Improve perf of type checker for equal types
warunalakshitha Dec 11, 2024
0ccf421
Remove redundant equal check in TypeCheckCache
warunalakshitha Dec 11, 2024
f412009
Optimize function by removing unnecessary synchronized modifier
chiranSachintha Dec 12, 2024
2b57fa4
Fix test with int sub types
warunalakshitha Dec 12, 2024
a1e03c5
Merge pull request #43704 from chiranSachintha/remove-sync
chiranSachintha Dec 12, 2024
db42f71
Refactor semtype concurrency model
heshanpadmasiri Dec 14, 2024
5bbc764
Avoid unnnecessary calls to create context
heshanpadmasiri Dec 15, 2024
85b8270
Fix phase change interruptions
heshanpadmasiri Dec 16, 2024
64f3005
Fix bstring array tests
warunalakshitha Dec 16, 2024
8b46143
Merge branch 2201.11.0-stage
warunalakshitha Dec 16, 2024
617605d
Add self diagnostics to semtypes
heshanpadmasiri Dec 16, 2024
b0b8f79
Add locks to handle concurrent env rec atom creation
heshanpadmasiri Dec 16, 2024
91e04ff
Add dead lock detection to self diagnostics
heshanpadmasiri Dec 16, 2024
c7439b9
Rethrow any type resolution exceptions
heshanpadmasiri Dec 17, 2024
f4c6cb5
Lock all recursive definitions
heshanpadmasiri Dec 17, 2024
06e31a7
Diagnose empty rec atoms
heshanpadmasiri Dec 17, 2024
534f7b4
Remove workaround for BIR serialization
heshanpadmasiri Dec 17, 2024
ab2a1b5
Properly reset the phaser
heshanpadmasiri Dec 17, 2024
10289a1
Refactor strand dump logic and fix bug
ravinperera00 Dec 17, 2024
0021146
Handle BasicType checks with mutable semtypes
heshanpadmasiri Dec 17, 2024
479166c
Add move diagnostics
heshanpadmasiri Dec 17, 2024
9fcbf67
Fix state transition errors
heshanpadmasiri Dec 17, 2024
8229d95
Add more diagnostics
heshanpadmasiri Dec 17, 2024
4487308
avoid phase change on error
heshanpadmasiri Dec 17, 2024
f723bee
Simple CAS sync
heshanpadmasiri Dec 17, 2024
bf10b3e
Simplify the sync logic
heshanpadmasiri Dec 17, 2024
109f6cc
Merge pull request #43708 from heshanpadmasiri/fix/semtype-sycn
chiranSachintha Dec 18, 2024
0060bf1
Fix checkstyle issue
ravinperera00 Dec 19, 2024
e01fe53
Merge branch 2201.11.0-stage
warunalakshitha Dec 19, 2024
bc78653
Update runtime API documentation
HindujaB Dec 19, 2024
fbb3a35
Merge pull request #43701 from warunalakshitha/perf_fix_semtype
warunalakshitha Dec 19, 2024
9111ec1
Merge pull request #43713 from ravinperera00/strand_dump_2
warunalakshitha Dec 19, 2024
c6974d8
Fix breakpoint changes inside Ballerina services after starting a deb…
NipunaRanasinghe Jan 8, 2025
1f00f40
Revert "Merge pull request #43708 from heshanpadmasiri/fix/semtype-sycn"
chiranSachintha Jan 9, 2025
9b1b667
Revert "Merge pull request #43689 from heshanpadmasiri/fix/bdd-optim"
chiranSachintha Jan 9, 2025
da93307
Revert "Merge pull request #43606 from ballerina-platform/nutcracker"
chiranSachintha Jan 9, 2025
f57346b
Merge pull request #43740 from NipunaRanasinghe/debugger-bp-fix-Update11
NipunaRanasinghe Jan 9, 2025
e3ebc61
Update runtime `Typechecker`
chiranSachintha Jan 9, 2025
ce793f9
Revert "Merge pull request #43701 from warunalakshitha/perf_fix_semtype"
chiranSachintha Jan 9, 2025
54a9f5d
Revert "Update runtime `Typechecker`"
chiranSachintha Jan 9, 2025
8996d17
Update levels
chiranSachintha Jan 9, 2025
6ec7360
Merge pull request #43742 from chiranSachintha/2201.11.0-stage-revert
warunalakshitha Jan 9, 2025
cd9e541
Set default value fps isolated
warunalakshitha Jan 9, 2025
b4931ec
Avoid creating unwanted virtual threads
warunalakshitha Jan 9, 2025
c85851f
Merge pull request #43745 from warunalakshitha/java21_perf
warunalakshitha Jan 9, 2025
8c20325
Improve adding array value performance
warunalakshitha Jan 9, 2025
f28de19
Improve the Scheduler call logic
warunalakshitha Jan 9, 2025
cc82945
Merge pull request #43747 from warunalakshitha/java21_perf
warunalakshitha Jan 9, 2025
15de3b2
Merge pull request #43718 from HindujaB/2201.11.0-stage
warunalakshitha Jan 20, 2025
a4b67fe
Merge pull request #43746 from ballerina-platform/java21_perf
warunalakshitha Jan 22, 2025
e105b20
Avoid using gradle release plugin
NipunaMadhushan Feb 6, 2025
5b91c57
Merge pull request #43801 from NipunaMadhushan/fix-u11-release
NipunaMadhushan Feb 6, 2025
17f9493
Set graalvm in release workflow
NipunaMadhushan Feb 6, 2025
02f7e64
Merge pull request #43805 from NipunaMadhushan/fix-u11-release
NipunaMadhushan Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve the Scheduler call logic
  • Loading branch information
warunalakshitha committed Jan 9, 2025
commit f28de19b4633ca726ee0c4407a615f8adde46c37
Original file line number Diff line number Diff line change
Expand Up @@ -67,106 +67,74 @@ public static Strand getStrand() {
return strandHolder.get().strand;
}
public Object callFunction(Module module, String functionName, StrandMetadata metadata, Object... args) {
Strand parentStrand = Scheduler.getStrand();
if (parentStrand != null) {
boolean runnable = parentStrand.isRunnable();
if (!runnable) {
parentStrand.resume();
}
try {
return callFunction(module, functionName, args, parentStrand);
} finally {
if (!runnable) {
parentStrand.yield();
}
}
}
Strand strand = Scheduler.getStrand();
Map<String, Object> properties = null;
boolean isIsolated = false;
if (metadata != null) {
properties = metadata.properties();
isIsolated = metadata.isConcurrentSafe();
}
parentStrand = createStrand(null, functionName, isIsolated, properties, null);
strandHolder.get().strand = parentStrand;
if (isIsolated) {
return callFunction(module, functionName, args, parentStrand);
if (strand == null) {
strand = createStrand(null, functionName, isIsolated, properties, null);
strandHolder.get().strand = strand;
}
if (strand.isRunnable()) {
return callFunction(module, functionName, args, strand);
}
try {
parentStrand.resume();
return callFunction(module, functionName, args, parentStrand);
strand.resume();
return callFunction(module, functionName, args, strand);
} finally {
parentStrand.done();
strand.done();
}
}

public Object callMethod(BObject object, String methodName, StrandMetadata metadata, Object... args) {
Strand parentStrand = Scheduler.getStrand();
if (parentStrand != null) {
boolean runnable = parentStrand.isRunnable();
if (!runnable) {
parentStrand.resume();
}
try {
return callMethod(object, methodName, args, parentStrand);
} finally {
if (!runnable) {
parentStrand.yield();
}
}
}
Strand strand = Scheduler.getStrand();
Map<String, Object> properties = null;
boolean isIsolated = false;
if (metadata != null) {
properties = metadata.properties();
isIsolated = metadata.isConcurrentSafe();
}
String strandName = getStrandName(object, methodName);
parentStrand = createStrand(null, strandName, isIsolated, properties, null);
strandHolder.get().strand = parentStrand;
if (isIsolated) {
return callMethod(object, methodName, args, parentStrand);
if (strand == null) {
String strandName = getStrandName(object, methodName);
strand = createStrand(null, strandName, isIsolated, properties, null);
strandHolder.get().strand = strand;
}

if (strand.isRunnable()) {
return callMethod(object, methodName, args, strand);
}
try {
parentStrand.resume();
return callMethod(object, methodName, args, parentStrand);
strand.resume();
return callMethod(object, methodName, args, strand);
} finally {
parentStrand.done();
strand.done();
}
}

public Object callFP(FPValue fp, StrandMetadata metadata, Object... args) {
Strand parentStrand = Scheduler.getStrand();
if (parentStrand != null) {
boolean runnable = parentStrand.isRunnable();
if (!runnable) {
parentStrand.resume();
}
try {
return callFp(fp, args, parentStrand);
} finally {
if (!runnable) {
parentStrand.yield();
}
}
}
Strand strand = Scheduler.getStrand();
Map<String, Object> properties = null;
boolean isIsolated = false;
if (metadata != null) {
properties = metadata.properties();
isIsolated = metadata.isConcurrentSafe();
}
String strandName = getStrandName(fp.getName());
parentStrand = createStrand(null, strandName, isIsolated, properties, null);
strandHolder.get().strand = parentStrand;
if (isIsolated) {
return callFp(fp, args, parentStrand);
if (strand == null) {
String strandName = getStrandName(fp.getName());
strand = createStrand(null, strandName, isIsolated, properties, null);
strandHolder.get().strand = strand;
}
if (strand.isRunnable()) {
return callFp(fp, args, strand);
}
try {
parentStrand.resume();
return callFp(fp, args, parentStrand);
strand.resume();
return callFp(fp, args, strand);
} finally {
parentStrand.done();
strand.done();
}
}

Expand Down