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

Side by Side Diff: src/map-updater.cc

Issue 2627003005: [printing] Remove duplicate code that prints property details. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | src/objects.h » ('j') | src/property.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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 "src/map-updater.h" 5 #include "src/map-updater.h"
6 6
7 #include "src/field-type.h" 7 #include "src/field-type.h"
8 #include "src/handles.h" 8 #include "src/handles.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 GetOrComputeFieldType(i, old_details.location(), next_representation); 427 GetOrComputeFieldType(i, old_details.location(), next_representation);
428 428
429 Handle<FieldType> target_field_type = 429 Handle<FieldType> target_field_type =
430 GetOrComputeFieldType(target_descriptors, i, 430 GetOrComputeFieldType(target_descriptors, i,
431 target_details.location(), next_representation); 431 target_details.location(), next_representation);
432 432
433 Handle<FieldType> next_field_type = Map::GeneralizeFieldType( 433 Handle<FieldType> next_field_type = Map::GeneralizeFieldType(
434 old_details.representation(), old_field_type, next_representation, 434 old_details.representation(), old_field_type, next_representation,
435 target_field_type, isolate_); 435 target_field_type, isolate_);
436 436
437 Handle<Object> wrapped_type(Map::WrapType(next_field_type)); 437 Handle<Object> wrapped_type(Map::WrapFieldType(next_field_type));
438 Descriptor d; 438 Descriptor d;
439 if (next_kind == kData) { 439 if (next_kind == kData) {
440 d = Descriptor::DataField(key, current_offset, wrapped_type, 440 d = Descriptor::DataField(key, current_offset, wrapped_type,
441 next_attributes, next_representation); 441 next_attributes, next_representation);
442 } else { 442 } else {
443 // TODO(ishell): mutable accessors are not implemented yet. 443 // TODO(ishell): mutable accessors are not implemented yet.
444 UNIMPLEMENTED(); 444 UNIMPLEMENTED();
445 } 445 }
446 current_offset += d.GetDetails().field_width_in_words(); 446 current_offset += d.GetDetails().field_width_in_words();
447 new_descriptors->Set(i, &d); 447 new_descriptors->Set(i, &d);
(...skipping 21 matching lines...) Expand all
469 PropertyKind next_kind = old_details.kind(); 469 PropertyKind next_kind = old_details.kind();
470 PropertyAttributes next_attributes = old_details.attributes(); 470 PropertyAttributes next_attributes = old_details.attributes();
471 PropertyLocation next_location = old_details.location(); 471 PropertyLocation next_location = old_details.location();
472 Representation next_representation = old_details.representation(); 472 Representation next_representation = old_details.representation();
473 473
474 Descriptor d; 474 Descriptor d;
475 if (next_location == kField) { 475 if (next_location == kField) {
476 Handle<FieldType> old_field_type = 476 Handle<FieldType> old_field_type =
477 GetOrComputeFieldType(i, old_details.location(), next_representation); 477 GetOrComputeFieldType(i, old_details.location(), next_representation);
478 478
479 Handle<Object> wrapped_type(Map::WrapType(old_field_type)); 479 Handle<Object> wrapped_type(Map::WrapFieldType(old_field_type));
480 Descriptor d; 480 Descriptor d;
481 if (next_kind == kData) { 481 if (next_kind == kData) {
482 d = Descriptor::DataField(key, current_offset, wrapped_type, 482 d = Descriptor::DataField(key, current_offset, wrapped_type,
483 next_attributes, next_representation); 483 next_attributes, next_representation);
484 } else { 484 } else {
485 // TODO(ishell): mutable accessors are not implemented yet. 485 // TODO(ishell): mutable accessors are not implemented yet.
486 UNIMPLEMENTED(); 486 UNIMPLEMENTED();
487 } 487 }
488 current_offset += d.GetDetails().field_width_in_words(); 488 current_offset += d.GetDetails().field_width_in_words();
489 new_descriptors->Set(i, &d); 489 new_descriptors->Set(i, &d);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 // the new descriptors to maintain descriptors sharing invariant. 609 // the new descriptors to maintain descriptors sharing invariant.
610 split_map->ReplaceDescriptors(*new_descriptors, *new_layout_descriptor); 610 split_map->ReplaceDescriptors(*new_descriptors, *new_layout_descriptor);
611 611
612 result_map_ = new_map; 612 result_map_ = new_map;
613 state_ = kEnd; 613 state_ = kEnd;
614 return state_; // Done. 614 return state_; // Done.
615 } 615 }
616 616
617 } // namespace internal 617 } // namespace internal
618 } // namespace v8 618 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/property.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698