Commit fc826e37 authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[TurboFan] Fix typing of INTERNALIZED_STRING_TYPE for new EmptyString type.

Add kInternalizedNonEmptySeqString and make kInternalizedString = 
kEmptyString | kInternalizedNonEmptySeqString.

BUG=chromium:731495

Change-Id: I60a6f37242423407ad97188b3f4bd48ae6989ad2
Reviewed-on: https://chromium-review.googlesource.com/528275Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45821}
parent 96062c04
......@@ -105,31 +105,31 @@ namespace compiler {
V(OtherNumber, 1u << 4) \
#define PROPER_BITSET_TYPE_LIST(V) \
V(None, 0u) \
V(Negative31, 1u << 5) \
V(Null, 1u << 6) \
V(Undefined, 1u << 7) \
V(Boolean, 1u << 8) \
V(Unsigned30, 1u << 9) \
V(MinusZero, 1u << 10) \
V(NaN, 1u << 11) \
V(Symbol, 1u << 12) \
V(EmptyString, 1u << 13) \
V(InternalizedNonSeqString, 1u << 14) \
V(InternalizedSeqString, 1u << 15) \
V(OtherNonSeqString, 1u << 16) \
V(OtherSeqString, 1u << 17) \
V(OtherCallable, 1u << 18) \
V(OtherObject, 1u << 19) \
V(OtherUndetectable, 1u << 20) \
V(CallableProxy, 1u << 21) \
V(OtherProxy, 1u << 22) \
V(Function, 1u << 23) \
V(BoundFunction, 1u << 24) \
V(Hole, 1u << 25) \
V(OtherInternal, 1u << 26) \
V(ExternalPointer, 1u << 27) \
V(Array, 1u << 28) \
V(None, 0u) \
V(Negative31, 1u << 5) \
V(Null, 1u << 6) \
V(Undefined, 1u << 7) \
V(Boolean, 1u << 8) \
V(Unsigned30, 1u << 9) \
V(MinusZero, 1u << 10) \
V(NaN, 1u << 11) \
V(Symbol, 1u << 12) \
V(EmptyString, 1u << 13) \
V(InternalizedNonEmptySeqString, 1u << 14) \
V(InternalizedNonSeqString, 1u << 15) \
V(OtherNonSeqString, 1u << 16) \
V(OtherSeqString, 1u << 17) \
V(OtherCallable, 1u << 18) \
V(OtherObject, 1u << 19) \
V(OtherUndetectable, 1u << 20) \
V(CallableProxy, 1u << 21) \
V(OtherProxy, 1u << 22) \
V(Function, 1u << 23) \
V(BoundFunction, 1u << 24) \
V(Hole, 1u << 25) \
V(OtherInternal, 1u << 26) \
V(ExternalPointer, 1u << 27) \
V(Array, 1u << 28) \
\
V(Signed31, kUnsigned30 | kNegative31) \
V(Signed32, kSigned31 | kOtherUnsigned31 | \
......@@ -149,16 +149,16 @@ namespace compiler {
V(OrderedNumber, kPlainNumber | kMinusZero) \
V(MinusZeroOrNaN, kMinusZero | kNaN) \
V(Number, kOrderedNumber | kNaN) \
V(NonEmptyInternalizedString, kInternalizedNonSeqString | \
kInternalizedSeqString) \
V(InternalizedString, kNonEmptyInternalizedString | \
kEmptyString) \
V(InternalizedSeqString, kEmptyString | \
kInternalizedNonEmptySeqString) \
V(InternalizedString, kInternalizedSeqString | \
kInternalizedNonSeqString) \
V(OtherString, kOtherNonSeqString | kOtherSeqString) \
V(NonEmptySeqString, kInternalizedSeqString | kOtherSeqString) \
V(SeqString, kNonEmptySeqString | kEmptyString) \
V(SeqString, kInternalizedSeqString | kOtherSeqString) \
V(NonSeqString, kInternalizedNonSeqString | \
kOtherNonSeqString) \
V(NonEmptyString, kNonEmptyInternalizedString | kOtherString) \
V(NonEmptyString, kInternalizedNonEmptySeqString | \
kInternalizedNonSeqString| kOtherString) \
V(String, kNonEmptyString | kEmptyString) \
V(UniqueName, kSymbol | kInternalizedString) \
V(Name, kSymbol | kString) \
......
// Copyright 2016 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
function foo() {
global = "";
global = global + "bar";
return global;
};
assertEquals(foo(), "bar");
%OptimizeFunctionOnNextCall(foo);
assertEquals(foo(), "bar");
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