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 9906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9917 // 1) it's a child object of another object with a valid allocation site | 9917 // 1) it's a child object of another object with a valid allocation site |
9918 // 2) we can just use the mode of the parent object for pretenuring | 9918 // 2) we can just use the mode of the parent object for pretenuring |
9919 HInstruction* double_box = | 9919 HInstruction* double_box = |
9920 Add<HAllocate>(heap_number_constant, HType::HeapNumber(), | 9920 Add<HAllocate>(heap_number_constant, HType::HeapNumber(), |
9921 pretenure_flag, HEAP_NUMBER_TYPE); | 9921 pretenure_flag, HEAP_NUMBER_TYPE); |
9922 AddStoreMapConstant(double_box, | 9922 AddStoreMapConstant(double_box, |
9923 isolate()->factory()->heap_number_map()); | 9923 isolate()->factory()->heap_number_map()); |
9924 Add<HStoreNamedField>(double_box, HObjectAccess::ForHeapNumberValue(), | 9924 Add<HStoreNamedField>(double_box, HObjectAccess::ForHeapNumberValue(), |
9925 Add<HConstant>(value)); | 9925 Add<HConstant>(value)); |
9926 value_instruction = double_box; | 9926 value_instruction = double_box; |
9927 } else if (representation.IsSmi() && value->IsUninitialized()) { | 9927 } else if (representation.IsSmi()) { |
9928 value_instruction = graph()->GetConstant0(); | 9928 value_instruction = value->IsUninitialized() |
9929 // Ensure that Constant0 is stored as smi. | 9929 ? graph()->GetConstant0() |
| 9930 : Add<HConstant>(value); |
| 9931 // Ensure that value is stored as smi. |
9930 access = access.WithRepresentation(representation); | 9932 access = access.WithRepresentation(representation); |
9931 } else { | 9933 } else { |
9932 value_instruction = Add<HConstant>(value); | 9934 value_instruction = Add<HConstant>(value); |
9933 } | 9935 } |
9934 | 9936 |
9935 Add<HStoreNamedField>(object, access, value_instruction); | 9937 Add<HStoreNamedField>(object, access, value_instruction); |
9936 } | 9938 } |
9937 } | 9939 } |
9938 | 9940 |
9939 int inobject_properties = boilerplate_object->map()->inobject_properties(); | 9941 int inobject_properties = boilerplate_object->map()->inobject_properties(); |
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11292 if (ShouldProduceTraceOutput()) { | 11294 if (ShouldProduceTraceOutput()) { |
11293 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11295 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11294 } | 11296 } |
11295 | 11297 |
11296 #ifdef DEBUG | 11298 #ifdef DEBUG |
11297 graph_->Verify(false); // No full verify. | 11299 graph_->Verify(false); // No full verify. |
11298 #endif | 11300 #endif |
11299 } | 11301 } |
11300 | 11302 |
11301 } } // namespace v8::internal | 11303 } } // namespace v8::internal |
OLD | NEW |