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

Side by Side Diff: src/json-parser.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/ic/ic.cc ('k') | src/lookup.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::GeneralizeField(target, descriptor, expected_representation, 402 Map::GeneralizeField(target, descriptor, details.constness(),
403 value_type); 403 expected_representation, 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 AdvanceSkipWhitespace(); 804 AdvanceSkipWhitespace();
805 return result; 805 return result;
806 } 806 }
807 807
808 // Explicit instantiation. 808 // Explicit instantiation.
809 template class JsonParser<true>; 809 template class JsonParser<true>;
810 template class JsonParser<false>; 810 template class JsonParser<false>;
811 811
812 } // namespace internal 812 } // namespace internal
813 } // namespace v8 813 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698