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

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

Issue 715313003: Avoid fast short-cut in Map::GeneralizeRepresentation() for literals with non-simple transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/objects.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 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_JSON_PARSER_H_ 5 #ifndef V8_JSON_PARSER_H_
6 #define V8_JSON_PARSER_H_ 6 #define V8_JSON_PARSER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/char-predicates-inl.h" 10 #include "src/char-predicates-inl.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 if (value->FitsRepresentation(expected_representation)) { 394 if (value->FitsRepresentation(expected_representation)) {
395 if (expected_representation.IsDouble()) { 395 if (expected_representation.IsDouble()) {
396 value = Object::NewStorageFor(isolate(), value, 396 value = Object::NewStorageFor(isolate(), value,
397 expected_representation); 397 expected_representation);
398 } else if (expected_representation.IsHeapObject() && 398 } else if (expected_representation.IsHeapObject() &&
399 !target->instance_descriptors()->GetFieldType( 399 !target->instance_descriptors()->GetFieldType(
400 descriptor)->NowContains(value)) { 400 descriptor)->NowContains(value)) {
401 Handle<HeapType> value_type(value->OptimalType( 401 Handle<HeapType> value_type(value->OptimalType(
402 isolate(), expected_representation)); 402 isolate(), expected_representation));
403 Map::GeneralizeFieldType(target, descriptor, value_type); 403 Map::GeneralizeFieldType(target, descriptor,
404 expected_representation, value_type);
404 } 405 }
405 DCHECK(target->instance_descriptors()->GetFieldType( 406 DCHECK(target->instance_descriptors()->GetFieldType(
406 descriptor)->NowContains(value)); 407 descriptor)->NowContains(value));
407 properties.Add(value, zone()); 408 properties.Add(value, zone());
408 map = target; 409 map = target;
409 continue; 410 continue;
410 } else { 411 } else {
411 transitioning = false; 412 transitioning = false;
412 } 413 }
413 } 414 }
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 812
812 DCHECK_EQ('"', c0_); 813 DCHECK_EQ('"', c0_);
813 // Advance past the last '"'. 814 // Advance past the last '"'.
814 AdvanceSkipWhitespace(); 815 AdvanceSkipWhitespace();
815 return result; 816 return result;
816 } 817 }
817 818
818 } } // namespace v8::internal 819 } } // namespace v8::internal
819 820
820 #endif // V8_JSON_PARSER_H_ 821 #endif // V8_JSON_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698