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 9835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9846 HInstruction* double_box = | 9846 HInstruction* double_box = |
9847 Add<HAllocate>(heap_number_constant, HType::HeapNumber(), | 9847 Add<HAllocate>(heap_number_constant, HType::HeapNumber(), |
9848 pretenure_flag, HEAP_NUMBER_TYPE); | 9848 pretenure_flag, HEAP_NUMBER_TYPE); |
9849 AddStoreMapConstant(double_box, | 9849 AddStoreMapConstant(double_box, |
9850 isolate()->factory()->heap_number_map()); | 9850 isolate()->factory()->heap_number_map()); |
9851 Add<HStoreNamedField>(double_box, HObjectAccess::ForHeapNumberValue(), | 9851 Add<HStoreNamedField>(double_box, HObjectAccess::ForHeapNumberValue(), |
9852 Add<HConstant>(value)); | 9852 Add<HConstant>(value)); |
9853 value_instruction = double_box; | 9853 value_instruction = double_box; |
9854 } else if (representation.IsSmi() && value->IsUninitialized()) { | 9854 } else if (representation.IsSmi() && value->IsUninitialized()) { |
9855 value_instruction = graph()->GetConstant0(); | 9855 value_instruction = graph()->GetConstant0(); |
| 9856 // Ensure that Constant0 is stored as smi. |
| 9857 access = access.WithRepresentation(representation); |
9856 } else { | 9858 } else { |
9857 value_instruction = Add<HConstant>(value); | 9859 value_instruction = Add<HConstant>(value); |
9858 } | 9860 } |
9859 | 9861 |
9860 Add<HStoreNamedField>(object, access, value_instruction); | 9862 Add<HStoreNamedField>(object, access, value_instruction); |
9861 } | 9863 } |
9862 } | 9864 } |
9863 | 9865 |
9864 int inobject_properties = boilerplate_object->map()->inobject_properties(); | 9866 int inobject_properties = boilerplate_object->map()->inobject_properties(); |
9865 HInstruction* value_instruction = | 9867 HInstruction* value_instruction = |
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11195 if (ShouldProduceTraceOutput()) { | 11197 if (ShouldProduceTraceOutput()) { |
11196 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11198 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11197 } | 11199 } |
11198 | 11200 |
11199 #ifdef DEBUG | 11201 #ifdef DEBUG |
11200 graph_->Verify(false); // No full verify. | 11202 graph_->Verify(false); // No full verify. |
11201 #endif | 11203 #endif |
11202 } | 11204 } |
11203 | 11205 |
11204 } } // namespace v8::internal | 11206 } } // namespace v8::internal |
OLD | NEW |