| OLD | NEW |
| 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 | 738 |
| 739 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, | 739 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, |
| 740 HInstruction* hinstr, | 740 HInstruction* hinstr, |
| 741 CanDeoptimize can_deoptimize) { | 741 CanDeoptimize can_deoptimize) { |
| 742 #ifdef DEBUG | 742 #ifdef DEBUG |
| 743 instr->VerifyCall(); | 743 instr->VerifyCall(); |
| 744 #endif | 744 #endif |
| 745 instr->MarkAsCall(); | 745 instr->MarkAsCall(); |
| 746 instr = AssignPointerMap(instr); | 746 instr = AssignPointerMap(instr); |
| 747 | 747 |
| 748 if (hinstr->HasSideEffects()) { | 748 if (hinstr->HasObservableSideEffects()) { |
| 749 ASSERT(hinstr->next()->IsSimulate()); | 749 ASSERT(hinstr->next()->IsSimulate()); |
| 750 HSimulate* sim = HSimulate::cast(hinstr->next()); | 750 HSimulate* sim = HSimulate::cast(hinstr->next()); |
| 751 instr = SetInstructionPendingDeoptimizationEnvironment( | 751 instr = SetInstructionPendingDeoptimizationEnvironment( |
| 752 instr, sim->ast_id()); | 752 instr, sim->ast_id()); |
| 753 } | 753 } |
| 754 | 754 |
| 755 // If instruction does not have side-effects lazy deoptimization | 755 // If instruction does not have side-effects lazy deoptimization |
| 756 // after the call will try to deoptimize to the point before the call. | 756 // after the call will try to deoptimize to the point before the call. |
| 757 // Thus we still need to attach environment to this call even if | 757 // Thus we still need to attach environment to this call even if |
| 758 // call sequence can not deoptimize eagerly. | 758 // call sequence can not deoptimize eagerly. |
| 759 bool needs_environment = | 759 bool needs_environment = |
| 760 (can_deoptimize == CAN_DEOPTIMIZE_EAGERLY) || !hinstr->HasSideEffects(); | 760 (can_deoptimize == CAN_DEOPTIMIZE_EAGERLY) || |
| 761 !hinstr->HasObservableSideEffects(); |
| 761 if (needs_environment && !instr->HasEnvironment()) { | 762 if (needs_environment && !instr->HasEnvironment()) { |
| 762 instr = AssignEnvironment(instr); | 763 instr = AssignEnvironment(instr); |
| 763 } | 764 } |
| 764 | 765 |
| 765 return instr; | 766 return instr; |
| 766 } | 767 } |
| 767 | 768 |
| 768 | 769 |
| 769 LInstruction* LChunkBuilder::MarkAsSaveDoubles(LInstruction* instr) { | 770 LInstruction* LChunkBuilder::MarkAsSaveDoubles(LInstruction* instr) { |
| 770 instr->MarkAsSaveDoubles(); | 771 instr->MarkAsSaveDoubles(); |
| (...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2209 LOperand* key = UseOrConstantAtStart(instr->key()); | 2210 LOperand* key = UseOrConstantAtStart(instr->key()); |
| 2210 LOperand* object = UseOrConstantAtStart(instr->object()); | 2211 LOperand* object = UseOrConstantAtStart(instr->object()); |
| 2211 LIn* result = new LIn(key, object); | 2212 LIn* result = new LIn(key, object); |
| 2212 return MarkAsCall(DefineFixed(result, rax), instr); | 2213 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2213 } | 2214 } |
| 2214 | 2215 |
| 2215 | 2216 |
| 2216 } } // namespace v8::internal | 2217 } } // namespace v8::internal |
| 2217 | 2218 |
| 2218 #endif // V8_TARGET_ARCH_X64 | 2219 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |