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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 314 |
315 // Walk up the prototype chain. | 315 // Walk up the prototype chain. |
316 if (!map->prototype()->IsJSObject()) { | 316 if (!map->prototype()->IsJSObject()) { |
317 // Perform the implicit ToObject for primitives here. | 317 // Perform the implicit ToObject for primitives here. |
318 // Implemented according to ES6 section 7.3.2 GetV (V, P). | 318 // Implemented according to ES6 section 7.3.2 GetV (V, P). |
319 Handle<JSFunction> constructor; | 319 Handle<JSFunction> constructor; |
320 if (Map::GetConstructorFunction(map, native_context()) | 320 if (Map::GetConstructorFunction(map, native_context()) |
321 .ToHandle(&constructor)) { | 321 .ToHandle(&constructor)) { |
322 map = handle(constructor->initial_map(), isolate()); | 322 map = handle(constructor->initial_map(), isolate()); |
323 DCHECK(map->prototype()->IsJSObject()); | 323 DCHECK(map->prototype()->IsJSObject()); |
324 } else if (map->prototype()->IsNull(isolate())) { | 324 } else if (map->prototype()->IsNull()) { |
325 // Store to property not found on the receiver or any prototype, we need | 325 // Store to property not found on the receiver or any prototype, we need |
326 // to transition to a new data property. | 326 // to transition to a new data property. |
327 // Implemented according to ES6 section 9.1.9 [[Set]] (P, V, Receiver) | 327 // Implemented according to ES6 section 9.1.9 [[Set]] (P, V, Receiver) |
328 if (access_mode == AccessMode::kStore) { | 328 if (access_mode == AccessMode::kStore) { |
329 return LookupTransition(receiver_map, name, holder, access_info); | 329 return LookupTransition(receiver_map, name, holder, access_info); |
330 } | 330 } |
331 // The property was not found, return undefined or throw depending | 331 // The property was not found, return undefined or throw depending |
332 // on the language mode of the load operation. | 332 // on the language mode of the load operation. |
333 // Implemented according to ES6 section 9.1.8 [[Get]] (P, Receiver) | 333 // Implemented according to ES6 section 9.1.8 [[Get]] (P, Receiver) |
334 *access_info = PropertyAccessInfo::NotFound( | 334 *access_info = PropertyAccessInfo::NotFound( |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 } | 452 } |
453 return false; | 453 return false; |
454 } | 454 } |
455 | 455 |
456 | 456 |
457 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } | 457 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } |
458 | 458 |
459 } // namespace compiler | 459 } // namespace compiler |
460 } // namespace internal | 460 } // namespace internal |
461 } // namespace v8 | 461 } // namespace v8 |
OLD | NEW |