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

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

Issue 10534139: One Zone per CompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename CompilationInfoZone to ZoneWithCompilationInfo Created 8 years, 6 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/isolate.cc ('k') | src/jsregexp.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 // 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 return ReportUnexpectedCharacter(); 319 return ReportUnexpectedCharacter();
320 } 320 }
321 } 321 }
322 AdvanceSkipWhitespace(); 322 AdvanceSkipWhitespace();
323 return json_object; 323 return json_object;
324 } 324 }
325 325
326 // Parse a JSON array. Position must be right at '['. 326 // Parse a JSON array. Position must be right at '['.
327 template <bool seq_ascii> 327 template <bool seq_ascii>
328 Handle<Object> JsonParser<seq_ascii>::ParseJsonArray() { 328 Handle<Object> JsonParser<seq_ascii>::ParseJsonArray() {
329 ZoneScope zone_scope(isolate(), DELETE_ON_EXIT); 329 ZoneScope zone_scope(zone(), DELETE_ON_EXIT);
330 ZoneList<Handle<Object> > elements(4, zone()); 330 ZoneList<Handle<Object> > elements(4, zone());
331 ASSERT_EQ(c0_, '['); 331 ASSERT_EQ(c0_, '[');
332 332
333 AdvanceSkipWhitespace(); 333 AdvanceSkipWhitespace();
334 if (c0_ != ']') { 334 if (c0_ != ']') {
335 do { 335 do {
336 Handle<Object> element = ParseJsonValue(); 336 Handle<Object> element = ParseJsonValue();
337 if (element.is_null()) return ReportUnexpectedCharacter(); 337 if (element.is_null()) return ReportUnexpectedCharacter();
338 elements.Add(element, zone()); 338 elements.Add(element, zone());
339 } while (MatchSkipWhiteSpace(',')); 339 } while (MatchSkipWhiteSpace(','));
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 } 595 }
596 ASSERT_EQ('"', c0_); 596 ASSERT_EQ('"', c0_);
597 // Advance past the last '"'. 597 // Advance past the last '"'.
598 AdvanceSkipWhitespace(); 598 AdvanceSkipWhitespace();
599 return result; 599 return result;
600 } 600 }
601 601
602 } } // namespace v8::internal 602 } } // namespace v8::internal
603 603
604 #endif // V8_JSON_PARSER_H_ 604 #endif // V8_JSON_PARSER_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/jsregexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698