summaryrefslogtreecommitdiff
path: root/deps/v8/src/ic/stub-cache.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-03-12 09:01:49 +0100
committerMichaël Zasso <targos@protonmail.com>2019-03-14 18:49:21 +0100
commit7b48713334469818661fe276cf571de9c7899f2d (patch)
tree4dbda49ac88db76ce09dc330a0cb587e68e139ba /deps/v8/src/ic/stub-cache.h
parent8549ac09b256666cf5275224ec58fab9939ff32e (diff)
downloadandroid-node-v8-7b48713334469818661fe276cf571de9c7899f2d.tar.gz
android-node-v8-7b48713334469818661fe276cf571de9c7899f2d.tar.bz2
android-node-v8-7b48713334469818661fe276cf571de9c7899f2d.zip
deps: update V8 to 7.3.492.25
PR-URL: https://github.com/nodejs/node/pull/25852 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/ic/stub-cache.h')
-rw-r--r--deps/v8/src/ic/stub-cache.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/deps/v8/src/ic/stub-cache.h b/deps/v8/src/ic/stub-cache.h
index 5cff496b15..0b6f9d43d1 100644
--- a/deps/v8/src/ic/stub-cache.h
+++ b/deps/v8/src/ic/stub-cache.h
@@ -5,7 +5,6 @@
#ifndef V8_IC_STUB_CACHE_H_
#define V8_IC_STUB_CACHE_H_
-#include "src/macro-assembler.h"
#include "src/objects/name.h"
namespace v8 {
@@ -33,15 +32,21 @@ class SCTableReference {
class StubCache {
public:
struct Entry {
- Name* key;
- MaybeObject* value;
- Map* map;
+ // The values here have plain Address types because they are read
+ // directly from generated code. As a nice side effect, this keeps
+ // #includes lightweight.
+ Address key;
+ // {value} is a tagged heap object reference (weak or strong), equivalent
+ // to a MaybeObject's payload.
+ Address value;
+ // {map} is a tagged Map pointer, or nullptr.
+ Address map;
};
void Initialize();
// Access cache for entry hash(name, map).
- MaybeObject* Set(Name* name, Map* map, MaybeObject* handler);
- MaybeObject* Get(Name* name, Map* map);
+ void Set(Name name, Map map, MaybeObject handler);
+ MaybeObject Get(Name name, Map map);
// Clear the lookup table (@ mark compact collection).
void Clear();
@@ -87,13 +92,8 @@ class StubCache {
// Some magic number used in the secondary hash computation.
static const int kSecondaryMagic = 0xb16ca6e5;
- static int PrimaryOffsetForTesting(Name* name, Map* map) {
- return PrimaryOffset(name, map);
- }
-
- static int SecondaryOffsetForTesting(Name* name, int seed) {
- return SecondaryOffset(name, seed);
- }
+ static int PrimaryOffsetForTesting(Name name, Map map);
+ static int SecondaryOffsetForTesting(Name name, int seed);
// The constructor is made public only for the purposes of testing.
explicit StubCache(Isolate* isolate);
@@ -109,12 +109,12 @@ class StubCache {
// Hash algorithm for the primary table. This algorithm is replicated in
// assembler for every architecture. Returns an index into the table that
// is scaled by 1 << kCacheIndexShift.
- static int PrimaryOffset(Name* name, Map* map);
+ static int PrimaryOffset(Name name, Map map);
// Hash algorithm for the secondary table. This algorithm is replicated in
// assembler for every architecture. Returns an index into the table that
// is scaled by 1 << kCacheIndexShift.
- static int SecondaryOffset(Name* name, int seed);
+ static int SecondaryOffset(Name name, int seed);
// Compute the entry for a given offset in exactly the same way as
// we do in generated code. We generate an hash code that already