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

Side by Side Diff: src/heap.cc

Issue 560012: Merge r3768 from bleeding_edge to branches/1.3 to fix... (Closed) Base URL: http://v8.googlecode.com/svn/branches/1.3/
Patch Set: Created 10 years, 10 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 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2290 if (count > in_object_properties) { 2290 if (count > in_object_properties) {
2291 count = in_object_properties; 2291 count = in_object_properties;
2292 } 2292 }
2293 Object* descriptors_obj = DescriptorArray::Allocate(count); 2293 Object* descriptors_obj = DescriptorArray::Allocate(count);
2294 if (descriptors_obj->IsFailure()) return descriptors_obj; 2294 if (descriptors_obj->IsFailure()) return descriptors_obj;
2295 DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj); 2295 DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj);
2296 for (int i = 0; i < count; i++) { 2296 for (int i = 0; i < count; i++) {
2297 String* name = fun->shared()->GetThisPropertyAssignmentName(i); 2297 String* name = fun->shared()->GetThisPropertyAssignmentName(i);
2298 ASSERT(name->IsSymbol()); 2298 ASSERT(name->IsSymbol());
2299 FieldDescriptor field(name, i, NONE); 2299 FieldDescriptor field(name, i, NONE);
2300 field.SetEnumerationIndex(i);
2300 descriptors->Set(i, &field); 2301 descriptors->Set(i, &field);
2301 } 2302 }
2303 descriptors->SetNextEnumerationIndex(count);
2302 descriptors->Sort(); 2304 descriptors->Sort();
2303 map->set_instance_descriptors(descriptors); 2305 map->set_instance_descriptors(descriptors);
2304 map->set_pre_allocated_property_fields(count); 2306 map->set_pre_allocated_property_fields(count);
2305 map->set_unused_property_fields(in_object_properties - count); 2307 map->set_unused_property_fields(in_object_properties - count);
2306 } 2308 }
2307 return map; 2309 return map;
2308 } 2310 }
2309 2311
2310 2312
2311 void Heap::InitializeJSObjectFromMap(JSObject* obj, 2313 void Heap::InitializeJSObjectFromMap(JSObject* obj,
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
4102 for (int i = 0; i < kNumberOfCaches; i++) { 4104 for (int i = 0; i < kNumberOfCaches; i++) {
4103 if (caches_[i] != NULL) { 4105 if (caches_[i] != NULL) {
4104 delete caches_[i]; 4106 delete caches_[i];
4105 caches_[i] = NULL; 4107 caches_[i] = NULL;
4106 } 4108 }
4107 } 4109 }
4108 } 4110 }
4109 4111
4110 4112
4111 } } // namespace v8::internal 4113 } } // 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