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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 void LCodeGen::FinishCode(Handle<Code> code) { | 82 void LCodeGen::FinishCode(Handle<Code> code) { |
83 ASSERT(is_done()); | 83 ASSERT(is_done()); |
84 code->set_stack_slots(GetStackSlotCount()); | 84 code->set_stack_slots(GetStackSlotCount()); |
85 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 85 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
86 if (FLAG_weak_embedded_maps_in_optimized_code) { | 86 if (FLAG_weak_embedded_maps_in_optimized_code) { |
87 RegisterDependentCodeForEmbeddedMaps(code); | 87 RegisterDependentCodeForEmbeddedMaps(code); |
88 } | 88 } |
89 PopulateDeoptimizationData(code); | 89 PopulateDeoptimizationData(code); |
90 info()->CommitDependentMaps(code); | 90 info()->CommitDependentMaps(code); |
91 | 91 |
92 for (int i = 0 ; i < transition_maps_.length(); i++) { | |
93 transition_maps_.at(i)->AddDependentCode( | |
94 DependentCode::kTransitionGroup, code); | |
95 } | |
96 if (graph()->depends_on_empty_array_proto_elements()) { | 92 if (graph()->depends_on_empty_array_proto_elements()) { |
97 isolate()->initial_object_prototype()->map()->AddDependentCode( | 93 isolate()->initial_object_prototype()->map()->AddDependentCode( |
98 DependentCode::kElementsCantBeAddedGroup, code); | 94 DependentCode::kElementsCantBeAddedGroup, code); |
99 isolate()->initial_array_prototype()->map()->AddDependentCode( | 95 isolate()->initial_array_prototype()->map()->AddDependentCode( |
100 DependentCode::kElementsCantBeAddedGroup, code); | 96 DependentCode::kElementsCantBeAddedGroup, code); |
101 } | 97 } |
102 } | 98 } |
103 | 99 |
104 | 100 |
105 void LCodeGen::Abort(const char* reason) { | 101 void LCodeGen::Abort(const char* reason) { |
(...skipping 4169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4275 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 4271 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
4276 ASSERT(transition.is_null()); | 4272 ASSERT(transition.is_null()); |
4277 ASSERT(access.IsInobject()); | 4273 ASSERT(access.IsInobject()); |
4278 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 4274 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
4279 DwVfpRegister value = ToDoubleRegister(instr->value()); | 4275 DwVfpRegister value = ToDoubleRegister(instr->value()); |
4280 __ vstr(value, FieldMemOperand(object, offset)); | 4276 __ vstr(value, FieldMemOperand(object, offset)); |
4281 return; | 4277 return; |
4282 } | 4278 } |
4283 | 4279 |
4284 if (!transition.is_null()) { | 4280 if (!transition.is_null()) { |
4285 if (transition->CanBeDeprecated()) { | |
4286 transition_maps_.Add(transition, info()->zone()); | |
4287 } | |
4288 __ mov(scratch, Operand(transition)); | 4281 __ mov(scratch, Operand(transition)); |
4289 __ str(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 4282 __ str(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
4290 if (instr->hydrogen()->NeedsWriteBarrierForMap()) { | 4283 if (instr->hydrogen()->NeedsWriteBarrierForMap()) { |
4291 Register temp = ToRegister(instr->temp()); | 4284 Register temp = ToRegister(instr->temp()); |
4292 // Update the write barrier for the map field. | 4285 // Update the write barrier for the map field. |
4293 __ RecordWriteField(object, | 4286 __ RecordWriteField(object, |
4294 HeapObject::kMapOffset, | 4287 HeapObject::kMapOffset, |
4295 scratch, | 4288 scratch, |
4296 temp, | 4289 temp, |
4297 GetLinkRegisterState(), | 4290 GetLinkRegisterState(), |
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5922 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5915 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5923 __ ldr(result, FieldMemOperand(scratch, | 5916 __ ldr(result, FieldMemOperand(scratch, |
5924 FixedArray::kHeaderSize - kPointerSize)); | 5917 FixedArray::kHeaderSize - kPointerSize)); |
5925 __ bind(&done); | 5918 __ bind(&done); |
5926 } | 5919 } |
5927 | 5920 |
5928 | 5921 |
5929 #undef __ | 5922 #undef __ |
5930 | 5923 |
5931 } } // namespace v8::internal | 5924 } } // namespace v8::internal |
OLD | NEW |