Skip to content

Commit

Permalink
Specify -O0 in tests explicitly
Browse files Browse the repository at this point in the history
Summary:
In anticipation of switching the default to optimized bytecode, explicitly specify
`-O0` in tests. This shouldn't affect the existing behavior of these tests, right now that
is the default.

Reviewed By: avp

Differential Revision: D18410476

fbshipit-source-id: 7b6cde2b19ae564842b1fe05282b84b6fd5cd849
  • Loading branch information
Riley Dulin authored and facebook-github-bot committed Nov 11, 2019
1 parent f9a4476 commit 93abbd6
Show file tree
Hide file tree
Showing 100 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions test/BCGen/HBC/debug_info.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 -dump-bytecode -target=HBC -g %s | %FileCheck %s --match-full-lines
// RUN: cp %s %T/debug_info_à.js && %hermes -dump-bytecode -target=HBC -g %T/debug_info_à.js | %FileCheck %s --match-full-lines --check-prefix=UNICODE
// RUN: %hermes -O0 -dump-bytecode -target=HBC -g %s | %FileCheck %s --match-full-lines
// RUN: cp %s %T/debug_info_à.js && %hermes -O0 -dump-bytecode -target=HBC -g %T/debug_info_à.js | %FileCheck %s --match-full-lines --check-prefix=UNICODE

var v1g = "global";

Expand Down
2 changes: 1 addition & 1 deletion test/BCGen/HBC/es6/generator.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: %hermesc -dump-bytecode %s | %FileCheck %s --match-full-lines
// RUN: %hermesc -O0 -dump-bytecode %s | %FileCheck %s --match-full-lines

