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

Side by Side Diff: src/heap.cc

Issue 560011: Merge r3768 from bleeding_edge to branches/2.0 to fix... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.0/
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 2380 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 if (count > in_object_properties) { 2391 if (count > in_object_properties) {
2392 count = in_object_properties; 2392 count = in_object_properties;
2393 } 2393 }
2394 Object* descriptors_obj = DescriptorArray::Allocate(count); 2394 Object* descriptors_obj = DescriptorArray::Allocate(count);
2395 if (descriptors_obj->IsFailure()) return descriptors_obj; 2395 if (descriptors_obj->IsFailure()) return descriptors_obj;
2396 DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj); 2396 DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj);
2397 for (int i = 0; i < count; i++) { 2397 for (int i = 0; i < count; i++) {
2398 String* name = fun->shared()->GetThisPropertyAssignmentName(i); 2398 String* name = fun->shared()->GetThisPropertyAssignmentName(i);
2399 ASSERT(name->IsSymbol()); 2399 ASSERT(name->IsSymbol());
2400 FieldDescriptor field(name, i, NONE); 2400 FieldDescriptor field(name, i, NONE);
2401 field.SetEnumerationIndex(i);
2401 descriptors->Set(i, &field); 2402 descriptors->Set(i, &field);
2402 } 2403 }
2404 descriptors->SetNextEnumerationIndex(count);
2403 descriptors->Sort(); 2405 descriptors->Sort();
2404 map->set_instance_descriptors(descriptors); 2406 map->set_instance_descriptors(descriptors);
2405 map->set_pre_allocated_property_fields(count); 2407 map->set_pre_allocated_property_fields(count);
2406 map->set_unused_property_fields(in_object_properties - count); 2408 map->set_unused_property_fields(in_object_properties - count);
2407 } 2409 }
2408 return map; 2410 return map;
2409 } 2411 }
2410 2412
2411 2413
2412 void Heap::InitializeJSObjectFromMap(JSObject* obj, 2414 void Heap::InitializeJSObjectFromMap(JSObject* obj,
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
4195 void ExternalStringTable::TearDown() { 4197 void ExternalStringTable::TearDown() {
4196 new_space_strings_.Free(); 4198 new_space_strings_.Free();
4197 old_space_strings_.Free(); 4199 old_space_strings_.Free();
4198 } 4200 }
4199 4201
4200 4202
4201 List<Object*> ExternalStringTable::new_space_strings_; 4203 List<Object*> ExternalStringTable::new_space_strings_;
4202 List<Object*> ExternalStringTable::old_space_strings_; 4204 List<Object*> ExternalStringTable::old_space_strings_;
4203 4205
4204 } } // namespace v8::internal 4206 } } // 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