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

Side by Side Diff: src/parser.cc

Issue 542010: Added ScriptData::HasError. (Closed)
Patch Set: Created 10 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/parser.h ('k') | test/cctest/test-api.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 4693 matching lines...) Expand 10 before | Expand all | Expand 10 after
4704 int ScriptDataImpl::Length() { 4704 int ScriptDataImpl::Length() {
4705 return store_.length(); 4705 return store_.length();
4706 } 4706 }
4707 4707
4708 4708
4709 unsigned* ScriptDataImpl::Data() { 4709 unsigned* ScriptDataImpl::Data() {
4710 return store_.start(); 4710 return store_.start();
4711 } 4711 }
4712 4712
4713 4713
4714 bool ScriptDataImpl::HasError() {
4715 return has_error();
4716 }
4717
4718
4714 ScriptDataImpl* PreParse(Handle<String> source, 4719 ScriptDataImpl* PreParse(Handle<String> source,
4715 unibrow::CharacterStream* stream, 4720 unibrow::CharacterStream* stream,
4716 v8::Extension* extension) { 4721 v8::Extension* extension) {
4717 Handle<Script> no_script; 4722 Handle<Script> no_script;
4718 bool allow_natives_syntax = 4723 bool allow_natives_syntax =
4719 always_allow_natives_syntax || 4724 always_allow_natives_syntax ||
4720 FLAG_allow_natives_syntax || 4725 FLAG_allow_natives_syntax ||
4721 Bootstrapper::IsActive(); 4726 Bootstrapper::IsActive();
4722 PreParser parser(no_script, allow_natives_syntax, extension); 4727 PreParser parser(no_script, allow_natives_syntax, extension);
4723 if (!parser.PreParseProgram(source, stream)) return NULL; 4728 if (!parser.PreParseProgram(source, stream)) return NULL;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
4796 start_position, 4801 start_position,
4797 is_expression); 4802 is_expression);
4798 return result; 4803 return result;
4799 } 4804 }
4800 4805
4801 4806
4802 #undef NEW 4807 #undef NEW
4803 4808
4804 4809
4805 } } // namespace v8::internal 4810 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698