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
......@@ -115,8 +115,8 @@ namespace compiler {
V(NaN, 1u << 11) \
V(Symbol, 1u << 12) \
V(EmptyString, 1u << 13) \
V(InternalizedNonSeqString, 1u << 14) \
V(InternalizedSeqString, 1u << 15) \
V(InternalizedNonEmptySeqString, 1u << 14) \
V(InternalizedNonSeqString, 1u << 15) \
V(OtherNonSeqString, 1u << 16) \
V(OtherSeqString, 1u << 17) \
V(OtherCallable, 1u << 18) \
......@@ -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