| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 128902f93afefbc2cea441bbccc487d2538f0743..1c42db09c906b56e2eec58b2c19ae3e6e034b075 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -7435,12 +7435,6 @@ void JSFunction::MarkForLazyRecompilation() {
|
| }
|
|
|
|
|
| -bool SharedFunctionInfo::EnsureCompiled(Handle<SharedFunctionInfo> shared,
|
| - ClearExceptionFlag flag) {
|
| - return shared->is_compiled() || CompileLazy(shared, flag);
|
| -}
|
| -
|
| -
|
| static bool CompileLazyHelper(CompilationInfo* info,
|
| ClearExceptionFlag flag) {
|
| // Compile the source information to a code object.
|
| @@ -7457,6 +7451,7 @@ static bool CompileLazyHelper(CompilationInfo* info,
|
|
|
| bool SharedFunctionInfo::CompileLazy(Handle<SharedFunctionInfo> shared,
|
| ClearExceptionFlag flag) {
|
| + ASSERT(shared->allows_lazy_compilation_without_context());
|
| CompilationInfo info(shared);
|
| return CompileLazyHelper(&info, flag);
|
| }
|
| @@ -7469,6 +7464,7 @@ bool JSFunction::CompileLazy(Handle<JSFunction> function,
|
| function->ReplaceCode(function->shared()->code());
|
| function->shared()->set_code_age(0);
|
| } else {
|
| + ASSERT(function->shared()->allows_lazy_compilation());
|
| CompilationInfo info(function);
|
| result = CompileLazyHelper(&info, flag);
|
| ASSERT(!result || function->is_compiled());
|
| @@ -7486,6 +7482,12 @@ bool JSFunction::CompileOptimized(Handle<JSFunction> function,
|
| }
|
|
|
|
|
| +bool JSFunction::EnsureCompiled(Handle<JSFunction> function,
|
| + ClearExceptionFlag flag) {
|
| + return function->is_compiled() || CompileLazy(function, flag);
|
| +}
|
| +
|
| +
|
| bool JSFunction::IsInlineable() {
|
| if (IsBuiltin()) return false;
|
| SharedFunctionInfo* shared_info = shared();
|
|
|