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

Side by Side Diff: src/external-reference-table.cc

Issue 2066993004: [snapshot] serialize embedder-provided external references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: also serialize next_serial_number Created 4 years, 6 months 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
« include/v8.h ('K') | « src/api.cc ('k') | src/heap/heap.h » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/external-reference-table.h" 5 #include "src/external-reference-table.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/counters.h" 9 #include "src/counters.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 // Add a small set of deopt entry addresses to encoder without generating the 362 // Add a small set of deopt entry addresses to encoder without generating the
363 // deopt table code, which isn't possible at deserialization time. 363 // deopt table code, which isn't possible at deserialization time.
364 HandleScope scope(isolate); 364 HandleScope scope(isolate);
365 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { 365 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) {
366 Address address = Deoptimizer::GetDeoptimizationEntry( 366 Address address = Deoptimizer::GetDeoptimizationEntry(
367 isolate, entry, Deoptimizer::LAZY, 367 isolate, entry, Deoptimizer::LAZY,
368 Deoptimizer::CALCULATE_ENTRY_ADDRESS); 368 Deoptimizer::CALCULATE_ENTRY_ADDRESS);
369 Add(address, "lazy_deopt"); 369 Add(address, "lazy_deopt");
370 } 370 }
371
372 // Add external references provided by the embedder (a null-terminated array).
373 intptr_t* api_external_references = isolate->api_external_references();
374 if (api_external_references != nullptr) {
375 while (*api_external_references != 0) {
376 Add(reinterpret_cast<Address>(*api_external_references), "<embedder>");
377 api_external_references++;
378 }
379 }
371 } 380 }
372 381
373 } // namespace internal 382 } // namespace internal
374 } // namespace v8 383 } // namespace v8
OLDNEW
« include/v8.h ('K') | « src/api.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698