Skip to content
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.

JS: async/await #274

Merged
merged 24 commits into from
Oct 15, 2017
Merged

JS: async/await #274

merged 24 commits into from
Oct 15, 2017

Conversation

soywiz
Copy link
Member

@soywiz soywiz commented Oct 15, 2017

Target JS to ES6 (you can always transpile it with a transpiler)
Use async/await pattern to enable support for synchronous I/O and threads

Partially implementation of #265 (but just for JS)

@intrigus
Copy link
Contributor

Wouldn't it be by far easier to implicitly mark all methods as @JTranscSync and only async methods as JTranscAsync?

@soywiz
Copy link
Member Author

soywiz commented Oct 15, 2017

@intrigus Yes, it would be easier. But I wanted two things:

  • Allow to mark some functions synchronous to ensure at compile-time
  • Validate this before investing time into implementing the implicit marking
  • Helps me to detect paths that should be synchronous but that are not so I can rewrite parts when possible

@codecov
Copy link

codecov bot commented Oct 15, 2017

Codecov Report

Merging #274 into master will increase coverage by 0.02%.
The diff coverage is 42.99%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #274      +/-   ##
============================================
+ Coverage     17.82%   17.85%   +0.02%     
  Complexity      386      386              
============================================
  Files           312      314       +2     
  Lines         20747    20802      +55     
  Branches       4485     4493       +8     
============================================
+ Hits           3699     3714      +15     
- Misses        16369    16405      +36     
- Partials        679      683       +4
Impacted Files Coverage Δ Complexity Δ
...sc-rt-core/src/com/jtransc/text/MStringReader.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...re/src/com/jtransc/simd/MutableFloat32x4Utils.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...c-rt-core/src/com/jtransc/lang/JTranscObjects.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...ransc-rt-core/src/com/jtransc/mem/FastMemByte.java 0% <ø> (ø) 0 <0> (ø) ⬇️
jtransc-rt-core/src/com/jtransc/FastMemory.java 19.35% <ø> (ø) 6 <0> (ø) ⬇️
jtransc-rt-core/src/com/jtransc/simd/Simd.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...c-rt-core/src/com/jtransc/simd/Float32x4Utils.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...sc-rt-core/src/com/jtransc/mem/BytesReadAlign.java 0% <ø> (ø) 0 <0> (ø) ⬇️
jtransc-rt-core/src/com/jtransc/mem/BytesRead.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...ansc-rt-core/src/com/jtransc/ds/FastStringMap.java 0% <ø> (ø) 0 <0> (ø) ⬇️
... and 42 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67193c2...3302723. Read the comment docs.

@soywiz soywiz merged commit 1fc651b into master Oct 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants