Reviewers: Kevin Millikin, Rico,
Description:
The test-case introduced by the fix for bug 1145 has a syntax error in
a lazily compiled function that is never called.
This syntax error is caught and handled by Runtime_LazyRecompile when
run with the --stress-opt flag (also when it tries to inline the function).
Currently we pass the exception back to javascript.
This change makes us discard the exception if recompilation fails, and
just continue with the current, unoptimized, code.
Or should I just discard the test-case, since it's bound to give
troubles to have a test-case with a known syntax error in it.
Please review this at http://codereview.chromium.org/6519047/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge/build-ia32
Affected files:
M src/runtime.cc
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
f7e00ef63ef15d16ed269956780bd391ee0a0b4b..8e092567084a95489571fb1d940414ba0c8b337e
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7000,7 +7000,7 @@ static MaybeObject* Runtime_LazyRecompile(Arguments
args) {
function->ReplaceCode(function->shared()->code());
return function->code();
}
- if (CompileOptimized(function, AstNode::kNoNumber, KEEP_EXCEPTION)) {
+ if (CompileOptimized(function, AstNode::kNoNumber, CLEAR_EXCEPTION)) {
return function->code();
}
if (FLAG_trace_opt) {
@@ -7009,7 +7009,7 @@ static MaybeObject* Runtime_LazyRecompile(Arguments
args) {
PrintF(": optimized compilation failed]\n");
}
function->ReplaceCode(function->shared()->code());
- return Failure::Exception();
+ return function->code();
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev