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

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

Issue 8139027: Version 3.6.5 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 9 years, 2 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-inl.h ('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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 int source_length_; 158 int source_length_;
159 Handle<SeqAsciiString> seq_source_; 159 Handle<SeqAsciiString> seq_source_;
160 160
161 Isolate* isolate_; 161 Isolate* isolate_;
162 uc32 c0_; 162 uc32 c0_;
163 int position_; 163 int position_;
164 }; 164 };
165 165
166 template <bool seq_ascii> 166 template <bool seq_ascii>
167 Handle<Object> JsonParser<seq_ascii>::ParseJson(Handle<String> source) { 167 Handle<Object> JsonParser<seq_ascii>::ParseJson(Handle<String> source) {
168 isolate_ = source->map()->isolate(); 168 isolate_ = source->map()->GetHeap()->isolate();
169 FlattenString(source); 169 FlattenString(source);
170 source_ = source; 170 source_ = source;
171 source_length_ = source_->length(); 171 source_length_ = source_->length();
172 172
173 // Optimized fast case where we only have ASCII characters. 173 // Optimized fast case where we only have ASCII characters.
174 if (seq_ascii) { 174 if (seq_ascii) {
175 seq_source_ = Handle<SeqAsciiString>::cast(source_); 175 seq_source_ = Handle<SeqAsciiString>::cast(source_);
176 } 176 }
177 177
178 // Set initial position right before the string. 178 // Set initial position right before the string.
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 590 }
591 ASSERT_EQ('"', c0_); 591 ASSERT_EQ('"', c0_);
592 // Advance past the last '"'. 592 // Advance past the last '"'.
593 AdvanceSkipWhitespace(); 593 AdvanceSkipWhitespace();
594 return result; 594 return result;
595 } 595 }
596 596
597 } } // namespace v8::internal 597 } } // namespace v8::internal
598 598
599 #endif // V8_JSON_PARSER_H_ 599 #endif // V8_JSON_PARSER_H_
OLDNEW
« no previous file with comments | « src/isolate-inl.h ('k') | src/jsregexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698