| OLD | NEW |
| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Mark that a parsing error has happened at the current token, and | 173 // Mark that a parsing error has happened at the current token, and |
| 174 // return a null handle. Primarily for readability. | 174 // return a null handle. Primarily for readability. |
| 175 inline Handle<Object> ReportUnexpectedCharacter() { | 175 inline Handle<Object> ReportUnexpectedCharacter() { |
| 176 return Handle<Object>::null(); | 176 return Handle<Object>::null(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 inline Isolate* isolate() { return isolate_; } | 179 inline Isolate* isolate() { return isolate_; } |
| 180 inline Factory* factory() { return factory_; } | 180 inline Factory* factory() { return factory_; } |
| 181 inline Handle<JSFunction> object_constructor() { return object_constructor_; } | 181 inline Handle<JSFunction> object_constructor() { return object_constructor_; } |
| 182 | 182 |
| 183 static const int kInitialSpecialStringLength = 1024; | 183 static const int kInitialSpecialStringLength = 32; |
| 184 static const int kPretenureTreshold = 100 * 1024; | 184 static const int kPretenureTreshold = 100 * 1024; |
| 185 | 185 |
| 186 | 186 |
| 187 private: | 187 private: |
| 188 Zone* zone() { return &zone_; } | 188 Zone* zone() { return &zone_; } |
| 189 | 189 |
| 190 void CommitStateToJsonObject(Handle<JSObject> json_object, Handle<Map> map, | 190 void CommitStateToJsonObject(Handle<JSObject> json_object, Handle<Map> map, |
| 191 ZoneList<Handle<Object> >* properties); | 191 ZoneList<Handle<Object> >* properties); |
| 192 | 192 |
| 193 Handle<String> source_; | 193 Handle<String> source_; |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 | 840 |
| 841 DCHECK_EQ('"', c0_); | 841 DCHECK_EQ('"', c0_); |
| 842 // Advance past the last '"'. | 842 // Advance past the last '"'. |
| 843 AdvanceSkipWhitespace(); | 843 AdvanceSkipWhitespace(); |
| 844 return result; | 844 return result; |
| 845 } | 845 } |
| 846 | 846 |
| 847 } } // namespace v8::internal | 847 } } // namespace v8::internal |
| 848 | 848 |
| 849 #endif // V8_JSON_PARSER_H_ | 849 #endif // V8_JSON_PARSER_H_ |
| OLD | NEW |