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

Side by Side Diff: src/heap.h

Issue 3466013: Fix copy-on-write assert by setting the new array map early. (Closed)
Patch Set: Created 10 years, 3 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
« no previous file with comments | « no previous file | src/heap.cc » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 491
492 // Allocates an uninitialized fixed array. It must be filled by the caller. 492 // Allocates an uninitialized fixed array. It must be filled by the caller.
493 // 493 //
494 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 494 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
495 // failed. 495 // failed.
496 // Please note this does not perform a garbage collection. 496 // Please note this does not perform a garbage collection.
497 MUST_USE_RESULT static Object* AllocateUninitializedFixedArray(int length); 497 MUST_USE_RESULT static Object* AllocateUninitializedFixedArray(int length);
498 498
499 // Make a copy of src and return it. Returns 499 // Make a copy of src and return it. Returns
500 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. 500 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed.
501 MUST_USE_RESULT static Object* CopyFixedArray(FixedArray* src); 501 MUST_USE_RESULT static inline Object* CopyFixedArray(FixedArray* src);
502
503 // Make a copy of src, set the map, and return the copy. Returns
504 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed.
505 MUST_USE_RESULT static Object* CopyFixedArrayWithMap(FixedArray* src,
506 Map* map);
502 507
503 // Allocates a fixed array initialized with the hole values. 508 // Allocates a fixed array initialized with the hole values.
504 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 509 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
505 // failed. 510 // failed.
506 // Please note this does not perform a garbage collection. 511 // Please note this does not perform a garbage collection.
507 MUST_USE_RESULT static Object* AllocateFixedArrayWithHoles( 512 MUST_USE_RESULT static Object* AllocateFixedArrayWithHoles(
508 int length, 513 int length,
509 PretenureFlag pretenure = NOT_TENURED); 514 PretenureFlag pretenure = NOT_TENURED);
510 515
511 // AllocateHashTable is identical to AllocateFixedArray except 516 // AllocateHashTable is identical to AllocateFixedArray except
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 2039
2035 // To speed up scavenge collections new space string are kept 2040 // To speed up scavenge collections new space string are kept
2036 // separate from old space strings. 2041 // separate from old space strings.
2037 static List<Object*> new_space_strings_; 2042 static List<Object*> new_space_strings_;
2038 static List<Object*> old_space_strings_; 2043 static List<Object*> old_space_strings_;
2039 }; 2044 };
2040 2045
2041 } } // namespace v8::internal 2046 } } // namespace v8::internal
2042 2047
2043 #endif // V8_HEAP_H_ 2048 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698