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

Side by Side Diff: src/ia32/lithium-ia32.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: Add regression test, change test status. 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
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 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 return NULL; 1669 return NULL;
1670 } 1670 }
1671 1671
1672 1672
1673 LInstruction* LChunkBuilder::DoChange(HChange* instr) { 1673 LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1674 Representation from = instr->from(); 1674 Representation from = instr->from();
1675 Representation to = instr->to(); 1675 Representation to = instr->to();
1676 if (from.IsTagged()) { 1676 if (from.IsTagged()) {
1677 if (to.IsDouble()) { 1677 if (to.IsDouble()) {
1678 LOperand* value = UseRegister(instr->value()); 1678 LOperand* value = UseRegister(instr->value());
1679 LNumberUntagD* res = new LNumberUntagD(value); 1679 LNumberUntagD* res =
1680 new LNumberUntagD(value, instr->deoptimize_on_undefined());
1680 return AssignEnvironment(DefineAsRegister(res)); 1681 return AssignEnvironment(DefineAsRegister(res));
1681 } else { 1682 } else {
1682 ASSERT(to.IsInteger32()); 1683 ASSERT(to.IsInteger32());
1683 LOperand* value = UseRegister(instr->value()); 1684 LOperand* value = UseRegister(instr->value());
1684 bool needs_check = !instr->value()->type().IsSmi(); 1685 bool needs_check = !instr->value()->type().IsSmi();
1685 if (needs_check) { 1686 if (needs_check) {
1686 bool truncating = instr->CanTruncateToInt32(); 1687 bool truncating = instr->CanTruncateToInt32();
1687 LOperand* xmm_temp = 1688 LOperand* xmm_temp =
1688 (truncating && CpuFeatures::IsSupported(SSE3)) 1689 (truncating && CpuFeatures::IsSupported(SSE3))
1689 ? NULL 1690 ? NULL
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
2280 LOperand* key = UseOrConstantAtStart(instr->key()); 2281 LOperand* key = UseOrConstantAtStart(instr->key());
2281 LOperand* object = UseOrConstantAtStart(instr->object()); 2282 LOperand* object = UseOrConstantAtStart(instr->object());
2282 LIn* result = new LIn(key, object); 2283 LIn* result = new LIn(key, object);
2283 return MarkAsCall(DefineFixed(result, eax), instr); 2284 return MarkAsCall(DefineFixed(result, eax), instr);
2284 } 2285 }
2285 2286
2286 2287
2287 } } // namespace v8::internal 2288 } } // namespace v8::internal
2288 2289
2289 #endif // V8_TARGET_ARCH_IA32 2290 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698