Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 216823005: Make sure value is a heap number when reusing the double box in BinaryOpICStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-359525.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-359525.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698