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

Side by Side Diff: src/objects.cc

Issue 7333008: Merge r8596 into 3.3 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.3/
Patch Set: Created 9 years, 5 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 | « no previous file | src/version.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3785 matching lines...) Expand 10 before | Expand all | Expand 10 after
3796 // the map field of the array. 3796 // the map field of the array.
3797 Map* next = Map::cast(contents->get(i)); 3797 Map* next = Map::cast(contents->get(i));
3798 next->set_map(current); 3798 next->set_map(current);
3799 *map_or_index_field = Smi::FromInt(i + 2); 3799 *map_or_index_field = Smi::FromInt(i + 2);
3800 current = next; 3800 current = next;
3801 map_done = false; 3801 map_done = false;
3802 break; 3802 break;
3803 } 3803 }
3804 } 3804 }
3805 if (!map_done) continue; 3805 if (!map_done) continue;
3806 } else {
3807 map_or_index_field = NULL;
3806 } 3808 }
3807 // That was the regular transitions, now for the prototype transitions. 3809 // That was the regular transitions, now for the prototype transitions.
3808 FixedArray* prototype_transitions = 3810 FixedArray* prototype_transitions =
3809 current->unchecked_prototype_transitions(); 3811 current->unchecked_prototype_transitions();
3810 Object** proto_map_or_index_field = 3812 Object** proto_map_or_index_field =
3811 RawField(prototype_transitions, HeapObject::kMapOffset); 3813 RawField(prototype_transitions, HeapObject::kMapOffset);
3812 Object* map_or_index = *proto_map_or_index_field; 3814 Object* map_or_index = *proto_map_or_index_field;
3813 const int start = 2; 3815 const int start = 2;
3814 int i = map_or_index->IsSmi() ? Smi::cast(map_or_index)->value() : start; 3816 int i = map_or_index->IsSmi() ? Smi::cast(map_or_index)->value() : start;
3815 if (i < prototype_transitions->length()) { 3817 if (i < prototype_transitions->length()) {
(...skipping 6789 matching lines...) Expand 10 before | Expand all | Expand 10 after
10605 if (break_point_objects()->IsUndefined()) return 0; 10607 if (break_point_objects()->IsUndefined()) return 0;
10606 // Single beak point. 10608 // Single beak point.
10607 if (!break_point_objects()->IsFixedArray()) return 1; 10609 if (!break_point_objects()->IsFixedArray()) return 1;
10608 // Multiple break points. 10610 // Multiple break points.
10609 return FixedArray::cast(break_point_objects())->length(); 10611 return FixedArray::cast(break_point_objects())->length();
10610 } 10612 }
10611 #endif 10613 #endif
10612 10614
10613 10615
10614 } } // namespace v8::internal 10616 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698