Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1270)

Unified Diff: src/snapshot/serialize.cc

Issue 1475953002: [stubs] A new approach to TF stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge with ToT Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/snapshot/serialize.cc
diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc
index 183f7554835b334f6cd1b1e05c5249a75fe17d9a..9048e964f3c1e16ab181a23cf57df256137d6b2e 100644
--- a/src/snapshot/serialize.cc
+++ b/src/snapshot/serialize.cc
@@ -540,8 +540,7 @@ void Deserializer::Deserialize(Isolate* isolate) {
}
isolate_->heap()->set_native_contexts_list(
- isolate_->heap()->code_stub_context());
-
+ isolate_->heap()->undefined_value());
// The allocation site list is build during root iteration, but if no sites
// were encountered then it needs to be initialized to undefined.
if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) {
@@ -552,7 +551,6 @@ void Deserializer::Deserialize(Isolate* isolate) {
// Update data pointers to the external strings containing natives sources.
Natives::UpdateSourceCache(isolate_->heap());
ExtraNatives::UpdateSourceCache(isolate_->heap());
- CodeStubNatives::UpdateSourceCache(isolate_->heap());
// Issue code events for newly deserialized code objects.
LOG_CODE_EVENT(isolate_, LogCodeObjects());
@@ -1174,11 +1172,6 @@ bool Deserializer::ReadData(Object** current, Object** limit, int source_space,
ExtraNatives::GetScriptSource(source_.Get()), current);
break;
- case kCodeStubNativesStringResource:
- current = CopyInNativesSource(
- CodeStubNatives::GetScriptSource(source_.Get()), current);
- break;
-
// Deserialize raw data of variable length.
case kVariableRawData: {
int size_in_bytes = source_.GetInt();
@@ -1714,10 +1707,7 @@ StartupSerializer::StartupSerializer(Isolate* isolate, SnapshotByteSink* sink)
void StartupSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
WhereToPoint where_to_point, int skip) {
- // Make sure that all functions are derived from the code-stub context
- DCHECK(!obj->IsJSFunction() ||
- JSFunction::cast(obj)->GetCreationContext() ==
- isolate()->heap()->code_stub_context());
+ DCHECK(!obj->IsJSFunction());
int root_index = root_index_map_.Lookup(obj);
// We can only encode roots as such if it has already been serialized.
@@ -2251,12 +2241,6 @@ void Serializer::ObjectSerializer::VisitExternalOneByteString(
kExtraNativesStringResource)) {
return;
}
- if (SerializeExternalNativeSourceString(
- CodeStubNatives::GetBuiltinsCount(), resource_pointer,
- CodeStubNatives::GetSourceCache(serializer_->isolate()->heap()),
- kCodeStubNativesStringResource)) {
- return;
- }
// One of the strings in the natives cache should match the resource. We
// don't expect any other kinds of external strings here.
UNREACHABLE();

Powered by Google App Engine
This is Rietveld 408576698