| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index 5b62a8a09c80321721c91b002c257348cc8af88e..a9c2a4837cf1258448e1d47811d49bf4092854ff 100644
|
| --- a/src/ic.cc
|
| +++ b/src/ic.cc
|
| @@ -1541,18 +1541,17 @@ void KeyedStoreIC::UpdateCaches(LookupResult* lookup,
|
| // Static IC stub generators.
|
| //
|
|
|
| -static Object* CompileFunction(Object* result,
|
| - Handle<Object> object,
|
| - InLoopFlag in_loop) {
|
| +static JSFunction* CompileFunction(JSFunction* function,
|
| + InLoopFlag in_loop) {
|
| // Compile now with optimization.
|
| HandleScope scope;
|
| - Handle<JSFunction> function = Handle<JSFunction>(JSFunction::cast(result));
|
| + Handle<JSFunction> function_handle(function);
|
| if (in_loop == IN_LOOP) {
|
| - CompileLazyInLoop(function, object, CLEAR_EXCEPTION);
|
| + CompileLazyInLoop(function_handle, CLEAR_EXCEPTION);
|
| } else {
|
| - CompileLazy(function, object, CLEAR_EXCEPTION);
|
| + CompileLazy(function_handle, CLEAR_EXCEPTION);
|
| }
|
| - return *function;
|
| + return *function_handle;
|
| }
|
|
|
|
|
| @@ -1575,7 +1574,7 @@ Object* CallIC_Miss(Arguments args) {
|
| if (!result->IsJSFunction() || JSFunction::cast(result)->is_compiled()) {
|
| return result;
|
| }
|
| - return CompileFunction(result, args.at<Object>(0), ic.target()->ic_in_loop());
|
| + return CompileFunction(JSFunction::cast(result), ic.target()->ic_in_loop());
|
| }
|
|
|
|
|
| @@ -1591,7 +1590,7 @@ Object* KeyedCallIC_Miss(Arguments args) {
|
| if (!result->IsJSFunction() || JSFunction::cast(result)->is_compiled()) {
|
| return result;
|
| }
|
| - return CompileFunction(result, args.at<Object>(0), ic.target()->ic_in_loop());
|
| + return CompileFunction(JSFunction::cast(result), ic.target()->ic_in_loop());
|
| }
|
|
|
|
|
|
|