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

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

Issue 1484723003: [runtime] Use "the hole" instead of smi 0 as sentinel for context extension. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years 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/contexts-inl.h ('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 bool disable_break, 17 bool disable_break,
18 Handle<Object> context_extension); 18 Handle<HeapObject> context_extension);
19 19
20 // Evaluate a piece of JavaScript in the context of a stack frame for 20 // Evaluate a piece of JavaScript in the context of a stack frame for
21 // debugging. Things that need special attention are: 21 // debugging. Things that need special attention are:
22 // - Parameters and stack-allocated locals need to be materialized. Altered 22 // - Parameters and stack-allocated locals need to be materialized. Altered
23 // values need to be written back to the stack afterwards. 23 // values need to be written back to the stack afterwards.
24 // - The arguments object needs to materialized. 24 // - The arguments object needs to materialized.
25 static MaybeHandle<Object> Local(Isolate* isolate, StackFrame::Id frame_id, 25 static MaybeHandle<Object> Local(Isolate* isolate, StackFrame::Id frame_id,
26 int inlined_jsframe_index, 26 int inlined_jsframe_index,
27 Handle<String> source, bool disable_break, 27 Handle<String> source, bool disable_break,
28 Handle<Object> context_extension); 28 Handle<HeapObject> context_extension);
29 29
30 private: 30 private:
31 // This class builds a context chain for evaluation of expressions 31 // This class builds a context chain for evaluation of expressions
32 // in debugger. 32 // in debugger.
33 // The scope chain leading up to a breakpoint where evaluation occurs 33 // The scope chain leading up to a breakpoint where evaluation occurs
34 // looks like: 34 // looks like:
35 // - [a mix of with, catch and block scopes] 35 // - [a mix of with, catch and block scopes]
36 // - [function stack + context] 36 // - [function stack + context]
37 // - [outer context] 37 // - [outer context]
38 // The builder materializes all stack variables into properties of objects; 38 // The builder materializes all stack variables into properties of objects;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 Handle<Context> innermost_context_; 81 Handle<Context> innermost_context_;
82 List<ContextChainElement> context_chain_; 82 List<ContextChainElement> context_chain_;
83 Isolate* isolate_; 83 Isolate* isolate_;
84 JavaScriptFrame* frame_; 84 JavaScriptFrame* frame_;
85 int inlined_jsframe_index_; 85 int inlined_jsframe_index_;
86 }; 86 };
87 87
88 static MaybeHandle<Object> Evaluate(Isolate* isolate, 88 static MaybeHandle<Object> Evaluate(Isolate* isolate,
89 Handle<SharedFunctionInfo> outer_info, 89 Handle<SharedFunctionInfo> outer_info,
90 Handle<Context> context, 90 Handle<Context> context,
91 Handle<Object> context_extension, 91 Handle<HeapObject> context_extension,
92 Handle<Object> receiver, 92 Handle<Object> receiver,
93 Handle<String> source); 93 Handle<String> source);
94 }; 94 };
95 95
96 96
97 } // namespace internal 97 } // namespace internal
98 } // namespace v8 98 } // namespace v8
99 99
100 #endif // V8_DEBUG_DEBUG_EVALUATE_H_ 100 #endif // V8_DEBUG_DEBUG_EVALUATE_H_
OLDNEW
« no previous file with comments | « src/contexts-inl.h ('k') | src/debug/debug-evaluate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698