| 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 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 (instr->left()->RangeCanInclude(kMinInt) && | 1387 (instr->left()->RangeCanInclude(kMinInt) && |
| 1388 instr->right()->RangeCanInclude(-1) && | 1388 instr->right()->RangeCanInclude(-1) && |
| 1389 instr->CheckFlag(HValue::kBailoutOnMinusZero)) || | 1389 instr->CheckFlag(HValue::kBailoutOnMinusZero)) || |
| 1390 (instr->left()->CanBeNegative() && | 1390 (instr->left()->CanBeNegative() && |
| 1391 instr->CanBeZero() && | 1391 instr->CanBeZero() && |
| 1392 instr->CheckFlag(HValue::kBailoutOnMinusZero))); | 1392 instr->CheckFlag(HValue::kBailoutOnMinusZero))); |
| 1393 return can_deopt ? AssignEnvironment(result) : result; | 1393 return can_deopt ? AssignEnvironment(result) : result; |
| 1394 } else { | 1394 } else { |
| 1395 LOperand* dividend = UseRegister(instr->left()); | 1395 LOperand* dividend = UseRegister(instr->left()); |
| 1396 LOperand* divisor = UseRegister(instr->right()); | 1396 LOperand* divisor = UseRegister(instr->right()); |
| 1397 LOperand* temp = FixedTemp(d10); | 1397 LOperand* temp = FixedTemp(d3); |
| 1398 LOperand* temp2 = FixedTemp(d11); | 1398 LOperand* temp2 = FixedTemp(d4); |
| 1399 LInstruction* result = | 1399 LInstruction* result = |
| 1400 DefineAsRegister(new(zone()) LModI(dividend, divisor, temp, temp2)); | 1400 DefineAsRegister(new(zone()) LModI(dividend, divisor, temp, temp2)); |
| 1401 bool can_deopt = (instr->right()->CanBeZero() || | 1401 bool can_deopt = (instr->right()->CanBeZero() || |
| 1402 (instr->left()->CanBeNegative() && | 1402 (instr->left()->CanBeNegative() && |
| 1403 instr->CanBeZero() && | 1403 instr->CanBeZero() && |
| 1404 instr->CheckFlag(HValue::kBailoutOnMinusZero))); | 1404 instr->CheckFlag(HValue::kBailoutOnMinusZero))); |
| 1405 return can_deopt ? AssignEnvironment(result) : result; | 1405 return can_deopt ? AssignEnvironment(result) : result; |
| 1406 } | 1406 } |
| 1407 } | 1407 } |
| 1408 | 1408 |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 ASSERT(to.IsInteger32()); | 1862 ASSERT(to.IsInteger32()); |
| 1863 LOperand* value = NULL; | 1863 LOperand* value = NULL; |
| 1864 LInstruction* res = NULL; | 1864 LInstruction* res = NULL; |
| 1865 HValue* val = instr->value(); | 1865 HValue* val = instr->value(); |
| 1866 if (val->type().IsSmi() || val->representation().IsSmi()) { | 1866 if (val->type().IsSmi() || val->representation().IsSmi()) { |
| 1867 value = UseRegisterAtStart(val); | 1867 value = UseRegisterAtStart(val); |
| 1868 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); | 1868 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); |
| 1869 } else { | 1869 } else { |
| 1870 value = UseRegister(val); | 1870 value = UseRegister(val); |
| 1871 LOperand* temp1 = TempRegister(); | 1871 LOperand* temp1 = TempRegister(); |
| 1872 LOperand* temp2 = FixedTemp(d11); | 1872 LOperand* temp2 = FixedTemp(d3); |
| 1873 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, | 1873 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, |
| 1874 temp1, | 1874 temp1, |
| 1875 temp2)); | 1875 temp2)); |
| 1876 res = AssignEnvironment(res); | 1876 res = AssignEnvironment(res); |
| 1877 } | 1877 } |
| 1878 return res; | 1878 return res; |
| 1879 } | 1879 } |
| 1880 } else if (from.IsDouble()) { | 1880 } else if (from.IsDouble()) { |
| 1881 if (to.IsTagged()) { | 1881 if (to.IsTagged()) { |
| 1882 info()->MarkAsDeferredCalling(); | 1882 info()->MarkAsDeferredCalling(); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1989 Representation input_rep = value->representation(); | 1989 Representation input_rep = value->representation(); |
| 1990 LOperand* reg = UseRegister(value); | 1990 LOperand* reg = UseRegister(value); |
| 1991 if (input_rep.IsDouble()) { | 1991 if (input_rep.IsDouble()) { |
| 1992 return DefineAsRegister(new(zone()) LClampDToUint8(reg)); | 1992 return DefineAsRegister(new(zone()) LClampDToUint8(reg)); |
| 1993 } else if (input_rep.IsInteger32()) { | 1993 } else if (input_rep.IsInteger32()) { |
| 1994 return DefineAsRegister(new(zone()) LClampIToUint8(reg)); | 1994 return DefineAsRegister(new(zone()) LClampIToUint8(reg)); |
| 1995 } else { | 1995 } else { |
| 1996 ASSERT(input_rep.IsSmiOrTagged()); | 1996 ASSERT(input_rep.IsSmiOrTagged()); |
| 1997 // Register allocator doesn't (yet) support allocation of double | 1997 // Register allocator doesn't (yet) support allocation of double |
| 1998 // temps. Reserve d1 explicitly. | 1998 // temps. Reserve d1 explicitly. |
| 1999 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, FixedTemp(d11)); | 1999 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, FixedTemp(d3)); |
| 2000 return AssignEnvironment(DefineAsRegister(result)); | 2000 return AssignEnvironment(DefineAsRegister(result)); |
| 2001 } | 2001 } |
| 2002 } | 2002 } |
| 2003 | 2003 |
| 2004 | 2004 |
| 2005 LInstruction* LChunkBuilder::DoDoubleBits(HDoubleBits* instr) { | 2005 LInstruction* LChunkBuilder::DoDoubleBits(HDoubleBits* instr) { |
| 2006 HValue* value = instr->value(); | 2006 HValue* value = instr->value(); |
| 2007 ASSERT(value->representation().IsDouble()); | 2007 ASSERT(value->representation().IsDouble()); |
| 2008 return DefineAsRegister(new(zone()) LDoubleBits(UseRegister(value))); | 2008 return DefineAsRegister(new(zone()) LDoubleBits(UseRegister(value))); |
| 2009 } | 2009 } |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2554 } | 2554 } |
| 2555 | 2555 |
| 2556 | 2556 |
| 2557 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2557 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2558 LOperand* object = UseRegister(instr->object()); | 2558 LOperand* object = UseRegister(instr->object()); |
| 2559 LOperand* index = UseRegister(instr->index()); | 2559 LOperand* index = UseRegister(instr->index()); |
| 2560 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2560 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2561 } | 2561 } |
| 2562 | 2562 |
| 2563 } } // namespace v8::internal | 2563 } } // namespace v8::internal |
| OLD | NEW |