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

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

Issue 334323003: Reland r22082 "Replace HeapNumber as doublebox with an explicit MutableHeapNumber." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Migrations test fixed Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/json-parser.h ('k') | src/mark-compact.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_STRINGIFIER_H_ 5 #ifndef V8_JSON_STRINGIFIER_H_
6 #define V8_JSON_STRINGIFIER_H_ 6 #define V8_JSON_STRINGIFIER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 EXCEPTION); 400 EXCEPTION);
401 } 401 }
402 402
403 if (object->IsSmi()) { 403 if (object->IsSmi()) {
404 if (deferred_string_key) SerializeDeferredKey(comma, key); 404 if (deferred_string_key) SerializeDeferredKey(comma, key);
405 return SerializeSmi(Smi::cast(*object)); 405 return SerializeSmi(Smi::cast(*object));
406 } 406 }
407 407
408 switch (HeapObject::cast(*object)->map()->instance_type()) { 408 switch (HeapObject::cast(*object)->map()->instance_type()) {
409 case HEAP_NUMBER_TYPE: 409 case HEAP_NUMBER_TYPE:
410 case MUTABLE_HEAP_NUMBER_TYPE:
410 if (deferred_string_key) SerializeDeferredKey(comma, key); 411 if (deferred_string_key) SerializeDeferredKey(comma, key);
411 return SerializeHeapNumber(Handle<HeapNumber>::cast(object)); 412 return SerializeHeapNumber(Handle<HeapNumber>::cast(object));
412 case ODDBALL_TYPE: 413 case ODDBALL_TYPE:
413 switch (Oddball::cast(*object)->kind()) { 414 switch (Oddball::cast(*object)->kind()) {
414 case Oddball::kFalse: 415 case Oddball::kFalse:
415 if (deferred_string_key) SerializeDeferredKey(comma, key); 416 if (deferred_string_key) SerializeDeferredKey(comma, key);
416 AppendAscii("false"); 417 AppendAscii("false");
417 return SUCCESS; 418 return SUCCESS;
418 case Oddball::kTrue: 419 case Oddball::kTrue:
419 if (deferred_string_key) SerializeDeferredKey(comma, key); 420 if (deferred_string_key) SerializeDeferredKey(comma, key);
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 SerializeString_<false, uint8_t>(object); 871 SerializeString_<false, uint8_t>(object);
871 } else { 872 } else {
872 SerializeString_<false, uc16>(object); 873 SerializeString_<false, uc16>(object);
873 } 874 }
874 } 875 }
875 } 876 }
876 877
877 } } // namespace v8::internal 878 } } // namespace v8::internal
878 879
879 #endif // V8_JSON_STRINGIFIER_H_ 880 #endif // V8_JSON_STRINGIFIER_H_
OLDNEW
« no previous file with comments | « src/json-parser.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698