Async/Await 5.4.319

95 views
Skip to first unread message

Brandon Jonson

unread,
Aug 2, 2016, 10:25:28 AM8/2/16
to v8-users
Hello Folks!

I got a working build of V8 5.4.319. I clearly see the Async/Await functions have made it (sort of) and still there in this build. Unfortunately I cannot get V8 to recognize it. I've tried it with flags: --harmony --es-shipping --es-staging --experimental-extras 

I'm still getting a big old "Unexpected token function" after the async keyword. Anybody know what I'm doing wrong? 

async function testmeout () {

  var foo = new Promise(function(resolve, reject) { resolve("foo") })

  return await foo;

}


Thanks!

Brandon Jonson

unread,
Aug 2, 2016, 10:45:06 AM8/2/16
to v8-users
Nevermind, I found it! 

The correct flag was --harmony-async-await. 

For some reason I thought simply using --harmony would grab them all. 

Thanks!

Caitlin Potter

unread,
Aug 2, 2016, 10:45:55 AM8/2/16
to v8-users
In 5.4.319, you _should_ get async/await with `--harmony`, based on https://github.com/v8/v8/blob/5.4.319/src/flag-definitions.h#L219.

Brandon Jonson

unread,
Aug 2, 2016, 2:51:01 PM8/2/16
to v8-users
Thanks for responding Caitlin! I thought that too however I explicitly had to use --harmony-async-await to get it to work. Good times!  

Caitlin Potter

unread,
Aug 2, 2016, 3:01:42 PM8/2/16
to v8-u...@googlegroups.com
I saw. The point is, --harmony enables staged features. There was something else going on if that did not work.
--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-users/OHGMyA4ohO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages