Chromium Code Reviews| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 224 | 224 |
| 225 | 225 |
| 226 bool AccessInfoFactory::ComputePropertyAccessInfo( | 226 bool AccessInfoFactory::ComputePropertyAccessInfo( |
| 227 Handle<Map> map, Handle<Name> name, AccessMode access_mode, | 227 Handle<Map> map, Handle<Name> name, AccessMode access_mode, |
| 228 PropertyAccessInfo* access_info) { | 228 PropertyAccessInfo* access_info) { |
| 229 // Check if it is safe to inline property access for the {map}. | 229 // Check if it is safe to inline property access for the {map}. |
| 230 if (!CanInlinePropertyAccess(map)) return false; | 230 if (!CanInlinePropertyAccess(map)) return false; |
| 231 | 231 |
| 232 // Compute the receiver type. | 232 // Compute the receiver type. |
| 233 Handle<Map> receiver_map = map; | 233 Handle<Map> receiver_map = map; |
| 234 name = isolate()->factory()->InternalizeName(name); | |
|
Michael Starzinger
2016/02/18 12:49:55
suggestion/nit: Should we add a short comment that
| |
| 234 | 235 |
| 235 // We support fast inline cases for certain JSObject getters. | 236 // We support fast inline cases for certain JSObject getters. |
| 236 if (access_mode == AccessMode::kLoad && | 237 if (access_mode == AccessMode::kLoad && |
| 237 LookupSpecialFieldAccessor(map, name, access_info)) { | 238 LookupSpecialFieldAccessor(map, name, access_info)) { |
| 238 return true; | 239 return true; |
| 239 } | 240 } |
| 240 | 241 |
| 241 MaybeHandle<JSObject> holder; | 242 MaybeHandle<JSObject> holder; |
| 242 do { | 243 do { |
| 243 // Lookup the named property on the {map}. | 244 // Lookup the named property on the {map}. |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 475 } | 476 } |
| 476 return false; | 477 return false; |
| 477 } | 478 } |
| 478 | 479 |
| 479 | 480 |
| 480 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } | 481 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } |
| 481 | 482 |
| 482 } // namespace compiler | 483 } // namespace compiler |
| 483 } // namespace internal | 484 } // namespace internal |
| 484 } // namespace v8 | 485 } // namespace v8 |
| OLD | NEW |