Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: src/deoptimizer.cc

Issue 1702593002: More simplification and unification of frame handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/x64/lithium-x64.cc ('k') | src/frames.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/deoptimizer.h" 5 #include "src/deoptimizer.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/ast/prettyprinter.h" 8 #include "src/ast/prettyprinter.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/disasm.h" 10 #include "src/disasm.h"
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 CHECK_EQ(Smi::cast(function_), Smi::FromInt(StackFrame::STUB)); 2024 CHECK_EQ(Smi::cast(function_), Smi::FromInt(StackFrame::STUB));
2025 } 2025 }
2026 // The fp-to-sp delta already takes the context, constant pool pointer and the 2026 // The fp-to-sp delta already takes the context, constant pool pointer and the
2027 // function into account so we have to avoid double counting them. 2027 // function into account so we have to avoid double counting them.
2028 unsigned result = fixed_size + fp_to_sp_delta_ - 2028 unsigned result = fixed_size + fp_to_sp_delta_ -
2029 StandardFrameConstants::kFixedFrameSizeFromFp; 2029 StandardFrameConstants::kFixedFrameSizeFromFp;
2030 if (compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) { 2030 if (compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) {
2031 unsigned stack_slots = compiled_code_->stack_slots(); 2031 unsigned stack_slots = compiled_code_->stack_slots();
2032 unsigned outgoing_size = 2032 unsigned outgoing_size =
2033 ComputeOutgoingArgumentSize(compiled_code_, bailout_id_); 2033 ComputeOutgoingArgumentSize(compiled_code_, bailout_id_);
2034 CHECK(result == fixed_size + (stack_slots * kPointerSize) + outgoing_size); 2034 CHECK(result ==
2035 fixed_size + (stack_slots * kPointerSize) -
2036 StandardFrameConstants::kFixedFrameSize + outgoing_size);
2035 } 2037 }
2036 return result; 2038 return result;
2037 } 2039 }
2038 2040
2039 // static 2041 // static
2040 unsigned Deoptimizer::ComputeJavascriptFixedSize(SharedFunctionInfo* shared) { 2042 unsigned Deoptimizer::ComputeJavascriptFixedSize(SharedFunctionInfo* shared) {
2041 // The fixed part of the frame consists of the return address, frame 2043 // The fixed part of the frame consists of the return address, frame
2042 // pointer, function, context, and all the incoming arguments. 2044 // pointer, function, context, and all the incoming arguments.
2043 return ComputeIncomingArgumentSize(shared) + 2045 return ComputeIncomingArgumentSize(shared) +
2044 StandardFrameConstants::kFixedFrameSize; 2046 StandardFrameConstants::kFixedFrameSize;
(...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after
3743 CHECK(value_info->IsMaterializedObject()); 3745 CHECK(value_info->IsMaterializedObject());
3744 3746
3745 value_info->value_ = 3747 value_info->value_ =
3746 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3748 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3747 } 3749 }
3748 } 3750 }
3749 } 3751 }
3750 3752
3751 } // namespace internal 3753 } // namespace internal
3752 } // namespace v8 3754 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-x64.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698