Commit 872d6713 authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cleanup] Make Add() out-of-line in ExternalReferenceTable.

We call this ~140 times from addReferences() and AddStubCache, which
caused size to increase.

Bug: 
Change-Id: Ib08d435abb82b3e07121adf023f96f6f0b33733e
Reviewed-on: https://chromium-review.googlesource.com/660120Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47949}
parent cba02969
......@@ -60,6 +60,10 @@ const char* ExternalReferenceTable::ResolveSymbol(void* address) {
#endif // SYMBOLIZE_FUNCTION
}
void ExternalReferenceTable::Add(Address address, const char* name) {
refs_.emplace_back(address, name);
}
void ExternalReferenceTable::AddReferences(Isolate* isolate) {
// Miscellaneous
Add(ExternalReference::roots_array_start(isolate).address(),
......
......@@ -32,14 +32,14 @@ class ExternalReferenceTable {
struct ExternalReferenceEntry {
Address address;
const char* name;
ExternalReferenceEntry(Address address, const char* name)
: address(address), name(name) {}
};
explicit ExternalReferenceTable(Isolate* isolate);
void Add(Address address, const char* name) {
ExternalReferenceEntry entry = {address, name};
refs_.push_back(entry);
}
void Add(Address address, const char* name);
void AddReferences(Isolate* isolate);
void AddBuiltins(Isolate* isolate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment