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

Side by Side Diff: src/snapshot/serialize.cc

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/snapshot/serialize.h" 5 #include "src/snapshot/serialize.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after
2454 return; 2454 return;
2455 case Code::WASM_FUNCTION: 2455 case Code::WASM_FUNCTION:
2456 UNREACHABLE(); 2456 UNREACHABLE();
2457 } 2457 }
2458 UNREACHABLE(); 2458 UNREACHABLE();
2459 } 2459 }
2460 2460
2461 // Past this point we should not see any (context-specific) maps anymore. 2461 // Past this point we should not see any (context-specific) maps anymore.
2462 CHECK(!obj->IsMap()); 2462 CHECK(!obj->IsMap());
2463 // There should be no references to the global object embedded. 2463 // There should be no references to the global object embedded.
2464 CHECK(!obj->IsJSGlobalProxy() && !obj->IsGlobalObject()); 2464 CHECK(!obj->IsJSGlobalProxy() && !obj->IsJSGlobalObject());
2465 // There should be no hash table embedded. They would require rehashing. 2465 // There should be no hash table embedded. They would require rehashing.
2466 CHECK(!obj->IsHashTable()); 2466 CHECK(!obj->IsHashTable());
2467 // We expect no instantiated function objects or contexts. 2467 // We expect no instantiated function objects or contexts.
2468 CHECK(!obj->IsJSFunction() && !obj->IsContext()); 2468 CHECK(!obj->IsJSFunction() && !obj->IsContext());
2469 2469
2470 SerializeGeneric(obj, how_to_code, where_to_point); 2470 SerializeGeneric(obj, how_to_code, where_to_point);
2471 } 2471 }
2472 2472
2473 2473
2474 void CodeSerializer::SerializeGeneric(HeapObject* heap_object, 2474 void CodeSerializer::SerializeGeneric(HeapObject* heap_object,
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 SerializedCodeData* scd = new SerializedCodeData(cached_data); 2852 SerializedCodeData* scd = new SerializedCodeData(cached_data);
2853 SanityCheckResult r = scd->SanityCheck(isolate, source); 2853 SanityCheckResult r = scd->SanityCheck(isolate, source);
2854 if (r == CHECK_SUCCESS) return scd; 2854 if (r == CHECK_SUCCESS) return scd;
2855 cached_data->Reject(); 2855 cached_data->Reject();
2856 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); 2856 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r);
2857 delete scd; 2857 delete scd;
2858 return NULL; 2858 return NULL;
2859 } 2859 }
2860 } // namespace internal 2860 } // namespace internal
2861 } // namespace v8 2861 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698