| 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/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/parser.h" | 9 #include "src/parser.h" |
| 10 #include "src/zone.h" | 10 #include "src/zone.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 73 } |
| 74 | 74 |
| 75 | 75 |
| 76 TEST(TestLinkageCodeStubIncoming) { | 76 TEST(TestLinkageCodeStubIncoming) { |
| 77 Isolate* isolate = CcTest::InitIsolateOnce(); | 77 Isolate* isolate = CcTest::InitIsolateOnce(); |
| 78 Zone zone; | 78 Zone zone; |
| 79 ToNumberStub stub(isolate); | 79 ToNumberStub stub(isolate); |
| 80 CompilationInfo info(&stub, isolate, &zone); | 80 CompilationInfo info(&stub, isolate, &zone); |
| 81 CallDescriptor* descriptor = Linkage::ComputeIncoming(&zone, &info); | 81 CallDescriptor* descriptor = Linkage::ComputeIncoming(&zone, &info); |
| 82 CHECK(descriptor); | 82 CHECK(descriptor); |
| 83 CHECK_EQ(1, static_cast<int>(descriptor->JSParameterCount())); | 83 CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount())); |
| 84 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); | 84 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); |
| 85 CHECK_EQ(Operator::kNoProperties, descriptor->properties()); | 85 CHECK_EQ(Operator::kNoProperties, descriptor->properties()); |
| 86 CHECK_EQ(false, descriptor->IsJSFunctionCall()); | 86 CHECK_EQ(false, descriptor->IsJSFunctionCall()); |
| 87 } | 87 } |
| 88 | 88 |
| 89 | 89 |
| 90 TEST(TestLinkageJSCall) { | 90 TEST(TestLinkageJSCall) { |
| 91 HandleAndZoneScope handles; | 91 HandleAndZoneScope handles; |
| 92 Handle<JSFunction> function = Compile("a + c"); | 92 Handle<JSFunction> function = Compile("a + c"); |
| 93 ParseInfo parse_info(handles.main_zone(), function); | 93 ParseInfo parse_info(handles.main_zone(), function); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 108 TEST(TestLinkageRuntimeCall) { | 108 TEST(TestLinkageRuntimeCall) { |
| 109 // TODO(titzer): test linkage creation for outgoing runtime calls. | 109 // TODO(titzer): test linkage creation for outgoing runtime calls. |
| 110 } | 110 } |
| 111 | 111 |
| 112 | 112 |
| 113 TEST(TestLinkageStubCall) { | 113 TEST(TestLinkageStubCall) { |
| 114 // TODO(titzer): test linkage creation for outgoing stub calls. | 114 // TODO(titzer): test linkage creation for outgoing stub calls. |
| 115 } | 115 } |
| 116 | 116 |
| 117 #endif // V8_TURBOFAN_TARGET | 117 #endif // V8_TURBOFAN_TARGET |
| OLD | NEW |