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

Side by Side Diff: src/heap.cc

Issue 12225099: Remove prototype checks for leaf maps in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add space after if Created 7 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 | « src/flag-definitions.h ('k') | src/hydrogen-instructions.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 map->set_map_no_write_barrier(meta_map()); 2198 map->set_map_no_write_barrier(meta_map());
2199 map->set_instance_type(instance_type); 2199 map->set_instance_type(instance_type);
2200 map->set_visitor_id( 2200 map->set_visitor_id(
2201 StaticVisitorBase::GetVisitorId(instance_type, instance_size)); 2201 StaticVisitorBase::GetVisitorId(instance_type, instance_size));
2202 map->set_prototype(null_value(), SKIP_WRITE_BARRIER); 2202 map->set_prototype(null_value(), SKIP_WRITE_BARRIER);
2203 map->set_constructor(null_value(), SKIP_WRITE_BARRIER); 2203 map->set_constructor(null_value(), SKIP_WRITE_BARRIER);
2204 map->set_instance_size(instance_size); 2204 map->set_instance_size(instance_size);
2205 map->set_inobject_properties(0); 2205 map->set_inobject_properties(0);
2206 map->set_pre_allocated_property_fields(0); 2206 map->set_pre_allocated_property_fields(0);
2207 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); 2207 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER);
2208 map->set_dependent_codes(DependentCodes::cast(empty_fixed_array()), 2208 map->set_dependent_code(DependentCode::cast(empty_fixed_array()),
2209 SKIP_WRITE_BARRIER); 2209 SKIP_WRITE_BARRIER);
2210 map->init_back_pointer(undefined_value()); 2210 map->init_back_pointer(undefined_value());
2211 map->set_unused_property_fields(0); 2211 map->set_unused_property_fields(0);
2212 map->set_instance_descriptors(empty_descriptor_array()); 2212 map->set_instance_descriptors(empty_descriptor_array());
2213 map->set_bit_field(0); 2213 map->set_bit_field(0);
2214 map->set_bit_field2(1 << Map::kIsExtensible); 2214 map->set_bit_field2(1 << Map::kIsExtensible);
2215 int bit_field3 = Map::EnumLengthBits::encode(Map::kInvalidEnumCache) | 2215 int bit_field3 = Map::EnumLengthBits::encode(Map::kInvalidEnumCache) |
2216 Map::OwnsDescriptors::encode(true); 2216 Map::OwnsDescriptors::encode(true);
2217 map->set_bit_field3(bit_field3); 2217 map->set_bit_field3(bit_field3);
2218 map->set_elements_kind(elements_kind); 2218 map->set_elements_kind(elements_kind);
2219 2219
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 ASSERT(!InNewSpace(undefined_value())); 2335 ASSERT(!InNewSpace(undefined_value()));
2336 2336
2337 // Allocate the empty descriptor array. 2337 // Allocate the empty descriptor array.
2338 { MaybeObject* maybe_obj = AllocateEmptyFixedArray(); 2338 { MaybeObject* maybe_obj = AllocateEmptyFixedArray();
2339 if (!maybe_obj->ToObject(&obj)) return false; 2339 if (!maybe_obj->ToObject(&obj)) return false;
2340 } 2340 }
2341 set_empty_descriptor_array(DescriptorArray::cast(obj)); 2341 set_empty_descriptor_array(DescriptorArray::cast(obj));
2342 2342
2343 // Fix the instance_descriptors for the existing maps. 2343 // Fix the instance_descriptors for the existing maps.
2344 meta_map()->set_code_cache(empty_fixed_array()); 2344 meta_map()->set_code_cache(empty_fixed_array());
2345 meta_map()->set_dependent_codes(DependentCodes::cast(empty_fixed_array())); 2345 meta_map()->set_dependent_code(DependentCode::cast(empty_fixed_array()));
2346 meta_map()->init_back_pointer(undefined_value()); 2346 meta_map()->init_back_pointer(undefined_value());
2347 meta_map()->set_instance_descriptors(empty_descriptor_array()); 2347 meta_map()->set_instance_descriptors(empty_descriptor_array());
2348 2348
2349 fixed_array_map()->set_code_cache(empty_fixed_array()); 2349 fixed_array_map()->set_code_cache(empty_fixed_array());
2350 fixed_array_map()->set_dependent_codes( 2350 fixed_array_map()->set_dependent_code(
2351 DependentCodes::cast(empty_fixed_array())); 2351 DependentCode::cast(empty_fixed_array()));
2352 fixed_array_map()->init_back_pointer(undefined_value()); 2352 fixed_array_map()->init_back_pointer(undefined_value());
2353 fixed_array_map()->set_instance_descriptors(empty_descriptor_array()); 2353 fixed_array_map()->set_instance_descriptors(empty_descriptor_array());
2354 2354
2355 oddball_map()->set_code_cache(empty_fixed_array()); 2355 oddball_map()->set_code_cache(empty_fixed_array());
2356 oddball_map()->set_dependent_codes(DependentCodes::cast(empty_fixed_array())); 2356 oddball_map()->set_dependent_code(DependentCode::cast(empty_fixed_array()));
2357 oddball_map()->init_back_pointer(undefined_value()); 2357 oddball_map()->init_back_pointer(undefined_value());
2358 oddball_map()->set_instance_descriptors(empty_descriptor_array()); 2358 oddball_map()->set_instance_descriptors(empty_descriptor_array());
2359 2359
2360 // Fix prototype object for existing maps. 2360 // Fix prototype object for existing maps.
2361 meta_map()->set_prototype(null_value()); 2361 meta_map()->set_prototype(null_value());
2362 meta_map()->set_constructor(null_value()); 2362 meta_map()->set_constructor(null_value());
2363 2363
2364 fixed_array_map()->set_prototype(null_value()); 2364 fixed_array_map()->set_prototype(null_value());
2365 fixed_array_map()->set_constructor(null_value()); 2365 fixed_array_map()->set_constructor(null_value());
2366 2366
(...skipping 5168 matching lines...) Expand 10 before | Expand all | Expand 10 after
7535 static_cast<int>(object_sizes_last_time_[index])); 7535 static_cast<int>(object_sizes_last_time_[index]));
7536 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7536 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7537 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7537 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7538 7538
7539 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7539 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7540 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7540 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7541 ClearObjectStats(); 7541 ClearObjectStats();
7542 } 7542 }
7543 7543
7544 } } // namespace v8::internal 7544 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698