Revision: 22229
Author: [email protected]
Date: Mon Jul 7 09:31:58 2014 UTC
Log: Parser cleanup: Cached data cannot contain errors (removed dead
code)
We no longer store the errors in cached data (see Parser::ParseProgram())
and
storing them is an unnecessary optimization. In addition, the code which
extracts errors from cached data is wrong, since it stores the result of
BuildArgs (in ReportMessageAt) and then deletes it.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/367373007
http://code.google.com/p/v8/source/detail?r=22229
Modified:
/branches/bleeding_edge/src/parser.cc
=======================================
--- /branches/bleeding_edge/src/parser.cc Wed Jul 2 12:01:56 2014 UTC
+++ /branches/bleeding_edge/src/parser.cc Mon Jul 7 09:31:58 2014 UTC
@@ -4857,20 +4857,7 @@
}
} else {
SetCachedData(info()->cached_data(), info()->cached_data_mode());
- if (info()->cached_data_mode() == CONSUME_CACHED_DATA &&
- (*info()->cached_data())->has_error()) {
- ScriptData* cached_data = *(info()->cached_data());
- Scanner::Location loc = cached_data->MessageLocation();
- const char* message = cached_data->BuildMessage();
- const char* arg = cached_data->BuildArg();
- ParserTraits::ReportMessageAt(loc, message, arg,
- cached_data->IsReferenceError());
- DeleteArray(message);
- DeleteArray(arg);
- ASSERT(info()->isolate()->has_pending_exception());
- } else {
- result = ParseProgram();
- }
+ result = ParseProgram();
}
info()->SetFunction(result);
ASSERT(ast_value_factory_->IsInternalized());
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.