| 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |