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 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1688 PrintSchedule(schedule); | 1688 PrintSchedule(schedule); |
1689 | 1689 |
1690 CHECK_EQ(19, GetScheduledNodeCount(schedule)); | 1690 CHECK_EQ(19, GetScheduledNodeCount(schedule)); |
1691 | 1691 |
1692 // Make sure the integer-only add gets hoisted to a different block that the | 1692 // Make sure the integer-only add gets hoisted to a different block that the |
1693 // JSAdd. | 1693 // JSAdd. |
1694 CHECK(schedule->block(n19) != schedule->block(n20)); | 1694 CHECK(schedule->block(n19) != schedule->block(n20)); |
1695 } | 1695 } |
1696 | 1696 |
1697 | 1697 |
| 1698 #if V8_TURBOFAN_TARGET |
| 1699 |
1698 // So we can get a real JS function. | 1700 // So we can get a real JS function. |
1699 static Handle<JSFunction> Compile(const char* source) { | 1701 static Handle<JSFunction> Compile(const char* source) { |
1700 Isolate* isolate = CcTest::i_isolate(); | 1702 Isolate* isolate = CcTest::i_isolate(); |
1701 Handle<String> source_code = isolate->factory() | 1703 Handle<String> source_code = isolate->factory() |
1702 ->NewStringFromUtf8(CStrVector(source)) | 1704 ->NewStringFromUtf8(CStrVector(source)) |
1703 .ToHandleChecked(); | 1705 .ToHandleChecked(); |
1704 Handle<SharedFunctionInfo> shared_function = Compiler::CompileScript( | 1706 Handle<SharedFunctionInfo> shared_function = Compiler::CompileScript( |
1705 source_code, Handle<String>(), 0, 0, false, | 1707 source_code, Handle<String>(), 0, 0, false, |
1706 Handle<Context>(isolate->native_context()), NULL, NULL, | 1708 Handle<Context>(isolate->native_context()), NULL, NULL, |
1707 v8::ScriptCompiler::kNoCompileOptions, NOT_NATIVES_CODE); | 1709 v8::ScriptCompiler::kNoCompileOptions, NOT_NATIVES_CODE); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1819 // The lazy deopt block is deferred. | 1821 // The lazy deopt block is deferred. |
1820 CHECK(deopt_block->deferred_); | 1822 CHECK(deopt_block->deferred_); |
1821 CHECK(!call_block->deferred_); | 1823 CHECK(!call_block->deferred_); |
1822 CHECK(!cont_block->deferred_); | 1824 CHECK(!cont_block->deferred_); |
1823 // The lazy deopt block contains framestate + bailout (and nothing else). | 1825 // The lazy deopt block contains framestate + bailout (and nothing else). |
1824 CHECK_EQ(deoptimization_node, deopt_block->control_input_); | 1826 CHECK_EQ(deoptimization_node, deopt_block->control_input_); |
1825 CHECK_EQ(2, static_cast<int>(deopt_block->nodes_.size())); | 1827 CHECK_EQ(2, static_cast<int>(deopt_block->nodes_.size())); |
1826 CHECK_EQ(lazy_deopt_node, deopt_block->nodes_[0]); | 1828 CHECK_EQ(lazy_deopt_node, deopt_block->nodes_[0]); |
1827 CHECK_EQ(state_node, deopt_block->nodes_[1]); | 1829 CHECK_EQ(state_node, deopt_block->nodes_[1]); |
1828 } | 1830 } |
| 1831 |
| 1832 #endif |
OLD | NEW |