Commit aaebbbaa authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

Remove --string-slices and --serialize-eager.

Both flags are obsolete.

R=cbruni@chromium.org

Change-Id: I78f5980f2d0bd569b8e5f6e29539cf87293cab94
Reviewed-on: https://chromium-review.googlesource.com/684296Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48194}
parent d6603be4
......@@ -4180,39 +4180,37 @@ Node* CodeStubAssembler::SubString(Node* context, Node* string, Node* from,
// encoding at this point.
Label external_string(this);
{
if (FLAG_string_slices) {
Label next(this);
Label next(this);
// Short slice. Copy instead of slicing.
GotoIf(SmiLessThan(substr_length, SmiConstant(SlicedString::kMinLength)),
&next);
// Short slice. Copy instead of slicing.
GotoIf(SmiLessThan(substr_length, SmiConstant(SlicedString::kMinLength)),
&next);
// Allocate new sliced string.
// Allocate new sliced string.
Counters* counters = isolate()->counters();
IncrementCounter(counters->sub_string_native(), 1);
Counters* counters = isolate()->counters();
IncrementCounter(counters->sub_string_native(), 1);
Label one_byte_slice(this), two_byte_slice(this);
Branch(IsOneByteStringInstanceType(to_direct.instance_type()),
&one_byte_slice, &two_byte_slice);
Label one_byte_slice(this), two_byte_slice(this);
Branch(IsOneByteStringInstanceType(to_direct.instance_type()),
&one_byte_slice, &two_byte_slice);
BIND(&one_byte_slice);
{
var_result.Bind(
AllocateSlicedOneByteString(substr_length, direct_string, offset));
Goto(&end);
}
BIND(&two_byte_slice);
{
var_result.Bind(
AllocateSlicedTwoByteString(substr_length, direct_string, offset));
Goto(&end);
}
BIND(&one_byte_slice);
{
var_result.Bind(
AllocateSlicedOneByteString(substr_length, direct_string, offset));
Goto(&end);
}
BIND(&next);
BIND(&two_byte_slice);
{
var_result.Bind(
AllocateSlicedTwoByteString(substr_length, direct_string, offset));
Goto(&end);
}
BIND(&next);
// The subject string can only be external or sequential string of either
// encoding at this point.
GotoIf(to_direct.is_external(), &external_string);
......@@ -4220,7 +4218,6 @@ Node* CodeStubAssembler::SubString(Node* context, Node* string, Node* from,
var_result.Bind(AllocAndCopyStringCharacters(
context, direct_string, instance_type, offset, substr_length));
Counters* counters = isolate()->counters();
IncrementCounter(counters->sub_string_native(), 1);
Goto(&end);
......
......@@ -835,7 +835,7 @@ Handle<String> Factory::NewProperSubString(Handle<String> str,
return MakeOrFindTwoCharacterString(isolate(), c1, c2);
}
if (!FLAG_string_slices || length < SlicedString::kMinLength) {
if (length < SlicedString::kMinLength) {
if (str->IsOneByteRepresentation()) {
Handle<SeqOneByteString> result =
NewRawOneByteString(length).ToHandleChecked();
......
......@@ -317,7 +317,6 @@ DEFINE_VALUE_IMPLICATION(optimize_for_size, max_semi_space_size, 1)
// Flags for data representation optimizations
DEFINE_BOOL(unbox_double_arrays, true, "automatically unbox arrays of doubles")
DEFINE_BOOL(string_slices, true, "use string slices")
// Flags for Ignition.
DEFINE_BOOL(ignition_elide_noneffectful_bytecodes, true,
......@@ -772,7 +771,6 @@ DEFINE_BOOL(always_opt, false, "always try to optimize functions")
DEFINE_BOOL(always_osr, false, "always try to OSR functions")
DEFINE_BOOL(prepare_always_opt, false, "prepare for turning on always opt")
DEFINE_BOOL(serialize_eager, false, "compile eagerly when caching scripts")
DEFINE_BOOL(trace_serializer, false, "print code serializer trace")
#ifdef DEBUG
DEFINE_BOOL(external_reference_stats, false,
......
......@@ -1155,7 +1155,6 @@ TEST(CachedHashOverflow) {
TEST(SliceFromCons) {
FLAG_string_slices = true;
CcTest::InitializeVM();
Factory* factory = CcTest::i_isolate()->factory();
v8::HandleScope scope(CcTest::isolate());
......@@ -1222,7 +1221,6 @@ TEST(InternalizeExternal) {
}
TEST(SliceFromExternal) {
FLAG_string_slices = true;
CcTest::InitializeVM();
Factory* factory = CcTest::i_isolate()->factory();
v8::HandleScope scope(CcTest::isolate());
......@@ -1243,7 +1241,6 @@ TEST(SliceFromExternal) {
TEST(TrivialSlice) {
// This tests whether a slice that contains the entire parent string
// actually creates a new string (it should not).
FLAG_string_slices = true;
CcTest::InitializeVM();
Factory* factory = CcTest::i_isolate()->factory();
v8::HandleScope scope(CcTest::isolate());
......@@ -1273,7 +1270,6 @@ TEST(TrivialSlice) {
TEST(SliceFromSlice) {
// This tests whether a slice that contains the entire parent string
// actually creates a new string (it should not).
FLAG_string_slices = true;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Value> result;
......
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