Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: src/hydrogen.cc

Issue 12697011: Implement direct allocation in old data space infrastructure. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap-inl.h ('k') | src/macro-assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 1071
1072 HConstant* header_size = 1072 HConstant* header_size =
1073 new(zone) HConstant(FixedArray::kHeaderSize, Representation::Integer32()); 1073 new(zone) HConstant(FixedArray::kHeaderSize, Representation::Integer32());
1074 AddInstruction(header_size); 1074 AddInstruction(header_size);
1075 HValue* total_size = AddInstruction( 1075 HValue* total_size = AddInstruction(
1076 HAdd::New(zone, context, mul, header_size)); 1076 HAdd::New(zone, context, mul, header_size));
1077 total_size->ChangeRepresentation(Representation::Integer32()); 1077 total_size->ChangeRepresentation(Representation::Integer32());
1078 total_size->ClearFlag(HValue::kCanOverflow); 1078 total_size->ClearFlag(HValue::kCanOverflow);
1079 1079
1080 HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE; 1080 HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE;
1081 // TODO(hpayer): add support for old data space 1081 if (FLAG_pretenure_literals) {
1082 if (FLAG_pretenure_literals && !IsFastDoubleElementsKind(kind)) { 1082 if (IsFastDoubleElementsKind(kind)) {
1083 flags = static_cast<HAllocate::Flags>( 1083 flags = static_cast<HAllocate::Flags>(
1084 flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE); 1084 flags | HAllocate::CAN_ALLOCATE_IN_OLD_DATA_SPACE);
1085 } else {
1086 flags = static_cast<HAllocate::Flags>(
1087 flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE);
1088 }
1085 } 1089 }
1086 if (IsFastDoubleElementsKind(kind)) { 1090 if (IsFastDoubleElementsKind(kind)) {
1087 flags = static_cast<HAllocate::Flags>( 1091 flags = static_cast<HAllocate::Flags>(
1088 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED); 1092 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED);
1089 } 1093 }
1090 1094
1091 HValue* elements = 1095 HValue* elements =
1092 AddInstruction(new(zone) HAllocate(context, total_size, 1096 AddInstruction(new(zone) HAllocate(context, total_size,
1093 HType::JSArray(), flags)); 1097 HType::JSArray(), flags));
1094 1098
(...skipping 9854 matching lines...) Expand 10 before | Expand all | Expand 10 after
10949 } 10953 }
10950 } 10954 }
10951 10955
10952 #ifdef DEBUG 10956 #ifdef DEBUG
10953 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10957 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10954 if (allocator_ != NULL) allocator_->Verify(); 10958 if (allocator_ != NULL) allocator_->Verify();
10955 #endif 10959 #endif
10956 } 10960 }
10957 10961
10958 } } // namespace v8::internal 10962 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/macro-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698