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

Issue 12210083: Renamed "symbols" to "internalized strings" throughout the code base, (Closed)

Created:
7 years, 10 months ago by rossberg
Modified:
7 years, 9 months ago
Reviewers:
Yang
CC:
v8-dev
Visibility:
Public.

Description

Renamed "symbols" to "internalized strings" throughout the code base, in preparation of the introduction of ES6 'symbols' (aka private/unique names). The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders. The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently). R=yangguo@chromium.org BUG= Committed: http://code.google.com/p/v8/source/detail?r=13781

Patch Set 1 #

Total comments: 9

Patch Set 2 : Addressed Yang's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1659 lines, -1617 lines) Patch
M include/v8.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/accessors.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M src/api.cc View 26 chunks +40 lines, -38 lines 0 comments Download
M src/arm/builtins-arm.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/arm/code-stubs-arm.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/arm/code-stubs-arm.cc View 1 24 chunks +73 lines, -70 lines 0 comments Download
M src/arm/codegen-arm.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/arm/full-codegen-arm.cc View 9 chunks +16 lines, -16 lines 0 comments Download
M src/arm/ic-arm.cc View 6 chunks +15 lines, -15 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 5 chunks +12 lines, -12 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M src/ast.h View 3 chunks +3 lines, -3 lines 0 comments Download
M src/ast.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M src/bootstrapper.cc View 1 46 chunks +108 lines, -104 lines 0 comments Download
M src/code-stubs.h View 1 chunk +1 line, -1 line 0 comments Download
M src/code-stubs.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M src/code-stubs-hydrogen.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/conversions-inl.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/debug.cc View 5 chunks +9 lines, -9 lines 0 comments Download
M src/execution.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/extensions/externalize-string-extension.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/factory.h View 3 chunks +14 lines, -14 lines 0 comments Download
M src/factory.cc View 8 chunks +24 lines, -26 lines 0 comments Download
M src/func-name-inferrer.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/handles.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/heap.h View 16 chunks +161 lines, -151 lines 0 comments Download
M src/heap.cc View 36 chunks +147 lines, -149 lines 0 comments Download
M src/heap-inl.h View 2 chunks +15 lines, -14 lines 0 comments Download
M src/hydrogen.cc View 5 chunks +8 lines, -7 lines 0 comments Download
M src/hydrogen-instructions.h View 2 chunks +4 lines, -3 lines 0 comments Download
M src/hydrogen-instructions.cc View 3 chunks +8 lines, -7 lines 0 comments Download
M src/ia32/code-stubs-ia32.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 19 chunks +55 lines, -55 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 7 chunks +13 lines, -13 lines 0 comments Download
M src/ia32/ic-ia32.cc View 6 chunks +13 lines, -13 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 5 chunks +12 lines, -12 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M src/ic.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ic.cc View 16 chunks +25 lines, -24 lines 0 comments Download
M src/interface.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/isolate.cc View 10 chunks +18 lines, -18 lines 0 comments Download
M src/json-parser.h View 1 7 chunks +16 lines, -16 lines 0 comments Download
M src/json-stringifier.h View 4 chunks +8 lines, -8 lines 0 comments Download
M src/liveedit.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M src/log-utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/mark-compact.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/mark-compact.cc View 9 chunks +26 lines, -26 lines 0 comments Download
M src/messages.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M src/mips/code-stubs-mips.h View 1 chunk +1 line, -1 line 0 comments Download
M src/mips/code-stubs-mips.cc View 6 chunks +15 lines, -15 lines 0 comments Download
M src/mips/stub-cache-mips.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 20 chunks +136 lines, -135 lines 0 comments Download
M src/objects.cc View 55 chunks +183 lines, -178 lines 0 comments Download
M src/objects-debug.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/objects-inl.h View 7 chunks +21 lines, -19 lines 0 comments Download
M src/objects-printer.cc View 3 chunks +22 lines, -16 lines 0 comments Download
M src/parser.cc View 26 chunks +31 lines, -31 lines 0 comments Download
M src/preparse-data.h View 1 chunk +1 line, -1 line 0 comments Download
M src/preparse-data.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/prettyprinter.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/profile-generator.cc View 7 chunks +12 lines, -12 lines 0 comments Download
M src/property.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/rewriter.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.h View 1 chunk +4 lines, -3 lines 0 comments Download
M src/runtime.cc View 29 chunks +67 lines, -66 lines 0 comments Download
M src/scopeinfo.cc View 6 chunks +10 lines, -10 lines 0 comments Download
M src/scopes.cc View 8 chunks +9 lines, -9 lines 0 comments Download
M src/serialize.h View 1 chunk +1 line, -1 line 0 comments Download
M src/serialize.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/string-stream.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/stub-cache.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M src/type-info.h View 4 chunks +17 lines, -17 lines 0 comments Download
M src/type-info.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/v8-counters.h View 1 chunk +1 line, -1 line 0 comments Download
M src/variables.h View 1 chunk +1 line, -1 line 0 comments Download
M src/variables.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/builtins-x64.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/code-stubs-x64.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 22 chunks +61 lines, -59 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/full-codegen-x64.cc View 9 chunks +15 lines, -15 lines 0 comments Download
M src/x64/ic-x64.cc View 6 chunks +15 lines, -15 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 5 chunks +13 lines, -13 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M test/cctest/test-alloc.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-api.cc View 7 chunks +12 lines, -10 lines 0 comments Download
M test/cctest/test-compiler.cc View 2 chunks +9 lines, -8 lines 0 comments Download
M test/cctest/test-debug.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-heap.cc View 17 chunks +43 lines, -42 lines 0 comments Download
M test/cctest/test-mark-compact.cc View 5 chunks +8 lines, -8 lines 0 comments Download
A test/cctest/test-parsing.cc View 0 chunks +-1 lines, --1 lines 0 comments Download
M test/cctest/test-random.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/test-serialize.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/test-weakmaps.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
rossberg
7 years, 10 months ago (2013-02-08 14:14:00 UTC) #1
Yang
I don't feel too strongly about this, but I'd prefer not omitting "string" from "internalized ...
7 years, 10 months ago (2013-02-11 12:26:36 UTC) #2
rossberg
Thanks for taking the pain. :) On 2013/02/11 12:26:36, Yang wrote: > I don't feel ...
7 years, 10 months ago (2013-02-11 13:30:16 UTC) #3
Yang
7 years, 10 months ago (2013-02-11 13:31:20 UTC) #4
On 2013/02/11 13:30:16, rossberg wrote:
> Thanks for taking the pain. :)
> 
> On 2013/02/11 12:26:36, Yang wrote:
> > I don't feel too strongly about this, but I'd prefer not omitting "string"
> from
> > "internalized string", for example in StringShape::IsInternalized,
> > kIsInternalizedMask and kIsInternalizedTag.
> 
> This is the only place where I omitted it, because it's an additional
attribute
> bit that augments an instance_type that already denotes a string.
> 
> > Missing renames in:
> > - v8.h and api.cc, but I guess there is not much we can do without changing
> the
> > API
> 
> Yes, unfortunately.
> 
> > - v8-counters.h
> 
> As discussed off-line, this was intentional, as mentioned in the change
> description. It is visible externally and also corresponds to the API
> terminology we cannot change.
> 
> > - ast.h (comments)
> 
> Intentional: this actually refers to parsing symbols, not internalized
strings.
> 
> > - d8.cc
> 
> Intentional, as this is implemented purely on top of the API, which still uses
> the Symbol terminology.
> 
> > - json-parser.h
> 
> Done. (I thought this is about symbols in the parsing sense, but you are
right,
> it isn't).
> 
> > I don't think gdb-jit.cc needs to be changed as the notion of symbol there
is
> > not in V8's context.
> 
> Right, reverted.
> 
> https://codereview.chromium.org/12210083/diff/1/src/arm/code-stubs-arm.cc
> File src/arm/code-stubs-arm.cc (right):
> 
>
https://codereview.chromium.org/12210083/diff/1/src/arm/code-stubs-arm.cc#new...
> src/arm/code-stubs-arm.cc:1750: // We could be strict about
internalized/string
> here, but as long as
> On 2013/02/11 12:26:36, Yang wrote:
> > suggest to change to "... about internatilized/non-internalized string
> here..."
> 
> Done.
> 
> https://codereview.chromium.org/12210083/diff/1/src/arm/ic-arm.cc
> File src/arm/ic-arm.cc (right):
> 
> https://codereview.chromium.org/12210083/diff/1/src/arm/ic-arm.cc#newcode1076
> src/arm/ic-arm.cc:1076: isolate->counters()->keyed_load_generic_symbol(), 1,
r2,
> r3);
> On 2013/02/11 12:26:36, Yang wrote:
> > forgot to change this?
> 
> Intentional, see above.
> 
> https://codereview.chromium.org/12210083/diff/1/src/bootstrapper.cc
> File src/bootstrapper.cc (right):
> 
>
https://codereview.chromium.org/12210083/diff/1/src/bootstrapper.cc#newcode1393
> src/bootstrapper.cc:1393:
> factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR(name));          \
> On 2013/02/11 12:26:36, Yang wrote:
> > You could re-align this new-line escape :)
> 
> Oops, done.
> 
> https://codereview.chromium.org/12210083/diff/1/src/gdb-jit.cc
> File src/gdb-jit.cc (right):
> 
> https://codereview.chromium.org/12210083/diff/1/src/gdb-jit.cc#newcode855
> src/gdb-jit.cc:855: class ELFStringTable : public ELFSection {
> On 2013/02/11 12:26:36, Yang wrote:
> > I was thinking that this use of "symbol" has nothing to do with V8... and
you
> > didn't change the ELFSymbol class, so changing this here makes little sense.
> 
> Indeed, reverted.

LGTM.

Powered by Google App Engine
This is Rietveld 408576698