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

Side by Side Diff: src/objects.cc

Issue 1706833002: [runtime] pass in the Isolate into SearchWithCache (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/objects.h ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 9961 matching lines...) Expand 10 before | Expand all | Expand 10 after
9972 Handle<AccessorPair> pair = Handle<AccessorPair>::cast(maybe_pair); 9972 Handle<AccessorPair> pair = Handle<AccessorPair>::cast(maybe_pair);
9973 if (pair->get(component) != *accessor) { 9973 if (pair->get(component) != *accessor) {
9974 return Map::Normalize(map, mode, "TransitionToDifferentAccessor"); 9974 return Map::Normalize(map, mode, "TransitionToDifferentAccessor");
9975 } 9975 }
9976 9976
9977 return transition; 9977 return transition;
9978 } 9978 }
9979 9979
9980 Handle<AccessorPair> pair; 9980 Handle<AccessorPair> pair;
9981 DescriptorArray* old_descriptors = map->instance_descriptors(); 9981 DescriptorArray* old_descriptors = map->instance_descriptors();
9982 int descriptor = old_descriptors->SearchWithCache(*name, *map); 9982 int descriptor = old_descriptors->SearchWithCache(isolate, *name, *map);
9983 if (descriptor != DescriptorArray::kNotFound) { 9983 if (descriptor != DescriptorArray::kNotFound) {
9984 if (descriptor != map->LastAdded()) { 9984 if (descriptor != map->LastAdded()) {
9985 return Map::Normalize(map, mode, "AccessorsOverwritingNonLast"); 9985 return Map::Normalize(map, mode, "AccessorsOverwritingNonLast");
9986 } 9986 }
9987 PropertyDetails old_details = old_descriptors->GetDetails(descriptor); 9987 PropertyDetails old_details = old_descriptors->GetDetails(descriptor);
9988 if (old_details.type() != ACCESSOR_CONSTANT) { 9988 if (old_details.type() != ACCESSOR_CONSTANT) {
9989 return Map::Normalize(map, mode, "AccessorsOverwritingNonAccessors"); 9989 return Map::Normalize(map, mode, "AccessorsOverwritingNonAccessors");
9990 } 9990 }
9991 9991
9992 if (old_details.attributes() != attributes) { 9992 if (old_details.attributes() != attributes) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
10053 10053
10054 Handle<Map> Map::CopyInsertDescriptor(Handle<Map> map, 10054 Handle<Map> Map::CopyInsertDescriptor(Handle<Map> map,
10055 Descriptor* descriptor, 10055 Descriptor* descriptor,
10056 TransitionFlag flag) { 10056 TransitionFlag flag) {
10057 Handle<DescriptorArray> old_descriptors(map->instance_descriptors()); 10057 Handle<DescriptorArray> old_descriptors(map->instance_descriptors());
10058 10058
10059 // Ensure the key is unique. 10059 // Ensure the key is unique.
10060 descriptor->KeyToUniqueName(); 10060 descriptor->KeyToUniqueName();
10061 10061
10062 // We replace the key if it is already present. 10062 // We replace the key if it is already present.
10063 int index = old_descriptors->SearchWithCache(*descriptor->GetKey(), *map); 10063 int index = old_descriptors->SearchWithCache(map->GetIsolate(),
10064 *descriptor->GetKey(), *map);
10064 if (index != DescriptorArray::kNotFound) { 10065 if (index != DescriptorArray::kNotFound) {
10065 return CopyReplaceDescriptor(map, old_descriptors, descriptor, index, flag); 10066 return CopyReplaceDescriptor(map, old_descriptors, descriptor, index, flag);
10066 } 10067 }
10067 return CopyAddDescriptor(map, descriptor, flag); 10068 return CopyAddDescriptor(map, descriptor, flag);
10068 } 10069 }
10069 10070
10070 10071
10071 Handle<DescriptorArray> DescriptorArray::CopyUpTo( 10072 Handle<DescriptorArray> DescriptorArray::CopyUpTo(
10072 Handle<DescriptorArray> desc, 10073 Handle<DescriptorArray> desc,
10073 int enumeration_index, 10074 int enumeration_index,
(...skipping 9810 matching lines...) Expand 10 before | Expand all | Expand 10 after
19884 if (cell->value() != *new_value) { 19885 if (cell->value() != *new_value) {
19885 cell->set_value(*new_value); 19886 cell->set_value(*new_value);
19886 Isolate* isolate = cell->GetIsolate(); 19887 Isolate* isolate = cell->GetIsolate();
19887 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19888 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19888 isolate, DependentCode::kPropertyCellChangedGroup); 19889 isolate, DependentCode::kPropertyCellChangedGroup);
19889 } 19890 }
19890 } 19891 }
19891 19892
19892 } // namespace internal 19893 } // namespace internal
19893 } // namespace v8 19894 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698