| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/stack_frame.h" | 9 #include "vm/stack_frame.h" |
| 10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 MakeDummyInstanceCall(assembler, Smi::Handle(Smi::New(42))); | 352 MakeDummyInstanceCall(assembler, Smi::Handle(Smi::New(42))); |
| 353 __ ReturnTOS(); | 353 __ ReturnTOS(); |
| 354 } | 354 } |
| 355 | 355 |
| 356 | 356 |
| 357 ASSEMBLER_TEST_RUN(BitAndTOSNonSmi, test) { | 357 ASSEMBLER_TEST_RUN(BitAndTOSNonSmi, test) { |
| 358 EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code())); | 358 EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code())); |
| 359 } | 359 } |
| 360 | 360 |
| 361 | 361 |
| 362 ASSEMBLER_TEST_GENERATE(LogicalNotTrue, assembler) { |
| 363 __ PushConstant(Bool::Get(true)); |
| 364 __ LogicalNot(); |
| 365 __ ReturnTOS(); |
| 366 } |
| 367 |
| 368 |
| 369 ASSEMBLER_TEST_RUN(LogicalNotTrue, test) { |
| 370 EXPECT(!EXECUTE_TEST_CODE_BOOL(test->code())); |
| 371 } |
| 372 |
| 373 |
| 374 ASSEMBLER_TEST_GENERATE(LogicalNotFalse, assembler) { |
| 375 __ PushConstant(Bool::Get(false)); |
| 376 __ LogicalNot(); |
| 377 __ ReturnTOS(); |
| 378 } |
| 379 |
| 380 |
| 381 ASSEMBLER_TEST_RUN(LogicalNotFalse, test) { |
| 382 EXPECT(EXECUTE_TEST_CODE_BOOL(test->code())); |
| 383 } |
| 384 |
| 385 |
| 386 |
| 362 ASSEMBLER_TEST_GENERATE(EqualTOSTrue, assembler) { | 387 ASSEMBLER_TEST_GENERATE(EqualTOSTrue, assembler) { |
| 363 __ PushConstant(Smi::Handle(Smi::New(42))); | 388 __ PushConstant(Smi::Handle(Smi::New(42))); |
| 364 __ PushConstant(Smi::Handle(Smi::New(42))); | 389 __ PushConstant(Smi::Handle(Smi::New(42))); |
| 365 __ EqualTOS(); | 390 __ EqualTOS(); |
| 366 // Should be skipped. | 391 // Should be skipped. |
| 367 MakeDummyInstanceCall(assembler, Bool::False()); | 392 MakeDummyInstanceCall(assembler, Bool::False()); |
| 368 __ ReturnTOS(); | 393 __ ReturnTOS(); |
| 369 } | 394 } |
| 370 | 395 |
| 371 | 396 |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 } | 1656 } |
| 1632 | 1657 |
| 1633 | 1658 |
| 1634 ASSEMBLER_TEST_RUN(CheckClassIdFail, test) { | 1659 ASSEMBLER_TEST_RUN(CheckClassIdFail, test) { |
| 1635 EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code())); | 1660 EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code())); |
| 1636 } | 1661 } |
| 1637 | 1662 |
| 1638 } // namespace dart | 1663 } // namespace dart |
| 1639 | 1664 |
| 1640 #endif // defined(TARGET_ARCH_DBC) | 1665 #endif // defined(TARGET_ARCH_DBC) |
| OLD | NEW |