Commit 10abff34 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Remove internalized cons string types.

Currently, internalizing a cons string could result in either an
in-place converted internalized cons string or a newly created
internalized sequential string, depending on allocation success.

The former could end up being embedded into an IC, which is not
supported.

R=mstarzinger@chromium.org
BUG=357103
LOG=N

Review URL: https://codereview.chromium.org/218993011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 681c15eb
...@@ -4964,8 +4964,6 @@ Map* Heap::InternalizedStringMapForString(String* string) { ...@@ -4964,8 +4964,6 @@ Map* Heap::InternalizedStringMapForString(String* string) {
switch (string->map()->instance_type()) { switch (string->map()->instance_type()) {
case STRING_TYPE: return internalized_string_map(); case STRING_TYPE: return internalized_string_map();
case ASCII_STRING_TYPE: return ascii_internalized_string_map(); case ASCII_STRING_TYPE: return ascii_internalized_string_map();
case CONS_STRING_TYPE: return cons_internalized_string_map();
case CONS_ASCII_STRING_TYPE: return cons_ascii_internalized_string_map();
case EXTERNAL_STRING_TYPE: return external_internalized_string_map(); case EXTERNAL_STRING_TYPE: return external_internalized_string_map();
case EXTERNAL_ASCII_STRING_TYPE: case EXTERNAL_ASCII_STRING_TYPE:
return external_ascii_internalized_string_map(); return external_ascii_internalized_string_map();
......
...@@ -13872,9 +13872,6 @@ class InternalizedStringKey : public HashTableKey { ...@@ -13872,9 +13872,6 @@ class InternalizedStringKey : public HashTableKey {
} }
MaybeObject* AsObject(Heap* heap) { MaybeObject* AsObject(Heap* heap) {
// Attempt to flatten the string, so that internalized strings will most
// often be flat strings.
string_ = string_->TryFlattenGetString();
// Internalize the string if possible. // Internalize the string if possible.
Map* map = heap->InternalizedStringMapForString(string_); Map* map = heap->InternalizedStringMapForString(string_);
if (map != NULL) { if (map != NULL) {
......
...@@ -355,8 +355,6 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits; ...@@ -355,8 +355,6 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits;
\ \
V(INTERNALIZED_STRING_TYPE) \ V(INTERNALIZED_STRING_TYPE) \
V(ASCII_INTERNALIZED_STRING_TYPE) \ V(ASCII_INTERNALIZED_STRING_TYPE) \
V(CONS_INTERNALIZED_STRING_TYPE) \
V(CONS_ASCII_INTERNALIZED_STRING_TYPE) \
V(EXTERNAL_INTERNALIZED_STRING_TYPE) \ V(EXTERNAL_INTERNALIZED_STRING_TYPE) \
V(EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE) \ V(EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE) \
V(EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE) \ V(EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE) \
...@@ -514,14 +512,6 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits; ...@@ -514,14 +512,6 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits;
kVariableSizeSentinel, \ kVariableSizeSentinel, \
ascii_internalized_string, \ ascii_internalized_string, \
AsciiInternalizedString) \ AsciiInternalizedString) \
V(CONS_INTERNALIZED_STRING_TYPE, \
ConsString::kSize, \
cons_internalized_string, \
ConsInternalizedString) \
V(CONS_ASCII_INTERNALIZED_STRING_TYPE, \
ConsString::kSize, \
cons_ascii_internalized_string, \
ConsAsciiInternalizedString) \
V(EXTERNAL_INTERNALIZED_STRING_TYPE, \ V(EXTERNAL_INTERNALIZED_STRING_TYPE, \
ExternalTwoByteString::kSize, \ ExternalTwoByteString::kSize, \
external_internalized_string, \ external_internalized_string, \
...@@ -662,10 +652,6 @@ enum InstanceType { ...@@ -662,10 +652,6 @@ enum InstanceType {
| kInternalizedTag, | kInternalizedTag,
ASCII_INTERNALIZED_STRING_TYPE = kOneByteStringTag | kSeqStringTag ASCII_INTERNALIZED_STRING_TYPE = kOneByteStringTag | kSeqStringTag
| kInternalizedTag, | kInternalizedTag,
CONS_INTERNALIZED_STRING_TYPE = kTwoByteStringTag | kConsStringTag
| kInternalizedTag,
CONS_ASCII_INTERNALIZED_STRING_TYPE = kOneByteStringTag | kConsStringTag
| kInternalizedTag,
EXTERNAL_INTERNALIZED_STRING_TYPE = kTwoByteStringTag | kExternalStringTag EXTERNAL_INTERNALIZED_STRING_TYPE = kTwoByteStringTag | kExternalStringTag
| kInternalizedTag, | kInternalizedTag,
EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE = kOneByteStringTag EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE = kOneByteStringTag
...@@ -685,9 +671,9 @@ enum InstanceType { ...@@ -685,9 +671,9 @@ enum InstanceType {
STRING_TYPE = INTERNALIZED_STRING_TYPE | kNotInternalizedTag, STRING_TYPE = INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
ASCII_STRING_TYPE = ASCII_INTERNALIZED_STRING_TYPE | kNotInternalizedTag, ASCII_STRING_TYPE = ASCII_INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
CONS_STRING_TYPE = CONS_INTERNALIZED_STRING_TYPE | kNotInternalizedTag, CONS_STRING_TYPE = kTwoByteStringTag | kConsStringTag | kNotInternalizedTag,
CONS_ASCII_STRING_TYPE = CONS_ASCII_STRING_TYPE =
CONS_ASCII_INTERNALIZED_STRING_TYPE | kNotInternalizedTag, kOneByteStringTag | kConsStringTag | kNotInternalizedTag,
SLICED_STRING_TYPE = SLICED_STRING_TYPE =
kTwoByteStringTag | kSlicedStringTag | kNotInternalizedTag, kTwoByteStringTag | kSlicedStringTag | kNotInternalizedTag,
......
...@@ -169,8 +169,6 @@ int TypeImpl<Config>::LubBitset(i::Map* map) { ...@@ -169,8 +169,6 @@ int TypeImpl<Config>::LubBitset(i::Map* map) {
case SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE: case SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE:
case INTERNALIZED_STRING_TYPE: case INTERNALIZED_STRING_TYPE:
case ASCII_INTERNALIZED_STRING_TYPE: case ASCII_INTERNALIZED_STRING_TYPE:
case CONS_INTERNALIZED_STRING_TYPE:
case CONS_ASCII_INTERNALIZED_STRING_TYPE:
case EXTERNAL_INTERNALIZED_STRING_TYPE: case EXTERNAL_INTERNALIZED_STRING_TYPE:
case EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE: case EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE:
case EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE: case EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE:
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
%SetFlags("--gc-interval=1");
var key = "Huckleberry Finn" + "Tom Sawyer";
var o = {};
function f() { o[key] = "Adventures"; }
f();
f();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment