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

Side by Side Diff: src/hydrogen.cc

Issue 12314155: Allow direct allocation in old pointer space. (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.h ('k') | src/hydrogen-instructions.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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 1068
1069 HConstant* header_size = 1069 HConstant* header_size =
1070 new(zone) HConstant(FixedArray::kHeaderSize, Representation::Integer32()); 1070 new(zone) HConstant(FixedArray::kHeaderSize, Representation::Integer32());
1071 AddInstruction(header_size); 1071 AddInstruction(header_size);
1072 HValue* total_size = AddInstruction( 1072 HValue* total_size = AddInstruction(
1073 HAdd::New(zone, context, mul, header_size)); 1073 HAdd::New(zone, context, mul, header_size));
1074 total_size->ChangeRepresentation(Representation::Integer32()); 1074 total_size->ChangeRepresentation(Representation::Integer32());
1075 total_size->ClearFlag(HValue::kCanOverflow); 1075 total_size->ClearFlag(HValue::kCanOverflow);
1076 1076
1077 HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE; 1077 HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE;
1078 // TODO(hpayer): add support for old data space
1079 if (FLAG_pretenure_literals && !IsFastDoubleElementsKind(kind)) {
1080 flags = static_cast<HAllocate::Flags>(
1081 flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE);
1082 }
1078 if (IsFastDoubleElementsKind(kind)) { 1083 if (IsFastDoubleElementsKind(kind)) {
1079 flags = static_cast<HAllocate::Flags>( 1084 flags = static_cast<HAllocate::Flags>(
1080 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED); 1085 flags | HAllocate::ALLOCATE_DOUBLE_ALIGNED);
1081 } 1086 }
1082 1087
1083 HValue* elements = 1088 HValue* elements =
1084 AddInstruction(new(zone) HAllocate(context, total_size, 1089 AddInstruction(new(zone) HAllocate(context, total_size,
1085 HType::JSArray(), flags)); 1090 HType::JSArray(), flags));
1086 1091
1087 Factory* factory = isolate()->factory(); 1092 Factory* factory = isolate()->factory();
(...skipping 9788 matching lines...) Expand 10 before | Expand all | Expand 10 after
10876 } 10881 }
10877 } 10882 }
10878 10883
10879 #ifdef DEBUG 10884 #ifdef DEBUG
10880 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10885 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10881 if (allocator_ != NULL) allocator_->Verify(); 10886 if (allocator_ != NULL) allocator_->Verify();
10882 #endif 10887 #endif
10883 } 10888 }
10884 10889
10885 } } // namespace v8::internal 10890 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698