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

Unified Diff: src/debug/debug-evaluate.cc

Issue 2680163005: [debugger] extend whitelist for side-effect free debug-evaluate. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/debugger/debug/debug-evaluate-no-side-effect-control.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-evaluate.cc
diff --git a/src/debug/debug-evaluate.cc b/src/debug/debug-evaluate.cc
index 55f3ac32d8d97dabd638e7627b7ba350c759bfc8..171967825fe24c4340940f70da3cffae007b95ab 100644
--- a/src/debug/debug-evaluate.cc
+++ b/src/debug/debug-evaluate.cc
@@ -271,10 +271,25 @@ bool IntrinsicHasNoSideEffect(Runtime::FunctionId id) {
case Runtime::kInlineToString:
case Runtime::kToLength:
case Runtime::kInlineToLength:
+ // Type checks.
+ case Runtime::kIsJSReceiver:
+ case Runtime::kInlineIsJSReceiver:
+ case Runtime::kIsSmi:
+ case Runtime::kInlineIsSmi:
+ case Runtime::kIsArray:
+ case Runtime::kIsFunction:
+ case Runtime::kIsDate:
+ case Runtime::kIsJSProxy:
+ case Runtime::kIsRegExp:
+ case Runtime::kIsTypedArray:
// Loads.
case Runtime::kLoadLookupSlotForCall:
// Errors.
+ case Runtime::kReThrow:
case Runtime::kThrowReferenceError:
+ case Runtime::kThrowSymbolIteratorInvalid:
+ case Runtime::kThrowIteratorResultNotAnObject:
+ case Runtime::kNewTypeError:
// Strings.
case Runtime::kInlineStringCharCodeAt:
case Runtime::kStringCharCodeAt:
@@ -352,9 +367,17 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) {
case Bytecode::kCreateArrayLiteral:
case Bytecode::kCreateObjectLiteral:
case Bytecode::kCreateRegExpLiteral:
- // Misc.
+ // Allocations.
+ case Bytecode::kCreateClosure:
case Bytecode::kCreateUnmappedArguments:
+ // Conversions.
+ case Bytecode::kToObject:
+ // Misc.
+ case Bytecode::kForInPrepare:
jgruber 2017/02/09 10:47:45 There's also a corresponding runtime function you
Yang 2017/02/09 11:23:00 Done.
+ case Bytecode::kForInNext:
+ case Bytecode::kForInStep:
case Bytecode::kThrow:
+ case Bytecode::kReThrow:
case Bytecode::kIllegal:
case Bytecode::kCallJSRuntime:
case Bytecode::kStackCheck:
@@ -373,6 +396,8 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) {
bool BuiltinHasNoSideEffect(Builtins::Name id) {
switch (id) {
// Whitelist for builtins.
+ // Array builtins.
+ case Builtins::kArrayPrototypeValues:
// Math builtins.
case Builtins::kMathAbs:
case Builtins::kMathAcos:
« no previous file with comments | « no previous file | test/debugger/debug/debug-evaluate-no-side-effect-control.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698