| OLD | NEW | 
|    1 // Copyright 2011 the V8 project authors. All rights reserved. |    1 // Copyright 2011 the V8 project authors. All rights reserved. | 
|    2 // Redistribution and use in source and binary forms, with or without |    2 // Redistribution and use in source and binary forms, with or without | 
|    3 // modification, are permitted provided that the following conditions are |    3 // modification, are permitted provided that the following conditions are | 
|    4 // met: |    4 // met: | 
|    5 // |    5 // | 
|    6 //     * Redistributions of source code must retain the above copyright |    6 //     * Redistributions of source code must retain the above copyright | 
|    7 //       notice, this list of conditions and the following disclaimer. |    7 //       notice, this list of conditions and the following disclaimer. | 
|    8 //     * Redistributions in binary form must reproduce the above |    8 //     * Redistributions in binary form must reproduce the above | 
|    9 //       copyright notice, this list of conditions and the following |    9 //       copyright notice, this list of conditions and the following | 
|   10 //       disclaimer in the documentation and/or other materials provided |   10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  336         if (value.is_null()) return ReportUnexpectedCharacter(); |  336         if (value.is_null()) return ReportUnexpectedCharacter(); | 
|  337  |  337  | 
|  338         if (key->Equals(isolate()->heap()->Proto_symbol())) { |  338         if (key->Equals(isolate()->heap()->Proto_symbol())) { | 
|  339           prototype = value; |  339           prototype = value; | 
|  340         } else { |  340         } else { | 
|  341           if (JSObject::TryTransitionToField(json_object, key)) { |  341           if (JSObject::TryTransitionToField(json_object, key)) { | 
|  342             json_object->FastPropertyAtPut(current_index++, *value); |  342             json_object->FastPropertyAtPut(current_index++, *value); | 
|  343           } else { |  343           } else { | 
|  344             JSObject::SetLocalPropertyIgnoreAttributes( |  344             JSObject::SetLocalPropertyIgnoreAttributes( | 
|  345                 json_object, key, value, NONE); |  345                 json_object, key, value, NONE); | 
 |  346             current_index = json_object->NumberOfLocalProperties(); | 
|  346           } |  347           } | 
|  347         } |  348         } | 
|  348       } |  349       } | 
|  349     } while (MatchSkipWhiteSpace(',')); |  350     } while (MatchSkipWhiteSpace(',')); | 
|  350     if (c0_ != '}') { |  351     if (c0_ != '}') { | 
|  351       return ReportUnexpectedCharacter(); |  352       return ReportUnexpectedCharacter(); | 
|  352     } |  353     } | 
|  353     if (!prototype.is_null()) SetPrototype(json_object, prototype); |  354     if (!prototype.is_null()) SetPrototype(json_object, prototype); | 
|  354   } |  355   } | 
|  355   AdvanceSkipWhitespace(); |  356   AdvanceSkipWhitespace(); | 
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  678   } |  679   } | 
|  679   ASSERT_EQ('"', c0_); |  680   ASSERT_EQ('"', c0_); | 
|  680   // Advance past the last '"'. |  681   // Advance past the last '"'. | 
|  681   AdvanceSkipWhitespace(); |  682   AdvanceSkipWhitespace(); | 
|  682   return result; |  683   return result; | 
|  683 } |  684 } | 
|  684  |  685  | 
|  685 } }  // namespace v8::internal |  686 } }  // namespace v8::internal | 
|  686  |  687  | 
|  687 #endif  // V8_JSON_PARSER_H_ |  688 #endif  // V8_JSON_PARSER_H_ | 
| OLD | NEW |