| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void LCodeGen::FinishCode(Handle<Code> code) { | 87 void LCodeGen::FinishCode(Handle<Code> code) { |
| 88 ASSERT(is_done()); | 88 ASSERT(is_done()); |
| 89 code->set_stack_slots(GetStackSlotCount()); | 89 code->set_stack_slots(GetStackSlotCount()); |
| 90 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 90 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
| 91 if (FLAG_weak_embedded_maps_in_optimized_code) { | 91 if (FLAG_weak_embedded_maps_in_optimized_code) { |
| 92 RegisterDependentCodeForEmbeddedMaps(code); | 92 RegisterDependentCodeForEmbeddedMaps(code); |
| 93 } | 93 } |
| 94 PopulateDeoptimizationData(code); | 94 PopulateDeoptimizationData(code); |
| 95 info()->CommitDependentMaps(code); | 95 info()->CommitDependentMaps(code); |
| 96 | 96 |
| 97 for (int i = 0 ; i < transition_maps_.length(); i++) { | |
| 98 transition_maps_.at(i)->AddDependentCode( | |
| 99 DependentCode::kTransitionGroup, code); | |
| 100 } | |
| 101 if (graph()->depends_on_empty_array_proto_elements()) { | 97 if (graph()->depends_on_empty_array_proto_elements()) { |
| 102 isolate()->initial_object_prototype()->map()->AddDependentCode( | 98 isolate()->initial_object_prototype()->map()->AddDependentCode( |
| 103 DependentCode::kElementsCantBeAddedGroup, code); | 99 DependentCode::kElementsCantBeAddedGroup, code); |
| 104 isolate()->initial_array_prototype()->map()->AddDependentCode( | 100 isolate()->initial_array_prototype()->map()->AddDependentCode( |
| 105 DependentCode::kElementsCantBeAddedGroup, code); | 101 DependentCode::kElementsCantBeAddedGroup, code); |
| 106 } | 102 } |
| 107 } | 103 } |
| 108 | 104 |
| 109 | 105 |
| 110 void LChunkBuilder::Abort(const char* reason) { | 106 void LChunkBuilder::Abort(const char* reason) { |
| (...skipping 3883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3994 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 3990 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 3995 ASSERT(transition.is_null()); | 3991 ASSERT(transition.is_null()); |
| 3996 ASSERT(access.IsInobject()); | 3992 ASSERT(access.IsInobject()); |
| 3997 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 3993 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
| 3998 XMMRegister value = ToDoubleRegister(instr->value()); | 3994 XMMRegister value = ToDoubleRegister(instr->value()); |
| 3999 __ movsd(FieldOperand(object, offset), value); | 3995 __ movsd(FieldOperand(object, offset), value); |
| 4000 return; | 3996 return; |
| 4001 } | 3997 } |
| 4002 | 3998 |
| 4003 if (!transition.is_null()) { | 3999 if (!transition.is_null()) { |
| 4004 if (transition->CanBeDeprecated()) { | |
| 4005 transition_maps_.Add(transition, info()->zone()); | |
| 4006 } | |
| 4007 if (!instr->hydrogen()->NeedsWriteBarrierForMap()) { | 4000 if (!instr->hydrogen()->NeedsWriteBarrierForMap()) { |
| 4008 __ Move(FieldOperand(object, HeapObject::kMapOffset), transition); | 4001 __ Move(FieldOperand(object, HeapObject::kMapOffset), transition); |
| 4009 } else { | 4002 } else { |
| 4010 Register temp = ToRegister(instr->temp()); | 4003 Register temp = ToRegister(instr->temp()); |
| 4011 __ Move(kScratchRegister, transition); | 4004 __ Move(kScratchRegister, transition); |
| 4012 __ movq(FieldOperand(object, HeapObject::kMapOffset), kScratchRegister); | 4005 __ movq(FieldOperand(object, HeapObject::kMapOffset), kScratchRegister); |
| 4013 // Update the write barrier for the map field. | 4006 // Update the write barrier for the map field. |
| 4014 __ RecordWriteField(object, | 4007 __ RecordWriteField(object, |
| 4015 HeapObject::kMapOffset, | 4008 HeapObject::kMapOffset, |
| 4016 kScratchRegister, | 4009 kScratchRegister, |
| (...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5606 FixedArray::kHeaderSize - kPointerSize)); | 5599 FixedArray::kHeaderSize - kPointerSize)); |
| 5607 __ bind(&done); | 5600 __ bind(&done); |
| 5608 } | 5601 } |
| 5609 | 5602 |
| 5610 | 5603 |
| 5611 #undef __ | 5604 #undef __ |
| 5612 | 5605 |
| 5613 } } // namespace v8::internal | 5606 } } // namespace v8::internal |
| 5614 | 5607 |
| 5615 #endif // V8_TARGET_ARCH_X64 | 5608 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |