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

Issue 2828933002: [console] fast console.assert(true) (Closed)

Created:
3 years, 8 months ago by kozy
Modified:
3 years, 8 months ago
Reviewers:
Igor Sheludko, dgozman
CC:
v8-reviews_googlegroups.com, devtools-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[console] fast console.assert(true) A lot of web sites around the world has hack which replaces native console.assert by function with fast return. Current console.assert is slow because we need to run CPP builtin but we should enter this builtin iff condition is false or omitted. BUG=v8:6175 R=ishell@chromium.org,dgozman@chromium.org Review-Url: https://codereview.chromium.org/2828933002 Cr-Commit-Position: refs/heads/master@{#44752} Committed: https://chromium.googlesource.com/v8/v8/+/f28e487858ef9048bcd8bc4a1bffa0ff8770bf57

Patch Set 1 #

Patch Set 2 : reverted protocol-test.js changes #

Total comments: 14

Patch Set 3 : addressed comments #

Patch Set 4 : added TailCallBuiltin #

Total comments: 2

Patch Set 5 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -2 lines) Patch
M BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/builtins/builtins.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
A src/builtins/builtins-console-gen.cc View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
M src/builtins/builtins-definitions.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/code-stub-assembler.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M src/inspector/v8-console.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/v8.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 19 (9 generated)
kozy
Dmitry and Igor, please take a look. This implementation is ~10 times faster for console.assert(true) ...
3 years, 8 months ago (2017-04-19 22:01:36 UTC) #1
Igor Sheludko
lgtm with nits. I think manual implementation is faster because of inlining and constant propagation, ...
3 years, 8 months ago (2017-04-20 10:18:42 UTC) #2
Igor Sheludko
https://codereview.chromium.org/2828933002/diff/20001/src/inspector/v8-console.cc File src/inspector/v8-console.cc (right): https://codereview.chromium.org/2828933002/diff/20001/src/inspector/v8-console.cc#newcode274 src/inspector/v8-console.cc:274: void V8Console::Assert(const v8::debug::ConsoleCallArguments& info) { On 2017/04/20 10:18:42, Igor ...
3 years, 8 months ago (2017-04-20 14:26:11 UTC) #3
kozy
thanks! please take another look, I've some questions. https://codereview.chromium.org/2828933002/diff/20001/src/builtins/builtins-console-gen.cc File src/builtins/builtins-console-gen.cc (right): https://codereview.chromium.org/2828933002/diff/20001/src/builtins/builtins-console-gen.cc#newcode23 src/builtins/builtins-console-gen.cc:23: GotoIf(WordEqual(argc, ...
3 years, 8 months ago (2017-04-20 15:14:55 UTC) #4
Igor Sheludko
https://codereview.chromium.org/2828933002/diff/20001/src/builtins/builtins-console-gen.cc File src/builtins/builtins-console-gen.cc (right): https://codereview.chromium.org/2828933002/diff/20001/src/builtins/builtins-console-gen.cc#newcode31 src/builtins/builtins-console-gen.cc:31: TailCallStub(CodeFactory::ConsoleAssert(isolate()), context, target, On 2017/04/20 15:14:54, kozy wrote: > ...
3 years, 8 months ago (2017-04-20 15:20:10 UTC) #5
kozy
On 2017/04/20 15:20:10, Igor Sheludko wrote: > https://codereview.chromium.org/2828933002/diff/20001/src/builtins/builtins-console-gen.cc > File src/builtins/builtins-console-gen.cc (right): > > https://codereview.chromium.org/2828933002/diff/20001/src/builtins/builtins-console-gen.cc#newcode31 ...
3 years, 8 months ago (2017-04-20 15:36:46 UTC) #7
Igor Sheludko
lgtm https://codereview.chromium.org/2828933002/diff/80001/src/builtins/builtins.cc File src/builtins/builtins.cc (right): https://codereview.chromium.org/2828933002/diff/80001/src/builtins/builtins.cc#newcode131 src/builtins/builtins.cc:131: return Callable(code, ConstructTrampolineDescriptor(isolate)); \ s/ConstructTrampolineDescriptor/BuiltinDescriptor/
3 years, 8 months ago (2017-04-20 15:55:19 UTC) #10
kozy
thanks. https://codereview.chromium.org/2828933002/diff/80001/src/builtins/builtins.cc File src/builtins/builtins.cc (right): https://codereview.chromium.org/2828933002/diff/80001/src/builtins/builtins.cc#newcode131 src/builtins/builtins.cc:131: return Callable(code, ConstructTrampolineDescriptor(isolate)); \ On 2017/04/20 15:55:19, Igor ...
3 years, 8 months ago (2017-04-20 16:48:15 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2828933002/100001
3 years, 8 months ago (2017-04-20 16:48:27 UTC) #16
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 17:17:27 UTC) #19
Message was sent while issue was closed.
Committed patchset #5 (id:100001) as
https://chromium.googlesource.com/v8/v8/+/f28e487858ef9048bcd8bc4a1bffa0ff877...

Powered by Google App Engine
This is Rietveld 408576698