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

Issue 2801008: Port faster callbacks invocation to x64. (Closed)

Created:
10 years, 6 months ago by antonm
Modified:
9 years, 4 months ago
Reviewers:
William Hesse
CC:
v8-dev
Visibility:
Public.

Description

Port faster callbacks invocation to x64. It's a port of http://code.google.com/p/v8/source/detail?r=3209 to x64 platform. That allows invocation of callbacks without going into runtime. Committed: http://code.google.com/p/v8/source/detail?r=5141

Patch Set 1 #

Patch Set 2 : Next round #

Patch Set 3 : Next round #

Patch Set 4 : Win64 port and rebase #

Patch Set 5 : Minor cosmetic comments #

Total comments: 8

Patch Set 6 : Addressing Bill's concerns #

Patch Set 7 : Minor cosmetic changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -67 lines) Patch
M src/ia32/codegen-ia32.cc View 1 2 3 4 5 2 chunks +7 lines, -7 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 2 chunks +4 lines, -4 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 5 chunks +14 lines, -17 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 2 3 4 5 2 chunks +10 lines, -11 lines 0 comments Download
M src/x64/assembler-x64.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M src/x64/assembler-x64.cc View 1 2 3 1 chunk +2 lines, -6 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 2 3 4 5 6 1 chunk +42 lines, -1 line 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 4 5 5 chunks +43 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 5 8 chunks +164 lines, -8 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 3 4 5 1 chunk +69 lines, -12 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
antonm
Bill, may you have a look? I've tested it on Ubuntu (gcc), MacOS (gcc) and ...
10 years, 5 months ago (2010-07-23 12:17:39 UTC) #1
William Hesse
LGTM. This is very complicated stuff. More comments, both on this and on the parallel ...
10 years, 5 months ago (2010-07-27 13:10:11 UTC) #2
antonm
10 years, 5 months ago (2010-07-27 14:55:14 UTC) #3
Bill,

thanks a lot for review.

Could you point out places which were especially difficult to understand?  I
would happily add comments, but cannot immediately see which places lack them
most.

http://codereview.chromium.org/2801008/diff/10001/11008
File src/x64/macro-assembler-x64.h (right):

http://codereview.chromium.org/2801008/diff/10001/11008#newcode735
src/x64/macro-assembler-x64.h:735: // Tail call a code stub (jump) and return
the code object called.  Try to
On 2010/07/27 13:10:11, William Hesse wrote:
> Put this declaration in the same place as on ia32, after TailCallStub().

Done.  Plus some more declarations.

http://codereview.chromium.org/2801008/diff/10001/11008#newcode779
src/x64/macro-assembler-x64.h:779: // ensuring that saved register, it is not
no_reg, is left unchanged.
On 2010/07/27 13:10:11, William Hesse wrote:
> I don't understand this sentence.  What if it is no_reg?  What if it is not
> no_reg?  Does it save it?

Yes.  It saves a register unless it's not no_reg.  But grepping through the code
shows we never invoke that with no_reg, so I think I'd drop this functionality,
it's trivial to add if needed.

http://codereview.chromium.org/2801008/diff/10001/11009
File src/x64/stub-cache-x64.cc (right):

http://codereview.chromium.org/2801008/diff/10001/11009#newcode2219
src/x64/stub-cache-x64.cc:2219: Register other = reg.is(scratch1) ? scratch2 :
scratch1;
On 2010/07/27 13:10:11, William Hesse wrote:
> What is the benefit of not just using scratch2 always?
> OK, I see this is just what is done on ia32.  But maybe it
> should be changed there too.

Good catch. Done.

http://codereview.chromium.org/2801008/diff/10001/11009#newcode2259
src/x64/stub-cache-x64.cc:2259: // object.
On 2010/07/27 13:10:11, William Hesse wrote:
> Do we have guaranteed semantics about whether the callback is called exactly
> once, even in the presence of GCs?

Sorry, I don't quite understand your question.  Yes, it's possible that
invocation of a callback leads to invocation of the same callback and triggers
GC as well.

However, if you're concerned with the comment above, it's about GC while
generating the code, not executing it.

Powered by Google App Engine
This is Rietveld 408576698