Chromium Code Reviews| 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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1051 | 1051 |
| 1052 HConstant* header_size = | 1052 HConstant* header_size = |
| 1053 new(zone) HConstant(FixedArray::kHeaderSize, Representation::Integer32()); | 1053 new(zone) HConstant(FixedArray::kHeaderSize, Representation::Integer32()); |
| 1054 AddInstruction(header_size); | 1054 AddInstruction(header_size); |
| 1055 HValue* total_size = AddInstruction( | 1055 HValue* total_size = AddInstruction( |
| 1056 HAdd::New(zone, context, mul, header_size)); | 1056 HAdd::New(zone, context, mul, header_size)); |
| 1057 total_size->ChangeRepresentation(Representation::Integer32()); | 1057 total_size->ChangeRepresentation(Representation::Integer32()); |
| 1058 total_size->ClearFlag(HValue::kCanOverflow); | 1058 total_size->ClearFlag(HValue::kCanOverflow); |
| 1059 | 1059 |
| 1060 HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE; | 1060 HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE; |
| 1061 if (FLAG_pretenure_objects) { | |
| 1062 flags = static_cast<HAllocate::Flags>( | |
| 1063 flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE); | |
|
danno
2013/03/05 12:18:18
I think this belongs inside HAllocate for now if t
Hannes Payer (out of office)
2013/03/11 17:16:31
I think it is cleaner to add it to the callers of
| |
| 1064 } | |
|
mvstanton
2013/03/05 09:35:57
This is a cool example of how you request in hydro
Hannes Payer (out of office)
2013/03/11 17:16:31
Done.
| |
| 1061 if (IsFastDoubleElementsKind(kind)) { | 1065 if (IsFastDoubleElementsKind(kind)) { |
| 1062 flags = static_cast<HAllocate::Flags>( | 1066 flags = static_cast<HAllocate::Flags>( |
| 1063 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED); | 1067 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED); |
| 1064 } | 1068 } |
| 1065 | 1069 |
| 1066 HValue* elements = | 1070 HValue* elements = |
| 1067 AddInstruction(new(zone) HAllocate(context, total_size, | 1071 AddInstruction(new(zone) HAllocate(context, total_size, |
| 1068 HType::JSArray(), flags)); | 1072 HType::JSArray(), flags)); |
| 1069 Isolate* isolate = graph()->isolate(); | 1073 Isolate* isolate = graph()->isolate(); |
| 1070 | 1074 |
| (...skipping 9724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10795 } | 10799 } |
| 10796 } | 10800 } |
| 10797 | 10801 |
| 10798 #ifdef DEBUG | 10802 #ifdef DEBUG |
| 10799 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 10803 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 10800 if (allocator_ != NULL) allocator_->Verify(); | 10804 if (allocator_ != NULL) allocator_->Verify(); |
| 10801 #endif | 10805 #endif |
| 10802 } | 10806 } |
| 10803 | 10807 |
| 10804 } } // namespace v8::internal | 10808 } } // namespace v8::internal |
| OLD | NEW |