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

Unified Diff: src/debug/debug-frames.cc

Issue 1695433002: Handlify DeoptimizedFrameInfo, remove custom GC iteration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use handle rather than the constructor. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug-frames.h ('k') | src/debug/debug-scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-frames.cc
diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc
index df395fcb1fd2a5f4ea8edec6488802cf54c2a214..f01354500b0e5ce1670a45e8e7afe6087158f99f 100644
--- a/src/debug/debug-frames.cc
+++ b/src/debug/debug-frames.cc
@@ -44,27 +44,25 @@ int FrameInspector::GetParametersCount() {
: frame_->ComputeParametersCount();
}
-
-Object* FrameInspector::GetFunction() {
- return is_optimized_ ? deoptimized_frame_->GetFunction() : frame_->function();
+Handle<Object> FrameInspector::GetFunction() {
+ return is_optimized_ ? deoptimized_frame_->GetFunction()
+ : handle(frame_->function(), isolate_);
}
-
-Object* FrameInspector::GetParameter(int index) {
+Handle<Object> FrameInspector::GetParameter(int index) {
return is_optimized_ ? deoptimized_frame_->GetParameter(index)
- : frame_->GetParameter(index);
+ : handle(frame_->GetParameter(index), isolate_);
}
-
-Object* FrameInspector::GetExpression(int index) {
+Handle<Object> FrameInspector::GetExpression(int index) {
// TODO(turbofan): Revisit once we support deoptimization.
if (frame_->LookupCode()->is_turbofanned() &&
frame_->function()->shared()->asm_function() &&
!FLAG_turbo_asm_deoptimization) {
- return isolate_->heap()->undefined_value();
+ return isolate_->factory()->undefined_value();
}
return is_optimized_ ? deoptimized_frame_->GetExpression(index)
- : frame_->GetExpression(index);
+ : handle(frame_->GetExpression(index), isolate_);
}
@@ -85,9 +83,9 @@ bool FrameInspector::IsConstructor() {
: frame_->IsConstructor();
}
-
-Object* FrameInspector::GetContext() {
- return is_optimized_ ? deoptimized_frame_->GetContext() : frame_->context();
+Handle<Object> FrameInspector::GetContext() {
+ return is_optimized_ ? deoptimized_frame_->GetContext()
+ : handle(frame_->context(), isolate_);
}
@@ -114,10 +112,10 @@ void FrameInspector::MaterializeStackLocals(Handle<JSObject> target,
Handle<String> name(scope_info->ParameterName(i));
if (ParameterIsShadowedByContextLocal(scope_info, name)) continue;
- Handle<Object> value(i < GetParametersCount()
- ? GetParameter(i)
- : isolate_->heap()->undefined_value(),
- isolate_);
+ Handle<Object> value =
+ i < GetParametersCount()
+ ? GetParameter(i)
+ : Handle<Object>::cast(isolate_->factory()->undefined_value());
DCHECK(!value->IsTheHole());
JSObject::SetOwnPropertyIgnoreAttributes(target, name, value, NONE).Check();
@@ -127,8 +125,7 @@ void FrameInspector::MaterializeStackLocals(Handle<JSObject> target,
for (int i = 0; i < scope_info->StackLocalCount(); ++i) {
if (scope_info->LocalIsSynthetic(i)) continue;
Handle<String> name(scope_info->StackLocalName(i));
- Handle<Object> value(GetExpression(scope_info->StackLocalIndex(i)),
- isolate_);
+ Handle<Object> value = GetExpression(scope_info->StackLocalIndex(i));
if (value->IsTheHole()) value = isolate_->factory()->undefined_value();
JSObject::SetOwnPropertyIgnoreAttributes(target, name, value, NONE).Check();
« no previous file with comments | « src/debug/debug-frames.h ('k') | src/debug/debug-scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698