function *loop(x) {
var i = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/BCGen/HBC/es6/spread-arguments.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: %hermesc -dump-bytecode %s | %FileCheck %s --match-full-lines
// RUN: %hermesc -O0 -dump-bytecode %s | %FileCheck %s --match-full-lines

function foo(fn, x) {
fn(...x);
Expand Down
2 changes: 1 addition & 1 deletion test/BCGen/HBC/es6/tdz-check.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 -target=HBC -dump-bytecode %s | %FileCheck --match-full-lines %s
// RUN: %hermes -O0 -target=HBC -dump-bytecode %s | %FileCheck --match-full-lines %s

function foo() {
return x;
Expand Down
2 changes: 1 addition & 1 deletion test/BCGen/HBC/own_properties.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 -target=HBC -dump-lir %s | %FileCheck --match-full-lines %s
// RUN: %hermes -O0 -target=HBC -dump-lir %s | %FileCheck --match-full-lines %s

// Test that StoreNewOwnPropertyInst is lowered to StoreOwnPropertyInst when
// the property name is a valid array index.
Expand Down
2 changes: 1 addition & 1 deletion test/BCGen/HBC/unique-lit.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: %hermesc -dump-bytecode %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-bytecode %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O -dump-bytecode %s | %FileCheck --match-full-lines --check-prefix=CHKOPT %s

// Check that literals are uniqued when optimizations is disabled, but aren't
Expand Down
2 changes: 1 addition & 1 deletion test/BCGen/HBC/variables.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 -strict -target=HBC -dump-lir %s | %FileCheck --match-full-lines %s
// RUN: %hermes -strict -O0 -target=HBC -dump-lir %s | %FileCheck --match-full-lines %s
// RUN: %hermes -strict -O -target=HBC -dump-lir %s | %FileCheck --match-full-lines --check-prefix=CHKOPT %s

var a = 5;
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/__proto__.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

// Ensure that __proto__ is not set as an "own" property.

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/accessors.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 -hermes-parser -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck --match-full-lines %s
// RUN: %hermes -hermes-parser -dump-ir %s -O

var x = {
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/arguments.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 -hermes-parser -dump-ir -non-strict %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir -non-strict %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir -non-strict %s -O

// Code that doesn't require creation of the expensive object.
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/array_elision.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O


Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/array_object.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O


Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/assignment.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O


Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/binary_operator.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O

function foo(x, y) {
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/break_block.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O

var x = 0;
Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/break_context_in_finally.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: %hermesc -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermesc -dump-bytecode %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermesc -O0 -dump-bytecode %s

// Ensure that the "break" in the finally handler exits the correct
// loop.
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/call_expr.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O

//CHECK: function bar(x, y, z)
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/cjs/cjs-location.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: %hermesc -commonjs -dump-ir -dump-source-location < %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -commonjs -dump-ir -dump-source-location < %s | %FileCheck --match-full-lines %s

x = 10;

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/cjs/cjs-multiple-1.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 -commonjs -dump-ir %S/cjs-multiple-1.js %S/cjs-multiple-2.js | %FileCheck --match-full-lines %s
// RUN: %hermes -O0 -commonjs -dump-ir %S/cjs-multiple-1.js %S/cjs-multiple-2.js | %FileCheck --match-full-lines %s

print('done 1');

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/cjs/cjs-simple.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 -commonjs -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermes -O0 -commonjs -dump-ir %s | %FileCheck --match-full-lines %s

print('done');

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/cond_expr_phi.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 -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -dump-ir %s -O

function condExpr(a,b,c,d) {
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/custom_globals.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 -hermes-parser -dump-ir -include-globals %s.d %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir -include-globals %s.d %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir -include-globals %s.d %s -O

var x = CustomGlobalProperty;
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/debugger.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O

function foo () {
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/delete-in-catch.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines

// Ensure that catch variables are not treated as global.
var result;
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/delete.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O

function sink() {}
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/do_while.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 -hermes-parser -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O

//CHECK-LABEL:function simple_do_while_test(cond)
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/array-binding.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

var [a, [b = 1, c] = [,2]] = x;

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/array-spread.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O -dump-ir %s | %FileCheck --match-full-lines -check-prefix OPT %s

function foo(x) {
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/arrow-arguments.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

// Ensure that 'arguments' is captured correctly for arrow functions.

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/arrow-function-1.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

var func1 = () => 10;
//CHECK-LABEL:arrow func1()
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/arrow-function-2.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

function outer1() {
var innerArrow1 = () => this.x;
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/arrow-function-3.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

function foo(x = () => this) {
return x();
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/computed-props.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 -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermes -O0 -dump-ir %s | %FileCheck %s --match-full-lines

({
['x']: 3,
Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/es6/disable-tdz.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -fno-enable-tdz -dump-ir %s | %FileCheck --match-full-lines --check-prefix=CHKDIS %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -fno-enable-tdz -dump-ir %s | %FileCheck --match-full-lines --check-prefix=CHKDIS %s

function check1() {
return x + y;
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/for-of.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 -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermes -O0 -dump-ir %s | %FileCheck --match-full-lines %s

function forof_normal(seq, cb) {
for(var i of seq)
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/generator.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: %hermesc -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck %s --match-full-lines

function* simple() {
yield 1;
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/new-target.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

function func1() {
return new.target;
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/object-binding.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: %hermesc -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck %s --match-full-lines

//CHECK-LABEL:function global()
//CHECK-NEXT:frame = [], globals = [a, b, d, e]
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/object-computed-destructuring.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: %hermesc -dump-ir %s | %FileCheck %s --match-full-lines
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck %s --match-full-lines

// CHECK-LABEL: function global()
// CHECK-NEXT: frame = [], globals = [b, rest, d]
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/param-init-arguments.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

// Ensure that we can use "arguments" when initializing formal parameters.

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/rest-element.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

function f1(t) {
var [...a] = t;
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/rest-param.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

function f1(a, ...b) {}
//CHECK-LABEL: function f1(a)
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/es6/rest-property.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: %hermesc -dump-ir %s | %FileCheck --match-full-lines %s
// RUN: %hermesc -O0 -dump-ir %s | %FileCheck --match-full-lines %s

function f1(t) {
var {...a} = t;
Expand Down
Loading

0 comments on commit 93abbd6

Please sign in to comment.