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

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

Issue 2707903002: [serializer] allow duplicate API external references. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « src/external-reference-table.h ('k') | src/snapshot/serializer-common.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 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/builtins/builtins.h" 9 #include "src/builtins/builtins.h"
10 #include "src/counters.h" 10 #include "src/counters.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 Address address = Deoptimizer::GetDeoptimizationEntry( 436 Address address = Deoptimizer::GetDeoptimizationEntry(
437 isolate, entry, Deoptimizer::LAZY, 437 isolate, entry, Deoptimizer::LAZY,
438 Deoptimizer::CALCULATE_ENTRY_ADDRESS); 438 Deoptimizer::CALCULATE_ENTRY_ADDRESS);
439 Add(address, "lazy_deopt"); 439 Add(address, "lazy_deopt");
440 } 440 }
441 } 441 }
442 442
443 void ExternalReferenceTable::AddApiReferences(Isolate* isolate) { 443 void ExternalReferenceTable::AddApiReferences(Isolate* isolate) {
444 // Add external references provided by the embedder (a null-terminated 444 // Add external references provided by the embedder (a null-terminated
445 // array). 445 // array).
446 api_refs_start_ = size();
446 intptr_t* api_external_references = isolate->api_external_references(); 447 intptr_t* api_external_references = isolate->api_external_references();
447 if (api_external_references != nullptr) { 448 if (api_external_references != nullptr) {
448 while (*api_external_references != 0) { 449 while (*api_external_references != 0) {
449 Address address = reinterpret_cast<Address>(*api_external_references); 450 Address address = reinterpret_cast<Address>(*api_external_references);
450 Add(address, ResolveSymbol(address)); 451 Add(address, ResolveSymbol(address));
451 api_external_references++; 452 api_external_references++;
452 } 453 }
453 } 454 }
454 } 455 }
455 456
456 } // namespace internal 457 } // namespace internal
457 } // namespace v8 458 } // namespace v8
OLDNEW
« no previous file with comments | « src/external-reference-table.h ('k') | src/snapshot/serializer-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698