| 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 } | 956 } |
| 957 } | 957 } |
| 958 result = EnforceNumberType(result, result_type); | 958 result = EnforceNumberType(result, result_type); |
| 959 } | 959 } |
| 960 | 960 |
| 961 // Reuse the double box of one of the operands if we are allowed to (i.e. | 961 // Reuse the double box of one of the operands if we are allowed to (i.e. |
| 962 // chained binops). | 962 // chained binops). |
| 963 if (state.CanReuseDoubleBox()) { | 963 if (state.CanReuseDoubleBox()) { |
| 964 HValue* operand = (state.mode() == OVERWRITE_LEFT) ? left : right; | 964 HValue* operand = (state.mode() == OVERWRITE_LEFT) ? left : right; |
| 965 IfBuilder if_heap_number(this); | 965 IfBuilder if_heap_number(this); |
| 966 if_heap_number.IfNot<HIsSmiAndBranch>(operand); | 966 if_heap_number.If<HHasInstanceTypeAndBranch>(operand, HEAP_NUMBER_TYPE); |
| 967 if_heap_number.Then(); | 967 if_heap_number.Then(); |
| 968 Add<HStoreNamedField>(operand, HObjectAccess::ForHeapNumberValue(), result); | 968 Add<HStoreNamedField>(operand, HObjectAccess::ForHeapNumberValue(), result); |
| 969 Push(operand); | 969 Push(operand); |
| 970 if_heap_number.Else(); | 970 if_heap_number.Else(); |
| 971 Push(result); | 971 Push(result); |
| 972 if_heap_number.End(); | 972 if_heap_number.End(); |
| 973 result = Pop(); | 973 result = Pop(); |
| 974 } | 974 } |
| 975 | 975 |
| 976 return result; | 976 return result; |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 return BuildRegExpConstructResult(length, index, input); | 1430 return BuildRegExpConstructResult(length, index, input); |
| 1431 } | 1431 } |
| 1432 | 1432 |
| 1433 | 1433 |
| 1434 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) { | 1434 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) { |
| 1435 return DoGenerateCode(isolate, this); | 1435 return DoGenerateCode(isolate, this); |
| 1436 } | 1436 } |
| 1437 | 1437 |
| 1438 | 1438 |
| 1439 } } // namespace v8::internal | 1439 } } // namespace v8::internal |
| OLD | NEW |