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

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

Issue 12300018: Made Isolate a mandatory parameter for everything Handle-related. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed CreateCode calls. Be nicer to MIPS. Created 7 years, 9 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.cc ('k') | src/json-stringifier.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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 case '9': 221 case '9':
222 message = "unexpected_token_number"; 222 message = "unexpected_token_number";
223 array = factory->NewJSArray(0); 223 array = factory->NewJSArray(0);
224 break; 224 break;
225 case '"': 225 case '"':
226 message = "unexpected_token_string"; 226 message = "unexpected_token_string";
227 array = factory->NewJSArray(0); 227 array = factory->NewJSArray(0);
228 break; 228 break;
229 default: 229 default:
230 message = "unexpected_token"; 230 message = "unexpected_token";
231 Handle<Object> name = LookupSingleCharacterStringFromCode(c0_); 231 Handle<Object> name =
232 LookupSingleCharacterStringFromCode(isolate_, c0_);
232 Handle<FixedArray> element = factory->NewFixedArray(1); 233 Handle<FixedArray> element = factory->NewFixedArray(1);
233 element->set(0, *name); 234 element->set(0, *name);
234 array = factory->NewJSArrayWithElements(element); 235 array = factory->NewJSArrayWithElements(element);
235 break; 236 break;
236 } 237 }
237 238
238 MessageLocation location(factory->NewScript(source), 239 MessageLocation location(factory->NewScript(source),
239 position_, 240 position_,
240 position_ + 1); 241 position_ + 1);
241 Handle<Object> result = factory->NewSyntaxError(message, array); 242 Handle<Object> result = factory->NewSyntaxError(message, array);
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 } 705 }
705 ASSERT_EQ('"', c0_); 706 ASSERT_EQ('"', c0_);
706 // Advance past the last '"'. 707 // Advance past the last '"'.
707 AdvanceSkipWhitespace(); 708 AdvanceSkipWhitespace();
708 return result; 709 return result;
709 } 710 }
710 711
711 } } // namespace v8::internal 712 } } // namespace v8::internal
712 713
713 #endif // V8_JSON_PARSER_H_ 714 #endif // V8_JSON_PARSER_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698