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 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
7 | 7 |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/generic-node-inl.h" | 9 #include "src/compiler/generic-node-inl.h" |
10 #include "src/compiler/generic-node.h" | 10 #include "src/compiler/generic-node.h" |
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1706 Handle<SharedFunctionInfo> shared_function = Compiler::CompileScript( | 1706 Handle<SharedFunctionInfo> shared_function = Compiler::CompileScript( |
1707 source_code, Handle<String>(), 0, 0, false, | 1707 source_code, Handle<String>(), 0, 0, false, |
1708 Handle<Context>(isolate->native_context()), NULL, NULL, | 1708 Handle<Context>(isolate->native_context()), NULL, NULL, |
1709 v8::ScriptCompiler::kNoCompileOptions, NOT_NATIVES_CODE); | 1709 v8::ScriptCompiler::kNoCompileOptions, NOT_NATIVES_CODE); |
1710 return isolate->factory()->NewFunctionFromSharedFunctionInfo( | 1710 return isolate->factory()->NewFunctionFromSharedFunctionInfo( |
1711 shared_function, isolate->native_context()); | 1711 shared_function, isolate->native_context()); |
1712 } | 1712 } |
1713 | 1713 |
1714 | 1714 |
1715 TEST(BuildScheduleTrivialLazyDeoptCall) { | 1715 TEST(BuildScheduleTrivialLazyDeoptCall) { |
| 1716 FLAG_turbo_deoptimization = true; |
| 1717 |
1716 HandleAndZoneScope scope; | 1718 HandleAndZoneScope scope; |
1717 Isolate* isolate = scope.main_isolate(); | 1719 Isolate* isolate = scope.main_isolate(); |
1718 Graph graph(scope.main_zone()); | 1720 Graph graph(scope.main_zone()); |
1719 CommonOperatorBuilder common(scope.main_zone()); | 1721 CommonOperatorBuilder common(scope.main_zone()); |
1720 JSOperatorBuilder js_builder(scope.main_zone()); | 1722 JSOperatorBuilder js_builder(scope.main_zone()); |
1721 | 1723 |
1722 InitializedHandleScope handles; | 1724 InitializedHandleScope handles; |
1723 Handle<JSFunction> function = Compile("m()"); | 1725 Handle<JSFunction> function = Compile("m()"); |
1724 CompilationInfoWithZone info(function); | 1726 CompilationInfoWithZone info(function); |
1725 Linkage linkage(&info); | 1727 Linkage linkage(&info); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 CHECK_EQ(deoptimization_node, deopt_block->control_input_); | 1831 CHECK_EQ(deoptimization_node, deopt_block->control_input_); |
1830 CHECK_EQ(5, static_cast<int>(deopt_block->nodes_.size())); | 1832 CHECK_EQ(5, static_cast<int>(deopt_block->nodes_.size())); |
1831 CHECK_EQ(lazy_deopt_node, deopt_block->nodes_[0]); | 1833 CHECK_EQ(lazy_deopt_node, deopt_block->nodes_[0]); |
1832 CHECK_EQ(IrOpcode::kStateValues, deopt_block->nodes_[1]->op()->opcode()); | 1834 CHECK_EQ(IrOpcode::kStateValues, deopt_block->nodes_[1]->op()->opcode()); |
1833 CHECK_EQ(IrOpcode::kStateValues, deopt_block->nodes_[2]->op()->opcode()); | 1835 CHECK_EQ(IrOpcode::kStateValues, deopt_block->nodes_[2]->op()->opcode()); |
1834 CHECK_EQ(IrOpcode::kStateValues, deopt_block->nodes_[3]->op()->opcode()); | 1836 CHECK_EQ(IrOpcode::kStateValues, deopt_block->nodes_[3]->op()->opcode()); |
1835 CHECK_EQ(state_node, deopt_block->nodes_[4]); | 1837 CHECK_EQ(state_node, deopt_block->nodes_[4]); |
1836 } | 1838 } |
1837 | 1839 |
1838 #endif | 1840 #endif |
OLD | NEW |