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

Side by Side Diff: src/heap.cc

Issue 326011: Remove a check which was not needed (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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 | no next file » | 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 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2249 } 2249 }
2250 Map* map = Map::cast(map_obj); 2250 Map* map = Map::cast(map_obj);
2251 map->set_inobject_properties(in_object_properties); 2251 map->set_inobject_properties(in_object_properties);
2252 map->set_unused_property_fields(in_object_properties); 2252 map->set_unused_property_fields(in_object_properties);
2253 map->set_prototype(prototype); 2253 map->set_prototype(prototype);
2254 2254
2255 // If the function has only simple this property assignments add field 2255 // If the function has only simple this property assignments add field
2256 // descriptors for these to the initial map as the object cannot be 2256 // descriptors for these to the initial map as the object cannot be
2257 // constructed without having these properties. 2257 // constructed without having these properties.
2258 ASSERT(in_object_properties <= Map::kMaxPreAllocatedPropertyFields); 2258 ASSERT(in_object_properties <= Map::kMaxPreAllocatedPropertyFields);
2259 if (fun->shared()->has_only_this_property_assignments() && 2259 if (fun->shared()->has_only_simple_this_property_assignments() &&
2260 fun->shared()->this_property_assignments_count() > 0 && 2260 fun->shared()->this_property_assignments_count() > 0) {
2261 fun->shared()->has_only_simple_this_property_assignments()) {
2262 int count = fun->shared()->this_property_assignments_count(); 2261 int count = fun->shared()->this_property_assignments_count();
2263 if (count > in_object_properties) { 2262 if (count > in_object_properties) {
2264 count = in_object_properties; 2263 count = in_object_properties;
2265 } 2264 }
2266 Object* descriptors_obj = DescriptorArray::Allocate(count); 2265 Object* descriptors_obj = DescriptorArray::Allocate(count);
2267 if (descriptors_obj->IsFailure()) return descriptors_obj; 2266 if (descriptors_obj->IsFailure()) return descriptors_obj;
2268 DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj); 2267 DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj);
2269 for (int i = 0; i < count; i++) { 2268 for (int i = 0; i < count; i++) {
2270 String* name = fun->shared()->GetThisPropertyAssignmentName(i); 2269 String* name = fun->shared()->GetThisPropertyAssignmentName(i);
2271 ASSERT(name->IsSymbol()); 2270 ASSERT(name->IsSymbol());
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
4036 for (int i = 0; i < kNumberOfCaches; i++) { 4035 for (int i = 0; i < kNumberOfCaches; i++) {
4037 if (caches_[i] != NULL) { 4036 if (caches_[i] != NULL) {
4038 delete caches_[i]; 4037 delete caches_[i];
4039 caches_[i] = NULL; 4038 caches_[i] = NULL;
4040 } 4039 }
4041 } 4040 }
4042 } 4041 }
4043 4042
4044 4043
4045 } } // namespace v8::internal 4044 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698