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

Side by Side Diff: src/debug/debug-evaluate.h

Issue 2622863003: [debugger] infrastructure for side-effect-free debug-evaluate. (Closed)
Patch Set: fix mips one more time Created 3 years, 11 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/debug/debug.cc ('k') | src/debug/debug-evaluate.cc » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_DEBUG_DEBUG_EVALUATE_H_ 5 #ifndef V8_DEBUG_DEBUG_EVALUATE_H_
6 #define V8_DEBUG_DEBUG_EVALUATE_H_ 6 #define V8_DEBUG_DEBUG_EVALUATE_H_
7 7
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 class DebugEvaluate : public AllStatic { 14 class DebugEvaluate : public AllStatic {
15 public: 15 public:
16 static MaybeHandle<Object> Global(Isolate* isolate, Handle<String> source); 16 static MaybeHandle<Object> Global(Isolate* isolate, Handle<String> source);
17 17
18 // Evaluate a piece of JavaScript in the context of a stack frame for 18 // Evaluate a piece of JavaScript in the context of a stack frame for
19 // debugging. Things that need special attention are: 19 // debugging. Things that need special attention are:
20 // - Parameters and stack-allocated locals need to be materialized. Altered 20 // - Parameters and stack-allocated locals need to be materialized. Altered
21 // values need to be written back to the stack afterwards. 21 // values need to be written back to the stack afterwards.
22 // - The arguments object needs to materialized. 22 // - The arguments object needs to materialized.
23 static MaybeHandle<Object> Local(Isolate* isolate, StackFrame::Id frame_id, 23 static MaybeHandle<Object> Local(Isolate* isolate, StackFrame::Id frame_id,
24 int inlined_jsframe_index, 24 int inlined_jsframe_index,
25 Handle<String> source); 25 Handle<String> source);
26 26
27 static bool FunctionHasNoSideEffect(Handle<SharedFunctionInfo> info);
28 static bool CallbackHasNoSideEffect(Address function_addr);
29
27 private: 30 private:
28 // This class builds a context chain for evaluation of expressions 31 // This class builds a context chain for evaluation of expressions
29 // in debugger. 32 // in debugger.
30 // The scope chain leading up to a breakpoint where evaluation occurs 33 // The scope chain leading up to a breakpoint where evaluation occurs
31 // looks like: 34 // looks like:
32 // - [a mix of with, catch and block scopes] 35 // - [a mix of with, catch and block scopes]
33 // - [function stack + context] 36 // - [function stack + context]
34 // - [outer context] 37 // - [outer context]
35 // The builder materializes all stack variables into properties of objects; 38 // The builder materializes all stack variables into properties of objects;
36 // the expression is then evaluated as if it is inside a series of 'with' 39 // the expression is then evaluated as if it is inside a series of 'with'
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 Handle<Context> context, 87 Handle<Context> context,
85 Handle<Object> receiver, 88 Handle<Object> receiver,
86 Handle<String> source); 89 Handle<String> source);
87 }; 90 };
88 91
89 92
90 } // namespace internal 93 } // namespace internal
91 } // namespace v8 94 } // namespace v8
92 95
93 #endif // V8_DEBUG_DEBUG_EVALUATE_H_ 96 #endif // V8_DEBUG_DEBUG_EVALUATE_H_
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/debug/debug-evaluate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698