| 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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   714     HConstant* constant = HConstant::cast(right_value); |   714     HConstant* constant = HConstant::cast(right_value); | 
|   715     right = chunk_->DefineConstantOperand(constant); |   715     right = chunk_->DefineConstantOperand(constant); | 
|   716     constant_value = constant->Integer32Value() & 0x1f; |   716     constant_value = constant->Integer32Value() & 0x1f; | 
|   717   } else { |   717   } else { | 
|   718     right = UseFixed(right_value, rcx); |   718     right = UseFixed(right_value, rcx); | 
|   719   } |   719   } | 
|   720  |   720  | 
|   721   // Shift operations can only deoptimize if we do a logical shift by 0 and |   721   // Shift operations can only deoptimize if we do a logical shift by 0 and | 
|   722   // the result cannot be truncated to int32. |   722   // the result cannot be truncated to int32. | 
|   723   bool does_deopt = false; |   723   bool does_deopt = false; | 
|   724   if (FLAG_opt_safe_uint32_operations) { |   724   if (op == Token::SHR && constant_value == 0) { | 
|   725     does_deopt = !instr->CheckFlag(HInstruction::kUint32); |   725     if (FLAG_opt_safe_uint32_operations) { | 
|   726   } else { |   726       does_deopt = !instr->CheckFlag(HInstruction::kUint32); | 
|   727     bool may_deopt = (op == Token::SHR && constant_value == 0); |   727     } else { | 
|   728     if (may_deopt) { |  | 
|   729       for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) { |   728       for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) { | 
|   730         if (!it.value()->CheckFlag(HValue::kTruncatingToInt32)) { |   729         if (!it.value()->CheckFlag(HValue::kTruncatingToInt32)) { | 
|   731           does_deopt = true; |   730           does_deopt = true; | 
|   732           break; |   731           break; | 
|   733         } |   732         } | 
|   734       } |   733       } | 
|   735     } |   734     } | 
|   736   } |   735   } | 
|   737  |   736  | 
|   738   LInstruction* result = |   737   LInstruction* result = | 
| (...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2315 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |  2314 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 
|  2316   LOperand* object = UseRegister(instr->object()); |  2315   LOperand* object = UseRegister(instr->object()); | 
|  2317   LOperand* index = UseTempRegister(instr->index()); |  2316   LOperand* index = UseTempRegister(instr->index()); | 
|  2318   return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |  2317   return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 
|  2319 } |  2318 } | 
|  2320  |  2319  | 
|  2321  |  2320  | 
|  2322 } }  // namespace v8::internal |  2321 } }  // namespace v8::internal | 
|  2323  |  2322  | 
|  2324 #endif  // V8_TARGET_ARCH_X64 |  2323 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW |