[snapshot] include fewer strings.

R=mstarzinger@chromium.org

Change-Id: I6cb9d9b7b82ce05299bb6088b187e91c4fa2ca0f
Reviewed-on: https://chromium-review.googlesource.com/649750
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47911}
This commit is contained in:
Yang Guo 2017-09-08 07:35:10 +02:00 committed by Commit Bot
parent 5f3a2def82
commit cd61390ea5
4 changed files with 9 additions and 5 deletions

View File

@ -1704,7 +1704,7 @@ Node* RegExpBuiltinsAssembler::RegExpExec(Node* context, Node* regexp,
GotoIf(WordEqual(result, NullConstant()), &out);
ThrowIfNotJSReceiver(context, result,
MessageTemplate::kInvalidRegExpExecResult, "unused");
MessageTemplate::kInvalidRegExpExecResult, "");
Goto(&out);
}

View File

@ -460,9 +460,7 @@ void Heap::CreateInitialObjects() {
HandleScope scope(isolate());
#define SYMBOL_INIT(name) \
{ \
Handle<String> name##d = factory->NewStringFromStaticChars(#name); \
Handle<Symbol> symbol(isolate()->factory()->NewPrivateSymbol()); \
symbol->set_name(*name##d); \
roots_[k##name##RootIndex] = *symbol; \
}
PRIVATE_SYMBOL_LIST(SYMBOL_INIT)

View File

@ -66,6 +66,12 @@ void StartupSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
} else if (obj->IsScript() && Script::cast(obj)->IsUserJavaScript()) {
Script::cast(obj)->set_context_data(
isolate_->heap()->uninitialized_symbol());
} else if (obj->IsSharedFunctionInfo()) {
// Clear inferred name for native functions.
SharedFunctionInfo* shared = SharedFunctionInfo::cast(obj);
if (!shared->IsSubjectToDebugging() && shared->HasInferredName()) {
shared->set_inferred_name(isolate()->heap()->empty_string());
}
}
if (obj->IsHashTable()) CheckRehashability(obj);

View File

@ -60,8 +60,8 @@ TEST(NoSideEffectsToString) {
CheckObject(isolate, factory->null_value(), "null");
CheckObject(isolate, factory->error_to_string(), "[object Error]");
CheckObject(isolate, factory->stack_trace_symbol(),
"Symbol(stack_trace_symbol)");
CheckObject(isolate, factory->unscopables_symbol(),
"Symbol(Symbol.unscopables)");
CheckObject(isolate, factory->NewError(isolate->error_function(),
factory->empty_string()),
"Error");