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

Issue 8513010: Add pointer cache field to external string for access in generated code. (Closed)

Created:
9 years, 1 month ago by Yang
Modified:
9 years, 1 month ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Add pointer cache field to external string for access in generated code. TEST=test/mjsunit/string-externalize.js Committed: http://code.google.com/p/v8/source/detail?r=10023

Patch Set 1 #

Patch Set 2 : . #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -149 lines) Patch
M src/code-stubs.h View 1 chunk +9 lines, -0 lines 1 comment Download
M src/heap.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/heap-inl.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 3 chunks +94 lines, -53 lines 3 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 chunk +6 lines, -76 lines 2 comments Download
M src/objects.h View 3 chunks +10 lines, -1 line 0 comments Download
M src/objects.cc View 10 chunks +12 lines, -14 lines 1 comment Download
M src/objects-inl.h View 3 chunks +23 lines, -0 lines 2 comments Download
M src/regexp-macro-assembler.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/serialize.cc View 1 chunk +1 line, -0 lines 0 comments Download
M test/mjsunit/string-externalize.js View 2 chunks +25 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Yang
This replaces my previous CL to improve external string accesses. The number of external strings ...
9 years, 1 month ago (2011-11-16 14:19:59 UTC) #1
Lasse Reichstein
LGTM. Obviously it would be great to have it work in generated code on X64 ...
9 years, 1 month ago (2011-11-17 13:40:18 UTC) #2
Yang
Landed in r10023. http://codereview.chromium.org/8513010/diff/1012/src/ia32/code-stubs-ia32.cc File src/ia32/code-stubs-ia32.cc (right): http://codereview.chromium.org/8513010/diff/1012/src/ia32/code-stubs-ia32.cc#newcode5164 src/ia32/code-stubs-ia32.cc:5164: __ cmp(FieldOperand(string, HeapObject::kMapOffset), On 2011/11/17 13:40:18, ...
9 years, 1 month ago (2011-11-17 17:06:23 UTC) #3
fschneider
9 years, 1 month ago (2011-11-17 17:18:30 UTC) #4
Don't forget to update the corresponding issue in the issue tracker :)

On 2011/11/17 17:06:23, Yang wrote:
> Landed in r10023.
> 
> http://codereview.chromium.org/8513010/diff/1012/src/ia32/code-stubs-ia32.cc
> File src/ia32/code-stubs-ia32.cc (right):
> 
>
http://codereview.chromium.org/8513010/diff/1012/src/ia32/code-stubs-ia32.cc#...
> src/ia32/code-stubs-ia32.cc:5164: __ cmp(FieldOperand(string,
> HeapObject::kMapOffset),
> On 2011/11/17 13:40:18, Lasse Reichstein wrote:
> > Comparing against the same memory location twice in a row. Is there no
> register
> > free to load it?
> > Or, possibly, keep it alive since we first loaded it in line 5129?
> > But this'll probably not happen often enough to warrant a scratch register.
> 
> |string| is used as a temp register, so I can use it as scratch at this point.
> 
>
http://codereview.chromium.org/8513010/diff/1012/src/ia32/lithium-codegen-ia3...
> File src/ia32/lithium-codegen-ia32.cc (right):
> 
>
http://codereview.chromium.org/8513010/diff/1012/src/ia32/lithium-codegen-ia3...
> src/ia32/lithium-codegen-ia32.cc:3377:
> StringCharCodeAtGenerator::GenerateCharLoad(masm(),
> On 2011/11/17 13:40:18, Lasse Reichstein wrote:
> > If GenerateCharLoad is used from outside StringCharCodeAtGenerator, you
might
> as
> > well make it a macro in macro-assembler-*.
> 
> Moved to codegen-*.cc instead. Big chunks of code that are shared only in a
few
> places belong there. Fast element transition code is put there already.
> 
> http://codereview.chromium.org/8513010/diff/1012/src/objects-inl.h
> File src/objects-inl.h (right):
> 
> http://codereview.chromium.org/8513010/diff/1012/src/objects-inl.h#newcode2321
> src/objects-inl.h:2321: if (*data_field == NULL) *data_field =
> resource()->data();
> On 2011/11/17 13:40:18, Lasse Reichstein wrote:
> > Alternatively, we could ensure that the data_field is always set (by setting
> it
> > when creating the string object). That allows us to avoid checking it on
every
> > access.
> 
> I thought lazy init is nice. I'll check in another CL whether this has
> advantages.

Powered by Google App Engine
This is Rietveld 408576698