OLD | NEW |
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 #include "src/debug/debug-evaluate.h" | 5 #include "src/debug/debug-evaluate.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/contexts.h" | 9 #include "src/contexts.h" |
10 #include "src/debug/debug-frames.h" | 10 #include "src/debug/debug-frames.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 : Handle<ScopeInfo>(evaluation_context_->scope_info()))); | 203 : Handle<ScopeInfo>(evaluation_context_->scope_info()))); |
204 scope_info->SetIsDebugEvaluateScope(); | 204 scope_info->SetIsDebugEvaluateScope(); |
205 evaluation_context_ = factory->NewDebugEvaluateContext( | 205 evaluation_context_ = factory->NewDebugEvaluateContext( |
206 evaluation_context_, scope_info, context_chain_[i].materialized_object, | 206 evaluation_context_, scope_info, context_chain_[i].materialized_object, |
207 context_chain_[i].wrapped_context, context_chain_[i].whitelist); | 207 context_chain_[i].wrapped_context, context_chain_[i].whitelist); |
208 } | 208 } |
209 } | 209 } |
210 | 210 |
211 | 211 |
212 void DebugEvaluate::ContextBuilder::UpdateValues() { | 212 void DebugEvaluate::ContextBuilder::UpdateValues() { |
213 // TODO(yangguo): remove updating values. | |
214 for (int i = 0; i < context_chain_.length(); i++) { | 213 for (int i = 0; i < context_chain_.length(); i++) { |
215 ContextChainElement element = context_chain_[i]; | 214 ContextChainElement element = context_chain_[i]; |
216 if (!element.materialized_object.is_null()) { | 215 if (!element.materialized_object.is_null()) { |
217 // Write back potential changes to materialized stack locals to the stack. | 216 // Write back potential changes to materialized stack locals to the stack. |
218 FrameInspector(frame_, inlined_jsframe_index_, isolate_) | 217 FrameInspector(frame_, inlined_jsframe_index_, isolate_) |
219 .UpdateStackLocalsFromMaterializedObject(element.materialized_object, | 218 .UpdateStackLocalsFromMaterializedObject(element.materialized_object, |
220 element.scope_info); | 219 element.scope_info); |
221 } | 220 } |
222 } | 221 } |
223 } | 222 } |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 | 566 |
568 if (FLAG_trace_side_effect_free_debug_evaluate) { | 567 if (FLAG_trace_side_effect_free_debug_evaluate) { |
569 PrintF("[debug-evaluate] API Callback at %p may cause side effect.\n", | 568 PrintF("[debug-evaluate] API Callback at %p may cause side effect.\n", |
570 reinterpret_cast<void*>(function_addr)); | 569 reinterpret_cast<void*>(function_addr)); |
571 } | 570 } |
572 return false; | 571 return false; |
573 } | 572 } |
574 | 573 |
575 } // namespace internal | 574 } // namespace internal |
576 } // namespace v8 | 575 } // namespace v8 |
OLD | NEW |