Commit 4363a693 authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[inspector] fixed location of top level function return

We should pass false as has_braces argument to create FunctionLiteral
for top level function.

R=dgozman@chromium.org,bmeurer@chromium.org
TBR=bmeurer@chromium.org

Bug: none
Change-Id: I397f31b562d32c71f3a12bfc9ceeed16c367aa80
Reviewed-on: https://chromium-review.googlesource.com/1098018
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53769}
parent 7aa82b97
...@@ -3184,7 +3184,7 @@ class AstNodeFactory final BASE_EMBEDDED { ...@@ -3184,7 +3184,7 @@ class AstNodeFactory final BASE_EMBEDDED {
body, expected_property_count, parameter_count, parameter_count, body, expected_property_count, parameter_count, parameter_count,
FunctionLiteral::kAnonymousExpression, FunctionLiteral::kAnonymousExpression,
FunctionLiteral::kNoDuplicateParameters, FunctionLiteral::kNoDuplicateParameters,
FunctionLiteral::kShouldLazyCompile, 0, true, FunctionLiteral::kShouldLazyCompile, 0, /* has_braces */ false,
FunctionLiteral::kIdTypeTopLevel); FunctionLiteral::kIdTypeTopLevel);
} }
......
...@@ -24,7 +24,7 @@ bytecodes: [ ...@@ -24,7 +24,7 @@ bytecodes: [
/* 8 S> */ B(LdaSmi), I8(1), /* 8 S> */ B(LdaSmi), I8(1),
/* 8 E> */ B(StaGlobal), U8(1), U8(2), /* 8 E> */ B(StaGlobal), U8(1), U8(2),
B(LdaUndefined), B(LdaUndefined),
/* 10 S> */ B(Return), /* 11 S> */ B(Return),
] ]
constant pool: [ constant pool: [
FIXED_ARRAY_TYPE, FIXED_ARRAY_TYPE,
...@@ -49,7 +49,7 @@ bytecodes: [ ...@@ -49,7 +49,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(0), U8(3), B(CallRuntime), U16(Runtime::kDeclareGlobals), R(0), U8(3),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaUndefined), B(LdaUndefined),
/* 15 S> */ B(Return), /* 16 S> */ B(Return),
] ]
constant pool: [ constant pool: [
FIXED_ARRAY_TYPE, FIXED_ARRAY_TYPE,
...@@ -78,7 +78,7 @@ bytecodes: [ ...@@ -78,7 +78,7 @@ bytecodes: [
/* 11 S> */ B(LdaSmi), I8(2), /* 11 S> */ B(LdaSmi), I8(2),
/* 12 E> */ B(StaGlobal), U8(1), U8(2), /* 12 E> */ B(StaGlobal), U8(1), U8(2),
B(Star), R(0), B(Star), R(0),
/* 15 S> */ B(Return), /* 16 S> */ B(Return),
] ]
constant pool: [ constant pool: [
FIXED_ARRAY_TYPE, FIXED_ARRAY_TYPE,
...@@ -107,7 +107,7 @@ bytecodes: [ ...@@ -107,7 +107,7 @@ bytecodes: [
B(Star), R(1), B(Star), R(1),
/* 16 E> */ B(CallUndefinedReceiver0), R(1), U8(3), /* 16 E> */ B(CallUndefinedReceiver0), R(1), U8(3),
B(Star), R(0), B(Star), R(0),
/* 20 S> */ B(Return), /* 21 S> */ B(Return),
] ]
constant pool: [ constant pool: [
FIXED_ARRAY_TYPE, FIXED_ARRAY_TYPE,
......
...@@ -34,10 +34,10 @@ bytecodes: [ ...@@ -34,10 +34,10 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(3), B(Ldar), R(3),
/* 13 S> */ B(Return), /* 14 S> */ B(Return),
B(Mov), R(3), R(1), B(Mov), R(3), R(1),
B(Ldar), R(1), B(Ldar), R(1),
/* 13 S> */ B(Return), /* 14 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [36], Smi [36],
...@@ -75,10 +75,10 @@ bytecodes: [ ...@@ -75,10 +75,10 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(3), B(Ldar), R(3),
/* 24 S> */ B(Return), /* 25 S> */ B(Return),
B(Mov), R(3), R(1), B(Mov), R(3), R(1),
B(Ldar), R(1), B(Ldar), R(1),
/* 24 S> */ B(Return), /* 25 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [36], Smi [36],
...@@ -118,7 +118,7 @@ bytecodes: [ ...@@ -118,7 +118,7 @@ bytecodes: [
B(Ldar), R(4), B(Ldar), R(4),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(4), B(Ldar), R(4),
/* 64 S> */ B(Return), /* 65 S> */ B(Return),
/* 32 S> */ B(LdaModuleVariable), I8(-1), U8(0), /* 32 S> */ B(LdaModuleVariable), I8(-1), U8(0),
B(ThrowReferenceErrorIfHole), U8(4), B(ThrowReferenceErrorIfHole), U8(4),
B(Star), R(4), B(Star), R(4),
...@@ -134,7 +134,7 @@ bytecodes: [ ...@@ -134,7 +134,7 @@ bytecodes: [
B(Star), R(5), B(Star), R(5),
/* 52 E> */ B(CallUndefinedReceiver1), R(4), R(5), U8(2), /* 52 E> */ B(CallUndefinedReceiver1), R(4), R(5), U8(2),
B(Star), R(2), B(Star), R(2),
/* 64 S> */ B(Return), /* 65 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [36], Smi [36],
...@@ -175,7 +175,7 @@ bytecodes: [ ...@@ -175,7 +175,7 @@ bytecodes: [
B(Ldar), R(4), B(Ldar), R(4),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(4), B(Ldar), R(4),
/* 49 S> */ B(Return), /* 50 S> */ B(Return),
/* 17 S> */ B(LdaSmi), I8(42), /* 17 S> */ B(LdaSmi), I8(42),
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0), /* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
/* 21 S> */ B(LdaModuleVariable), I8(1), U8(0), /* 21 S> */ B(LdaModuleVariable), I8(1), U8(0),
...@@ -190,7 +190,7 @@ bytecodes: [ ...@@ -190,7 +190,7 @@ bytecodes: [
/* 42 E> */ B(StaModuleVariable), I8(1), U8(0), /* 42 E> */ B(StaModuleVariable), I8(1), U8(0),
B(Mov), R(4), R(2), B(Mov), R(4), R(2),
B(Ldar), R(2), B(Ldar), R(2),
/* 49 S> */ B(Return), /* 50 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [36], Smi [36],
...@@ -233,7 +233,7 @@ bytecodes: [ ...@@ -233,7 +233,7 @@ bytecodes: [
B(Ldar), R(4), B(Ldar), R(4),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(4), B(Ldar), R(4),
/* 49 S> */ B(Return), /* 50 S> */ B(Return),
/* 17 S> */ B(LdaSmi), I8(42), /* 17 S> */ B(LdaSmi), I8(42),
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0), /* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
/* 21 S> */ B(LdaModuleVariable), I8(1), U8(0), /* 21 S> */ B(LdaModuleVariable), I8(1), U8(0),
...@@ -248,7 +248,7 @@ bytecodes: [ ...@@ -248,7 +248,7 @@ bytecodes: [
/* 42 E> */ B(StaModuleVariable), I8(1), U8(0), /* 42 E> */ B(StaModuleVariable), I8(1), U8(0),
B(Mov), R(4), R(2), B(Mov), R(4), R(2),
B(Ldar), R(2), B(Ldar), R(2),
/* 49 S> */ B(Return), /* 50 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [42], Smi [42],
...@@ -291,7 +291,7 @@ bytecodes: [ ...@@ -291,7 +291,7 @@ bytecodes: [
B(Ldar), R(4), B(Ldar), R(4),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(4), B(Ldar), R(4),
/* 51 S> */ B(Return), /* 52 S> */ B(Return),
/* 19 S> */ B(LdaSmi), I8(42), /* 19 S> */ B(LdaSmi), I8(42),
/* 19 E> */ B(StaModuleVariable), I8(1), U8(0), /* 19 E> */ B(StaModuleVariable), I8(1), U8(0),
/* 23 S> */ B(LdaModuleVariable), I8(1), U8(0), /* 23 S> */ B(LdaModuleVariable), I8(1), U8(0),
...@@ -306,7 +306,7 @@ bytecodes: [ ...@@ -306,7 +306,7 @@ bytecodes: [
/* 44 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0), /* 44 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
B(Mov), R(4), R(2), B(Mov), R(4), R(2),
B(Ldar), R(2), B(Ldar), R(2),
/* 51 S> */ B(Return), /* 52 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [42], Smi [42],
...@@ -347,12 +347,12 @@ bytecodes: [ ...@@ -347,12 +347,12 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(3), B(Ldar), R(3),
/* 32 S> */ B(Return), /* 33 S> */ B(Return),
B(Mov), R(3), R(1), B(Mov), R(3), R(1),
B(CreateClosure), U8(4), U8(0), U8(0), B(CreateClosure), U8(4), U8(0), U8(0),
B(StaModuleVariable), I8(1), U8(0), B(StaModuleVariable), I8(1), U8(0),
B(Ldar), R(1), B(Ldar), R(1),
/* 32 S> */ B(Return), /* 33 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [42], Smi [42],
...@@ -394,7 +394,7 @@ bytecodes: [ ...@@ -394,7 +394,7 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(3), B(Ldar), R(3),
/* 26 S> */ B(Return), /* 27 S> */ B(Return),
B(Mov), R(3), R(1), B(Mov), R(3), R(1),
B(LdaTheHole), B(LdaTheHole),
B(Star), R(6), B(Star), R(6),
...@@ -408,7 +408,7 @@ bytecodes: [ ...@@ -408,7 +408,7 @@ bytecodes: [
B(Ldar), R(5), B(Ldar), R(5),
B(StaModuleVariable), I8(1), U8(0), B(StaModuleVariable), I8(1), U8(0),
B(Ldar), R(1), B(Ldar), R(1),
/* 26 S> */ B(Return), /* 27 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [42], Smi [42],
...@@ -448,10 +448,10 @@ bytecodes: [ ...@@ -448,10 +448,10 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(3), B(Ldar), R(3),
/* 30 S> */ B(Return), /* 31 S> */ B(Return),
B(Mov), R(3), R(1), B(Mov), R(3), R(1),
B(Ldar), R(1), B(Ldar), R(1),
/* 30 S> */ B(Return), /* 31 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [36], Smi [36],
...@@ -489,10 +489,10 @@ bytecodes: [ ...@@ -489,10 +489,10 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(3), B(Ldar), R(3),
/* 19 S> */ B(Return), /* 20 S> */ B(Return),
B(Mov), R(3), R(1), B(Mov), R(3), R(1),
B(Ldar), R(1), B(Ldar), R(1),
/* 19 S> */ B(Return), /* 20 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [36], Smi [36],
...@@ -536,14 +536,14 @@ bytecodes: [ ...@@ -536,14 +536,14 @@ bytecodes: [
B(Ldar), R(4), B(Ldar), R(4),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
B(Ldar), R(4), B(Ldar), R(4),
/* 45 S> */ B(Return), /* 46 S> */ B(Return),
/* 31 S> */ B(LdaNamedProperty), R(1), U8(4), U8(0), /* 31 S> */ B(LdaNamedProperty), R(1), U8(4), U8(0),
B(Star), R(4), B(Star), R(4),
/* 42 E> */ B(LdaNamedProperty), R(1), U8(5), U8(2), /* 42 E> */ B(LdaNamedProperty), R(1), U8(5), U8(2),
B(Star), R(7), B(Star), R(7),
/* 31 E> */ B(CallProperty2), R(4), R(1), R(1), R(7), U8(4), /* 31 E> */ B(CallProperty2), R(4), R(1), R(1), R(7), U8(4),
B(Star), R(2), B(Star), R(2),
/* 45 S> */ B(Return), /* 46 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [48], Smi [48],
......
...@@ -27,7 +27,7 @@ bytecodes: [ ...@@ -27,7 +27,7 @@ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
/* 8 E> */ B(StaGlobal), U8(4), U8(6), /* 8 E> */ B(StaGlobal), U8(4), U8(6),
B(LdaUndefined), B(LdaUndefined),
/* 33 S> */ B(Return), /* 34 S> */ B(Return),
] ]
constant pool: [ constant pool: [
FIXED_ARRAY_TYPE, FIXED_ARRAY_TYPE,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
var Debug = debug.Debug; var Debug = debug.Debug;
var expected = ["debugger;", "debugger;"]; var expected = ["debugger;", ""];
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return; if (event != Debug.DebugEvent.Break) return;
......
...@@ -44,7 +44,7 @@ setTimeout(function() { ...@@ -44,7 +44,7 @@ setTimeout(function() {
Debug.setListener(null); Debug.setListener(null);
assertNull(exception); assertNull(exception);
var expectation = var expectation =
["debugger;","debugger;"," print(1);","}"," return 2;"," return 2;", ["debugger;",""," print(1);","}"," return 2;"," return 2;",
" throw new Error();"," print(3);","} // STOP"]; " throw new Error();"," print(3);","} // STOP"];
assertEquals(log, expectation); assertEquals(log, expectation);
}); });
......
...@@ -8,8 +8,8 @@ paused at: ...@@ -8,8 +8,8 @@ paused at:
paused at: paused at:
(function boo() { setTimeout(() => 239, 0); debugger; })()# (function boo() { setTimeout(() => 239, 0); debugger; })()
#
paused at: paused at:
(function boo() { setTimeout(() => #239, 0); debugger; })() (function boo() { setTimeout(() => #239, 0); debugger; })()
......
...@@ -375,7 +375,7 @@ testFunction (test.js:28:0) ...@@ -375,7 +375,7 @@ testFunction (test.js:28:0)
for (let k of iterable) { all.push(k); } for (let k of iterable) { all.push(k); }
#} #}
(anonymous) (expr.js:0:34) (anonymous) (expr.js:0:35)
......
...@@ -14,12 +14,6 @@ Tests possible breakpoints in array literal ...@@ -14,12 +14,6 @@ Tests possible breakpoints in array literal
scriptId : <scriptId> scriptId : <scriptId>
} }
[2] : { [2] : {
columnNumber : 7
lineNumber : 0
scriptId : <scriptId>
type : return
}
[3] : {
columnNumber : 8 columnNumber : 8
lineNumber : 0 lineNumber : 0
scriptId : <scriptId> scriptId : <scriptId>
......
...@@ -45,12 +45,12 @@ function boo(){ #return Promise.resolve().then(() => 42); } ...@@ -45,12 +45,12 @@ function boo(){ #return Promise.resolve().then(() => 42); }
Test end is undefined Test end is undefined
function foo(){ #return Promise.#resolve();# } function foo(){ #return Promise.#resolve();# }
function boo(){ #return Promise.#resolve().#then(() => #42#);# } function boo(){ #return Promise.#resolve().#then(() => #42#);# }
#
#
Test end.lineNumber > scripts.lineCount() Test end.lineNumber > scripts.lineCount()
function foo(){ #return Promise.#resolve();# } function foo(){ #return Promise.#resolve();# }
function boo(){ #return Promise.#resolve().#then(() => #42#);# } function boo(){ #return Promise.#resolve().#then(() => #42#);# }
#
Test one string Test one string
function foo(){ #return Promise.#resolve();# } function foo(){ #return Promise.#resolve();# }
...@@ -64,7 +64,7 @@ function boo(){ return Promise.resolve().then(() => 42); } ...@@ -64,7 +64,7 @@ function boo(){ return Promise.resolve().then(() => 42); }
Running test: getPossibleBreakpointsInArrow Running test: getPossibleBreakpointsInArrow
function foo() { #return Promise.#resolve().#then(() => #239#).#then(() => #42#).#then(() => #() => #42#)# #} function foo() { #return Promise.#resolve().#then(() => #239#).#then(() => #42#).#then(() => #() => #42#)# }#
Running test: arrowFunctionFirstLine Running test: arrowFunctionFirstLine
function foo1() { #Promise.#resolve().#then(() => #42#) #} function foo1() { #Promise.#resolve().#then(() => #42#) #}
...@@ -92,7 +92,7 @@ Running test: arrowFunctionOnPause ...@@ -92,7 +92,7 @@ Running test: arrowFunctionOnPause
#debugger; function foo3() { #Promise.#resolve().#then(() => #42#) #} #debugger; function foo3() { #Promise.#resolve().#then(() => #42#) #}
function foo4() { #Promise.#resolve().#then(() => #42#) #}; function foo4() { #Promise.#resolve().#then(() => #42#) #};
#foo3(); #foo3();
#foo4()#; #foo4();#
paused in paused in
debugger; function foo3() { Promise.resolve().then(() => 42) } debugger; function foo3() { Promise.resolve().then(() => 42) }
function foo4() { Promise.resolve().then(() => 42) }; function foo4() { Promise.resolve().then(() => 42) };
...@@ -147,7 +147,7 @@ paused in ...@@ -147,7 +147,7 @@ paused in
debugger; function foo3() { Promise.resolve().then(() => 42) } debugger; function foo3() { Promise.resolve().then(() => 42) }
function foo4() { Promise.resolve().then(() => 42) }; function foo4() { Promise.resolve().then(() => 42) };
foo3(); foo3();
foo4()^; foo4();^
paused in Promise.resolve.then paused in Promise.resolve.then
debugger; function foo3() { Promise.resolve().then(() => ^42) } debugger; function foo3() { Promise.resolve().then(() => ^42) }
function foo4() { Promise.resolve().then(() => 42) }; function foo4() { Promise.resolve().then(() => 42) };
...@@ -193,12 +193,12 @@ function boo(){ #return Promise.resolve().then(() => 42); } ...@@ -193,12 +193,12 @@ function boo(){ #return Promise.resolve().then(() => 42); }
Test end is undefined Test end is undefined
function foo(){ #return Promise.#resolve();# } function foo(){ #return Promise.#resolve();# }
function boo(){ #return Promise.#resolve().#then(() => #42#);# } function boo(){ #return Promise.#resolve().#then(() => #42#);# }
#
#
Test end.lineNumber > scripts.lineCount() Test end.lineNumber > scripts.lineCount()
function foo(){ #return Promise.#resolve();# } function foo(){ #return Promise.#resolve();# }
function boo(){ #return Promise.#resolve().#then(() => #42#);# } function boo(){ #return Promise.#resolve().#then(() => #42#);# }
#
Test one string Test one string
function foo(){ #return Promise.#resolve();# } function foo(){ #return Promise.#resolve();# }
...@@ -214,58 +214,71 @@ function boo(){ return Promise.resolve().then(() => 42); } ...@@ -214,58 +214,71 @@ function boo(){ return Promise.resolve().then(() => 42); }
Running test: withOffset Running test: withOffset
function foo5() { #Promise.#resolve().#then(() => #42#) #} function foo5() { #Promise.#resolve().#then(() => #42#) #}
function foo6() { #Promise.#resolve().#then(() => #42#) #} function foo6() { #Promise.#resolve().#then(() => #42#) #}
#
paused in foo5 paused in foo5
function foo5() { ^Promise.resolve().then(() => 42) } function foo5() { ^Promise.resolve().then(() => 42) }
function foo6() { Promise.resolve().then(() => 42) } function foo6() { Promise.resolve().then(() => 42) }
paused in foo5 paused in foo5
function foo5() { Promise.^resolve().then(() => 42) } function foo5() { Promise.^resolve().then(() => 42) }
function foo6() { Promise.resolve().then(() => 42) } function foo6() { Promise.resolve().then(() => 42) }
paused in foo5 paused in foo5
function foo5() { Promise.resolve().^then(() => 42) } function foo5() { Promise.resolve().^then(() => 42) }
function foo6() { Promise.resolve().then(() => 42) } function foo6() { Promise.resolve().then(() => 42) }
paused in foo5 paused in foo5
function foo5() { Promise.resolve().then(() => 42) ^} function foo5() { Promise.resolve().then(() => 42) ^}
function foo6() { Promise.resolve().then(() => 42) } function foo6() { Promise.resolve().then(() => 42) }
paused in foo6 paused in foo6
function foo5() { Promise.resolve().then(() => 42) } function foo5() { Promise.resolve().then(() => 42) }
function foo6() { ^Promise.resolve().then(() => 42) } function foo6() { ^Promise.resolve().then(() => 42) }
paused in foo6 paused in foo6
function foo5() { Promise.resolve().then(() => 42) } function foo5() { Promise.resolve().then(() => 42) }
function foo6() { Promise.^resolve().then(() => 42) } function foo6() { Promise.^resolve().then(() => 42) }
paused in foo6 paused in foo6
function foo5() { Promise.resolve().then(() => 42) } function foo5() { Promise.resolve().then(() => 42) }
function foo6() { Promise.resolve().^then(() => 42) } function foo6() { Promise.resolve().^then(() => 42) }
paused in foo6 paused in foo6
function foo5() { Promise.resolve().then(() => 42) } function foo5() { Promise.resolve().then(() => 42) }
function foo6() { Promise.resolve().then(() => 42) ^} function foo6() { Promise.resolve().then(() => 42) ^}
paused in Promise.resolve.then paused in Promise.resolve.then
function foo5() { Promise.resolve().then(() => ^42) } function foo5() { Promise.resolve().then(() => ^42) }
function foo6() { Promise.resolve().then(() => 42) } function foo6() { Promise.resolve().then(() => 42) }
paused in Promise.resolve.then paused in Promise.resolve.then
function foo5() { Promise.resolve().then(() => 42^) } function foo5() { Promise.resolve().then(() => 42^) }
function foo6() { Promise.resolve().then(() => 42) } function foo6() { Promise.resolve().then(() => 42) }
paused in Promise.resolve.then paused in Promise.resolve.then
function foo5() { Promise.resolve().then(() => 42) } function foo5() { Promise.resolve().then(() => 42) }
function foo6() { Promise.resolve().then(() => ^42) } function foo6() { Promise.resolve().then(() => ^42) }
paused in Promise.resolve.then paused in Promise.resolve.then
function foo5() { Promise.resolve().then(() => 42) } function foo5() { Promise.resolve().then(() => 42) }
function foo6() { Promise.resolve().then(() => 42^) } function foo6() { Promise.resolve().then(() => 42^) }
Running test: arrowFunctionReturn Running test: arrowFunctionReturn
#() => #239# #() => #239#
#
function foo() { function boo() { #return 239# } #}# function foo() { function boo() { #return 239# } #}
#
#() => { #239 #}# #() => { #239 #}
#
function foo() { #239 #}# function foo() { #239 #}
#
#() => #23#9# #() => #239#
#() => { #return 239# #} #() => { #return 239# }#
Running test: argumentsAsCalls Running test: argumentsAsCalls
function foo(){#} function foo(){#}
function boo(){#} function boo(){#}
function main(f1,f2){#} function main(f1,f2){#}
#main(#foo(), #boo());# #main(#foo(), #boo());
#
...@@ -267,5 +267,5 @@ function twiceDefined() { ...@@ -267,5 +267,5 @@ function twiceDefined() {
|_|return a + b;|R| |_|return a + b;|R|
} }
|R|
...@@ -118,7 +118,8 @@ function foo4() { Promise.resolve().then(() => 42) };\nfoo3();\nfoo4();`; ...@@ -118,7 +118,8 @@ function foo4() { Promise.resolve().then(() => 42) };\nfoo3();\nfoo4();`;
Protocol.Debugger.onPaused(message => dumpBreakLocationInSourceAndResume(message, source, 3, 18)); Protocol.Debugger.onPaused(message => dumpBreakLocationInSourceAndResume(message, source, 3, 18));
var source = `function foo5() { Promise.resolve().then(() => 42) } var source = `function foo5() { Promise.resolve().then(() => 42) }
function foo6() { Promise.resolve().then(() => 42) }`; function foo6() { Promise.resolve().then(() => 42) }
`;
waitForPossibleBreakpoints(source, { lineNumber: 0, columnNumber: 0 }, undefined, { name: 'with-offset.js', line_offset: 3, column_offset: 18 }) waitForPossibleBreakpoints(source, { lineNumber: 0, columnNumber: 0 }, undefined, { name: 'with-offset.js', line_offset: 3, column_offset: 18 })
.then(message => dumpAllLocations(message, source, 3, 18)) .then(message => dumpAllLocations(message, source, 3, 18))
.then(setAllBreakpoints) .then(setAllBreakpoints)
......
...@@ -20,7 +20,7 @@ paused at: ...@@ -20,7 +20,7 @@ paused at:
var a = #239; var a = #239;
paused at: paused at:
var a = 239#; var a = 239;#
Running test: testWithNativeBreakpoint Running test: testWithNativeBreakpoint
......
...@@ -27,8 +27,8 @@ Running test: testTailCall ...@@ -27,8 +27,8 @@ Running test: testTailCall
type : return type : return
} }
[4] : { [4] : {
columnNumber : 1 columnNumber : 0
lineNumber : 6 lineNumber : 7
scriptId : <scriptId> scriptId : <scriptId>
type : return type : return
} }
......
...@@ -3,8 +3,8 @@ Tests breakpoint at last line. ...@@ -3,8 +3,8 @@ Tests breakpoint at last line.
breakpointId : <breakpointId> breakpointId : <breakpointId>
locations : [ locations : [
[0] : { [0] : {
columnNumber : 12 columnNumber : 0
lineNumber : 3 lineNumber : 4
scriptId : <scriptId> scriptId : <scriptId>
} }
] ]
...@@ -12,5 +12,10 @@ Tests breakpoint at last line. ...@@ -12,5 +12,10 @@ Tests breakpoint at last line.
{ {
breakpointId : <breakpointId> breakpointId : <breakpointId>
locations : [ locations : [
[0] : {
columnNumber : 0
lineNumber : 4
scriptId : <scriptId>
}
] ]
} }
...@@ -7,7 +7,7 @@ function testEval() { ...@@ -7,7 +7,7 @@ function testEval() {
eval('// comment only\n'); eval('// comment only\n');
break at: break at:
// comment onl#y // comment only#
break at: break at:
eval('// comment only'); eval('// comment only');
...@@ -15,8 +15,8 @@ break at: ...@@ -15,8 +15,8 @@ break at:
} }
break at: break at:
// comment only# // comment only
#
break at: break at:
eval('// comment only\n'); eval('// comment only\n');
......
...@@ -14,4 +14,4 @@ paused ...@@ -14,4 +14,4 @@ paused
(anonymous) (test.js:2:5) (anonymous) (test.js:2:5)
(anonymous) (:0:6) (anonymous) (:0:6)
paused paused
(anonymous) (:0:8) (anonymous) (:0:9)
...@@ -4,7 +4,7 @@ Running test: testStepOut ...@@ -4,7 +4,7 @@ Running test: testStepOut
test (foo.js:12:2) test (foo.js:12:2)
(anonymous) (:0:0) (anonymous) (:0:0)
(anonymous) (:0:5) (anonymous) (:0:6)
(anonymous) (timeout1.js:0:8) (anonymous) (timeout1.js:0:8)
...@@ -22,11 +22,11 @@ test (foo.js:12:2) ...@@ -22,11 +22,11 @@ test (foo.js:12:2)
test (foo.js:13:0) test (foo.js:13:0)
(anonymous) (:0:0) (anonymous) (:0:0)
(anonymous) (:0:5) (anonymous) (:0:6)
(anonymous) (timeout1.js:0:8) (anonymous) (timeout1.js:0:8)
(anonymous) (timeout1.js:0:34) (anonymous) (timeout1.js:0:35)
foo (timeout2.js:2:2) foo (timeout2.js:2:2)
...@@ -34,7 +34,7 @@ foo (timeout2.js:2:12) ...@@ -34,7 +34,7 @@ foo (timeout2.js:2:12)
(anonymous) (timeout3.js:0:8) (anonymous) (timeout3.js:0:8)
(anonymous) (timeout3.js:0:34) (anonymous) (timeout3.js:0:35)
Running test: testStepInto Running test: testStepInto
...@@ -55,11 +55,11 @@ test (foo.js:12:2) ...@@ -55,11 +55,11 @@ test (foo.js:12:2)
test (foo.js:13:0) test (foo.js:13:0)
(anonymous) (:0:0) (anonymous) (:0:0)
(anonymous) (:0:5) (anonymous) (:0:6)
(anonymous) (timeout1.js:0:8) (anonymous) (timeout1.js:0:8)
(anonymous) (timeout1.js:0:34) (anonymous) (timeout1.js:0:35)
foo (timeout2.js:2:2) foo (timeout2.js:2:2)
...@@ -67,5 +67,5 @@ foo (timeout2.js:2:12) ...@@ -67,5 +67,5 @@ foo (timeout2.js:2:12)
(anonymous) (timeout3.js:0:8) (anonymous) (timeout3.js:0:8)
(anonymous) (timeout3.js:0:34) (anonymous) (timeout3.js:0:35)
...@@ -31,5 +31,5 @@ paused ...@@ -31,5 +31,5 @@ paused
#} #}
paused paused
test(#) test()#
...@@ -65,10 +65,9 @@ f (:3:27) ...@@ -65,10 +65,9 @@ f (:3:27)
} }
Debugger.stepOver called Debugger.stepOver called
(anonymous) (:5:5) (anonymous) (:6:0)
} f(5);
f(5);# #
Debugger.resume called Debugger.resume called
...@@ -107,10 +106,9 @@ f (:3:27) ...@@ -107,10 +106,9 @@ f (:3:27)
} }
Debugger.stepOut called Debugger.stepOut called
(anonymous) (:5:5) (anonymous) (:6:0)
} f(5);
f(5);# #
Debugger.resume called Debugger.resume called
...@@ -169,9 +167,8 @@ f (:3:27) ...@@ -169,9 +167,8 @@ f (:3:27)
} }
Debugger.stepOut called Debugger.stepOut called
(anonymous) (:5:5) (anonymous) (:6:0)
} f(5);
f(5);# #
Debugger.resume called Debugger.resume called
...@@ -8,7 +8,7 @@ Debugger.stepInto called ...@@ -8,7 +8,7 @@ Debugger.stepInto called
[1,2].map(v => #v); [1,2].map(v => #v);
Debugger.stepOut called Debugger.stepOut called
[1,2].map(v => v)#; [1,2].map(v => v);#
Debugger.resume called Debugger.resume called
...@@ -29,7 +29,7 @@ Debugger.stepOver called ...@@ -29,7 +29,7 @@ Debugger.stepOver called
[1,2].map(v => v#); [1,2].map(v => v#);
Debugger.stepOver called Debugger.stepOver called
[1,2].map(v => v)#; [1,2].map(v => v);#
Debugger.resume called Debugger.resume called
...@@ -50,7 +50,7 @@ Debugger.stepInto called ...@@ -50,7 +50,7 @@ Debugger.stepInto called
[1,2].map(v => v#); [1,2].map(v => v#);
Debugger.stepInto called Debugger.stepInto called
[1,2].map(v => v)#; [1,2].map(v => v);#
Debugger.resume called Debugger.resume called
...@@ -71,7 +71,7 @@ Debugger.stepInto called ...@@ -71,7 +71,7 @@ Debugger.stepInto called
callAll(() => 1, () => 2#); callAll(() => 1, () => 2#);
Debugger.stepInto called Debugger.stepInto called
callAll(() => 1, () => 2)#; callAll(() => 1, () => 2);#
Debugger.resume called Debugger.resume called
...@@ -92,7 +92,7 @@ Debugger.stepOver called ...@@ -92,7 +92,7 @@ Debugger.stepOver called
callAll(() => 1, () => 2#); callAll(() => 1, () => 2#);
Debugger.stepOver called Debugger.stepOver called
callAll(() => 1, () => 2)#; callAll(() => 1, () => 2);#
Debugger.resume called Debugger.resume called
...@@ -107,7 +107,7 @@ Debugger.stepOut called ...@@ -107,7 +107,7 @@ Debugger.stepOut called
callAll(() => 1, () => #2); callAll(() => 1, () => #2);
Debugger.stepOut called Debugger.stepOut called
callAll(() => 1, () => 2)#; callAll(() => 1, () => 2);#
Debugger.resume called Debugger.resume called
...@@ -122,7 +122,7 @@ Debugger.stepOut called ...@@ -122,7 +122,7 @@ Debugger.stepOut called
callAll(() => 1, callAll.bind(null, () => #2)); callAll(() => 1, callAll.bind(null, () => #2));
Debugger.stepOut called Debugger.stepOut called
callAll(() => 1, callAll.bind(null, () => 2))#; callAll(() => 1, callAll.bind(null, () => 2));#
Debugger.resume called Debugger.resume called
...@@ -134,7 +134,7 @@ Debugger.stepInto called ...@@ -134,7 +134,7 @@ Debugger.stepInto called
foo = () => #1 foo = () => #1
Debugger.stepOut called Debugger.stepOut called
callAll(foo, callAll.bind(null, foo))#; callAll(foo, callAll.bind(null, foo));#
Debugger.resume called Debugger.resume called
...@@ -155,7 +155,7 @@ Debugger.stepOver called ...@@ -155,7 +155,7 @@ Debugger.stepOver called
callAll(() => 1, callAll.bind(null, () => 2#)); callAll(() => 1, callAll.bind(null, () => 2#));
Debugger.stepOver called Debugger.stepOver called
callAll(() => 1, callAll.bind(null, () => 2))#; callAll(() => 1, callAll.bind(null, () => 2));#
Debugger.resume called Debugger.resume called
...@@ -176,7 +176,7 @@ Debugger.stepOver called ...@@ -176,7 +176,7 @@ Debugger.stepOver called
callAll(() => 1, callAll.bind(null, () => 2#)); callAll(() => 1, callAll.bind(null, () => 2#));
Debugger.stepOver called Debugger.stepOver called
callAll(() => 1, callAll.bind(null, () => 2))#; callAll(() => 1, callAll.bind(null, () => 2));#
Debugger.resume called Debugger.resume called
...@@ -191,7 +191,7 @@ Debugger.stepOut called ...@@ -191,7 +191,7 @@ Debugger.stepOut called
callAll(callAll.bind(null, () => 1), () => #2); callAll(callAll.bind(null, () => 1), () => #2);
Debugger.stepOut called Debugger.stepOut called
callAll(callAll.bind(null, () => 1), () => 2)#; callAll(callAll.bind(null, () => 1), () => 2);#
Debugger.resume called Debugger.resume called
...@@ -203,7 +203,7 @@ Debugger.stepInto called ...@@ -203,7 +203,7 @@ Debugger.stepInto called
foo = () => #1 foo = () => #1
Debugger.stepOut called Debugger.stepOut called
callAll(callAll.bind(null, foo), foo)#; callAll(callAll.bind(null, foo), foo);#
Debugger.resume called Debugger.resume called
...@@ -224,7 +224,7 @@ Debugger.stepOver called ...@@ -224,7 +224,7 @@ Debugger.stepOver called
callAll(callAll.bind(null, () => 1), () => 2#); callAll(callAll.bind(null, () => 1), () => 2#);
Debugger.stepOver called Debugger.stepOver called
callAll(callAll.bind(null, () => 1), () => 2)#; callAll(callAll.bind(null, () => 1), () => 2);#
Debugger.resume called Debugger.resume called
...@@ -245,7 +245,7 @@ Debugger.stepInto called ...@@ -245,7 +245,7 @@ Debugger.stepInto called
callAll(callAll.bind(null, () => 1), () => 2#); callAll(callAll.bind(null, () => 1), () => 2#);
Debugger.stepInto called Debugger.stepInto called
callAll(callAll.bind(null, () => 1), () => 2)#; callAll(callAll.bind(null, () => 1), () => 2);#
Debugger.resume called Debugger.resume called
...@@ -272,7 +272,7 @@ Debugger.stepOver called ...@@ -272,7 +272,7 @@ Debugger.stepOver called
callAll(foo, foo, () => 2#); callAll(foo, foo, () => 2#);
Debugger.stepOver called Debugger.stepOver called
callAll(foo, foo, () => 2)#; callAll(foo, foo, () => 2);#
Debugger.resume called Debugger.resume called
...@@ -287,7 +287,7 @@ Debugger.stepOut called ...@@ -287,7 +287,7 @@ Debugger.stepOut called
callAll(foo, foo, () => #2); callAll(foo, foo, () => #2);
Debugger.stepOut called Debugger.stepOut called
callAll(foo, foo, () => 2)#; callAll(foo, foo, () => 2);#
Debugger.resume called Debugger.resume called
...@@ -305,6 +305,6 @@ Debugger.stepOut called ...@@ -305,6 +305,6 @@ Debugger.stepOut called
callAll(foo, foo, () => #2); callAll(foo, foo, () => #2);
Debugger.stepOut called Debugger.stepOut called
callAll(foo, foo, () => 2)#; callAll(foo, foo, () => 2);#
Debugger.resume called Debugger.resume called
...@@ -5,4 +5,5 @@ function f(/*Object, number, undefined*/a, /*Array, number, null*/b, /*boolean, ...@@ -5,4 +5,5 @@ function f(/*Object, number, undefined*/a, /*Array, number, null*/b, /*boolean,
/*string*/}; /*string*/};
f({}, [], true); f({}, [], true);
f(3, 2.3, {a: 42}); f(3, 2.3, {a: 42});
f(undefined, null, Symbol('hello'));/*string*/ f(undefined, null, Symbol('hello'));
/*string*/
...@@ -12,4 +12,5 @@ var f = new Flower(); ...@@ -12,4 +12,5 @@ var f = new Flower();
f.constructor = {}; f.constructor = {};
f.constructor.name = "Not a flower."; f.constructor.name = "Not a flower.";
g({}, [], f); g({}, [], f);
g(3, 2.3, {a: 42});/*string*/ g(3, 2.3, {a: 42});
/*string*/
...@@ -13,4 +13,5 @@ var f = new Flower(); ...@@ -13,4 +13,5 @@ var f = new Flower();
// know about a toStringTag. // know about a toStringTag.
f[Symbol.toStringTag] = 'Dog'; f[Symbol.toStringTag] = 'Dog';
g({}, [], f); g({}, [], f);
g(3, 2.3, {a: 42});/*string*/ g(3, 2.3, {a: 42});
/*string*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment