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

Unified Diff: src/objects.h

Issue 2395233003: [modules] Give Module an internal [hash] field (Closed)
Patch Set: Fix merge Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 927c6c7f46183a1e27932d206b3ddb53ca929edf..213e8850fd8a16d808cfe5be7e4c22b1d343faea 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -7926,15 +7926,15 @@ class Module : public Struct {
// Embedder-specified data
DECL_ACCESSORS(embedder_data, Object)
+ // Hash for this object (a random non-zero Smi).
+ DECL_INT_ACCESSORS(hash)
+
// Get the SharedFunctionInfo associated with the code.
inline SharedFunctionInfo* shared() const;
// Get the ModuleInfo associated with the code.
inline ModuleInfo* info() const;
- // Compute a hash for this object.
- inline uint32_t Hash() const;
-
// Implementation of spec operation ModuleDeclarationInstantiation.
// Returns false if an exception occurred during instantiation, true
// otherwise.
@@ -7964,7 +7964,8 @@ class Module : public Struct {
static const int kFlagsOffset = kRequestedModulesOffset + kPointerSize;
static const int kEmbedderDataOffset = kFlagsOffset + kPointerSize;
static const int kModuleNamespaceOffset = kEmbedderDataOffset + kPointerSize;
- static const int kSize = kModuleNamespaceOffset + kPointerSize;
+ static const int kHashOffset = kModuleNamespaceOffset + kPointerSize;
+ static const int kSize = kHashOffset + kPointerSize;
private:
enum { kEvaluatedBit };
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698