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

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

Issue 2720013003: [debug] add more tests for side-effect free debug-evaluate. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | test/debugger/debug/debug-evaluate-no-side-effect.js » ('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 #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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 PrintF("[debug-evaluate] built-in %s may cause side effect.\n", 497 PrintF("[debug-evaluate] built-in %s may cause side effect.\n",
498 Builtins::name(id)); 498 Builtins::name(id));
499 } 499 }
500 return false; 500 return false;
501 } 501 }
502 } 502 }
503 503
504 static const Address accessors_with_no_side_effect[] = { 504 static const Address accessors_with_no_side_effect[] = {
505 // Whitelist for accessors. 505 // Whitelist for accessors.
506 FUNCTION_ADDR(Accessors::StringLengthGetter), 506 FUNCTION_ADDR(Accessors::StringLengthGetter),
507 FUNCTION_ADDR(Accessors::ArrayLengthGetter)}; 507 FUNCTION_ADDR(Accessors::ArrayLengthGetter),
508 FUNCTION_ADDR(Accessors::FunctionLengthGetter),
509 FUNCTION_ADDR(Accessors::FunctionNameGetter),
510 FUNCTION_ADDR(Accessors::BoundFunctionLengthGetter),
511 FUNCTION_ADDR(Accessors::BoundFunctionNameGetter),
512 };
508 513
509 } // anonymous namespace 514 } // anonymous namespace
510 515
511 // static 516 // static
512 bool DebugEvaluate::FunctionHasNoSideEffect(Handle<SharedFunctionInfo> info) { 517 bool DebugEvaluate::FunctionHasNoSideEffect(Handle<SharedFunctionInfo> info) {
513 if (FLAG_trace_side_effect_free_debug_evaluate) { 518 if (FLAG_trace_side_effect_free_debug_evaluate) {
514 PrintF("[debug-evaluate] Checking function %s for side effect.\n", 519 PrintF("[debug-evaluate] Checking function %s for side effect.\n",
515 info->DebugName()->ToCString().get()); 520 info->DebugName()->ToCString().get());
516 } 521 }
517 522
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 565
561 if (FLAG_trace_side_effect_free_debug_evaluate) { 566 if (FLAG_trace_side_effect_free_debug_evaluate) {
562 PrintF("[debug-evaluate] API Callback at %p may cause side effect.\n", 567 PrintF("[debug-evaluate] API Callback at %p may cause side effect.\n",
563 reinterpret_cast<void*>(function_addr)); 568 reinterpret_cast<void*>(function_addr));
564 } 569 }
565 return false; 570 return false;
566 } 571 }
567 572
568 } // namespace internal 573 } // namespace internal
569 } // namespace v8 574 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/debugger/debug/debug-evaluate-no-side-effect.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698