Skip to content
Permalink
Browse files

[js] Add missing async/await

  • Loading branch information...
pmurias committed Dec 22, 2018
1 parent 822962d commit e233f287b095a84e101bd2a557822cfb640fa9bc
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/vm/js/perl6-runtime/runtime.js
@@ -265,8 +265,8 @@ module.exports.load = function(nqp, CodeRef, Capture, containerSpecs) {

op.p6sink = /*async*/ function(ctx, obj) {
if (obj.$$typeObject || obj === Null) return;
if (obj.$$can(ctx, 'sink')) {
obj.p6$sink(ctx, null, obj);
if (/*await*/ obj.$$can(ctx, 'sink')) {
/*await*/ obj.p6$sink(ctx, null, obj);
}
};

@@ -302,7 +302,7 @@ module.exports.load = function(nqp, CodeRef, Capture, containerSpecs) {

};

op.p6fakerun = function(HLL, options) {
op.p6fakerun = /*async*/ function(HLL, options) {
const code = options.content.get('code').$$getStr();
const input = options.content.get('input').$$getStr();

@@ -313,7 +313,7 @@ module.exports.load = function(nqp, CodeRef, Capture, containerSpecs) {

const rakudoLibrary = nqp.requireExtraStuff('./rakudo-library.nqp-raw-runtime');

const result = rakudoLibrary.capturedRun(code, input, compilerArgs, args, env);
const result = /*await*/ rakudoLibrary.capturedRun(code, input, compilerArgs, args, env);

const hash = nqp.hash();

0 comments on commit e233f28

Please sign in to comment.
You can’t perform that action at this time.