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

Side by Side Diff: src/parsing/json-parser.h

Issue 1636013002: Replace HeapType with a non-templated FieldType class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tracing of generalizations Created 4 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #ifndef V8_PARSING_JSON_PARSER_H_ 5 #ifndef V8_PARSING_JSON_PARSER_H_
6 #define V8_PARSING_JSON_PARSER_H_ 6 #define V8_PARSING_JSON_PARSER_H_
7 7
8 #include "src/char-predicates.h" 8 #include "src/char-predicates.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 if (transitioning) { 409 if (transitioning) {
410 PropertyDetails details = 410 PropertyDetails details =
411 target->instance_descriptors()->GetDetails(descriptor); 411 target->instance_descriptors()->GetDetails(descriptor);
412 Representation expected_representation = details.representation(); 412 Representation expected_representation = details.representation();
413 413
414 if (value->FitsRepresentation(expected_representation)) { 414 if (value->FitsRepresentation(expected_representation)) {
415 if (expected_representation.IsHeapObject() && 415 if (expected_representation.IsHeapObject() &&
416 !target->instance_descriptors() 416 !target->instance_descriptors()
417 ->GetFieldType(descriptor) 417 ->GetFieldType(descriptor)
418 ->NowContains(value)) { 418 ->NowContains(value)) {
419 Handle<HeapType> value_type( 419 Handle<FieldType> value_type(
420 value->OptimalType(isolate(), expected_representation)); 420 value->OptimalType(isolate(), expected_representation));
421 Map::GeneralizeFieldType(target, descriptor, 421 Map::GeneralizeFieldType(target, descriptor,
422 expected_representation, value_type); 422 expected_representation, value_type);
423 } 423 }
424 DCHECK(target->instance_descriptors() 424 DCHECK(target->instance_descriptors()
425 ->GetFieldType(descriptor) 425 ->GetFieldType(descriptor)
426 ->NowContains(value)); 426 ->NowContains(value));
427 properties.Add(value, zone()); 427 properties.Add(value, zone());
428 map = target; 428 map = target;
429 descriptor++; 429 descriptor++;
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 DCHECK_EQ('"', c0_); 833 DCHECK_EQ('"', c0_);
834 // Advance past the last '"'. 834 // Advance past the last '"'.
835 AdvanceSkipWhitespace(); 835 AdvanceSkipWhitespace();
836 return result; 836 return result;
837 } 837 }
838 838
839 } // namespace internal 839 } // namespace internal
840 } // namespace v8 840 } // namespace v8
841 841
842 #endif // V8_PARSING_JSON_PARSER_H_ 842 #endif // V8_PARSING_JSON_PARSER_H_
OLDNEW
« src/ic/ic.cc ('K') | « src/objects-inl.h ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698