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/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/graph-inl.h" | 7 #include "src/compiler/graph-inl.h" |
8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "src/compiler/node-aux-data-inl.h" | 10 #include "src/compiler/node-aux-data-inl.h" |
11 #include "src/compiler/node-properties-inl.h" | 11 #include "src/compiler/node-properties-inl.h" |
12 #include "src/unique.h" | 12 #include "src/unique.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 namespace compiler { | 16 namespace compiler { |
17 | 17 |
18 | 18 |
19 // TODO(mstarzinger): This is a temporary workaround for non-hydrogen stubs for | 19 // TODO(mstarzinger): This is a temporary workaround for non-hydrogen stubs for |
20 // which we don't have an interface descriptor yet. Use ReplaceWithICStubCall | 20 // which we don't have an interface descriptor yet. Use ReplaceWithICStubCall |
21 // once these stub have been made into a HydrogenCodeStub. | 21 // once these stub have been made into a HydrogenCodeStub. |
22 template <typename T> | 22 template <typename T> |
23 static CodeStubInterfaceDescriptor* GetInterfaceDescriptor(Isolate* isolate, | 23 static CodeStubInterfaceDescriptor* GetInterfaceDescriptor(Isolate* isolate, |
24 T* stub) { | 24 T* stub) { |
25 CodeStub::Major key = static_cast<CodeStub*>(stub)->MajorKey(); | 25 CodeStub::Major key = static_cast<CodeStub*>(stub)->MajorKey(); |
26 CodeStubInterfaceDescriptor* d = isolate->code_stub_interface_descriptor(key); | 26 CodeStubInterfaceDescriptor* d = isolate->code_stub_interface_descriptor(key); |
27 stub->InitializeInterfaceDescriptor(isolate, d); | 27 stub->InitializeInterfaceDescriptor(d); |
28 return d; | 28 return d; |
29 } | 29 } |
30 | 30 |
31 | 31 |
32 JSGenericLowering::JSGenericLowering(CompilationInfo* info, JSGraph* jsgraph, | 32 JSGenericLowering::JSGenericLowering(CompilationInfo* info, JSGraph* jsgraph, |
33 MachineOperatorBuilder* machine, | 33 MachineOperatorBuilder* machine, |
34 SourcePositionTable* source_positions) | 34 SourcePositionTable* source_positions) |
35 : LoweringBuilder(jsgraph->graph(), source_positions), | 35 : LoweringBuilder(jsgraph->graph(), source_positions), |
36 info_(info), | 36 info_(info), |
37 jsgraph_(jsgraph), | 37 jsgraph_(jsgraph), |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 425 |
426 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { | 426 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { |
427 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); | 427 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); |
428 int arity = NodeProperties::GetValueInputCount(node); | 428 int arity = NodeProperties::GetValueInputCount(node); |
429 ReplaceWithRuntimeCall(node, function, arity); | 429 ReplaceWithRuntimeCall(node, function, arity); |
430 return node; | 430 return node; |
431 } | 431 } |
432 } | 432 } |
433 } | 433 } |
434 } // namespace v8::internal::compiler | 434 } // namespace v8::internal::compiler |
OLD | NEW |