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

Issue 4695003: Removing redundant stubs for API functions. (Closed)

Created:
10 years, 1 month ago by SeRya
Modified:
9 years, 7 months ago
Reviewers:
antonm
CC:
v8-dev
Visibility:
Public.

Description

Removing redundant stubs for API functions. Committed: http://code.google.com/p/v8/source/detail?r=5827

Patch Set 1 : '' #

Total comments: 25

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Total comments: 26

Patch Set 4 : '' #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -238 lines) Patch
M src/code-stubs.h View 1 2 3 2 chunks +0 lines, -58 lines 0 comments Download
M src/code-stubs.cc View 2 3 3 chunks +13 lines, -21 lines 2 comments Download
M src/codegen.cc View 1 2 3 1 chunk +0 lines, -31 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 1 chunk +0 lines, -29 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 2 chunks +18 lines, -3 lines 0 comments Download
src/ia32/macro-assembler-ia32.cc View 1 2 3 6 chunks +37 lines, -2 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 3 2 chunks +51 lines, -28 lines 0 comments Download
M src/objects.h View 1 2 3 4 chunks +2 lines, -6 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 chunks +0 lines, -5 lines 0 comments Download
M src/objects-inl.h View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 1 chunk +0 lines, -14 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 1 chunk +22 lines, -6 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 8 chunks +63 lines, -5 lines 2 comments Download
M src/x64/stub-cache-x64.cc View 1 2 3 3 chunks +26 lines, -28 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
SeRya
10 years, 1 month ago (2010-11-10 11:43:49 UTC) #1
antonm
First round http://codereview.chromium.org/4695003/diff/27001/src/code-stubs.h File src/code-stubs.h (left): http://codereview.chromium.org/4695003/diff/27001/src/code-stubs.h#oldcode535 src/code-stubs.h:535: virtual bool GetCustomCache(Code** code_out); looks like these ...
10 years, 1 month ago (2010-11-10 14:53:54 UTC) #2
SeRya
The comments addressed except two about "unifying exit frame construction and arguments". Anton, please explain. ...
10 years, 1 month ago (2010-11-11 15:50:39 UTC) #3
antonm
http://codereview.chromium.org/4695003/diff/27001/src/ia32/stub-cache-ia32.cc File src/ia32/stub-cache-ia32.cc (right): http://codereview.chromium.org/4695003/diff/27001/src/ia32/stub-cache-ia32.cc#newcode504 src/ia32/stub-cache-ia32.cc:504: __ PrepareCallApiFunction(argc + kFastApiCallArguments + 1, On 2010/11/11 15:50:39, ...
10 years, 1 month ago (2010-11-12 18:35:54 UTC) #4
SeRya
http://codereview.chromium.org/4695003/diff/27001/src/ia32/stub-cache-ia32.cc File src/ia32/stub-cache-ia32.cc (right): http://codereview.chromium.org/4695003/diff/27001/src/ia32/stub-cache-ia32.cc#newcode504 src/ia32/stub-cache-ia32.cc:504: __ PrepareCallApiFunction(argc + kFastApiCallArguments + 1, On 2010/11/12 18:35:55, ...
10 years, 1 month ago (2010-11-13 09:19:49 UTC) #5
antonm
http://codereview.chromium.org/4695003/diff/82001/src/ia32/stub-cache-ia32.cc File src/ia32/stub-cache-ia32.cc (right): http://codereview.chromium.org/4695003/diff/82001/src/ia32/stub-cache-ia32.cc#newcode454 src/ia32/stub-cache-ia32.cc:454: static bool GenerateFastApiCall(MacroAssembler* masm, as a further idea: probably ...
10 years, 1 month ago (2010-11-13 11:34:45 UTC) #6
SeRya
http://codereview.chromium.org/4695003/diff/82001/src/ia32/stub-cache-ia32.cc File src/ia32/stub-cache-ia32.cc (right): http://codereview.chromium.org/4695003/diff/82001/src/ia32/stub-cache-ia32.cc#newcode489 src/ia32/stub-cache-ia32.cc:489: // Prepare arguments for ApiCallEntryStub. On 2010/11/13 11:34:46, antonm ...
10 years, 1 month ago (2010-11-15 12:09:11 UTC) #7
antonm
That's almost LGTM. My main concern is case > 6 arguments for non-Win x64. http://codereview.chromium.org/4695003/diff/112001/src/code-stubs.cc ...
10 years, 1 month ago (2010-11-15 16:22:06 UTC) #8
SeRya
10 years, 1 month ago (2010-11-15 16:37:50 UTC) #9
http://codereview.chromium.org/4695003/diff/112001/src/code-stubs.cc
File src/code-stubs.cc (right):

http://codereview.chromium.org/4695003/diff/112001/src/code-stubs.cc#newcode148
src/code-stubs.cc:148: Heap::code_stubs()->AtNumberPut(GetKey(), code);
On 2010/11/15 16:22:06, antonm wrote:
> [cosmetic nit] just asking: can this fit one line now?

It can't (only if shorten the var name).

http://codereview.chromium.org/4695003/diff/112001/src/x64/macro-assembler-x6...
File src/x64/macro-assembler-x64.cc (right):

http://codereview.chromium.org/4695003/diff/112001/src/x64/macro-assembler-x6...
src/x64/macro-assembler-x64.cc:1800: ASSERT(argc <= 6);  // EnterApiExitFrame
supports only register based args.
On 2010/11/15 16:22:06, antonm wrote:
> Sorry, I still don't understand what.  What will happen if I write something
> like:
> 
> for (var i = 0; i < 1000; i++) obj.appFunction(1, 2, 3, 4, 5, 6, 7, 8, 9)?
> 
> Will v8 just crash?

Currently it's used only for getters for x64 (yet). But in case it was the
arguments would be: argc is 1 (because InvocationCallback accepts single
argument - reference to v8::Arguments). stack_space will be 13: receiver + 9 JS
arguments + 3-element array to represent v8::Arguments::implicit_values_.

Powered by Google App Engine
This is Rietveld 408576698