[ES6] implement block scoping to enable 'let'
[WebKit-https.git] / Source / JavaScriptCore / bytecode / BytecodeUseDef.h
index 250d322..413d84f 100644 (file)
@@ -57,7 +57,6 @@ void computeUsesForBytecodeOffset(
     case op_get_scope:
     case op_to_this:
     case op_check_tdz:
-    case op_pop_scope:
     case op_profile_will_call:
     case op_profile_did_call:
     case op_profile_type:
@@ -113,7 +112,6 @@ void computeUsesForBytecodeOffset(
         functor(codeBlock, instruction, opcodeID, instruction[4].u.operand);
         return;
     }
-    case op_create_lexical_environment:
     case op_get_property_enumerator:
     case op_get_enumerable_length:
     case op_new_func_exp:
@@ -122,6 +120,7 @@ void computeUsesForBytecodeOffset(
     case op_init_global_const:
     case op_push_name_scope:
     case op_push_with_scope:
+    case op_create_lexical_environment:
     case op_resolve_scope:
     case op_get_from_scope:
     case op_to_primitive:
@@ -148,6 +147,7 @@ void computeUsesForBytecodeOffset(
     case op_del_by_id:
     case op_unsigned:
     case op_new_func:
+    case op_get_parent_scope:
     case op_create_scoped_arguments:
     case op_get_from_arguments: {
         functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
@@ -297,9 +297,10 @@ void computeDefsForBytecodeOffset(CodeBlock* codeBlock, unsigned bytecodeOffset,
     case op_get_property_enumerator:
     case op_enumerator_structure_pname:
     case op_enumerator_generic_pname:
-    case op_pop_scope:
+    case op_get_parent_scope:
     case op_push_name_scope:
     case op_push_with_scope:
+    case op_create_lexical_environment:
     case op_resolve_scope:
     case op_strcat:
     case op_to_primitive:
@@ -373,8 +374,7 @@ void computeDefsForBytecodeOffset(CodeBlock* codeBlock, unsigned bytecodeOffset,
         functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
         return;
     }
-    case op_catch:
-    case op_create_lexical_environment: {
+    case op_catch: {
         functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
         functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
         return;