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

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

Issue 2410293003: [runtime] Rename FieldTypeGroup to FieldOwnerGroup. (Closed)
Patch Set: Address feedback Created 4 years, 2 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/compilation-dependencies.h ('k') | src/crankshaft/hydrogen.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/compiler/type-cache.h" 10 #include "src/compiler/type-cache.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 if (descriptors_field_type->IsNone()) { 315 if (descriptors_field_type->IsNone()) {
316 // Store is not safe if the field type was cleared. 316 // Store is not safe if the field type was cleared.
317 if (access_mode == AccessMode::kStore) return false; 317 if (access_mode == AccessMode::kStore) return false;
318 318
319 // The field type was cleared by the GC, so we don't know anything 319 // The field type was cleared by the GC, so we don't know anything
320 // about the contents now. 320 // about the contents now.
321 } else if (descriptors_field_type->IsClass()) { 321 } else if (descriptors_field_type->IsClass()) {
322 // Add proper code dependencies in case of stable field map(s). 322 // Add proper code dependencies in case of stable field map(s).
323 Handle<Map> field_owner_map(map->FindFieldOwner(number), 323 Handle<Map> field_owner_map(map->FindFieldOwner(number),
324 isolate()); 324 isolate());
325 dependencies()->AssumeFieldType(field_owner_map); 325 dependencies()->AssumeFieldOwner(field_owner_map);
326 326
327 // Remember the field map, and try to infer a useful type. 327 // Remember the field map, and try to infer a useful type.
328 field_type = Type::For(descriptors_field_type->AsClass()); 328 field_type = Type::For(descriptors_field_type->AsClass());
329 field_map = descriptors_field_type->AsClass(); 329 field_map = descriptors_field_type->AsClass();
330 } 330 }
331 } 331 }
332 *access_info = PropertyAccessInfo::DataField( 332 *access_info = PropertyAccessInfo::DataField(
333 MapList{receiver_map}, field_index, field_representation, 333 MapList{receiver_map}, field_index, field_representation,
334 field_type, field_map, holder); 334 field_type, field_map, holder);
335 return true; 335 return true;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 Handle<FieldType> descriptors_field_type( 505 Handle<FieldType> descriptors_field_type(
506 transition_map->instance_descriptors()->GetFieldType(number), 506 transition_map->instance_descriptors()->GetFieldType(number),
507 isolate()); 507 isolate());
508 if (descriptors_field_type->IsNone()) { 508 if (descriptors_field_type->IsNone()) {
509 // Store is not safe if the field type was cleared. 509 // Store is not safe if the field type was cleared.
510 return false; 510 return false;
511 } else if (descriptors_field_type->IsClass()) { 511 } else if (descriptors_field_type->IsClass()) {
512 // Add proper code dependencies in case of stable field map(s). 512 // Add proper code dependencies in case of stable field map(s).
513 Handle<Map> field_owner_map(transition_map->FindFieldOwner(number), 513 Handle<Map> field_owner_map(transition_map->FindFieldOwner(number),
514 isolate()); 514 isolate());
515 dependencies()->AssumeFieldType(field_owner_map); 515 dependencies()->AssumeFieldOwner(field_owner_map);
516 516
517 // Remember the field map, and try to infer a useful type. 517 // Remember the field map, and try to infer a useful type.
518 field_type = Type::For(descriptors_field_type->AsClass()); 518 field_type = Type::For(descriptors_field_type->AsClass());
519 field_map = descriptors_field_type->AsClass(); 519 field_map = descriptors_field_type->AsClass();
520 } 520 }
521 } 521 }
522 dependencies()->AssumeMapNotDeprecated(transition_map); 522 dependencies()->AssumeMapNotDeprecated(transition_map);
523 *access_info = PropertyAccessInfo::DataField( 523 *access_info = PropertyAccessInfo::DataField(
524 MapList{map}, field_index, field_representation, field_type, field_map, 524 MapList{map}, field_index, field_representation, field_type, field_map,
525 holder, transition_map); 525 holder, transition_map);
526 return true; 526 return true;
527 } 527 }
528 return false; 528 return false;
529 } 529 }
530 530
531 531
532 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } 532 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); }
533 533
534 } // namespace compiler 534 } // namespace compiler
535 } // namespace internal 535 } // namespace internal
536 } // namespace v8 536 } // namespace v8
OLDNEW
« no previous file with comments | « src/compilation-dependencies.h ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698