| 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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 Add<HConstant>(static_cast<int>(SmiValuesAre32Bits() | 925 Add<HConstant>(static_cast<int>(SmiValuesAre32Bits() |
| 926 ? 0x80000000 : 0x40000000)), Token::EQ_STRICT); | 926 ? 0x80000000 : 0x40000000)), Token::EQ_STRICT); |
| 927 if_of.Then(); | 927 if_of.Then(); |
| 928 if_of.ElseDeopt("UInt->Smi oveflow"); | 928 if_of.ElseDeopt("UInt->Smi oveflow"); |
| 929 if_of.End(); | 929 if_of.End(); |
| 930 } | 930 } |
| 931 } | 931 } |
| 932 result = EnforceNumberType(result, result_type); | 932 result = EnforceNumberType(result, result_type); |
| 933 } | 933 } |
| 934 | 934 |
| 935 // Reuse the double box if we are allowed to (i.e. chained binops). | 935 // Reuse the double box of one of the operands if we are allowed to (i.e. |
| 936 // chained binops). |
| 936 if (stub->CanReuseDoubleBox()) { | 937 if (stub->CanReuseDoubleBox()) { |
| 937 HValue* reuse = (stub->mode() == OVERWRITE_LEFT) ? left : right; | 938 HValue* operand = (stub->mode() == OVERWRITE_LEFT) ? left : right; |
| 938 IfBuilder if_heap_number(this); | 939 IfBuilder if_heap_number(this); |
| 939 if_heap_number.IfNot<HIsSmiAndBranch>(reuse); | 940 if_heap_number.IfNot<HIsSmiAndBranch>(operand); |
| 940 if_heap_number.Then(); | 941 if_heap_number.Then(); |
| 941 HValue* res_val = Add<HForceRepresentation>(result, | 942 Add<HStoreNamedField>(operand, HObjectAccess::ForHeapNumberValue(), result); |
| 942 Representation::Double()); | 943 Push(operand); |
| 943 HObjectAccess access = HObjectAccess::ForHeapNumberValue(); | |
| 944 Add<HStoreNamedField>(reuse, access, res_val); | |
| 945 Push(reuse); | |
| 946 if_heap_number.Else(); | 944 if_heap_number.Else(); |
| 947 Push(result); | 945 Push(result); |
| 948 if_heap_number.End(); | 946 if_heap_number.End(); |
| 949 result = Pop(); | 947 result = Pop(); |
| 950 } | 948 } |
| 951 | 949 |
| 952 return result; | 950 return result; |
| 953 } | 951 } |
| 954 | 952 |
| 955 | 953 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 return js_function; | 1242 return js_function; |
| 1245 } | 1243 } |
| 1246 | 1244 |
| 1247 | 1245 |
| 1248 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) { | 1246 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) { |
| 1249 return DoGenerateCode(isolate, this); | 1247 return DoGenerateCode(isolate, this); |
| 1250 } | 1248 } |
| 1251 | 1249 |
| 1252 | 1250 |
| 1253 } } // namespace v8::internal | 1251 } } // namespace v8::internal |
| OLD | NEW |