| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Test enabled only on supported architectures. | 5 // Test enabled only on supported architectures. |
| 6 #if defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_ARM) || \ | 6 #if defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_ARM) || \ |
| 7 defined(V8_TARGET_ARCH_ARM64) | 7 defined(V8_TARGET_ARCH_ARM64) |
| 8 | 8 |
| 9 #include "src/flags.h" | 9 #include "src/flags.h" |
| 10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
| 11 #include "src/objects.h" | 11 #include "src/objects.h" |
| 12 #include "src/unicode-cache.h" | 12 #include "src/unicode-cache.h" |
| 13 #include "test/cctest/compiler/function-tester.h" | 13 #include "test/cctest/compiler/function-tester.h" |
| 14 | 14 |
| 15 namespace v8 { | 15 namespace v8 { |
| 16 namespace internal { | 16 namespace internal { |
| 17 namespace compiler { | 17 namespace compiler { |
| 18 | 18 |
| 19 TEST(RunUnwindingInfo) { | 19 TEST(RunUnwindingInfo) { |
| 20 FLAG_always_opt = true; |
| 20 FLAG_perf_prof_unwinding_info = true; | 21 FLAG_perf_prof_unwinding_info = true; |
| 21 | 22 |
| 22 FunctionTester tester( | 23 FunctionTester tester( |
| 23 "(function (x) {\n" | 24 "(function (x) {\n" |
| 24 " function f(x) { return x*x; }\n" | 25 " function f(x) { return x*x; }\n" |
| 25 " return x > 0 ? x+1 : f(x);\n" | 26 " return x > 0 ? x+1 : f(x);\n" |
| 26 "})"); | 27 "})"); |
| 27 | 28 |
| 28 tester.Call(tester.Val(-1)); | 29 tester.Call(tester.Val(-1)); |
| 29 | 30 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 52 // | | State B != A |---+ | 53 // | | State B != A |---+ |
| 53 // | +----------------+ | | 54 // | +----------------+ | |
| 54 // +-->| Failure here |<--+ | 55 // +-->| Failure here |<--+ |
| 55 // +----------------+ | 56 // +----------------+ |
| 56 | 57 |
| 57 } // namespace compiler | 58 } // namespace compiler |
| 58 } // namespace internal | 59 } // namespace internal |
| 59 } // namespace v8 | 60 } // namespace v8 |
| 60 | 61 |
| 61 #endif | 62 #endif |
| OLD | NEW |