| Index: src/liveedit.cc
|
| diff --git a/src/liveedit.cc b/src/liveedit.cc
|
| index c03d8d3e938f98da66c56d484e88d88ef97ce2ad..41aa83d9801ea5ec502c1c01636f09a607811a08 100644
|
| --- a/src/liveedit.cc
|
| +++ b/src/liveedit.cc
|
| @@ -1089,37 +1089,36 @@ class LiteralFixer {
|
| };
|
|
|
|
|
| +namespace {
|
| +
|
| // Check whether the code is natural function code (not a lazy-compile stub
|
| // code).
|
| -static bool IsJSFunctionCode(Code* code) {
|
| - return code->kind() == Code::FUNCTION;
|
| -}
|
| +bool IsJSFunctionCode(Code* code) { return code->kind() == Code::FUNCTION; }
|
|
|
|
|
| // Returns true if an instance of candidate were inlined into function's code.
|
| -static bool IsInlined(JSFunction* function, SharedFunctionInfo* candidate) {
|
| +bool IsInlined(JSFunction* function, SharedFunctionInfo* candidate) {
|
| DisallowHeapAllocation no_gc;
|
|
|
| if (function->code()->kind() != Code::OPTIMIZED_FUNCTION) return false;
|
|
|
| - DeoptimizationInputData* data =
|
| + DeoptimizationInputData* const data =
|
| DeoptimizationInputData::cast(function->code()->deoptimization_data());
|
| -
|
| - if (data == function->GetIsolate()->heap()->empty_fixed_array()) {
|
| - return false;
|
| - }
|
| -
|
| - FixedArray* literals = data->LiteralArray();
|
| -
|
| - int inlined_count = data->InlinedFunctionCount()->value();
|
| - for (int i = 0; i < inlined_count; ++i) {
|
| - JSFunction* inlined = JSFunction::cast(literals->get(i));
|
| - if (inlined->shared() == candidate) return true;
|
| + if (data != function->GetIsolate()->heap()->empty_fixed_array()) {
|
| + FixedArray* const literals = data->LiteralArray();
|
| + int const inlined_count = data->InlinedFunctionCount()->value();
|
| + for (int i = 0; i < inlined_count; ++i) {
|
| + if (SharedFunctionInfo::cast(literals->get(i)) == candidate) {
|
| + return true;
|
| + }
|
| + }
|
| }
|
|
|
| return false;
|
| }
|
|
|
| +} // namespace
|
| +
|
|
|
| // Marks code that shares the same shared function info or has inlined
|
| // code that shares the same function info.
|
|
|