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 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1630 } | 1630 } |
1631 if_inputisprimitive.Else(); | 1631 if_inputisprimitive.Else(); |
1632 { | 1632 { |
1633 // Convert the input to a primitive. | 1633 // Convert the input to a primitive. |
1634 Push(BuildToPrimitive(input, input_map)); | 1634 Push(BuildToPrimitive(input, input_map)); |
1635 } | 1635 } |
1636 if_inputisprimitive.End(); | 1636 if_inputisprimitive.End(); |
1637 // Convert the primitive to a string value. | 1637 // Convert the primitive to a string value. |
1638 ToStringStub stub(isolate()); | 1638 ToStringStub stub(isolate()); |
1639 HValue* values[] = {context(), Pop()}; | 1639 HValue* values[] = {context(), Pop()}; |
1640 Push(AddUncasted<HCallWithDescriptor>( | 1640 Push(AddUncasted<HCallWithDescriptor>(Add<HConstant>(stub.GetCode()), 0, |
1641 Add<HConstant>(stub.GetCode()), 0, stub.GetCallInterfaceDescriptor(), | 1641 stub.GetCallInterfaceDescriptor(), |
1642 Vector<HValue*>(values, arraysize(values)))); | 1642 ArrayVector(values))); |
1643 } | 1643 } |
1644 if_inputisstring.End(); | 1644 if_inputisstring.End(); |
1645 } | 1645 } |
1646 if_inputissmi.End(); | 1646 if_inputissmi.End(); |
1647 return Pop(); | 1647 return Pop(); |
1648 } | 1648 } |
1649 | 1649 |
1650 | 1650 |
1651 HValue* CodeStubGraphBuilderBase::BuildToPrimitive(HValue* input, | 1651 HValue* CodeStubGraphBuilderBase::BuildToPrimitive(HValue* input, |
1652 HValue* input_map) { | 1652 HValue* input_map) { |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2292 return Pop(); | 2292 return Pop(); |
2293 } | 2293 } |
2294 | 2294 |
2295 | 2295 |
2296 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2296 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2297 return DoGenerateCode(this); | 2297 return DoGenerateCode(this); |
2298 } | 2298 } |
2299 | 2299 |
2300 } // namespace internal | 2300 } // namespace internal |
2301 } // namespace v8 | 2301 } // namespace v8 |
OLD | NEW |