| OLD | NEW | 
|---|
| 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 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2382   map->set_inobject_properties(in_object_properties); | 2382   map->set_inobject_properties(in_object_properties); | 
| 2383   map->set_unused_property_fields(in_object_properties); | 2383   map->set_unused_property_fields(in_object_properties); | 
| 2384   map->set_prototype(prototype); | 2384   map->set_prototype(prototype); | 
| 2385 | 2385 | 
| 2386   // If the function has only simple this property assignments add | 2386   // If the function has only simple this property assignments add | 
| 2387   // field descriptors for these to the initial map as the object | 2387   // field descriptors for these to the initial map as the object | 
| 2388   // cannot be constructed without having these properties.  Guard by | 2388   // cannot be constructed without having these properties.  Guard by | 
| 2389   // the inline_new flag so we only change the map if we generate a | 2389   // the inline_new flag so we only change the map if we generate a | 
| 2390   // specialized construct stub. | 2390   // specialized construct stub. | 
| 2391   ASSERT(in_object_properties <= Map::kMaxPreAllocatedPropertyFields); | 2391   ASSERT(in_object_properties <= Map::kMaxPreAllocatedPropertyFields); | 
| 2392   if (FLAG_inline_new && | 2392   if (FLAG_inline_new | 
| 2393       fun->shared()->has_only_simple_this_property_assignments() && | 2393       && fun->shared()->has_only_simple_this_property_assignments() | 
| 2394       fun->shared()->this_property_assignments_count() > 0) { | 2394       && fun->shared()->this_property_assignments_count() > 0 | 
|  | 2395       && !JSObject::cast(prototype)->HasSetter()) { | 
| 2395     int count = fun->shared()->this_property_assignments_count(); | 2396     int count = fun->shared()->this_property_assignments_count(); | 
| 2396     if (count > in_object_properties) { | 2397     if (count > in_object_properties) { | 
| 2397       count = in_object_properties; | 2398       count = in_object_properties; | 
| 2398     } | 2399     } | 
| 2399     Object* descriptors_obj = DescriptorArray::Allocate(count); | 2400     Object* descriptors_obj = DescriptorArray::Allocate(count); | 
| 2400     if (descriptors_obj->IsFailure()) return descriptors_obj; | 2401     if (descriptors_obj->IsFailure()) return descriptors_obj; | 
| 2401     DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj); | 2402     DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj); | 
| 2402     for (int i = 0; i < count; i++) { | 2403     for (int i = 0; i < count; i++) { | 
| 2403       String* name = fun->shared()->GetThisPropertyAssignmentName(i); | 2404       String* name = fun->shared()->GetThisPropertyAssignmentName(i); | 
| 2404       ASSERT(name->IsSymbol()); | 2405       ASSERT(name->IsSymbol()); | 
| (...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4221 void ExternalStringTable::TearDown() { | 4222 void ExternalStringTable::TearDown() { | 
| 4222   new_space_strings_.Free(); | 4223   new_space_strings_.Free(); | 
| 4223   old_space_strings_.Free(); | 4224   old_space_strings_.Free(); | 
| 4224 } | 4225 } | 
| 4225 | 4226 | 
| 4226 | 4227 | 
| 4227 List<Object*> ExternalStringTable::new_space_strings_; | 4228 List<Object*> ExternalStringTable::new_space_strings_; | 
| 4228 List<Object*> ExternalStringTable::old_space_strings_; | 4229 List<Object*> ExternalStringTable::old_space_strings_; | 
| 4229 | 4230 | 
| 4230 } }  // namespace v8::internal | 4231 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|