| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // Mark that a parsing error has happened at the current token, and | 166 // Mark that a parsing error has happened at the current token, and |
| 167 // return a null handle. Primarily for readability. | 167 // return a null handle. Primarily for readability. |
| 168 inline Handle<Object> ReportUnexpectedCharacter() { | 168 inline Handle<Object> ReportUnexpectedCharacter() { |
| 169 return Handle<Object>::null(); | 169 return Handle<Object>::null(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 inline Isolate* isolate() { return isolate_; } | 172 inline Isolate* isolate() { return isolate_; } |
| 173 inline Factory* factory() { return factory_; } | 173 inline Factory* factory() { return factory_; } |
| 174 inline Handle<JSFunction> object_constructor() { return object_constructor_; } | 174 inline Handle<JSFunction> object_constructor() { return object_constructor_; } |
| 175 | 175 |
| 176 static const int kInitialSpecialStringLength = 1024; | 176 static const int kInitialSpecialStringLength = 32; |
| 177 static const int kPretenureTreshold = 100 * 1024; | 177 static const int kPretenureTreshold = 100 * 1024; |
| 178 | 178 |
| 179 | 179 |
| 180 private: | 180 private: |
| 181 Zone* zone() { return &zone_; } | 181 Zone* zone() { return &zone_; } |
| 182 | 182 |
| 183 void CommitStateToJsonObject(Handle<JSObject> json_object, Handle<Map> map, | 183 void CommitStateToJsonObject(Handle<JSObject> json_object, Handle<Map> map, |
| 184 ZoneList<Handle<Object> >* properties); | 184 ZoneList<Handle<Object> >* properties); |
| 185 | 185 |
| 186 Handle<String> source_; | 186 Handle<String> source_; |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 | 793 |
| 794 DCHECK_EQ('"', c0_); | 794 DCHECK_EQ('"', c0_); |
| 795 // Advance past the last '"'. | 795 // Advance past the last '"'. |
| 796 AdvanceSkipWhitespace(); | 796 AdvanceSkipWhitespace(); |
| 797 return result; | 797 return result; |
| 798 } | 798 } |
| 799 | 799 |
| 800 } } // namespace v8::internal | 800 } } // namespace v8::internal |
| 801 | 801 |
| 802 #endif // V8_JSON_PARSER_H_ | 802 #endif // V8_JSON_PARSER_H_ |
| OLD | NEW |