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 "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/crankshaft/hydrogen.h" | 8 #include "src/crankshaft/hydrogen.h" |
9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
10 #include "src/field-index.h" | 10 #include "src/field-index.h" |
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 } | 1674 } |
1675 | 1675 |
1676 return BuildStringAdd(left, right, HAllocationMode(pretenure_flag)); | 1676 return BuildStringAdd(left, right, HAllocationMode(pretenure_flag)); |
1677 } | 1677 } |
1678 | 1678 |
1679 | 1679 |
1680 Handle<Code> StringAddStub::GenerateCode() { | 1680 Handle<Code> StringAddStub::GenerateCode() { |
1681 return DoGenerateCode(this); | 1681 return DoGenerateCode(this); |
1682 } | 1682 } |
1683 | 1683 |
1684 | |
1685 template <> | 1684 template <> |
1686 HValue* CodeStubGraphBuilder<ToBooleanStub>::BuildCodeInitializedStub() { | 1685 HValue* CodeStubGraphBuilder<ToBooleanICStub>::BuildCodeInitializedStub() { |
1687 ToBooleanStub* stub = casted_stub(); | 1686 ToBooleanICStub* stub = casted_stub(); |
1688 IfBuilder if_true(this); | 1687 IfBuilder if_true(this); |
1689 if_true.If<HBranch>(GetParameter(0), stub->types()); | 1688 if_true.If<HBranch>(GetParameter(0), stub->types()); |
1690 if_true.Then(); | 1689 if_true.Then(); |
1691 if_true.Return(graph()->GetConstantTrue()); | 1690 if_true.Return(graph()->GetConstantTrue()); |
1692 if_true.Else(); | 1691 if_true.Else(); |
1693 if_true.End(); | 1692 if_true.End(); |
1694 return graph()->GetConstantFalse(); | 1693 return graph()->GetConstantFalse(); |
1695 } | 1694 } |
1696 | 1695 |
1697 | 1696 Handle<Code> ToBooleanICStub::GenerateCode() { return DoGenerateCode(this); } |
1698 Handle<Code> ToBooleanStub::GenerateCode() { | |
1699 return DoGenerateCode(this); | |
1700 } | |
1701 | |
1702 | 1697 |
1703 template <> | 1698 template <> |
1704 HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() { | 1699 HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() { |
1705 StoreGlobalStub* stub = casted_stub(); | 1700 StoreGlobalStub* stub = casted_stub(); |
1706 HParameter* value = GetParameter(StoreDescriptor::kValueIndex); | 1701 HParameter* value = GetParameter(StoreDescriptor::kValueIndex); |
1707 if (stub->check_global()) { | 1702 if (stub->check_global()) { |
1708 // Check that the map of the global has not changed: use a placeholder map | 1703 // Check that the map of the global has not changed: use a placeholder map |
1709 // that will be replaced later with the global object's map. | 1704 // that will be replaced later with the global object's map. |
1710 HParameter* proxy = GetParameter(StoreDescriptor::kReceiverIndex); | 1705 HParameter* proxy = GetParameter(StoreDescriptor::kReceiverIndex); |
1711 HValue* proxy_map = | 1706 HValue* proxy_map = |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2399 return Pop(); | 2394 return Pop(); |
2400 } | 2395 } |
2401 | 2396 |
2402 | 2397 |
2403 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2398 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2404 return DoGenerateCode(this); | 2399 return DoGenerateCode(this); |
2405 } | 2400 } |
2406 | 2401 |
2407 } // namespace internal | 2402 } // namespace internal |
2408 } // namespace v8 | 2403 } // namespace v8 |
OLD | NEW |