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

Side by Side Diff: src/objects.cc

Issue 10827037: Extending map verification to also verify LastAdded/DescriptorArray consistency. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 8 years, 4 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') | src/objects-debug.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 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 4854 matching lines...) Expand 10 before | Expand all | Expand 10 after
4865 4865
4866 MaybeObject* Map::CopyReplaceDescriptors(DescriptorArray* descriptors, 4866 MaybeObject* Map::CopyReplaceDescriptors(DescriptorArray* descriptors,
4867 String* name, 4867 String* name,
4868 int last_added, 4868 int last_added,
4869 TransitionFlag flag) { 4869 TransitionFlag flag) {
4870 Map* result; 4870 Map* result;
4871 MaybeObject* maybe_result = CopyDropDescriptors(); 4871 MaybeObject* maybe_result = CopyDropDescriptors();
4872 if (!maybe_result->To(&result)) return maybe_result; 4872 if (!maybe_result->To(&result)) return maybe_result;
4873 4873
4874 if (last_added == kNoneAdded) { 4874 if (last_added == kNoneAdded) {
4875 ASSERT(descriptors->IsEmpty()); 4875 ASSERT(descriptors->number_of_descriptors() == 0);
4876 } else { 4876 } else {
4877 ASSERT(descriptors->GetDetails(last_added).index() == 4877 ASSERT(descriptors->GetDetails(last_added).index() ==
4878 descriptors->number_of_descriptors()); 4878 descriptors->number_of_descriptors());
4879 result->set_instance_descriptors(descriptors); 4879 result->set_instance_descriptors(descriptors);
4880 result->SetLastAdded(last_added); 4880 result->SetLastAdded(last_added);
4881 } 4881 }
4882 4882
4883 if (flag == INSERT_TRANSITION && CanHaveMoreTransitions()) { 4883 if (flag == INSERT_TRANSITION && CanHaveMoreTransitions()) {
4884 TransitionArray* transitions; 4884 TransitionArray* transitions;
4885 MaybeObject* maybe_transitions = AddTransition(name, result); 4885 MaybeObject* maybe_transitions = AddTransition(name, result);
(...skipping 8236 matching lines...) Expand 10 before | Expand all | Expand 10 after
13122 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13122 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13123 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13123 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13124 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13124 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13125 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13125 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13126 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13126 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13127 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13127 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13128 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13128 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13129 } 13129 }
13130 13130
13131 } } // namespace v8::internal 13131 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698