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

Side by Side Diff: src/x64/lithium-x64.cc

Issue 7044049: Add boolean flag to HChange and LNumberUntagD to not convert undefined to NaN. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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
« src/hydrogen-instructions.h ('K') | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 return NULL; 1642 return NULL;
1643 } 1643 }
1644 1644
1645 1645
1646 LInstruction* LChunkBuilder::DoChange(HChange* instr) { 1646 LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1647 Representation from = instr->from(); 1647 Representation from = instr->from();
1648 Representation to = instr->to(); 1648 Representation to = instr->to();
1649 if (from.IsTagged()) { 1649 if (from.IsTagged()) {
1650 if (to.IsDouble()) { 1650 if (to.IsDouble()) {
1651 LOperand* value = UseRegister(instr->value()); 1651 LOperand* value = UseRegister(instr->value());
1652 LNumberUntagD* res = new LNumberUntagD(value); 1652 LNumberUntagD* res =
1653 new LNumberUntagD(value, instr->deoptimize_on_undefined());
1653 return AssignEnvironment(DefineAsRegister(res)); 1654 return AssignEnvironment(DefineAsRegister(res));
1654 } else { 1655 } else {
1655 ASSERT(to.IsInteger32()); 1656 ASSERT(to.IsInteger32());
1656 LOperand* value = UseRegister(instr->value()); 1657 LOperand* value = UseRegister(instr->value());
1657 bool needs_check = !instr->value()->type().IsSmi(); 1658 bool needs_check = !instr->value()->type().IsSmi();
1658 if (needs_check) { 1659 if (needs_check) {
1659 bool truncating = instr->CanTruncateToInt32(); 1660 bool truncating = instr->CanTruncateToInt32();
1660 LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1); 1661 LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1);
1661 LTaggedToI* res = new LTaggedToI(value, xmm_temp); 1662 LTaggedToI* res = new LTaggedToI(value, xmm_temp);
1662 return AssignEnvironment(DefineSameAsFirst(res)); 1663 return AssignEnvironment(DefineSameAsFirst(res));
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
2220 LOperand* key = UseOrConstantAtStart(instr->key()); 2221 LOperand* key = UseOrConstantAtStart(instr->key());
2221 LOperand* object = UseOrConstantAtStart(instr->object()); 2222 LOperand* object = UseOrConstantAtStart(instr->object());
2222 LIn* result = new LIn(key, object); 2223 LIn* result = new LIn(key, object);
2223 return MarkAsCall(DefineFixed(result, rax), instr); 2224 return MarkAsCall(DefineFixed(result, rax), instr);
2224 } 2225 }
2225 2226
2226 2227
2227 } } // namespace v8::internal 2228 } } // namespace v8::internal
2228 2229
2229 #endif // V8_TARGET_ARCH_X64 2230 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/hydrogen-instructions.h ('K') | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698