Rename activation to be more in line with spec language
[WebKit-https.git] / Source / JavaScriptCore / runtime / JSScope.h
index 1ac7780..e753931 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2013 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2012, 2013, 2014 Apple Inc. All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -31,7 +31,7 @@
 namespace JSC {
 
 class ScopeChainIterator;
-class WatchpointSet;
+class VariableWatchpointSet;
 
 enum ResolveMode {
     ThrowIfNotFound,
@@ -54,6 +54,9 @@ enum ResolveType {
     Dynamic
 };
 
+const char* resolveModeName(ResolveMode mode);
+const char* resolveTypeName(ResolveType type);
+
 inline ResolveType makeType(ResolveType type, bool needsVarInjectionChecks)
 {
     if (!needsVarInjectionChecks)
@@ -96,10 +99,11 @@ inline bool needsVarInjectionChecks(ResolveType type)
 }
 
 struct ResolveOp {
-    ResolveOp(ResolveType type, size_t depth, Structure* structure, WatchpointSet* watchpointSet, uintptr_t operand)
+    ResolveOp(ResolveType type, size_t depth, Structure* structure, JSLexicalEnvironment* lexicalEnvironment, VariableWatchpointSet* watchpointSet, uintptr_t operand)
         : type(type)
         , depth(depth)
         , structure(structure)
+        , lexicalEnvironment(lexicalEnvironment)
         , watchpointSet(watchpointSet)
         , operand(operand)
     {
@@ -108,7 +112,8 @@ struct ResolveOp {
     ResolveType type;
     size_t depth;
     Structure* structure;
-    WatchpointSet* watchpointSet;
+    JSLexicalEnvironment* lexicalEnvironment;
+    VariableWatchpointSet* watchpointSet;
     uintptr_t operand;
 };
 
@@ -145,10 +150,10 @@ public:
     friend class LLIntOffsetsExtractor;
     static size_t offsetOfNext();
 
-    JS_EXPORT_PRIVATE static JSObject* objectAtScope(JSScope*);
+    static JSObject* objectAtScope(JSScope*);
 
     static JSValue resolve(ExecState*, JSScope*, const Identifier&);
-    static ResolveOp abstractResolve(ExecState*, JSScope*, const Identifier&, GetOrPut, ResolveType);
+    static ResolveOp abstractResolve(ExecState*, bool hasTopActivation, JSScope*, const Identifier&, GetOrPut, ResolveType);
 
     static void visitChildren(JSCell*, SlotVisitor&);
 
@@ -163,7 +168,6 @@ public:
 
 protected:
     JSScope(VM&, Structure*, JSScope* next);
-    static const unsigned StructureFlags = OverridesVisitChildren | Base::StructureFlags;
 
 private:
     WriteBarrier<JSScope> m_next;