OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1752 OFStream os(stdout); | 1752 OFStream os(stdout); |
1753 os << "["; | 1753 os << "["; |
1754 PrintBaseName(os); | 1754 PrintBaseName(os); |
1755 os << ": " << from << "=>" << to << "]" << std::endl; | 1755 os << ": " << from << "=>" << to << "]" << std::endl; |
1756 } | 1756 } |
1757 | 1757 |
1758 void CallICStub::PrintState(std::ostream& os) const { // NOLINT | 1758 void CallICStub::PrintState(std::ostream& os) const { // NOLINT |
1759 os << state(); | 1759 os << state(); |
1760 } | 1760 } |
1761 | 1761 |
| 1762 void CallICTrampolineStub::GenerateAssembly( |
| 1763 compiler::CodeAssemblerState* state) const { |
| 1764 typedef compiler::Node Node; |
| 1765 CodeStubAssembler assembler(state); |
| 1766 |
| 1767 Node* context = assembler.Parameter(Descriptor::kContext); |
| 1768 Node* target = assembler.Parameter(Descriptor::kFunction); |
| 1769 Node* argc = assembler.Parameter(Descriptor::kActualArgumentsCount); |
| 1770 Node* slot = assembler.Parameter(Descriptor::kSlot); |
| 1771 Node* vector = assembler.LoadTypeFeedbackVectorForStub(); |
| 1772 |
| 1773 Callable callable = |
| 1774 CodeFactory::CallIC(isolate(), convert_mode(), tail_call_mode()); |
| 1775 assembler.TailCallStub(callable, context, target, argc, slot, vector); |
| 1776 } |
1762 | 1777 |
1763 void JSEntryStub::FinishCode(Handle<Code> code) { | 1778 void JSEntryStub::FinishCode(Handle<Code> code) { |
1764 Handle<FixedArray> handler_table = | 1779 Handle<FixedArray> handler_table = |
1765 code->GetIsolate()->factory()->NewFixedArray(1, TENURED); | 1780 code->GetIsolate()->factory()->NewFixedArray(1, TENURED); |
1766 handler_table->set(0, Smi::FromInt(handler_offset_)); | 1781 handler_table->set(0, Smi::FromInt(handler_offset_)); |
1767 code->set_handler_table(*handler_table); | 1782 code->set_handler_table(*handler_table); |
1768 } | 1783 } |
1769 | 1784 |
1770 void TransitionElementsKindStub::InitializeDescriptor( | 1785 void TransitionElementsKindStub::InitializeDescriptor( |
1771 CodeStubDescriptor* descriptor) { | 1786 CodeStubDescriptor* descriptor) { |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2177 } | 2192 } |
2178 | 2193 |
2179 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) | 2194 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) |
2180 : PlatformCodeStub(isolate) {} | 2195 : PlatformCodeStub(isolate) {} |
2181 | 2196 |
2182 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) | 2197 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) |
2183 : PlatformCodeStub(isolate) {} | 2198 : PlatformCodeStub(isolate) {} |
2184 | 2199 |
2185 } // namespace internal | 2200 } // namespace internal |
2186 } // namespace v8 | 2201 } // namespace v8 |
OLD | NEW |