Add coroutines, async/await functionality, and gen.close()

This commit is contained in:
coolreader18 committed 2019-11-07 00:04:50 -06:00
1 parent 52f1965c1c
commit 577cea92fe
10 files changed
+255 -26

No files matched your search

+3
View File
@@ -55,6 +55,7 @@ bitflags! {
const HAS_ANNOTATIONS = 0x04;
const NEW_LOCALS = 0x08;
const IS_GENERATOR = 0x10;
const IS_COROUTINE = 0x20;
}
}
@@ -273,6 +274,7 @@ pub enum Instruction {
Reverse {
amount: usize,
},
GetAwaitable,
}
use self::Instruction::*;
@@ -549,6 +551,7 @@ impl Instruction {
FormatValue { spec, .. } => w!(FormatValue, spec), // TODO: write conversion
PopException => w!(PopException),
Reverse { amount } => w!(Reverse, amount),
GetAwaitable => w!(GetAwaitable),
}
}
}