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

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

Issue 14904008: Robustification: Always assign an environment to LModI when a deopt is possible. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 7 years, 7 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 | « src/arm/lithium-arm.cc ('k') | src/mips/lithium-mips.cc » ('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 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 // The temporary operand is necessary to ensure that right is 1531 // The temporary operand is necessary to ensure that right is
1532 // not allocated into edx. 1532 // not allocated into edx.
1533 LOperand* temp = FixedTemp(edx); 1533 LOperand* temp = FixedTemp(edx);
1534 LOperand* value = UseFixed(instr->left(), eax); 1534 LOperand* value = UseFixed(instr->left(), eax);
1535 LOperand* divisor = UseRegister(instr->right()); 1535 LOperand* divisor = UseRegister(instr->right());
1536 LModI* mod = new(zone()) LModI(value, divisor, temp); 1536 LModI* mod = new(zone()) LModI(value, divisor, temp);
1537 result = DefineFixed(mod, edx); 1537 result = DefineFixed(mod, edx);
1538 } 1538 }
1539 1539
1540 return (instr->CheckFlag(HValue::kBailoutOnMinusZero) || 1540 return (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
1541 instr->CheckFlag(HValue::kCanBeDivByZero)) 1541 instr->CheckFlag(HValue::kCanBeDivByZero) ||
1542 instr->CheckFlag(HValue::kCanOverflow))
1542 ? AssignEnvironment(result) 1543 ? AssignEnvironment(result)
1543 : result; 1544 : result;
1544 } else if (instr->representation().IsTagged()) { 1545 } else if (instr->representation().IsTagged()) {
1545 return DoArithmeticT(Token::MOD, instr); 1546 return DoArithmeticT(Token::MOD, instr);
1546 } else { 1547 } else {
1547 ASSERT(instr->representation().IsDouble()); 1548 ASSERT(instr->representation().IsDouble());
1548 // We call a C function for double modulo. It can't trigger a GC. 1549 // We call a C function for double modulo. It can't trigger a GC.
1549 // We need to use fixed result register for the call. 1550 // We need to use fixed result register for the call.
1550 // TODO(fschneider): Allow any register as input registers. 1551 // TODO(fschneider): Allow any register as input registers.
1551 LOperand* left = UseFixedDouble(instr->left(), xmm2); 1552 LOperand* left = UseFixedDouble(instr->left(), xmm2);
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2767 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2767 LOperand* object = UseRegister(instr->object()); 2768 LOperand* object = UseRegister(instr->object());
2768 LOperand* index = UseTempRegister(instr->index()); 2769 LOperand* index = UseTempRegister(instr->index());
2769 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2770 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2770 } 2771 }
2771 2772
2772 2773
2773 } } // namespace v8::internal 2774 } } // namespace v8::internal
2774 2775
2775 #endif // V8_TARGET_ARCH_IA32 2776 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698