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/zone.h" | 9 #include "src/zone.h" |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 CHECK_EQ(1 + i, static_cast<int>(descriptor->JSParameterCount())); | 67 CHECK_EQ(1 + i, static_cast<int>(descriptor->JSParameterCount())); |
68 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); | 68 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); |
69 CHECK_EQ(Operator::kNoProperties, descriptor->properties()); | 69 CHECK_EQ(Operator::kNoProperties, descriptor->properties()); |
70 CHECK_EQ(true, descriptor->IsJSFunctionCall()); | 70 CHECK_EQ(true, descriptor->IsJSFunctionCall()); |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 | 74 |
75 TEST(TestLinkageCodeStubIncoming) { | 75 TEST(TestLinkageCodeStubIncoming) { |
76 Isolate* isolate = CcTest::InitIsolateOnce(); | 76 Isolate* isolate = CcTest::InitIsolateOnce(); |
| 77 Zone zone; |
77 ToNumberStub stub(isolate); | 78 ToNumberStub stub(isolate); |
78 CompilationInfoWithZone info(&stub, isolate); | 79 CompilationInfo info(&stub, isolate, &zone); |
79 CallDescriptor* descriptor = Linkage::ComputeIncoming(info.zone(), &info); | 80 CallDescriptor* descriptor = Linkage::ComputeIncoming(&zone, &info); |
80 CHECK(descriptor); | 81 CHECK(descriptor); |
81 CHECK_EQ(1, static_cast<int>(descriptor->JSParameterCount())); | 82 CHECK_EQ(1, static_cast<int>(descriptor->JSParameterCount())); |
82 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); | 83 CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); |
83 CHECK_EQ(Operator::kNoProperties, descriptor->properties()); | 84 CHECK_EQ(Operator::kNoProperties, descriptor->properties()); |
84 CHECK_EQ(false, descriptor->IsJSFunctionCall()); | 85 CHECK_EQ(false, descriptor->IsJSFunctionCall()); |
85 } | 86 } |
86 | 87 |
87 | 88 |
88 TEST(TestLinkageJSCall) { | 89 TEST(TestLinkageJSCall) { |
89 HandleAndZoneScope handles; | 90 HandleAndZoneScope handles; |
(...skipping 16 matching lines...) Expand all Loading... |
106 // TODO(titzer): test linkage creation for outgoing runtime calls. | 107 // TODO(titzer): test linkage creation for outgoing runtime calls. |
107 } | 108 } |
108 | 109 |
109 | 110 |
110 TEST(TestLinkageStubCall) { | 111 TEST(TestLinkageStubCall) { |
111 // TODO(titzer): test linkage creation for outgoing stub calls. | 112 // TODO(titzer): test linkage creation for outgoing stub calls. |
112 } | 113 } |
113 | 114 |
114 | 115 |
115 #endif // V8_TURBOFAN_TARGET | 116 #endif // V8_TURBOFAN_TARGET |
OLD | NEW |