OLD | NEW |
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 28 matching lines...) Expand all Loading... |
39 ExternalReferenceTable::ExternalReferenceTable(Isolate* isolate) { | 39 ExternalReferenceTable::ExternalReferenceTable(Isolate* isolate) { |
40 // nullptr is preserved through serialization/deserialization. | 40 // nullptr is preserved through serialization/deserialization. |
41 Add(nullptr, "nullptr"); | 41 Add(nullptr, "nullptr"); |
42 AddReferences(isolate); | 42 AddReferences(isolate); |
43 AddBuiltins(isolate); | 43 AddBuiltins(isolate); |
44 AddRuntimeFunctions(isolate); | 44 AddRuntimeFunctions(isolate); |
45 AddIsolateAddresses(isolate); | 45 AddIsolateAddresses(isolate); |
46 AddAccessors(isolate); | 46 AddAccessors(isolate); |
47 AddStubCache(isolate); | 47 AddStubCache(isolate); |
48 AddDeoptEntries(isolate); | 48 AddDeoptEntries(isolate); |
| 49 // API references must be added last. |
49 AddApiReferences(isolate); | 50 AddApiReferences(isolate); |
50 } | 51 } |
51 | 52 |
52 #ifdef DEBUG | 53 #ifdef DEBUG |
53 void ExternalReferenceTable::ResetCount() { | 54 void ExternalReferenceTable::ResetCount() { |
54 for (ExternalReferenceEntry& entry : refs_) entry.count = 0; | 55 for (ExternalReferenceEntry& entry : refs_) entry.count = 0; |
55 } | 56 } |
56 | 57 |
57 void ExternalReferenceTable::PrintCount() { | 58 void ExternalReferenceTable::PrintCount() { |
58 for (int i = 0; i < refs_.length(); i++) { | 59 for (int i = 0; i < refs_.length(); i++) { |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 while (*api_external_references != 0) { | 453 while (*api_external_references != 0) { |
453 Address address = reinterpret_cast<Address>(*api_external_references); | 454 Address address = reinterpret_cast<Address>(*api_external_references); |
454 Add(address, ResolveSymbol(address)); | 455 Add(address, ResolveSymbol(address)); |
455 api_external_references++; | 456 api_external_references++; |
456 } | 457 } |
457 } | 458 } |
458 } | 459 } |
459 | 460 |
460 } // namespace internal | 461 } // namespace internal |
461 } // namespace v8 | 462 } // namespace v8 |
OLD | NEW |