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

Issue 153803003: Correctly recognize external strings. (Closed)

Created:
6 years, 10 months ago by Yang
Modified:
6 years, 10 months ago
Reviewers:
dcarney
CC:
v8-dev, Paweł Hajdan Jr.
Visibility:
Public.

Description

Correctly recognize external strings. Since r15906, cons strings in old pointer space that are made external remain cons strings, and point to a newly-allocated external string. This is because external strings are not allow in the pointer space. However, v8::String::IsExternal and related methods do not reflect this. The consequence is that the embedder cannot take advantage of external strings. Note that v8::String::CanMakeExternal still returns false for cons strings due to AccessCheck not being GC safe (see r17023). BUG=268686 LOG=N

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -47 lines) Patch
M include/v8.h View 5 chunks +22 lines, -14 lines 1 comment Download
M src/api.cc View 4 chunks +60 lines, -30 lines 1 comment Download
M src/objects-inl.h View 2 chunks +7 lines, -3 lines 0 comments Download
M test/cctest/test-api.cc View 1 chunk +44 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Yang
Please take a look.
6 years, 10 months ago (2014-02-04 14:07:37 UTC) #1
dcarney
lgtm https://codereview.chromium.org/153803003/diff/1/include/v8.h File include/v8.h (right): https://codereview.chromium.org/153803003/diff/1/include/v8.h#newcode6011 include/v8.h:6011: String::ExternalStringResourceBase* String::GetExternalStringResourceBase( this function is ridiculously hot in ...
6 years, 10 months ago (2014-02-04 15:10:05 UTC) #2
Yang
6 years, 10 months ago (2014-02-05 09:01:26 UTC) #3
On 2014/02/04 15:10:05, dcarney wrote:
> lgtm
> 
> https://codereview.chromium.org/153803003/diff/1/include/v8.h
> File include/v8.h (right):
> 
> https://codereview.chromium.org/153803003/diff/1/include/v8.h#newcode6011
> include/v8.h:6011: String::ExternalStringResourceBase*
> String::GetExternalStringResourceBase(
> this function is ridiculously hot in some dromaeo benchmark, so you can't land
> it like this.
> maybe try doing some reordering
> 
> if (string_type == I::kExternalRepresentationTag) {
>   return ...
> } else if (string_type != I::kConsRepresentationTag) {
>   return NULL;
> }
> return slow_case()
> 
> https://codereview.chromium.org/153803003/diff/1/src/api.cc
> File src/api.cc (right):
> 
> https://codereview.chromium.org/153803003/diff/1/src/api.cc#newcode4714
> src/api.cc:4714: if (i::StringShape(str).IsCons()) {
> extract these 4 lines into a static function

Scrapping this since we have a better solution now.

Powered by Google App Engine
This is Rietveld 408576698