OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/frames-inl.h" | 5 #include "src/frames-inl.h" |
6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
7 #include "test/cctest/compiler/function-tester.h" | 7 #include "test/cctest/compiler/function-tester.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 "})"); | 77 "})"); |
78 | 78 |
79 CompileRun("function DeoptAndThrow(f) { %DeoptimizeFunction(f); throw 0; }"); | 79 CompileRun("function DeoptAndThrow(f) { %DeoptimizeFunction(f); throw 0; }"); |
80 InstallIsOptimizedHelper(CcTest::isolate()); | 80 InstallIsOptimizedHelper(CcTest::isolate()); |
81 T.CheckCall(T.false_value()); | 81 T.CheckCall(T.false_value()); |
82 } | 82 } |
83 | 83 |
84 | 84 |
85 TEST(DeoptExceptionHandlerFinally) { | 85 TEST(DeoptExceptionHandlerFinally) { |
86 FLAG_allow_natives_syntax = true; | 86 FLAG_allow_natives_syntax = true; |
87 FLAG_turbo_try_finally = true; | |
88 | 87 |
89 FunctionTester T( | 88 FunctionTester T( |
90 "(function f() {" | 89 "(function f() {" |
91 " var is_opt = IsOptimized;" | 90 " var is_opt = IsOptimized;" |
92 " try {" | 91 " try {" |
93 " DeoptAndThrow(f);" | 92 " DeoptAndThrow(f);" |
94 " } finally {" | 93 " } finally {" |
95 " return is_opt();" | 94 " return is_opt();" |
96 " }" | 95 " }" |
97 "})"); | 96 "})"); |
(...skipping 14 matching lines...) Expand all Loading... |
112 " %DeoptimizeFunction(foo);" | 111 " %DeoptimizeFunction(foo);" |
113 " return 1;" | 112 " return 1;" |
114 "})"); | 113 "})"); |
115 | 114 |
116 T.CheckCall(T.Val(1)); | 115 T.CheckCall(T.Val(1)); |
117 } | 116 } |
118 | 117 |
119 } // namespace compiler | 118 } // namespace compiler |
120 } // namespace internal | 119 } // namespace internal |
121 } // namespace v8 | 120 } // namespace v8 |
OLD | NEW |