summaryrefslogtreecommitdiff
path: root/src/env-inl.h
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2017-12-17 22:45:45 -0500
committerAnatoli Papirovski <apapirovski@mac.com>2017-12-24 09:12:01 -0500
commit4444b6b9add0a202dec319471630f724a219675c (patch)
tree97ec9d2dffa6e4749e3f6c283432b37fa6acc4e5 /src/env-inl.h
parent35d8ef5a85cac82e5acf8c8f50b320d62682cb68 (diff)
downloadandroid-node-v8-4444b6b9add0a202dec319471630f724a219675c.tar.gz
android-node-v8-4444b6b9add0a202dec319471630f724a219675c.tar.bz2
android-node-v8-4444b6b9add0a202dec319471630f724a219675c.zip
process: refactor nextTick for clarity
Do not share unnecessary information about nextTick state between JS & C++, instead only track whether a nextTick is scheduled or not. Turn nextTickQueue into an Object instead of a class since multiple instances are never created. Other assorted refinements and refactoring. PR-URL: https://github.com/nodejs/node/pull/17738 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/env-inl.h')
-rw-r--r--src/env-inl.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/env-inl.h b/src/env-inl.h
index ae864fb084..9af7c1215a 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -207,7 +207,7 @@ inline Environment::TickInfo::TickInfo() {
fields_[i] = 0;
}
-inline uint32_t* Environment::TickInfo::fields() {
+inline uint8_t* Environment::TickInfo::fields() {
return fields_;
}
@@ -215,16 +215,8 @@ inline int Environment::TickInfo::fields_count() const {
return kFieldsCount;
}
-inline uint32_t Environment::TickInfo::index() const {
- return fields_[kIndex];
-}
-
-inline uint32_t Environment::TickInfo::length() const {
- return fields_[kLength];
-}
-
-inline void Environment::TickInfo::set_index(uint32_t value) {
- fields_[kIndex] = value;
+inline uint8_t Environment::TickInfo::scheduled() const {
+ return fields_[kScheduled];
}
inline void Environment::AssignToContext(v8::Local<v8::Context> context,