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

Unified Diff: src/objects.h

Issue 2395233003: [modules] Give Module an internal [hash] field (Closed)
Patch Set: 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 552e96f18fab6259c0c2661098c552c44b7fdca5..c57613587a2e703699fa78d49a5fdcee5a2ff304 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -7903,15 +7903,15 @@ class Module : public Struct {
// Embedder-specified data
DECL_ACCESSORS(embedder_data, Object)
+ // Hash code for this object (a random non-zero Smi).
neis 2016/10/07 09:21:50 s/code // to avoid confusion in the following comm
adamk 2016/10/07 17:37:35 Done.
+ 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.
@@ -7935,7 +7935,8 @@ class Module : public Struct {
static const int kRequestedModulesOffset = kExportsOffset + kPointerSize;
static const int kFlagsOffset = kRequestedModulesOffset + kPointerSize;
static const int kEmbedderDataOffset = kFlagsOffset + kPointerSize;
- static const int kSize = kEmbedderDataOffset + kPointerSize;
+ static const int kHashOffset = kEmbedderDataOffset + 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