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

Side by Side Diff: src/json-parser.cc

Issue 2601643002: [runtime] Add MapUpdater class that manages all kinds of map updates. (Closed)
Patch Set: Addressing comments 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 | « BUILD.gn ('k') | src/map-updater.h » ('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/json-parser.h" 5 #include "src/json-parser.h"
6 6
7 #include "src/char-predicates-inl.h" 7 #include "src/char-predicates-inl.h"
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 target->instance_descriptors()->GetDetails(descriptor); 392 target->instance_descriptors()->GetDetails(descriptor);
393 Representation expected_representation = details.representation(); 393 Representation expected_representation = details.representation();
394 394
395 if (value->FitsRepresentation(expected_representation)) { 395 if (value->FitsRepresentation(expected_representation)) {
396 if (expected_representation.IsHeapObject() && 396 if (expected_representation.IsHeapObject() &&
397 !target->instance_descriptors() 397 !target->instance_descriptors()
398 ->GetFieldType(descriptor) 398 ->GetFieldType(descriptor)
399 ->NowContains(value)) { 399 ->NowContains(value)) {
400 Handle<FieldType> value_type( 400 Handle<FieldType> value_type(
401 value->OptimalType(isolate(), expected_representation)); 401 value->OptimalType(isolate(), expected_representation));
402 Map::GeneralizeFieldType(target, descriptor, 402 Map::GeneralizeField(target, descriptor, expected_representation,
403 expected_representation, value_type); 403 value_type);
404 } 404 }
405 DCHECK(target->instance_descriptors() 405 DCHECK(target->instance_descriptors()
406 ->GetFieldType(descriptor) 406 ->GetFieldType(descriptor)
407 ->NowContains(value)); 407 ->NowContains(value));
408 properties.Add(value, zone()); 408 properties.Add(value, zone());
409 map = target; 409 map = target;
410 descriptor++; 410 descriptor++;
411 continue; 411 continue;
412 } else { 412 } else {
413 transitioning = false; 413 transitioning = false;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 AdvanceSkipWhitespace(); 803 AdvanceSkipWhitespace();
804 return result; 804 return result;
805 } 805 }
806 806
807 // Explicit instantiation. 807 // Explicit instantiation.
808 template class JsonParser<true>; 808 template class JsonParser<true>;
809 template class JsonParser<false>; 809 template class JsonParser<false>;
810 810
811 } // namespace internal 811 } // namespace internal
812 } // namespace v8 812 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/map-updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698