Skip to content

Commit

Permalink
Prepare Job Queue VM experiment
Browse files Browse the repository at this point in the history
Summary:
This diff introduces a new VM experiment flag `JobQueue` with a
helper function `useJobQueue` to prepare any conditionalizations
required by the Job Queue experiment.

Reviewed By: dulinriley

Differential Revision: D27666283

fbshipit-source-id: 25669201dedf1e3805480e42ec3aa2c2a2624b77
  • Loading branch information
Huxpro authored and facebook-github-bot committed Apr 22, 2021
1 parent 43af1db commit a4cf67f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/hermes/VM/Runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,10 @@ class Runtime : public HandleRootOwner,
return hasIntl_;
}

bool useJobQueue() const {
return getVMExperimentFlags() & experiments::JobQueue;
}

bool builtinsAreFrozen() const {
return builtinsFrozen_;
}
Expand Down
1 change: 1 addition & 0 deletions include/hermes/VM/VMExperiments.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum {
GenGC = 1 << 11,
// HadesTimedIncremental = 1 << 12,
CrashTrace = 1 << 13,
JobQueue = 1 << 14,
};

/// Set of flags for active VM experiments.
Expand Down

0 comments on commit a4cf67f

Please sign in to comment.