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

Issue 1539039: Inline fast cases in string keyed load IC. (Closed)

Created:
10 years, 8 months ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Inline fast cases in string keyed load IC. String keyed load used to call STRING_CHAR_AT builtin that performs two steps (get a char code, construct a one-char string from the code), both of which have fast cases implemented as inline runtime functions. In this chage most of the code from these functions is extracted to a set of common generator functions in StringStubBase and the fast cases are grouped together in the IC code. Committed: http://code.google.com/p/v8/source/detail?r=4444

Patch Set 1 #

Patch Set 2 : More detailed comments. #

Patch Set 3 : Cleanup. #

Total comments: 13

Patch Set 4 : Review fixes. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+328 lines, -242 lines) Patch
M src/globals.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 2 3 4 chunks +66 lines, -34 lines 1 comment Download
M src/ia32/codegen-ia32.cc View 1 2 3 21 chunks +219 lines, -187 lines 0 comments Download
M src/ia32/ic-ia32.cc View 1 2 3 1 chunk +40 lines, -21 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Vitaly Repeshko
This is ia32-only for now. I'll file a bug to port to other architectures. Once ...
10 years, 8 months ago (2010-04-15 23:32:53 UTC) #1
Søren Thygesen Gjesse
http://codereview.chromium.org/1539039/diff/4001/5003 File src/ia32/codegen-ia32.h (right): http://codereview.chromium.org/1539039/diff/4001/5003#newcode891 src/ia32/codegen-ia32.h:891: // overhead. Copying of overlapping regions is not supported. ...
10 years, 8 months ago (2010-04-16 07:18:03 UTC) #2
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/1539039/diff/4001/5001 File src/globals.h (right): http://codereview.chromium.org/1539039/diff/4001/5001#newcode222 src/globals.h:222: const int32_t kInt32SignMask = 0x80000000; type uint32_t instead? ...
10 years, 8 months ago (2010-04-16 08:38:33 UTC) #3
Vitaly Repeshko
Søren, thanks a lot for the review! All issues addressed. Please take another look. -- ...
10 years, 8 months ago (2010-04-17 00:42:15 UTC) #4
Søren Thygesen Gjesse
10 years, 8 months ago (2010-04-19 06:38:45 UTC) #5
LGTM

http://codereview.chromium.org/1539039/diff/4001/5002
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/1539039/diff/4001/5002#newcode12542
src/ia32/codegen-ia32.cc:12542: __ movzx_b(result, FieldOperand(result,
Map::kInstanceTypeOffset));
On 2010/04/17 00:42:15, Vitaly wrote:
> On 2010/04/16 08:38:33, Søren Gjesse wrote:
> > In this case we know that the string is either a flat or an external string.
I
> > am not sure whether it makes sense to use that information.
> 
> I'm not sure I follow you here. Do you mean we know this about the first
> component of the cons string? I think we can still have e.g. a cons string
> there.
> 

When the second string is the empty string the first is known to be a flat
string. It might still be external though.

http://codereview.chromium.org/1539039/diff/12001/13003
File src/ia32/codegen-ia32.h (right):

http://codereview.chromium.org/1539039/diff/12001/13003#newcode886
src/ia32/codegen-ia32.h:886: class StringHelper : public AllStatic {
Please move the declaration of this class to codegen-ia32.cc, as it is not used
outside.

Powered by Google App Engine
This is Rietveld 408576698