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

Side by Side Diff: src/compiler/access-info.cc

Issue 2059173002: Reland of place all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/code-stubs.cc ('k') | src/compiler/js-call-reducer.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 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
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()) { 324 } else if (map->prototype()->IsNull(isolate())) {
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
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
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698