| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/frames-inl.h" | 7 #include "src/frames-inl.h" |
| 8 #include "test/cctest/cctest.h" | 8 #include "test/cctest/cctest.h" |
| 9 #include "test/cctest/compiler/function-tester.h" | 9 #include "test/cctest/compiler/function-tester.h" |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 " return d + a;" | 56 " return d + a;" |
| 57 "})"); | 57 "})"); |
| 58 | 58 |
| 59 InstallIsOptimizedHelper(CcTest::isolate()); | 59 InstallIsOptimizedHelper(CcTest::isolate()); |
| 60 T.CheckCall(T.Val(6), T.Val(3)); | 60 T.CheckCall(T.Val(6), T.Val(3)); |
| 61 } | 61 } |
| 62 | 62 |
| 63 | 63 |
| 64 TEST(DeoptExceptionHandlerCatch) { | 64 TEST(DeoptExceptionHandlerCatch) { |
| 65 FLAG_allow_natives_syntax = true; | 65 FLAG_allow_natives_syntax = true; |
| 66 FLAG_turbo_try_catch = true; | |
| 67 | 66 |
| 68 FunctionTester T( | 67 FunctionTester T( |
| 69 "(function f() {" | 68 "(function f() {" |
| 70 " var is_opt = IsOptimized;" | 69 " var is_opt = IsOptimized;" |
| 71 " try {" | 70 " try {" |
| 72 " DeoptAndThrow(f);" | 71 " DeoptAndThrow(f);" |
| 73 " } catch (e) {" | 72 " } catch (e) {" |
| 74 " return is_opt();" | 73 " return is_opt();" |
| 75 " }" | 74 " }" |
| 76 "})"); | 75 "})"); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 107 FLAG_allow_natives_syntax = true; | 106 FLAG_allow_natives_syntax = true; |
| 108 | 107 |
| 109 FunctionTester T( | 108 FunctionTester T( |
| 110 "(function foo() {" | 109 "(function foo() {" |
| 111 " %DeoptimizeFunction(foo);" | 110 " %DeoptimizeFunction(foo);" |
| 112 " return 1;" | 111 " return 1;" |
| 113 "})"); | 112 "})"); |
| 114 | 113 |
| 115 T.CheckCall(T.Val(1)); | 114 T.CheckCall(T.Val(1)); |
| 116 } | 115 } |
| OLD | NEW |