Ignore:
Timestamp:
Jun 8, 2009, 11:02:24 PM (16 years ago)
Author:
[email protected]
Message:

Bug 26249: Support JSON.stringify
<https://bugs.webkit.org/show_bug.cgi?id=26249>

Reviewed by Sam Weinig.

Implement JSON.stringify. This patch handles all the semantics of the ES5
JSON.stringify function, including replacer functions and arrays and both
string and numeric gap arguments.

Currently uses a clamped recursive algorithm basically identical to the spec
description but with a few minor tweaks for performance and corrected semantics
discussed in the es-discuss mailing list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r44514 r44521  
    199199                A7E2EA6B0FB460CF00601F06 /* LiteralParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E2EA690FB460CF00601F06 /* LiteralParser.h */; };
    200200                A7E2EA6C0FB460CF00601F06 /* LiteralParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E2EA6A0FB460CF00601F06 /* LiteralParser.cpp */; };
     201                A7F9935F0FD7325100A0B2D0 /* JSONObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F9935D0FD7325100A0B2D0 /* JSONObject.h */; };
     202                A7F993600FD7325100A0B2D0 /* JSONObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7F9935E0FD7325100A0B2D0 /* JSONObject.cpp */; };
     203                A7F9949B0FD746A300A0B2D0 /* JSONObject.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F9949A0FD746A300A0B2D0 /* JSONObject.lut.h */; };
    201204                BC02E90D0E1839DB000F9297 /* ErrorConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC02E9050E1839DB000F9297 /* ErrorConstructor.h */; };
    202205                BC02E90F0E1839DB000F9297 /* ErrorPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = BC02E9070E1839DB000F9297 /* ErrorPrototype.h */; };
     
    735738                A7F8690E0F9584A100558697 /* CachedCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedCall.h; sourceTree = "<group>"; };
    736739                A7F869EC0F95C2EC00558697 /* CallFrameClosure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallFrameClosure.h; sourceTree = "<group>"; };
     740                A7F9935D0FD7325100A0B2D0 /* JSONObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONObject.h; sourceTree = "<group>"; };
     741                A7F9935E0FD7325100A0B2D0 /* JSONObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSONObject.cpp; sourceTree = "<group>"; };
     742                A7F9949A0FD746A300A0B2D0 /* JSONObject.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONObject.lut.h; path = /Users/oliver/builds/Debug/DerivedSources/JavaScriptCore/JSONObject.lut.h; sourceTree = "<absolute>"; };
    737743                A8E894310CD0602400367179 /* JSCallbackObjectFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCallbackObjectFunctions.h; sourceTree = "<group>"; };
    738744                A8E894330CD0603F00367179 /* JSGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObject.h; sourceTree = "<group>"; };
     
    11431149                                BC18C5230E16FC8A00B34460 /* ArrayPrototype.lut.h */,
    11441150                                BCD203E70E1718F4002C7E82 /* DatePrototype.lut.h */,
     1151                                A7F9949A0FD746A300A0B2D0 /* JSONObject.lut.h */,
    11451152                                BC18C5290E16FCC200B34460 /* MathObject.lut.h */,
    11461153                                BC2680E60E16D52300A06E92 /* NumberConstructor.lut.h */,
     
    14631470                                F692A8850255597D01FF60F7 /* UString.cpp */,
    14641471                                F692A8860255597D01FF60F7 /* UString.h */,
     1472                                A7F9935D0FD7325100A0B2D0 /* JSONObject.h */,
     1473                                A7F9935E0FD7325100A0B2D0 /* JSONObject.cpp */,
    14651474                        );
    14661475                        path = runtime;
     
    18471856                                0BDFFAE00FC6192900D69EF4 /* CrossThreadRefCounted.h in Headers */,
    18481857                                0BDFFAE10FC6193100D69EF4 /* OwnFastMallocPtr.h in Headers */,
     1858                                A7F9935F0FD7325100A0B2D0 /* JSONObject.h in Headers */,
     1859                                A7F9949B0FD746A300A0B2D0 /* JSONObject.lut.h in Headers */,
    18491860                                86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */,
    18501861                                86ADD1460FDDEA980006EEC2 /* MacroAssemblerARMv7.h in Headers */,
     
    22102221                                93052C340FB792190048FDC3 /* ParserArena.cpp in Sources */,
    22112222                                BCDD51EB0FB8DF74004A8BDC /* JITOpcodes.cpp in Sources */,
     2223                                A7F993600FD7325100A0B2D0 /* JSONObject.cpp in Sources */,
    22122224                        );
    22132225                        runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset for help on using the changeset viewer.