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

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

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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
« 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 // 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_PARSER_H_ 5 #ifndef V8_JSON_PARSER_H_
6 #define V8_JSON_PARSER_H_ 6 #define V8_JSON_PARSER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/char-predicates-inl.h" 10 #include "src/char-predicates-inl.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 static const int kEndOfString = -1; 27 static const int kEndOfString = -1;
28 28
29 private: 29 private:
30 explicit JsonParser(Handle<String> source) 30 explicit JsonParser(Handle<String> source)
31 : source_(source), 31 : source_(source),
32 source_length_(source->length()), 32 source_length_(source->length()),
33 isolate_(source->map()->GetHeap()->isolate()), 33 isolate_(source->map()->GetHeap()->isolate()),
34 factory_(isolate_->factory()), 34 factory_(isolate_->factory()),
35 zone_(isolate_),
36 object_constructor_(isolate_->native_context()->object_function(), 35 object_constructor_(isolate_->native_context()->object_function(),
37 isolate_), 36 isolate_),
38 position_(-1) { 37 position_(-1) {
39 source_ = String::Flatten(source_); 38 source_ = String::Flatten(source_);
40 pretenure_ = (source_length_ >= kPretenureTreshold) ? TENURED : NOT_TENURED; 39 pretenure_ = (source_length_ >= kPretenureTreshold) ? TENURED : NOT_TENURED;
41 40
42 // Optimized fast case where we only have Latin1 characters. 41 // Optimized fast case where we only have Latin1 characters.
43 if (seq_one_byte) { 42 if (seq_one_byte) {
44 seq_source_ = Handle<SeqOneByteString>::cast(source_); 43 seq_source_ = Handle<SeqOneByteString>::cast(source_);
45 } 44 }
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 810
812 DCHECK_EQ('"', c0_); 811 DCHECK_EQ('"', c0_);
813 // Advance past the last '"'. 812 // Advance past the last '"'.
814 AdvanceSkipWhitespace(); 813 AdvanceSkipWhitespace();
815 return result; 814 return result;
816 } 815 }
817 816
818 } } // namespace v8::internal 817 } } // namespace v8::internal
819 818
820 #endif // V8_JSON_PARSER_H_ 819 #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