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

Side by Side Diff: src/objects.h

Issue 7427: - Fix instance size calculation to ensure that the object cannot... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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.cc ('k') | test/mjsunit/large-object-allocation.js » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 int number_of_slow_unused_elements_; 1393 int number_of_slow_unused_elements_;
1394 }; 1394 };
1395 1395
1396 void IncrementSpillStatistics(SpillInformation* info); 1396 void IncrementSpillStatistics(SpillInformation* info);
1397 #endif 1397 #endif
1398 Object* SlowReverseLookup(Object* value); 1398 Object* SlowReverseLookup(Object* value);
1399 1399
1400 static const uint32_t kMaxGap = 1024; 1400 static const uint32_t kMaxGap = 1024;
1401 static const int kMaxFastElementsLength = 5000; 1401 static const int kMaxFastElementsLength = 5000;
1402 static const int kMaxFastProperties = 8; 1402 static const int kMaxFastProperties = 8;
1403 static const int kMaxInstanceSize = 255 * kPointerSize;
1403 // When extending the backing storage for property values, we increase 1404 // When extending the backing storage for property values, we increase
1404 // its size by more than the 1 entry necessary, so sequentially adding fields 1405 // its size by more than the 1 entry necessary, so sequentially adding fields
1405 // to the same object requires fewer allocations and copies. 1406 // to the same object requires fewer allocations and copies.
1406 static const int kFieldsAdded = 3; 1407 static const int kFieldsAdded = 3;
1407 1408
1408 // Layout description. 1409 // Layout description.
1409 static const int kPropertiesOffset = HeapObject::kHeaderSize; 1410 static const int kPropertiesOffset = HeapObject::kHeaderSize;
1410 static const int kElementsOffset = kPropertiesOffset + kPointerSize; 1411 static const int kElementsOffset = kPropertiesOffset + kPointerSize;
1411 static const int kHeaderSize = kElementsOffset + kPointerSize; 1412 static const int kHeaderSize = kElementsOffset + kPointerSize;
1412 1413
(...skipping 2600 matching lines...) Expand 10 before | Expand all | Expand 10 after
4013 } else { 4014 } else {
4014 value &= ~(1 << bit_position); 4015 value &= ~(1 << bit_position);
4015 } 4016 }
4016 return value; 4017 return value;
4017 } 4018 }
4018 }; 4019 };
4019 4020
4020 } } // namespace v8::internal 4021 } } // namespace v8::internal
4021 4022
4022 #endif // V8_OBJECTS_H_ 4023 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | test/mjsunit/large-object-allocation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698