| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 316 |
| 317 Handle<Code> ToNumberStub::GenerateCode(Isolate* isolate) { | 317 Handle<Code> ToNumberStub::GenerateCode(Isolate* isolate) { |
| 318 return DoGenerateCode(isolate, this); | 318 return DoGenerateCode(isolate, this); |
| 319 } | 319 } |
| 320 | 320 |
| 321 | 321 |
| 322 template <> | 322 template <> |
| 323 HValue* CodeStubGraphBuilder<NumberToStringStub>::BuildCodeStub() { | 323 HValue* CodeStubGraphBuilder<NumberToStringStub>::BuildCodeStub() { |
| 324 info()->MarkAsSavesCallerDoubles(); | 324 info()->MarkAsSavesCallerDoubles(); |
| 325 HValue* number = GetParameter(NumberToStringStub::kNumber); | 325 HValue* number = GetParameter(NumberToStringStub::kNumber); |
| 326 return BuildNumberToString(number, Type::Number(isolate())); | 326 return BuildNumberToString(number, handle(Type::Number(), isolate())); |
| 327 } | 327 } |
| 328 | 328 |
| 329 | 329 |
| 330 Handle<Code> NumberToStringStub::GenerateCode(Isolate* isolate) { | 330 Handle<Code> NumberToStringStub::GenerateCode(Isolate* isolate) { |
| 331 return DoGenerateCode(isolate, this); | 331 return DoGenerateCode(isolate, this); |
| 332 } | 332 } |
| 333 | 333 |
| 334 | 334 |
| 335 template <> | 335 template <> |
| 336 HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { | 336 HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 !left_type->Is(Type::String()) && !right_type->Is(Type::String())) { | 889 !left_type->Is(Type::String()) && !right_type->Is(Type::String())) { |
| 890 // For the generic add stub a fast case for string addition is performance | 890 // For the generic add stub a fast case for string addition is performance |
| 891 // critical. | 891 // critical. |
| 892 if (left_type->Maybe(Type::String())) { | 892 if (left_type->Maybe(Type::String())) { |
| 893 IfBuilder if_leftisstring(this); | 893 IfBuilder if_leftisstring(this); |
| 894 if_leftisstring.If<HIsStringAndBranch>(left); | 894 if_leftisstring.If<HIsStringAndBranch>(left); |
| 895 if_leftisstring.Then(); | 895 if_leftisstring.Then(); |
| 896 { | 896 { |
| 897 Push(BuildBinaryOperation( | 897 Push(BuildBinaryOperation( |
| 898 state.op(), left, right, | 898 state.op(), left, right, |
| 899 Type::String(isolate()), right_type, | 899 handle(Type::String(), isolate()), right_type, |
| 900 result_type, state.fixed_right_arg(), | 900 result_type, state.fixed_right_arg(), |
| 901 allocation_mode)); | 901 allocation_mode)); |
| 902 } | 902 } |
| 903 if_leftisstring.Else(); | 903 if_leftisstring.Else(); |
| 904 { | 904 { |
| 905 Push(BuildBinaryOperation( | 905 Push(BuildBinaryOperation( |
| 906 state.op(), left, right, | 906 state.op(), left, right, |
| 907 left_type, right_type, result_type, | 907 left_type, right_type, result_type, |
| 908 state.fixed_right_arg(), allocation_mode)); | 908 state.fixed_right_arg(), allocation_mode)); |
| 909 } | 909 } |
| 910 if_leftisstring.End(); | 910 if_leftisstring.End(); |
| 911 result = Pop(); | 911 result = Pop(); |
| 912 } else { | 912 } else { |
| 913 IfBuilder if_rightisstring(this); | 913 IfBuilder if_rightisstring(this); |
| 914 if_rightisstring.If<HIsStringAndBranch>(right); | 914 if_rightisstring.If<HIsStringAndBranch>(right); |
| 915 if_rightisstring.Then(); | 915 if_rightisstring.Then(); |
| 916 { | 916 { |
| 917 Push(BuildBinaryOperation( | 917 Push(BuildBinaryOperation( |
| 918 state.op(), left, right, | 918 state.op(), left, right, |
| 919 left_type, Type::String(isolate()), | 919 left_type, handle(Type::String(), isolate()), |
| 920 result_type, state.fixed_right_arg(), | 920 result_type, state.fixed_right_arg(), |
| 921 allocation_mode)); | 921 allocation_mode)); |
| 922 } | 922 } |
| 923 if_rightisstring.Else(); | 923 if_rightisstring.Else(); |
| 924 { | 924 { |
| 925 Push(BuildBinaryOperation( | 925 Push(BuildBinaryOperation( |
| 926 state.op(), left, right, | 926 state.op(), left, right, |
| 927 left_type, right_type, result_type, | 927 left_type, right_type, result_type, |
| 928 state.fixed_right_arg(), allocation_mode)); | 928 state.fixed_right_arg(), allocation_mode)); |
| 929 } | 929 } |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 return BuildUncheckedDictionaryElementLoad(receiver, key); | 1346 return BuildUncheckedDictionaryElementLoad(receiver, key); |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 | 1349 |
| 1350 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { | 1350 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { |
| 1351 return DoGenerateCode(isolate, this); | 1351 return DoGenerateCode(isolate, this); |
| 1352 } | 1352 } |
| 1353 | 1353 |
| 1354 | 1354 |
| 1355 } } // namespace v8::internal | 1355 } } // namespace v8::internal |
| OLD | NEW |