diff options
author | Matt Loring <mattloring@google.com> | 2017-05-25 11:51:56 -0700 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-05-28 17:11:34 +0200 |
commit | 849f22309a3e612dd4b9483db32713f7e759215b (patch) | |
tree | d4a58b79312aabea98e342c26e132d73ab63eec9 /configure | |
parent | 5b50501395ebe9dd1fc33aa792e8d5a54a78cfb4 (diff) | |
download | android-node-v8-849f22309a3e612dd4b9483db32713f7e759215b.tar.gz android-node-v8-849f22309a3e612dd4b9483db32713f7e759215b.tar.bz2 android-node-v8-849f22309a3e612dd4b9483db32713f7e759215b.zip |
async_wrap,src: wrap promises directly
Promises do not have any internal fields by default. V8 recently added
the capability of configuring the number of internal fields on promises.
This change adds an internal field to promises allowing promises to be
wrapped directly by the PromiseWrap object. In addition to cleaner code
this avoids an extra object allocation per promise and speeds up promise
creation with async_hooks enabled by ~2x.
PR-URL: https://github.com/nodejs/node/pull/13242
Ref: https://github.com/nodejs/node/pull/13224
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -954,6 +954,7 @@ def configure_v8(o): o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs. o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds. o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables. + o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks. o['variables']['v8_use_snapshot'] = 'false' if options.without_snapshot else 'true' o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) |