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

Unified Diff: src/contexts.h

Issue 1484723003: [runtime] Use "the hole" instead of smi 0 as sentinel for context extension. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years, 1 month 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/compiler/typer.cc ('k') | src/contexts.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.h
diff --git a/src/contexts.h b/src/contexts.h
index 992de5669d1aa7c434527450b0ff02b5be4ea283..e40c11a45edd3c33e1f0e4b002739d84a5760246 100644
--- a/src/contexts.h
+++ b/src/contexts.h
@@ -327,7 +327,7 @@ class ScriptContextTable : public FixedArray {
// function contexts, and non-NULL for 'with' contexts.
// Used to implement the 'with' statement.
//
-// [ extension ] A pointer to an extension JSObject, or NULL. Used to
+// [ extension ] A pointer to an extension JSObject, or "the hole". Used to
// implement 'with' statements and dynamic declarations
// (through 'eval'). The object in a 'with' statement is
// stored in the extension slot of a 'with' context.
@@ -405,8 +405,8 @@ class Context: public FixedArray {
inline void set_previous(Context* context);
inline bool has_extension();
- inline Object* extension();
- inline void set_extension(Object* object);
+ inline HeapObject* extension();
+ inline void set_extension(HeapObject* object);
JSObject* extension_object();
JSReceiver* extension_receiver();
ScopeInfo* scope_info();
« no previous file with comments | « src/compiler/typer.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698