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

Issue 174524: Add allocation support to ia32 macro assembler (Closed)

Created:
11 years, 4 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add allocation support to ia32 macro assembler. Factored out the allocation in new space from assembler code into the macro assembler. To support the current allocation patterns a number of different functions where required. Committed: http://code.google.com/p/v8/source/detail?r=2768

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 16

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+932 lines, -761 lines) Patch
M src/ia32/builtins-ia32.cc View 1 2 4 chunks +10 lines, -15 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 2 1 chunk +664 lines, -664 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 1 chunk +10 lines, -13 lines 0 comments Download
M src/ia32/codegen-ia32-inl.h View 1 2 1 chunk +56 lines, -56 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 2 chunks +49 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 1 chunk +140 lines, -0 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 2 chunks +3 lines, -13 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Søren Thygesen Gjesse
I will add x86 architecture in a separate changelist.
11 years, 4 months ago (2009-08-26 15:07:20 UTC) #1
Mads Ager (chromium)
LGTM http://codereview.chromium.org/174524/diff/1010/18 File src/ia32/macro-assembler-ia32.h (right): http://codereview.chromium.org/174524/diff/1010/18#newcode194 Line 194: // and result_end have not yet been ...
11 years, 4 months ago (2009-08-26 15:14:52 UTC) #2
Lasse Reichstein
Drive by comments - LGTM too. http://codereview.chromium.org/174524/diff/1010/16 File src/ia32/macro-assembler-ia32.cc (right): http://codereview.chromium.org/174524/diff/1010/16#newcode665 Line 665: // Move ...
11 years, 4 months ago (2009-08-26 20:53:06 UTC) #3
Søren Thygesen Gjesse
11 years, 3 months ago (2009-08-27 07:23:22 UTC) #4
Changed all the allocation functions to be called AllocateObjectInNewSpace, and
added the boolean parameter result_contains_top_on_entry to indicate whether
loading of the allocation top is required to all of them. This makes all the
allocation functions look and work the same way. Also made one common comment
for all three allocation functions in the .h file instead of three almost
identical ones.

http://codereview.chromium.org/174524/diff/1010/16
File src/ia32/macro-assembler-ia32.cc (right):

http://codereview.chromium.org/174524/diff/1010/16#newcode665
Line 665: // Move address of new object to result. Use scratch2 if provided.
On 2009/08/26 20:53:06, Lasse Reichstein wrote:
> "scratch2" -> "scratch"

Done.

http://codereview.chromium.org/174524/diff/1010/16#newcode692
Line 692: void MacroAssembler::AllocateAnotherObjectInNewSpace(int header_size,
On 2009/08/26 20:53:06, Lasse Reichstein wrote:
> Name isn't very telling. Just call it AllocateObjectInNewSpace, and rename the
> arguments to show that it requires the existing allocation top in a register.
> 

Refactored - see general comment.

http://codereview.chromium.org/174524/diff/1010/16#newcode695
Line 695: Register result,
On 2009/08/26 20:53:06, Lasse Reichstein wrote:
> The "result" register isn't really a result. How about a name like
> "allocation_top".

Refactored - see general comment.

http://codereview.chromium.org/174524/diff/1010/16#newcode718
Line 718: Assert(below, "Undo allocation of non allocated memory");
On 2009/08/26 20:53:06, Lasse Reichstein wrote:
> Might as well use Check instead of Assert when already inside #ifdef DEBUG.

Done.

http://codereview.chromium.org/174524/diff/1010/18
File src/ia32/macro-assembler-ia32.h (right):

http://codereview.chromium.org/174524/diff/1010/18#newcode194
Line 194: // and result_end have not yet been tagged as a heap objects.
On 2009/08/26 15:14:52, Mads Ager wrote:
> as a -> as

Done.

http://codereview.chromium.org/174524/diff/1010/18#newcode207
Line 207: // yet been tagged as a heap objects.
On 2009/08/26 15:14:52, Mads Ager wrote:
> as a -> as

Done.

http://codereview.chromium.org/174524/diff/1010/18#newcode216
Line 216: // allocate in new space.
On 2009/08/26 20:53:06, Lasse Reichstein wrote:
> Should work no matter how the top of NewSpace allocation gets into "result".

Refactored - see general comment.

http://codereview.chromium.org/174524/diff/1010/18#newcode225
Line 225: // it will no longer be allocated.
On 2009/08/26 20:53:06, Lasse Reichstein wrote:
> Should have a big warning against storing pointers to these objects anywhere
> (except in following objects) before using Undo.

Done.

Powered by Google App Engine
This is Rietveld 408576698