Rename activation to be more in line with spec language
[WebKit-https.git] / Source / JavaScriptCore / runtime / JSScope.h
index 553fb57..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,6 +31,7 @@
 namespace JSC {
 
 class ScopeChainIterator;
+class VariableWatchpointSet;
 
 enum ResolveMode {
     ThrowIfNotFound,
@@ -53,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)
@@ -95,10 +99,12 @@ inline bool needsVarInjectionChecks(ResolveType type)
 }
 
 struct ResolveOp {
-    ResolveOp(ResolveType type, size_t depth, Structure* structure, 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)
     {
     }
@@ -106,6 +112,8 @@ struct ResolveOp {
     ResolveType type;
     size_t depth;
     Structure* structure;
+    JSLexicalEnvironment* lexicalEnvironment;
+    VariableWatchpointSet* watchpointSet;
     uintptr_t operand;
 };
 
@@ -142,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&);
 
@@ -160,7 +168,6 @@ public:
 
 protected:
     JSScope(VM&, Structure*, JSScope* next);
-    static const unsigned StructureFlags = OverridesVisitChildren | Base::StructureFlags;
 
 private:
     WriteBarrier<JSScope> m_next;
@@ -215,7 +222,7 @@ inline JSGlobalObject* JSScope::globalObject()
 
 inline VM* JSScope::vm()
 { 
-    return Heap::heap(this)->vm();
+    return MarkedBlock::blockFor(this)->vm();
 }
 
 inline Register& Register::operator=(JSScope* scope)