| 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/code-stubs.h" |    5 #include "src/code-stubs.h" | 
|    6 #include "src/compiler.h" |    6 #include "src/compiler.h" | 
|    7 #include "src/parsing/parser.h" |    7 #include "src/parsing/parser.h" | 
|    8 #include "src/zone.h" |    8 #include "src/zone.h" | 
|    9  |    9  | 
|   10 #include "src/compiler/common-operator.h" |   10 #include "src/compiler/common-operator.h" | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   91  |   91  | 
|   92 TEST(TestLinkageRuntimeCall) { |   92 TEST(TestLinkageRuntimeCall) { | 
|   93   // TODO(titzer): test linkage creation for outgoing runtime calls. |   93   // TODO(titzer): test linkage creation for outgoing runtime calls. | 
|   94 } |   94 } | 
|   95  |   95  | 
|   96  |   96  | 
|   97 TEST(TestLinkageStubCall) { |   97 TEST(TestLinkageStubCall) { | 
|   98   Isolate* isolate = CcTest::InitIsolateOnce(); |   98   Isolate* isolate = CcTest::InitIsolateOnce(); | 
|   99   Zone zone(isolate->allocator()); |   99   Zone zone(isolate->allocator()); | 
|  100   ToNumberStub stub(isolate); |  100   ToNumberStub stub(isolate); | 
|  101   CompilationInfo info("test", isolate, &zone, Code::ComputeFlags(Code::STUB)); |  101   CompilationInfo info(ArrayVector("test"), isolate, &zone, | 
 |  102                        Code::ComputeFlags(Code::STUB)); | 
|  102   CallInterfaceDescriptor interface_descriptor = |  103   CallInterfaceDescriptor interface_descriptor = | 
|  103       stub.GetCallInterfaceDescriptor(); |  104       stub.GetCallInterfaceDescriptor(); | 
|  104   CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( |  105   CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( | 
|  105       isolate, &zone, interface_descriptor, stub.GetStackParameterCount(), |  106       isolate, &zone, interface_descriptor, stub.GetStackParameterCount(), | 
|  106       CallDescriptor::kNoFlags, Operator::kNoProperties); |  107       CallDescriptor::kNoFlags, Operator::kNoProperties); | 
|  107   CHECK(descriptor); |  108   CHECK(descriptor); | 
|  108   CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount())); |  109   CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount())); | 
|  109   CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); |  110   CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount())); | 
|  110   CHECK_EQ(Operator::kNoProperties, descriptor->properties()); |  111   CHECK_EQ(Operator::kNoProperties, descriptor->properties()); | 
|  111   CHECK_EQ(false, descriptor->IsJSFunctionCall()); |  112   CHECK_EQ(false, descriptor->IsJSFunctionCall()); | 
|  112   // TODO(titzer): test linkage creation for outgoing stub calls. |  113   // TODO(titzer): test linkage creation for outgoing stub calls. | 
|  113 } |  114 } | 
|  114  |  115  | 
|  115 }  // namespace compiler |  116 }  // namespace compiler | 
|  116 }  // namespace internal |  117 }  // namespace internal | 
|  117 }  // namespace v8 |  118 }  // namespace v8 | 
| OLD | NEW |