| OLD | NEW |
| 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 <ostream> | 5 #include <ostream> |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/compilation-dependencies.h" | 8 #include "src/compilation-dependencies.h" |
| 9 #include "src/compiler/access-info.h" | 9 #include "src/compiler/access-info.h" |
| 10 #include "src/field-index-inl.h" | 10 #include "src/field-index-inl.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // We support fast inline cases for certain JSObject getters. | 235 // We support fast inline cases for certain JSObject getters. |
| 236 if (access_mode == AccessMode::kLoad && | 236 if (access_mode == AccessMode::kLoad && |
| 237 LookupSpecialFieldAccessor(map, name, access_info)) { | 237 LookupSpecialFieldAccessor(map, name, access_info)) { |
| 238 return true; | 238 return true; |
| 239 } | 239 } |
| 240 | 240 |
| 241 MaybeHandle<JSObject> holder; | 241 MaybeHandle<JSObject> holder; |
| 242 do { | 242 do { |
| 243 // Lookup the named property on the {map}. | 243 // Lookup the named property on the {map}. |
| 244 Handle<DescriptorArray> descriptors(map->instance_descriptors(), isolate()); | 244 Handle<DescriptorArray> descriptors(map->instance_descriptors(), isolate()); |
| 245 int const number = descriptors->SearchWithCache(*name, *map); | 245 int const number = descriptors->SearchWithCache(isolate(), *name, *map); |
| 246 if (number != DescriptorArray::kNotFound) { | 246 if (number != DescriptorArray::kNotFound) { |
| 247 PropertyDetails const details = descriptors->GetDetails(number); | 247 PropertyDetails const details = descriptors->GetDetails(number); |
| 248 if (access_mode == AccessMode::kStore) { | 248 if (access_mode == AccessMode::kStore) { |
| 249 // Don't bother optimizing stores to read-only properties. | 249 // Don't bother optimizing stores to read-only properties. |
| 250 if (details.IsReadOnly()) { | 250 if (details.IsReadOnly()) { |
| 251 return false; | 251 return false; |
| 252 } | 252 } |
| 253 // Check for store to data property on a prototype. | 253 // Check for store to data property on a prototype. |
| 254 if (details.kind() == kData && !holder.is_null()) { | 254 if (details.kind() == kData && !holder.is_null()) { |
| 255 // Store to property not found on the receiver but on a prototype, we | 255 // Store to property not found on the receiver but on a prototype, we |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 } | 475 } |
| 476 return false; | 476 return false; |
| 477 } | 477 } |
| 478 | 478 |
| 479 | 479 |
| 480 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } | 480 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } |
| 481 | 481 |
| 482 } // namespace compiler | 482 } // namespace compiler |
| 483 } // namespace internal | 483 } // namespace internal |
| 484 } // namespace v8 | 484 } // namespace v8 |
| OLD | NEW |