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

Side by Side Diff: src/value-serializer.cc

Issue 2598543003: [runtime][ic] Constant field tracking support. (Closed)
Patch Set: Addressing comments Created 3 years, 10 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/property-details.h ('k') | test/cctest/heap/test-heap.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/value-serializer.h" 5 #include "src/value-serializer.h"
6 6
7 #include <type_traits> 7 #include <type_traits>
8 8
9 #include "src/base/logging.h" 9 #include "src/base/logging.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 PropertyDetails details = 1716 PropertyDetails details =
1717 target->instance_descriptors()->GetDetails(descriptor); 1717 target->instance_descriptors()->GetDetails(descriptor);
1718 Representation expected_representation = details.representation(); 1718 Representation expected_representation = details.representation();
1719 if (value->FitsRepresentation(expected_representation)) { 1719 if (value->FitsRepresentation(expected_representation)) {
1720 if (expected_representation.IsHeapObject() && 1720 if (expected_representation.IsHeapObject() &&
1721 !target->instance_descriptors() 1721 !target->instance_descriptors()
1722 ->GetFieldType(descriptor) 1722 ->GetFieldType(descriptor)
1723 ->NowContains(value)) { 1723 ->NowContains(value)) {
1724 Handle<FieldType> value_type = 1724 Handle<FieldType> value_type =
1725 value->OptimalType(isolate_, expected_representation); 1725 value->OptimalType(isolate_, expected_representation);
1726 Map::GeneralizeField(target, descriptor, expected_representation, 1726 Map::GeneralizeField(target, descriptor, details.constness(),
1727 value_type); 1727 expected_representation, value_type);
1728 } 1728 }
1729 DCHECK(target->instance_descriptors() 1729 DCHECK(target->instance_descriptors()
1730 ->GetFieldType(descriptor) 1730 ->GetFieldType(descriptor)
1731 ->NowContains(value)); 1731 ->NowContains(value));
1732 properties.push_back(value); 1732 properties.push_back(value);
1733 map = target; 1733 map = target;
1734 continue; 1734 continue;
1735 } else { 1735 } else {
1736 transitioning = false; 1736 transitioning = false;
1737 } 1737 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 if (stack.size() != 1) { 1929 if (stack.size() != 1) {
1930 isolate_->Throw(*isolate_->factory()->NewError( 1930 isolate_->Throw(*isolate_->factory()->NewError(
1931 MessageTemplate::kDataCloneDeserializationError)); 1931 MessageTemplate::kDataCloneDeserializationError));
1932 return MaybeHandle<Object>(); 1932 return MaybeHandle<Object>();
1933 } 1933 }
1934 return scope.CloseAndEscape(stack[0]); 1934 return scope.CloseAndEscape(stack[0]);
1935 } 1935 }
1936 1936
1937 } // namespace internal 1937 } // namespace internal
1938 } // namespace v8 1938 } // namespace v8
OLDNEW
« no previous file with comments | « src/property-details.h ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698