Skip to content

Commit

Permalink
Back out "Switch Hermes to use engine job/microtask queue by default"
Browse files Browse the repository at this point in the history
Summary:
Original commit changeset: b0c0f198826a

Original Phabricator Diff: D34536200

Reviewed By: sammy-SC

Differential Revision: D34625038

fbshipit-source-id: 444c99150f45f426d5c62ff8b27b64a91d7d619b
  • Loading branch information
neildhar authored and facebook-github-bot committed Mar 3, 2022
1 parent 5a1efb3 commit ba6e578
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/hermes/VM/Runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ class Runtime : public HandleRootOwner,
}

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

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

/// Set of flags for active VM experiments.
Expand Down
2 changes: 1 addition & 1 deletion test/hermes/console-host-job-throw.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

// RUN: %hermes %s 2>&1 | %FileCheck --match-full-lines %s
// RUN: %hermes -Xvm-experiment-flags=16384 %s 2>&1 | %FileCheck --match-full-lines %s

print("ConsoleHost job throws");
// CHECK-LABEL: ConsoleHost job throws
Expand Down
4 changes: 2 additions & 2 deletions test/hermes/promise-jobs-scheduled-in-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/

// RUN: %hermes -Xvm-experiment-flags=32768 %s | %FileCheck --match-full-lines --check-prefix=TASK %s
// RUN: %hermes %s | %FileCheck --match-full-lines --check-prefix=MICROTASK %s
// RUN: %hermes %s | %FileCheck --match-full-lines --check-prefix=TASK %s
// RUN: %hermes -Xvm-experiment-flags=16384 %s | %FileCheck --match-full-lines --check-prefix=MICROTASK %s

print('promise jobs scheduled in scripts');
// CHECK-LABEL: promise jobs scheduled in scripts
Expand Down
4 changes: 2 additions & 2 deletions test/hermes/promise-jobs-scheduled-in-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/

// RUN: %hermes -Xvm-experiment-flags=32768 %s | %FileCheck --match-full-lines --check-prefix=TASK %s
// RUN: %hermes %s | %FileCheck --match-full-lines --check-prefix=MICROTASK %s
// RUN: %hermes %s | %FileCheck --match-full-lines --check-prefix=TASK %s
// RUN: %hermes -Xvm-experiment-flags=16384 %s | %FileCheck --match-full-lines --check-prefix=MICROTASK %s

print('promise jobs scheduled in tasks');
// CHECK-LABEL: promise jobs scheduled in tasks
Expand Down
1 change: 1 addition & 0 deletions test/hermes/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

// RUN: %hermes -Xes6-promise %s | %FileCheck --match-full-lines %s
// RUN: %hermes -Xvm-experiment-flags=16384 %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O -emit-binary -out %t.hbc %s && %hermes -Xes6-promise %t.hbc | %FileCheck --match-full-lines %s

print('promise');
Expand Down

0 comments on commit ba6e578

Please sign in to comment.