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

Side by Side Diff: src/objects-debug.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/objects.cc ('k') | src/objects-inl.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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 MapVerify(); 322 MapVerify();
323 CHECK(is_shared()); 323 CHECK(is_shared());
324 CHECK(instance_descriptors()->IsEmpty()); 324 CHECK(instance_descriptors()->IsEmpty());
325 CHECK_EQ(0, pre_allocated_property_fields()); 325 CHECK_EQ(0, pre_allocated_property_fields());
326 CHECK_EQ(0, unused_property_fields()); 326 CHECK_EQ(0, unused_property_fields());
327 CHECK_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), 327 CHECK_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()),
328 visitor_id()); 328 visitor_id());
329 } 329 }
330 330
331 331
332 void Map::VerifyOmittedPrototypeChecks() {
333 if (!FLAG_omit_prototype_checks_for_leaf_maps) return;
334 if (HasTransitionArray() || is_dictionary_map()) {
335 CHECK_EQ(0, dependent_code()->number_of_entries(
336 DependentCode::kPrototypeCheckGroup));
337 }
338 }
339
340
332 void CodeCache::CodeCacheVerify() { 341 void CodeCache::CodeCacheVerify() {
333 VerifyHeapPointer(default_cache()); 342 VerifyHeapPointer(default_cache());
334 VerifyHeapPointer(normal_type_cache()); 343 VerifyHeapPointer(normal_type_cache());
335 CHECK(default_cache()->IsFixedArray()); 344 CHECK(default_cache()->IsFixedArray());
336 CHECK(normal_type_cache()->IsUndefined() 345 CHECK(normal_type_cache()->IsUndefined()
337 || normal_type_cache()->IsCodeCacheHashTable()); 346 || normal_type_cache()->IsCodeCacheHashTable());
338 } 347 }
339 348
340 349
341 void PolymorphicCodeCache::PolymorphicCodeCacheVerify() { 350 void PolymorphicCodeCache::PolymorphicCodeCacheVerify() {
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 606
598 607
599 void Code::VerifyEmbeddedMapsDependency() { 608 void Code::VerifyEmbeddedMapsDependency() {
600 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); 609 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
601 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { 610 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) {
602 RelocInfo::Mode mode = it.rinfo()->rmode(); 611 RelocInfo::Mode mode = it.rinfo()->rmode();
603 if (mode == RelocInfo::EMBEDDED_OBJECT && 612 if (mode == RelocInfo::EMBEDDED_OBJECT &&
604 it.rinfo()->target_object()->IsMap()) { 613 it.rinfo()->target_object()->IsMap()) {
605 Map* map = Map::cast(it.rinfo()->target_object()); 614 Map* map = Map::cast(it.rinfo()->target_object());
606 if (map->CanTransition()) { 615 if (map->CanTransition()) {
607 CHECK(map->dependent_codes()->Contains(this)); 616 CHECK(map->dependent_code()->Contains(
617 DependentCode::kWeaklyEmbeddedGroup, this));
608 } 618 }
609 } 619 }
610 } 620 }
611 } 621 }
612 622
613 623
614 void JSArray::JSArrayVerify() { 624 void JSArray::JSArrayVerify() {
615 JSObjectVerify(); 625 JSObjectVerify();
616 CHECK(length()->IsNumber() || length()->IsUndefined()); 626 CHECK(length()->IsNumber() || length()->IsUndefined());
617 CHECK(elements()->IsUndefined() || 627 CHECK(elements()->IsUndefined() ||
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 for (int i = 0; i < number_of_transitions(); ++i) { 1058 for (int i = 0; i < number_of_transitions(); ++i) {
1049 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1059 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1050 } 1060 }
1051 return true; 1061 return true;
1052 } 1062 }
1053 1063
1054 1064
1055 #endif // DEBUG 1065 #endif // DEBUG
1056 1066
1057 } } // namespace v8::internal 1067 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698