Remove obsolete ParserApi::PartialPreParse method.

R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10787036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent af623613
......@@ -5979,31 +5979,6 @@ static ScriptDataImpl* DoPreParse(Utf16CharacterStream* source,
}
// Preparse, but only collect data that is immediately useful,
// even if the preparser data is only used once.
ScriptDataImpl* ParserApi::PartialPreParse(Handle<String> source,
v8::Extension* extension,
int flags) {
bool allow_lazy = FLAG_lazy && (extension == NULL);
if (!allow_lazy) {
// Partial preparsing is only about lazily compiled functions.
// If we don't allow lazy compilation, the log data will be empty.
return NULL;
}
flags |= kAllowLazy;
PartialParserRecorder recorder;
int source_length = source->length();
if (source->IsExternalTwoByteString()) {
ExternalTwoByteStringUtf16CharacterStream stream(
Handle<ExternalTwoByteString>::cast(source), 0, source_length);
return DoPreParse(&stream, flags, &recorder);
} else {
GenericStringUtf16CharacterStream stream(source, 0, source_length);
return DoPreParse(&stream, flags, &recorder);
}
}
ScriptDataImpl* ParserApi::PreParse(Utf16CharacterStream* source,
v8::Extension* extension,
int flags) {
......
......@@ -175,12 +175,6 @@ class ParserApi {
static ScriptDataImpl* PreParse(Utf16CharacterStream* source,
v8::Extension* extension,
int flags);
// Preparser that only does preprocessing that makes sense if only used
// immediately after.
static ScriptDataImpl* PartialPreParse(Handle<String> source,
v8::Extension* extension,
int flags);
};
// ----------------------------------------------------------------------------
......
......@@ -354,7 +354,8 @@ TEST(Regress928) {
v8::HandleScope handles;
i::Handle<i::String> source(
FACTORY->NewStringFromAscii(i::CStrVector(program)));
i::ScriptDataImpl* data = i::ParserApi::PartialPreParse(source, NULL, false);
i::GenericStringUtf16CharacterStream stream(source, 0, source->length());
i::ScriptDataImpl* data = i::ParserApi::PreParse(&stream, NULL, false);
CHECK(!data->HasError());
data->Initialize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment