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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { | 208 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { |
209 stream->Add("if "); | 209 stream->Add("if "); |
210 InputAt(0)->PrintTo(stream); | 210 InputAt(0)->PrintTo(stream); |
211 stream->Add(" %s ", Token::String(op())); | 211 stream->Add(" %s ", Token::String(op())); |
212 InputAt(1)->PrintTo(stream); | 212 InputAt(1)->PrintTo(stream); |
213 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); | 213 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); |
214 } | 214 } |
215 | 215 |
216 | 216 |
217 void LIsNullAndBranch::PrintDataTo(StringStream* stream) { | 217 void LIsNilAndBranch::PrintDataTo(StringStream* stream) { |
218 stream->Add("if "); | 218 stream->Add("if "); |
219 InputAt(0)->PrintTo(stream); | 219 InputAt(0)->PrintTo(stream); |
220 stream->Add(is_strict() ? " === null" : " == null"); | 220 stream->Add(kind() == kStrictEquality ? " === " : " == "); |
| 221 stream->Add(nil() == kNullValue ? "null" : "undefined"); |
221 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); | 222 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); |
222 } | 223 } |
223 | 224 |
224 | 225 |
225 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { | 226 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { |
226 stream->Add("if is_object("); | 227 stream->Add("if is_object("); |
227 InputAt(0)->PrintTo(stream); | 228 InputAt(0)->PrintTo(stream); |
228 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 229 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
229 } | 230 } |
230 | 231 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 stream->Add(" length "); | 345 stream->Add(" length "); |
345 length()->PrintTo(stream); | 346 length()->PrintTo(stream); |
346 | 347 |
347 stream->Add(" index "); | 348 stream->Add(" index "); |
348 index()->PrintTo(stream); | 349 index()->PrintTo(stream); |
349 } | 350 } |
350 | 351 |
351 | 352 |
352 int LChunk::GetNextSpillIndex(bool is_double) { | 353 int LChunk::GetNextSpillIndex(bool is_double) { |
353 // Skip a slot if for a double-width slot. | 354 // Skip a slot if for a double-width slot. |
354 if (is_double) spill_slot_count_++; | 355 if (is_double) { |
| 356 spill_slot_count_ |= 1; // Make it odd, so incrementing makes it even. |
| 357 spill_slot_count_++; |
| 358 num_double_slots_++; |
| 359 } |
355 return spill_slot_count_++; | 360 return spill_slot_count_++; |
356 } | 361 } |
357 | 362 |
358 | 363 |
359 LOperand* LChunk::GetNextSpillSlot(bool is_double) { | 364 LOperand* LChunk::GetNextSpillSlot(bool is_double) { |
360 int index = GetNextSpillIndex(is_double); | 365 int index = GetNextSpillIndex(is_double); |
361 if (is_double) { | 366 if (is_double) { |
362 return LDoubleStackSlot::Create(index); | 367 return LDoubleStackSlot::Create(index); |
363 } else { | 368 } else { |
364 return LStackSlot::Create(index); | 369 return LStackSlot::Create(index); |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 template<int I, int T> | 705 template<int I, int T> |
701 LInstruction* LChunkBuilder::DefineFixedDouble( | 706 LInstruction* LChunkBuilder::DefineFixedDouble( |
702 LTemplateInstruction<1, I, T>* instr, | 707 LTemplateInstruction<1, I, T>* instr, |
703 XMMRegister reg) { | 708 XMMRegister reg) { |
704 return Define(instr, ToUnallocated(reg)); | 709 return Define(instr, ToUnallocated(reg)); |
705 } | 710 } |
706 | 711 |
707 | 712 |
708 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { | 713 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { |
709 HEnvironment* hydrogen_env = current_block_->last_environment(); | 714 HEnvironment* hydrogen_env = current_block_->last_environment(); |
710 instr->set_environment(CreateEnvironment(hydrogen_env)); | 715 int argument_index_accumulator = 0; |
| 716 instr->set_environment(CreateEnvironment(hydrogen_env, |
| 717 &argument_index_accumulator)); |
711 return instr; | 718 return instr; |
712 } | 719 } |
713 | 720 |
714 | 721 |
715 LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment( | 722 LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment( |
716 LInstruction* instr, int ast_id) { | 723 LInstruction* instr, int ast_id) { |
717 ASSERT(instruction_pending_deoptimization_environment_ == NULL); | 724 ASSERT(instruction_pending_deoptimization_environment_ == NULL); |
718 ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber); | 725 ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber); |
719 instruction_pending_deoptimization_environment_ = instr; | 726 instruction_pending_deoptimization_environment_ = instr; |
720 pending_deoptimization_ast_id_ = ast_id; | 727 pending_deoptimization_ast_id_ = ast_id; |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 if (FLAG_stress_environments && !instr->HasEnvironment()) { | 994 if (FLAG_stress_environments && !instr->HasEnvironment()) { |
988 instr = AssignEnvironment(instr); | 995 instr = AssignEnvironment(instr); |
989 } | 996 } |
990 instr->set_hydrogen_value(current); | 997 instr->set_hydrogen_value(current); |
991 chunk_->AddInstruction(instr, current_block_); | 998 chunk_->AddInstruction(instr, current_block_); |
992 } | 999 } |
993 current_instruction_ = old_current; | 1000 current_instruction_ = old_current; |
994 } | 1001 } |
995 | 1002 |
996 | 1003 |
997 LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) { | 1004 LEnvironment* LChunkBuilder::CreateEnvironment( |
| 1005 HEnvironment* hydrogen_env, |
| 1006 int* argument_index_accumulator) { |
998 if (hydrogen_env == NULL) return NULL; | 1007 if (hydrogen_env == NULL) return NULL; |
999 | 1008 |
1000 LEnvironment* outer = CreateEnvironment(hydrogen_env->outer()); | 1009 LEnvironment* outer = |
| 1010 CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator); |
1001 int ast_id = hydrogen_env->ast_id(); | 1011 int ast_id = hydrogen_env->ast_id(); |
1002 ASSERT(ast_id != AstNode::kNoNumber); | 1012 ASSERT(ast_id != AstNode::kNoNumber); |
1003 int value_count = hydrogen_env->length(); | 1013 int value_count = hydrogen_env->length(); |
1004 LEnvironment* result = new LEnvironment(hydrogen_env->closure(), | 1014 LEnvironment* result = new LEnvironment(hydrogen_env->closure(), |
1005 ast_id, | 1015 ast_id, |
1006 hydrogen_env->parameter_count(), | 1016 hydrogen_env->parameter_count(), |
1007 argument_count_, | 1017 argument_count_, |
1008 value_count, | 1018 value_count, |
1009 outer); | 1019 outer); |
1010 int argument_index = 0; | |
1011 for (int i = 0; i < value_count; ++i) { | 1020 for (int i = 0; i < value_count; ++i) { |
1012 if (hydrogen_env->is_special_index(i)) continue; | 1021 if (hydrogen_env->is_special_index(i)) continue; |
1013 | 1022 |
1014 HValue* value = hydrogen_env->values()->at(i); | 1023 HValue* value = hydrogen_env->values()->at(i); |
1015 LOperand* op = NULL; | 1024 LOperand* op = NULL; |
1016 if (value->IsArgumentsObject()) { | 1025 if (value->IsArgumentsObject()) { |
1017 op = NULL; | 1026 op = NULL; |
1018 } else if (value->IsPushArgument()) { | 1027 } else if (value->IsPushArgument()) { |
1019 op = new LArgument(argument_index++); | 1028 op = new LArgument((*argument_index_accumulator)++); |
1020 } else { | 1029 } else { |
1021 op = UseAny(value); | 1030 op = UseAny(value); |
1022 } | 1031 } |
1023 result->AddValue(op, value->representation()); | 1032 result->AddValue(op, value->representation()); |
1024 } | 1033 } |
1025 | 1034 |
1026 return result; | 1035 return result; |
1027 } | 1036 } |
1028 | 1037 |
1029 | 1038 |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 return new LCmpObjectEqAndBranch(left, right); | 1473 return new LCmpObjectEqAndBranch(left, right); |
1465 } | 1474 } |
1466 | 1475 |
1467 | 1476 |
1468 LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( | 1477 LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( |
1469 HCompareConstantEqAndBranch* instr) { | 1478 HCompareConstantEqAndBranch* instr) { |
1470 return new LCmpConstantEqAndBranch(UseRegisterAtStart(instr->value())); | 1479 return new LCmpConstantEqAndBranch(UseRegisterAtStart(instr->value())); |
1471 } | 1480 } |
1472 | 1481 |
1473 | 1482 |
1474 LInstruction* LChunkBuilder::DoIsNullAndBranch(HIsNullAndBranch* instr) { | 1483 LInstruction* LChunkBuilder::DoIsNilAndBranch(HIsNilAndBranch* instr) { |
1475 // We only need a temp register for non-strict compare. | 1484 // We only need a temp register for non-strict compare. |
1476 LOperand* temp = instr->is_strict() ? NULL : TempRegister(); | 1485 LOperand* temp = instr->kind() == kStrictEquality ? NULL : TempRegister(); |
1477 return new LIsNullAndBranch(UseRegisterAtStart(instr->value()), temp); | 1486 return new LIsNilAndBranch(UseRegisterAtStart(instr->value()), temp); |
1478 } | 1487 } |
1479 | 1488 |
1480 | 1489 |
1481 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { | 1490 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { |
1482 ASSERT(instr->value()->representation().IsTagged()); | 1491 ASSERT(instr->value()->representation().IsTagged()); |
1483 LOperand* temp = TempRegister(); | 1492 LOperand* temp = TempRegister(); |
1484 return new LIsObjectAndBranch(UseRegister(instr->value()), temp); | 1493 return new LIsObjectAndBranch(UseRegister(instr->value()), temp); |
1485 } | 1494 } |
1486 | 1495 |
1487 | 1496 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 } | 1685 } |
1677 | 1686 |
1678 | 1687 |
1679 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { | 1688 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { |
1680 LOperand* value = UseAtStart(instr->value()); | 1689 LOperand* value = UseAtStart(instr->value()); |
1681 return AssignEnvironment(new LCheckSmi(value)); | 1690 return AssignEnvironment(new LCheckSmi(value)); |
1682 } | 1691 } |
1683 | 1692 |
1684 | 1693 |
1685 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 1694 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
1686 LOperand* value = UseAtStart(instr->value()); | 1695 // If the target is in new space, we'll emit a global cell compare and so |
| 1696 // want the value in a register. If the target gets promoted before we |
| 1697 // emit code, we will still get the register but will do an immediate |
| 1698 // compare instead of the cell compare. This is safe. |
| 1699 LOperand* value = Isolate::Current()->heap()->InNewSpace(*instr->target()) |
| 1700 ? UseRegisterAtStart(instr->value()) |
| 1701 : UseAtStart(instr->value()); |
1687 return AssignEnvironment(new LCheckFunction(value)); | 1702 return AssignEnvironment(new LCheckFunction(value)); |
1688 } | 1703 } |
1689 | 1704 |
1690 | 1705 |
1691 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { | 1706 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { |
1692 LOperand* value = UseRegisterAtStart(instr->value()); | 1707 LOperand* value = UseRegisterAtStart(instr->value()); |
1693 LCheckMap* result = new LCheckMap(value); | 1708 LCheckMap* result = new LCheckMap(value); |
1694 return AssignEnvironment(result); | 1709 return AssignEnvironment(result); |
1695 } | 1710 } |
1696 | 1711 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 return DefineAsRegister(new LConstantT); | 1778 return DefineAsRegister(new LConstantT); |
1764 } else { | 1779 } else { |
1765 UNREACHABLE(); | 1780 UNREACHABLE(); |
1766 return NULL; | 1781 return NULL; |
1767 } | 1782 } |
1768 } | 1783 } |
1769 | 1784 |
1770 | 1785 |
1771 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 1786 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
1772 LLoadGlobalCell* result = new LLoadGlobalCell; | 1787 LLoadGlobalCell* result = new LLoadGlobalCell; |
1773 return instr->check_hole_value() | 1788 return instr->RequiresHoleCheck() |
1774 ? AssignEnvironment(DefineAsRegister(result)) | 1789 ? AssignEnvironment(DefineAsRegister(result)) |
1775 : DefineAsRegister(result); | 1790 : DefineAsRegister(result); |
1776 } | 1791 } |
1777 | 1792 |
1778 | 1793 |
1779 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 1794 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
1780 LOperand* context = UseFixed(instr->context(), esi); | 1795 LOperand* context = UseFixed(instr->context(), esi); |
1781 LOperand* global_object = UseFixed(instr->global_object(), eax); | 1796 LOperand* global_object = UseFixed(instr->global_object(), eax); |
1782 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(context, global_object); | 1797 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(context, global_object); |
1783 return MarkAsCall(DefineFixed(result, eax), instr); | 1798 return MarkAsCall(DefineFixed(result, eax), instr); |
1784 } | 1799 } |
1785 | 1800 |
1786 | 1801 |
1787 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 1802 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
1788 LStoreGlobalCell* result = | 1803 LStoreGlobalCell* result = |
1789 new LStoreGlobalCell(UseRegisterAtStart(instr->value())); | 1804 new LStoreGlobalCell(UseTempRegister(instr->value()), |
1790 return instr->check_hole_value() ? AssignEnvironment(result) : result; | 1805 TempRegister(), |
| 1806 TempRegister()); |
| 1807 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; |
1791 } | 1808 } |
1792 | 1809 |
1793 | 1810 |
1794 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { | 1811 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { |
1795 LOperand* context = UseFixed(instr->context(), esi); | 1812 LOperand* context = UseFixed(instr->context(), esi); |
1796 LOperand* global_object = UseFixed(instr->global_object(), edx); | 1813 LOperand* global_object = UseFixed(instr->global_object(), edx); |
1797 LOperand* value = UseFixed(instr->value(), eax); | 1814 LOperand* value = UseFixed(instr->value(), eax); |
1798 LStoreGlobalGeneric* result = | 1815 LStoreGlobalGeneric* result = |
1799 new LStoreGlobalGeneric(context, global_object, value); | 1816 new LStoreGlobalGeneric(context, global_object, value); |
1800 return MarkAsCall(result, instr); | 1817 return MarkAsCall(result, instr); |
1801 } | 1818 } |
1802 | 1819 |
1803 | 1820 |
1804 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1821 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
1805 LOperand* context = UseRegisterAtStart(instr->value()); | 1822 LOperand* context = UseRegisterAtStart(instr->value()); |
1806 return DefineAsRegister(new LLoadContextSlot(context)); | 1823 return DefineAsRegister(new LLoadContextSlot(context)); |
1807 } | 1824 } |
1808 | 1825 |
1809 | 1826 |
1810 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { | 1827 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
1811 LOperand* context; | |
1812 LOperand* value; | 1828 LOperand* value; |
1813 LOperand* temp; | 1829 LOperand* temp; |
| 1830 LOperand* context = UseRegister(instr->context()); |
1814 if (instr->NeedsWriteBarrier()) { | 1831 if (instr->NeedsWriteBarrier()) { |
1815 context = UseTempRegister(instr->context()); | |
1816 value = UseTempRegister(instr->value()); | 1832 value = UseTempRegister(instr->value()); |
1817 temp = TempRegister(); | 1833 temp = TempRegister(); |
1818 } else { | 1834 } else { |
1819 context = UseRegister(instr->context()); | |
1820 value = UseRegister(instr->value()); | 1835 value = UseRegister(instr->value()); |
1821 temp = NULL; | 1836 temp = NULL; |
1822 } | 1837 } |
1823 return new LStoreContextSlot(context, value, temp); | 1838 return new LStoreContextSlot(context, value, temp); |
1824 } | 1839 } |
1825 | 1840 |
1826 | 1841 |
1827 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1842 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
1828 ASSERT(instr->representation().IsTagged()); | 1843 ASSERT(instr->representation().IsTagged()); |
1829 LOperand* obj = UseRegisterAtStart(instr->object()); | 1844 LOperand* obj = UseRegisterAtStart(instr->object()); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 } | 1952 } |
1938 | 1953 |
1939 | 1954 |
1940 LInstruction* LChunkBuilder::DoStoreKeyedFastElement( | 1955 LInstruction* LChunkBuilder::DoStoreKeyedFastElement( |
1941 HStoreKeyedFastElement* instr) { | 1956 HStoreKeyedFastElement* instr) { |
1942 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 1957 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
1943 ASSERT(instr->value()->representation().IsTagged()); | 1958 ASSERT(instr->value()->representation().IsTagged()); |
1944 ASSERT(instr->object()->representation().IsTagged()); | 1959 ASSERT(instr->object()->representation().IsTagged()); |
1945 ASSERT(instr->key()->representation().IsInteger32()); | 1960 ASSERT(instr->key()->representation().IsInteger32()); |
1946 | 1961 |
1947 LOperand* obj = UseTempRegister(instr->object()); | 1962 LOperand* obj = UseRegister(instr->object()); |
1948 LOperand* val = needs_write_barrier | 1963 LOperand* val = needs_write_barrier |
1949 ? UseTempRegister(instr->value()) | 1964 ? UseTempRegister(instr->value()) |
1950 : UseRegisterAtStart(instr->value()); | 1965 : UseRegisterAtStart(instr->value()); |
1951 LOperand* key = needs_write_barrier | 1966 LOperand* key = needs_write_barrier |
1952 ? UseTempRegister(instr->key()) | 1967 ? UseTempRegister(instr->key()) |
1953 : UseRegisterOrConstantAtStart(instr->key()); | 1968 : UseRegisterOrConstantAtStart(instr->key()); |
1954 | 1969 |
1955 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); | 1970 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); |
1956 } | 1971 } |
1957 | 1972 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2014 | 2029 |
2015 LStoreKeyedGeneric* result = | 2030 LStoreKeyedGeneric* result = |
2016 new LStoreKeyedGeneric(context, object, key, value); | 2031 new LStoreKeyedGeneric(context, object, key, value); |
2017 return MarkAsCall(result, instr); | 2032 return MarkAsCall(result, instr); |
2018 } | 2033 } |
2019 | 2034 |
2020 | 2035 |
2021 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2036 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
2022 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2037 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
2023 | 2038 |
2024 LOperand* obj = needs_write_barrier | 2039 LOperand* obj; |
2025 ? UseTempRegister(instr->object()) | 2040 if (needs_write_barrier) { |
2026 : UseRegisterAtStart(instr->object()); | 2041 obj = instr->is_in_object() |
| 2042 ? UseRegister(instr->object()) |
| 2043 : UseTempRegister(instr->object()); |
| 2044 } else { |
| 2045 obj = UseRegisterAtStart(instr->object()); |
| 2046 } |
2027 | 2047 |
2028 LOperand* val = needs_write_barrier | 2048 LOperand* val = needs_write_barrier |
2029 ? UseTempRegister(instr->value()) | 2049 ? UseTempRegister(instr->value()) |
2030 : UseRegister(instr->value()); | 2050 : UseRegister(instr->value()); |
2031 | 2051 |
2032 // We only need a scratch register if we have a write barrier or we | 2052 // We only need a scratch register if we have a write barrier or we |
2033 // have a store into the properties array (not in-object-property). | 2053 // have a store into the properties array (not in-object-property). |
2034 LOperand* temp = (!instr->is_in_object() || needs_write_barrier) | 2054 LOperand* temp = (!instr->is_in_object() || needs_write_barrier) |
2035 ? TempRegister() | 2055 ? TempRegister() |
2036 : NULL; | 2056 : NULL; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2258 LOperand* key = UseOrConstantAtStart(instr->key()); | 2278 LOperand* key = UseOrConstantAtStart(instr->key()); |
2259 LOperand* object = UseOrConstantAtStart(instr->object()); | 2279 LOperand* object = UseOrConstantAtStart(instr->object()); |
2260 LIn* result = new LIn(context, key, object); | 2280 LIn* result = new LIn(context, key, object); |
2261 return MarkAsCall(DefineFixed(result, eax), instr); | 2281 return MarkAsCall(DefineFixed(result, eax), instr); |
2262 } | 2282 } |
2263 | 2283 |
2264 | 2284 |
2265 } } // namespace v8::internal | 2285 } } // namespace v8::internal |
2266 | 2286 |
2267 #endif // V8_TARGET_ARCH_IA32 | 2287 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |