11cb0ef41Sopenharmony_ci// Copyright 2017 the V8 project authors. All rights reserved.
21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be
31cb0ef41Sopenharmony_ci// found in the LICENSE file.
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci#ifndef V8_DEBUG_DEBUG_SCOPE_ITERATOR_H_
61cb0ef41Sopenharmony_ci#define V8_DEBUG_DEBUG_SCOPE_ITERATOR_H_
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ci#include "src/debug/debug-frames.h"
91cb0ef41Sopenharmony_ci#include "src/debug/debug-interface.h"
101cb0ef41Sopenharmony_ci#include "src/debug/debug-scopes.h"
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_cinamespace v8 {
131cb0ef41Sopenharmony_cinamespace internal {
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ciclass DebugScopeIterator final : public debug::ScopeIterator {
161cb0ef41Sopenharmony_ci public:
171cb0ef41Sopenharmony_ci  DebugScopeIterator(Isolate* isolate, FrameInspector* frame_inspector);
181cb0ef41Sopenharmony_ci  DebugScopeIterator(Isolate* isolate, Handle<JSFunction> function);
191cb0ef41Sopenharmony_ci  DebugScopeIterator(Isolate* isolate, Handle<JSGeneratorObject> generator);
201cb0ef41Sopenharmony_ci
211cb0ef41Sopenharmony_ci  bool Done() override;
221cb0ef41Sopenharmony_ci  void Advance() override;
231cb0ef41Sopenharmony_ci  ScopeType GetType() override;
241cb0ef41Sopenharmony_ci  v8::Local<v8::Object> GetObject() override;
251cb0ef41Sopenharmony_ci  v8::Local<v8::Value> GetFunctionDebugName() override;
261cb0ef41Sopenharmony_ci  int GetScriptId() override;
271cb0ef41Sopenharmony_ci  bool HasLocationInfo() override;
281cb0ef41Sopenharmony_ci  debug::Location GetStartLocation() override;
291cb0ef41Sopenharmony_ci  debug::Location GetEndLocation() override;
301cb0ef41Sopenharmony_ci
311cb0ef41Sopenharmony_ci  bool SetVariableValue(v8::Local<v8::String> name,
321cb0ef41Sopenharmony_ci                        v8::Local<v8::Value> value) override;
331cb0ef41Sopenharmony_ci
341cb0ef41Sopenharmony_ci private:
351cb0ef41Sopenharmony_ci  bool ShouldIgnore();
361cb0ef41Sopenharmony_ci
371cb0ef41Sopenharmony_ci  v8::internal::ScopeIterator iterator_;
381cb0ef41Sopenharmony_ci};
391cb0ef41Sopenharmony_ci
401cb0ef41Sopenharmony_ci}  // namespace internal
411cb0ef41Sopenharmony_ci}  // namespace v8
421cb0ef41Sopenharmony_ci
431cb0ef41Sopenharmony_ci#endif  // V8_DEBUG_DEBUG_SCOPE_ITERATOR_H_
44