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

Side by Side Diff: src/objects.cc

Issue 2816006: [Isolates] KeyedLookupCache / DescriptorLookupCache / ContextSlotCache moved to Isolate. (Closed)
Patch Set: Created 10 years, 6 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
« no previous file with comments | « src/isolate.cc ('k') | src/runtime.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 return true; 1675 return true;
1676 } 1676 }
1677 } 1677 }
1678 } 1678 }
1679 return false; 1679 return false;
1680 } 1680 }
1681 1681
1682 1682
1683 void JSObject::LookupInDescriptor(String* name, LookupResult* result) { 1683 void JSObject::LookupInDescriptor(String* name, LookupResult* result) {
1684 DescriptorArray* descriptors = map()->instance_descriptors(); 1684 DescriptorArray* descriptors = map()->instance_descriptors();
1685 int number = DescriptorLookupCache::Lookup(descriptors, name); 1685 DescriptorLookupCache* descriptor_lookup_cache = Isolate::Current()->
1686 descriptor_lookup_cache();
1687 int number = descriptor_lookup_cache->Lookup(descriptors, name);
1688
1686 if (number == DescriptorLookupCache::kAbsent) { 1689 if (number == DescriptorLookupCache::kAbsent) {
1687 number = descriptors->Search(name); 1690 number = descriptors->Search(name);
1688 DescriptorLookupCache::Update(descriptors, name, number); 1691 descriptor_lookup_cache->Update(descriptors, name, number);
1689 } 1692 }
1690 if (number != DescriptorArray::kNotFound) { 1693 if (number != DescriptorArray::kNotFound) {
1691 result->DescriptorResult(this, descriptors->GetDetails(number), number); 1694 result->DescriptorResult(this, descriptors->GetDetails(number), number);
1692 } else { 1695 } else {
1693 result->NotFound(); 1696 result->NotFound();
1694 } 1697 }
1695 } 1698 }
1696 1699
1697 1700
1698 void JSObject::LocalLookupRealNamedProperty(String* name, 1701 void JSObject::LocalLookupRealNamedProperty(String* name,
(...skipping 7023 matching lines...) Expand 10 before | Expand all | Expand 10 after
8722 if (break_point_objects()->IsUndefined()) return 0; 8725 if (break_point_objects()->IsUndefined()) return 0;
8723 // Single beak point. 8726 // Single beak point.
8724 if (!break_point_objects()->IsFixedArray()) return 1; 8727 if (!break_point_objects()->IsFixedArray()) return 1;
8725 // Multiple break points. 8728 // Multiple break points.
8726 return FixedArray::cast(break_point_objects())->length(); 8729 return FixedArray::cast(break_point_objects())->length();
8727 } 8730 }
8728 #endif 8731 #endif
8729 8732
8730 8733
8731 } } // namespace v8::internal 8734 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698