2017-02-27 20:20:39 +00:00
|
|
|
Checks Debugger.getPossibleBreakpoints
|
|
|
|
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
function testEval() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|eval('// comment only');
|
|
|
|
|C|eval('// comment only\n');
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
// function without return
|
|
|
|
function procedure() {
|
2017-03-06 20:47:55 +00:00
|
|
|
var a = |_|1;
|
|
|
|
var b = |_|2;
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testProcedure() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|procedure();
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function returnTrue() {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return true;|R|
|
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testIf() {
|
|
|
|
var a;
|
2017-03-07 13:27:55 +00:00
|
|
|
if (true) |_|a = true;
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|if (!a) {
|
|
|
|
|_|a = true;
|
2017-02-27 20:20:39 +00:00
|
|
|
} else {
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|a = false;
|
2017-02-27 20:20:39 +00:00
|
|
|
}
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|if (|C|returnTrue()) {
|
|
|
|
|_|a = false;
|
2017-02-27 20:20:39 +00:00
|
|
|
} else {
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|a = true;
|
2017-02-27 20:20:39 +00:00
|
|
|
}
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
2017-03-06 20:47:55 +00:00
|
|
|
function emptyFunction() {|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testEmptyFunction() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|emptyFunction();
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function twoArguments(a1, a2) {
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testCallArguments() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|twoArguments(|C|emptyFunction(), |C|emptyFunction());
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testNested() {
|
|
|
|
function nested1() {
|
|
|
|
function nested2() {
|
|
|
|
function nested3() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
|
|
|
|C|nested3();
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return;|R|
|
|
|
|
}
|
2017-07-17 19:02:35 +00:00
|
|
|
return |C|nested2();|R|
|
2017-07-14 17:50:09 +00:00
|
|
|
}
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|nested1();
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function return42() {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return 42;|R|
|
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function returnCall() {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return |C|return42();|R|
|
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testCallAtReturn() {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return |C|returnCall();|R|
|
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function returnObject() {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return ({ foo: () => |_|42|R| });|R|
|
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testWith() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|with (|C|returnObject()) {
|
|
|
|
|C|foo();
|
2017-02-27 20:20:39 +00:00
|
|
|
}
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|with({}) {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return;|R|
|
2017-02-27 20:20:39 +00:00
|
|
|
}
|
2017-07-14 17:50:09 +00:00
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testForLoop() {
|
2017-03-06 20:47:55 +00:00
|
|
|
for (var i = |_|0; i |_|< 1; ++|_|i) {}
|
2017-07-17 19:02:35 +00:00
|
|
|
for (var i = |_|0; i |_|< 1; ++|_|i) i;
|
2017-03-06 20:47:55 +00:00
|
|
|
for (var i = |_|0; i |_|< 0; ++|_|i) {}
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testForOfLoop() {
|
2018-01-11 17:24:11 +00:00
|
|
|
for (var |C|k of |_|[]) {}
|
|
|
|
for (var |C|k of |_|[1]) |_|k;
|
2017-03-06 20:47:55 +00:00
|
|
|
var a = |_|[];
|
2018-01-11 17:24:11 +00:00
|
|
|
for (var |C|k of |_|a) {}
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testForInLoop() {
|
2017-03-06 20:47:55 +00:00
|
|
|
var o = |_|{};
|
|
|
|
for (var |_|k in |_|o) {}
|
|
|
|
for (var |_|k in |_|o) |_|k;
|
|
|
|
for (var |_|k in |_|{ a:1 }) {}
|
|
|
|
for (var |_|k in |_|{ a:1 }) |_|k;
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testSimpleExpressions() {
|
2017-03-07 13:27:55 +00:00
|
|
|
1 + 2 + 3;
|
2017-03-06 20:47:55 +00:00
|
|
|
var a = |_|1;
|
|
|
|
|_|++a;
|
|
|
|
|_|a--;
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
2017-12-06 17:27:18 +00:00
|
|
|
|_|Object.|C|defineProperty(this, 'getterFoo', {
|
2017-03-06 20:47:55 +00:00
|
|
|
get: () => |_|return42|R|
|
2017-02-27 20:20:39 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
function testGetter() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|getterFoo();
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
2017-12-06 17:27:18 +00:00
|
|
|
var obj = |_|{
|
2017-03-06 20:47:55 +00:00
|
|
|
foo: () => (|_|{
|
|
|
|
boo: () => |_|return42|R|
|
|
|
|
})|R|
|
2017-02-27 20:20:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
function testChainedCalls() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|obj.|C|foo().|C|boo()|C|();
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testChainedWithNative() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|Array.|C|from([1]).|C|concat([2]).|C|map(v => v |_|* 2|R|);
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testPromiseThen() {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return Promise.|C|resolve().|C|then(v => v |_|* 2|R|).|C|then(v => v |_|* 2|R|);|R|
|
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testSwitch() {
|
2017-03-06 20:47:55 +00:00
|
|
|
for (var i = |_|0; i |_|< 3; ++|_|i) {
|
|
|
|
|_|switch(i) {
|
|
|
|
case 0: |_|continue;
|
|
|
|
case 1: |C|return42(); |_|break;
|
2017-07-14 17:50:09 +00:00
|
|
|
default: |_|return;|R|
|
2017-02-27 20:20:39 +00:00
|
|
|
}
|
|
|
|
}
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
2018-01-16 10:25:57 +00:00
|
|
|
function* idMaker|_|() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|yield 1;
|
|
|
|
|_|yield 2;
|
|
|
|
|_|yield 3;
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testGenerator() {
|
2017-03-06 20:47:55 +00:00
|
|
|
var gen = |C|idMaker();
|
|
|
|
|C|return42();
|
2017-07-17 19:02:35 +00:00
|
|
|
gen.|C|next().value;
|
2017-03-06 20:47:55 +00:00
|
|
|
|D|debugger;
|
2017-07-17 19:02:35 +00:00
|
|
|
gen.|C|next().value;
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|return42();
|
2017-07-17 19:02:35 +00:00
|
|
|
gen.|C|next().value;
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|return42();
|
2017-07-17 19:02:35 +00:00
|
|
|
gen.|C|next().value;
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function throwException() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|throw |C|new Error();
|
2017-03-07 13:27:55 +00:00
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testCaughtException() {
|
|
|
|
try {
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|throwException()
|
2017-02-27 20:20:39 +00:00
|
|
|
} catch (e) {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return;|R|
|
2017-02-27 20:20:39 +00:00
|
|
|
}
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function testClasses() {
|
2017-05-04 17:00:44 +00:00
|
|
|
class Cat {
|
2017-02-27 20:20:39 +00:00
|
|
|
constructor(name) {
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|this.name = name;
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
speak() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
}
|
2017-05-04 17:00:44 +00:00
|
|
|
class Lion extends Cat {
|
2017-02-27 20:20:39 +00:00
|
|
|
constructor(name) {
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|super(name);
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
speak() {
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|super.|C|speak();
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
}
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|new Lion().|C|speak();
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
async function asyncFoo() {
|
2017-05-18 19:45:52 +00:00
|
|
|
|_|await Promise.|C|resolve().|C|then(v => v |_|* 2|R|);
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|return42();
|
|
|
|
|_|await |C|asyncBoo();
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
async function asyncBoo() {
|
2017-05-18 19:45:52 +00:00
|
|
|
|_|await Promise.|C|resolve();
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
async function testAsyncAwait() {
|
2017-05-18 19:45:52 +00:00
|
|
|
|_|await |C|asyncFoo();
|
2017-03-06 20:47:55 +00:00
|
|
|
|_|await |C|awaitBoo();
|
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
// TODO(kozyatinskiy): fix this.
|
|
|
|
async function testPromiseAsyncWithCode() {
|
|
|
|
var nextTest;
|
2017-03-06 20:47:55 +00:00
|
|
|
var testPromise = |C|new Promise(resolve => nextTest |_|= resolve|R|);
|
2017-02-27 20:20:39 +00:00
|
|
|
async function main() {
|
|
|
|
async function foo() {
|
|
|
|
var resolveNested;
|
2017-03-06 20:47:55 +00:00
|
|
|
var p = |C|new Promise(resolve => resolveNested |_|= resolve|R|);
|
|
|
|
|C|setTimeout(resolveNested, 0);
|
2017-07-13 13:53:13 +00:00
|
|
|
|_|await p;
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
|
|
|
|C|setTimeout(returnCall, 0);
|
2018-01-16 10:25:57 +00:00
|
|
|
|_|await |C|foo();
|
|
|
|
|_|await |C|foo();
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|nextTest();
|
|
|
|
|R|}
|
|
|
|
|C|main();
|
[async] Improve async function handling.
This change introduces new intrinsics used to desugar async functions
in the Parser and the BytecodeGenerator, namely we introduce a new
%_AsyncFunctionEnter intrinsic that constructs the generator object
for the async function (and in the future will also create the outer
promise for the async function). This generator object is internal
and never escapes to user code, plus since async functions don't have
a "prototype" property, we can just a single map here instead of tracking
the prototype/initial_map on every async function. This saves one word
per async function plus one initial_map per async function that was
invoked at least once.
We also introduce two new intrinsics %_AsyncFunctionReject, which
rejects the outer promise with the caught exception, and another
%_AsyncFunctionResolve, which resolves the outer promise with the
right hand side of the `return` statement. These functions also perform
the DevTools part of the job (aka popping from the promise stack and
sending the debug event). This allows us to get rid of the implicit
try-finally from async functions completely; because the finally
block only called to the %AsyncFunctionPromiseRelease builtin, which
was used to inform DevTools.
In essence we now turn an async function like
```js
async function f(x) { return await bar(x); }
```
into something like this (in Parser and BytecodeGenerator respectively):
```
function f(x) {
.generator_object = %_AsyncFunctionEnter(.closure, this);
.promise = %AsyncFunctionCreatePromise();
try {
.tmp = await bar(x);
return %_AsyncFunctionResolve(.promise, .tmp);
} catch (e) {
return %_AsyncFunctionReject(.promise, e);
}
}
```
Overall the bytecode for async functions gets significantly shorter
already (and will get even shorter once we put the outer promise into
the async function generator object). For example the bytecode for a
simple async function
```js
async function f(x) { return await x; }
```
goes from 175 bytes to 110 bytes (a ~38% reduction in size), which
is in particular due to the simplification around the try-finally
removal.
Overall this seems to improve the doxbee-async-es2017-native test by
around 2-3%. On the test case mentioned in v8:8276 we go from
1124ms to 441ms, which corresponds to a 60% reduction in total
execution time!
Tbr: marja@chromium.org
Bug: v8:7253, v8:7522, v8:8276
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id29dc92de7490b387ff697860c900cee44c9a7a4
Reviewed-on: https://chromium-review.googlesource.com/c/1269041
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56502}
2018-10-10 05:54:39 +00:00
|
|
|
|_|return testPromise;|R|
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function returnFunction() {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return returnObject;|R|
|
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
async function testPromiseComplex() {
|
|
|
|
var nextTest;
|
2017-03-06 20:47:55 +00:00
|
|
|
var testPromise = |C|new Promise(resolve => nextTest |_|= resolve|R|);
|
2017-02-27 20:20:39 +00:00
|
|
|
async function main() {
|
|
|
|
async function foo() {
|
2017-05-18 19:45:52 +00:00
|
|
|
|_|await Promise.|C|resolve();
|
[async] Improve async function handling.
This change introduces new intrinsics used to desugar async functions
in the Parser and the BytecodeGenerator, namely we introduce a new
%_AsyncFunctionEnter intrinsic that constructs the generator object
for the async function (and in the future will also create the outer
promise for the async function). This generator object is internal
and never escapes to user code, plus since async functions don't have
a "prototype" property, we can just a single map here instead of tracking
the prototype/initial_map on every async function. This saves one word
per async function plus one initial_map per async function that was
invoked at least once.
We also introduce two new intrinsics %_AsyncFunctionReject, which
rejects the outer promise with the caught exception, and another
%_AsyncFunctionResolve, which resolves the outer promise with the
right hand side of the `return` statement. These functions also perform
the DevTools part of the job (aka popping from the promise stack and
sending the debug event). This allows us to get rid of the implicit
try-finally from async functions completely; because the finally
block only called to the %AsyncFunctionPromiseRelease builtin, which
was used to inform DevTools.
In essence we now turn an async function like
```js
async function f(x) { return await bar(x); }
```
into something like this (in Parser and BytecodeGenerator respectively):
```
function f(x) {
.generator_object = %_AsyncFunctionEnter(.closure, this);
.promise = %AsyncFunctionCreatePromise();
try {
.tmp = await bar(x);
return %_AsyncFunctionResolve(.promise, .tmp);
} catch (e) {
return %_AsyncFunctionReject(.promise, e);
}
}
```
Overall the bytecode for async functions gets significantly shorter
already (and will get even shorter once we put the outer promise into
the async function generator object). For example the bytecode for a
simple async function
```js
async function f(x) { return await x; }
```
goes from 175 bytes to 110 bytes (a ~38% reduction in size), which
is in particular due to the simplification around the try-finally
removal.
Overall this seems to improve the doxbee-async-es2017-native test by
around 2-3%. On the test case mentioned in v8:8276 we go from
1124ms to 441ms, which corresponds to a 60% reduction in total
execution time!
Tbr: marja@chromium.org
Bug: v8:7253, v8:7522, v8:8276
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id29dc92de7490b387ff697860c900cee44c9a7a4
Reviewed-on: https://chromium-review.googlesource.com/c/1269041
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56502}
2018-10-10 05:54:39 +00:00
|
|
|
|_|return 42;|R|
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
|
|
|
var x = |_|1;
|
|
|
|
var y = |_|2;
|
2018-01-16 10:25:57 +00:00
|
|
|
|C|returnFunction(|C|emptyFunction(), x++, --y, x => 2 |_|* x|R|, |C|returnCall())|C|().a = |_|await |C|foo((a => 2 |_|*a|R|)|C|(5));
|
2017-03-06 20:47:55 +00:00
|
|
|
|C|nextTest();
|
|
|
|
|R|}
|
|
|
|
|C|main();
|
[async] Improve async function handling.
This change introduces new intrinsics used to desugar async functions
in the Parser and the BytecodeGenerator, namely we introduce a new
%_AsyncFunctionEnter intrinsic that constructs the generator object
for the async function (and in the future will also create the outer
promise for the async function). This generator object is internal
and never escapes to user code, plus since async functions don't have
a "prototype" property, we can just a single map here instead of tracking
the prototype/initial_map on every async function. This saves one word
per async function plus one initial_map per async function that was
invoked at least once.
We also introduce two new intrinsics %_AsyncFunctionReject, which
rejects the outer promise with the caught exception, and another
%_AsyncFunctionResolve, which resolves the outer promise with the
right hand side of the `return` statement. These functions also perform
the DevTools part of the job (aka popping from the promise stack and
sending the debug event). This allows us to get rid of the implicit
try-finally from async functions completely; because the finally
block only called to the %AsyncFunctionPromiseRelease builtin, which
was used to inform DevTools.
In essence we now turn an async function like
```js
async function f(x) { return await bar(x); }
```
into something like this (in Parser and BytecodeGenerator respectively):
```
function f(x) {
.generator_object = %_AsyncFunctionEnter(.closure, this);
.promise = %AsyncFunctionCreatePromise();
try {
.tmp = await bar(x);
return %_AsyncFunctionResolve(.promise, .tmp);
} catch (e) {
return %_AsyncFunctionReject(.promise, e);
}
}
```
Overall the bytecode for async functions gets significantly shorter
already (and will get even shorter once we put the outer promise into
the async function generator object). For example the bytecode for a
simple async function
```js
async function f(x) { return await x; }
```
goes from 175 bytes to 110 bytes (a ~38% reduction in size), which
is in particular due to the simplification around the try-finally
removal.
Overall this seems to improve the doxbee-async-es2017-native test by
around 2-3%. On the test case mentioned in v8:8276 we go from
1124ms to 441ms, which corresponds to a 60% reduction in total
execution time!
Tbr: marja@chromium.org
Bug: v8:7253, v8:7522, v8:8276
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id29dc92de7490b387ff697860c900cee44c9a7a4
Reviewed-on: https://chromium-review.googlesource.com/c/1269041
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56502}
2018-10-10 05:54:39 +00:00
|
|
|
|_|return testPromise;|R|
|
2017-03-06 20:47:55 +00:00
|
|
|
|R|}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
|
|
|
function twiceDefined() {
|
2017-12-06 17:27:18 +00:00
|
|
|
|_|return a + b;|R|
|
2017-02-27 20:20:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function twiceDefined() {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return a + b;|R|
|
|
|
|
}
|
2017-02-27 20:20:39 +00:00
|
|
|
|
2018-06-12 21:57:52 +00:00
|
|
|
|R|
|
[inspector] moved var initialization break location before init expression (reland)
This CL improves break locations for expressions like 'var a = <expr>'. Without CL we use <expr> position as break location for initialization statement, with this CL we use position of first character after '=' as position.
Benefits (see test for details):
- only one break in expressions which includes mix of property lookup and calls, e.g. var p = Promise.resolve().then(x => x * 2),
- removed redundant break location for expressions like: let { x, y } = { x: 1, y: 2}.
TBR=dgozman@chromium.org,rmcilroy@chromium.org,machenbach@chromium.org,marja@chromium.org,kozyatinskiy@chromium.org,devtools-reviews@chromium.org,v8-reviews@googlegroups.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: v8:5909
Change-Id: Ie84fa79afeed09e28cf8478ba610a0cfbfdfc294
Reviewed-on: https://chromium-review.googlesource.com/518116
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45598}
2017-05-30 12:25:55 +00:00
|
|
|
|