| OLD | NEW |
| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 struct TokenInfo { | 129 struct TokenInfo { |
| 130 TokenInfo() : token(Token::ILLEGAL), | 130 TokenInfo() : token(Token::ILLEGAL), |
| 131 beg_pos(0), | 131 beg_pos(0), |
| 132 end_pos(0) { } | 132 end_pos(0) { } |
| 133 Token::Value token; | 133 Token::Value token; |
| 134 int beg_pos; | 134 int beg_pos; |
| 135 int end_pos; | 135 int end_pos; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 static const int kInitialSpecialStringSize = 100; | 138 static const int kInitialSpecialStringSize = 1024; |
| 139 | 139 |
| 140 | 140 |
| 141 private: | 141 private: |
| 142 Handle<String> source_; | 142 Handle<String> source_; |
| 143 int source_length_; | 143 int source_length_; |
| 144 Handle<SeqAsciiString> seq_source_; | 144 Handle<SeqAsciiString> seq_source_; |
| 145 | 145 |
| 146 bool is_sequential_ascii_; | 146 bool is_sequential_ascii_; |
| 147 // Current and next token | 147 // Current and next token |
| 148 TokenInfo current_; | 148 TokenInfo current_; |
| 149 TokenInfo next_; | 149 TokenInfo next_; |
| 150 Isolate* isolate_; | 150 Isolate* isolate_; |
| 151 uc32 c0_; | 151 uc32 c0_; |
| 152 int position_; | 152 int position_; |
| 153 | 153 |
| 154 | 154 |
| 155 Handle<String> string_val_; | 155 Handle<String> string_val_; |
| 156 double number_; | 156 double number_; |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } } // namespace v8::internal | 159 } } // namespace v8::internal |
| 160 | 160 |
| 161 #endif // V8_JSON_PARSER_H_ | 161 #endif // V8_JSON_PARSER_H_ |
| OLD | NEW |