[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:
parent
5f3a2def82
commit
cd61390ea5
@ -1704,7 +1704,7 @@ Node* RegExpBuiltinsAssembler::RegExpExec(Node* context, Node* regexp,
|
|||||||
GotoIf(WordEqual(result, NullConstant()), &out);
|
GotoIf(WordEqual(result, NullConstant()), &out);
|
||||||
|
|
||||||
ThrowIfNotJSReceiver(context, result,
|
ThrowIfNotJSReceiver(context, result,
|
||||||
MessageTemplate::kInvalidRegExpExecResult, "unused");
|
MessageTemplate::kInvalidRegExpExecResult, "");
|
||||||
|
|
||||||
Goto(&out);
|
Goto(&out);
|
||||||
}
|
}
|
||||||
|
@ -460,9 +460,7 @@ void Heap::CreateInitialObjects() {
|
|||||||
HandleScope scope(isolate());
|
HandleScope scope(isolate());
|
||||||
#define SYMBOL_INIT(name) \
|
#define SYMBOL_INIT(name) \
|
||||||
{ \
|
{ \
|
||||||
Handle<String> name##d = factory->NewStringFromStaticChars(#name); \
|
|
||||||
Handle<Symbol> symbol(isolate()->factory()->NewPrivateSymbol()); \
|
Handle<Symbol> symbol(isolate()->factory()->NewPrivateSymbol()); \
|
||||||
symbol->set_name(*name##d); \
|
|
||||||
roots_[k##name##RootIndex] = *symbol; \
|
roots_[k##name##RootIndex] = *symbol; \
|
||||||
}
|
}
|
||||||
PRIVATE_SYMBOL_LIST(SYMBOL_INIT)
|
PRIVATE_SYMBOL_LIST(SYMBOL_INIT)
|
||||||
|
@ -66,6 +66,12 @@ void StartupSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
|
|||||||
} else if (obj->IsScript() && Script::cast(obj)->IsUserJavaScript()) {
|
} else if (obj->IsScript() && Script::cast(obj)->IsUserJavaScript()) {
|
||||||
Script::cast(obj)->set_context_data(
|
Script::cast(obj)->set_context_data(
|
||||||
isolate_->heap()->uninitialized_symbol());
|
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);
|
if (obj->IsHashTable()) CheckRehashability(obj);
|
||||||
|
@ -60,8 +60,8 @@ TEST(NoSideEffectsToString) {
|
|||||||
CheckObject(isolate, factory->null_value(), "null");
|
CheckObject(isolate, factory->null_value(), "null");
|
||||||
|
|
||||||
CheckObject(isolate, factory->error_to_string(), "[object Error]");
|
CheckObject(isolate, factory->error_to_string(), "[object Error]");
|
||||||
CheckObject(isolate, factory->stack_trace_symbol(),
|
CheckObject(isolate, factory->unscopables_symbol(),
|
||||||
"Symbol(stack_trace_symbol)");
|
"Symbol(Symbol.unscopables)");
|
||||||
CheckObject(isolate, factory->NewError(isolate->error_function(),
|
CheckObject(isolate, factory->NewError(isolate->error_function(),
|
||||||
factory->empty_string()),
|
factory->empty_string()),
|
||||||
"Error");
|
"Error");
|
||||||
|
Loading…
Reference in New Issue
Block a user