Keep only captured symbols in CodeBlock symbol tables.
[WebKit-https.git] / Source / JavaScriptCore / bytecompiler / Label.h
index 21fa46309a2f2875a28da6483bb4a56fe1ee0dad..d29ab8ff3818c0ebede488c73444fa992c8ef0db 100644 (file)
@@ -37,6 +37,8 @@
 
 namespace JSC {
 
+    class BytecodeGenerator;
+
     class Label {
     public:
         explicit Label(BytecodeGenerator* generator)
@@ -66,6 +68,12 @@ namespace JSC {
         int refCount() const { return m_refCount; }
 
         bool isForward() const { return m_location == invalidLocation; }
+        
+        int bind()
+        {
+            ASSERT(!isForward());
+            return bind(0, 0);
+        }
 
     private:
         typedef Vector<std::pair<int, int>, 8> JumpVector;