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

Side by Side Diff: src/heap.cc

Issue 334007: Merge bleeding_edge revision 3032 to trunk... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 11 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 | « 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 Map* map = Map::cast(map_obj); 2128 Map* map = Map::cast(map_obj);
2129 map->set_inobject_properties(in_object_properties); 2129 map->set_inobject_properties(in_object_properties);
2130 map->set_unused_property_fields(in_object_properties); 2130 map->set_unused_property_fields(in_object_properties);
2131 map->set_prototype(prototype); 2131 map->set_prototype(prototype);
2132 2132
2133 // If the function has only simple this property assignments add field 2133 // If the function has only simple this property assignments add field
2134 // descriptors for these to the initial map as the object cannot be 2134 // descriptors for these to the initial map as the object cannot be
2135 // constructed without having these properties. 2135 // constructed without having these properties.
2136 ASSERT(in_object_properties <= Map::kMaxPreAllocatedPropertyFields); 2136 ASSERT(in_object_properties <= Map::kMaxPreAllocatedPropertyFields);
2137 if (fun->shared()->has_only_this_property_assignments() && 2137 if (fun->shared()->has_only_this_property_assignments() &&
2138 fun->shared()->this_property_assignments_count() > 0) { 2138 fun->shared()->this_property_assignments_count() > 0 &&
2139 fun->shared()->has_only_simple_this_property_assignments()) {
2139 int count = fun->shared()->this_property_assignments_count(); 2140 int count = fun->shared()->this_property_assignments_count();
2140 if (count > in_object_properties) { 2141 if (count > in_object_properties) {
2141 count = in_object_properties; 2142 count = in_object_properties;
2142 } 2143 }
2143 Object* descriptors_obj = DescriptorArray::Allocate(count); 2144 Object* descriptors_obj = DescriptorArray::Allocate(count);
2144 if (descriptors_obj->IsFailure()) return descriptors_obj; 2145 if (descriptors_obj->IsFailure()) return descriptors_obj;
2145 DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj); 2146 DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj);
2146 for (int i = 0; i < count; i++) { 2147 for (int i = 0; i < count; i++) {
2147 String* name = fun->shared()->GetThisPropertyAssignmentName(i); 2148 String* name = fun->shared()->GetThisPropertyAssignmentName(i);
2148 ASSERT(name->IsSymbol()); 2149 ASSERT(name->IsSymbol());
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after
3892 for (int i = 0; i < kNumberOfCaches; i++) { 3893 for (int i = 0; i < kNumberOfCaches; i++) {
3893 if (caches_[i] != NULL) { 3894 if (caches_[i] != NULL) {
3894 delete caches_[i]; 3895 delete caches_[i];
3895 caches_[i] = NULL; 3896 caches_[i] = NULL;
3896 } 3897 }
3897 } 3898 }
3898 } 3899 }
3899 3900
3900 3901
3901 } } // namespace v8::internal 3902 } } // 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