fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 1 | /* |
mark.lam@apple.com | 03916fe | 2017-02-28 01:20:54 +0000 | [diff] [blame] | 2 | * Copyright (C) 2013-2017 Apple Inc. All rights reserved. |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
ryanhaddad@apple.com | 22104f5 | 2016-09-28 17:08:17 +0000 | [diff] [blame] | 26 | #pragma once |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 27 | |
| 28 | #include "CodeBlock.h" |
| 29 | |
| 30 | namespace JSC { |
| 31 | |
utatane.tea@gmail.com | c258519 | 2016-08-25 22:55:10 +0000 | [diff] [blame] | 32 | template<typename Block, typename Functor, typename Instruction> |
| 33 | void computeUsesForBytecodeOffset(Block* codeBlock, OpcodeID opcodeID, Instruction* instruction, const Functor& functor) |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 34 | { |
sbarati@apple.com | 60a3be7 | 2017-08-25 18:26:15 +0000 | [diff] [blame] | 35 | if (opcodeID != op_enter && (codeBlock->wasCompiledWithDebuggingOpcodes() || codeBlock->usesEval()) && codeBlock->scopeRegister().isValid()) |
sbarati@apple.com | 5c4cd81 | 2016-06-02 22:18:27 +0000 | [diff] [blame] | 36 | functor(codeBlock, instruction, opcodeID, codeBlock->scopeRegister().offset()); |
| 37 | |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 38 | switch (opcodeID) { |
| 39 | // No uses. |
| 40 | case op_new_regexp: |
| 41 | case op_new_array_buffer: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 42 | case op_debug: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 43 | case op_jneq_ptr: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 44 | case op_loop_hint: |
| 45 | case op_jmp: |
| 46 | case op_new_object: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 47 | case op_enter: |
keith_miller@apple.com | 85aeabb | 2016-06-03 23:06:39 +0000 | [diff] [blame] | 48 | case op_argument_count: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 49 | case op_catch: |
saambarati1@gmail.com | b4f28a5 | 2014-12-05 05:58:07 +0000 | [diff] [blame] | 50 | case op_profile_control_flow: |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 51 | case op_create_direct_arguments: |
keith_miller@apple.com | 2636739 | 2016-03-14 20:55:15 +0000 | [diff] [blame] | 52 | case op_create_cloned_arguments: |
sbarati@apple.com | 855d560 | 2015-11-30 20:36:54 +0000 | [diff] [blame] | 53 | case op_get_rest_length: |
mark.lam@apple.com | 03916fe | 2017-02-28 01:20:54 +0000 | [diff] [blame] | 54 | case op_check_traps: |
utatane.tea@gmail.com | bebf785 | 2016-11-10 06:34:05 +0000 | [diff] [blame] | 55 | case op_get_argument: |
sbarati@apple.com | 12cb945 | 2017-05-25 18:47:38 +0000 | [diff] [blame] | 56 | case op_nop: |
fpizlo@apple.com | f502684 | 2017-06-06 18:08:17 +0000 | [diff] [blame] | 57 | case op_unreachable: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 58 | return; |
utatane.tea@gmail.com | 9b3f866 | 2015-11-13 18:52:03 +0000 | [diff] [blame] | 59 | case op_assert: |
msaboff@apple.com | 8b6b341 | 2014-11-04 03:36:28 +0000 | [diff] [blame] | 60 | case op_get_scope: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 61 | case op_to_this: |
rniwa@webkit.org | eb7ac19 | 2015-03-13 01:11:15 +0000 | [diff] [blame] | 62 | case op_check_tdz: |
keith_miller@apple.com | 591a67d | 2017-08-15 04:18:56 +0000 | [diff] [blame] | 63 | case op_identity_with_profile: |
commit-queue@webkit.org | 2ed31ec | 2014-08-21 01:03:20 +0000 | [diff] [blame] | 64 | case op_profile_type: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 65 | case op_throw: |
sbarati@apple.com | c1f73c3 | 2017-09-01 05:41:08 +0000 | [diff] [blame] | 66 | case op_throw_static_error: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 67 | case op_end: |
| 68 | case op_ret: |
| 69 | case op_jtrue: |
| 70 | case op_jfalse: |
| 71 | case op_jeq_null: |
| 72 | case op_jneq_null: |
| 73 | case op_dec: |
utatane.tea@gmail.com | fdd9bf4 | 2015-12-02 03:16:28 +0000 | [diff] [blame] | 74 | case op_inc: |
sbarati@apple.com | c1f73c3 | 2017-09-01 05:41:08 +0000 | [diff] [blame] | 75 | case op_log_shadow_chicken_prologue: { |
sbarati@apple.com | ed271f9 | 2016-01-19 04:08:56 +0000 | [diff] [blame] | 76 | ASSERT(opcodeLengths[opcodeID] > 1); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 77 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 78 | return; |
| 79 | } |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 80 | case op_jlesseq: |
| 81 | case op_jgreater: |
| 82 | case op_jgreatereq: |
| 83 | case op_jnless: |
| 84 | case op_jnlesseq: |
| 85 | case op_jngreater: |
| 86 | case op_jngreatereq: |
sbarati@apple.com | 855d560 | 2015-11-30 20:36:54 +0000 | [diff] [blame] | 87 | case op_jless: |
utatane.tea@gmail.com | fcab24f | 2017-09-27 18:51:12 +0000 | [diff] [blame^] | 88 | case op_jbelow: |
| 89 | case op_jbeloweq: |
mark.lam@apple.com | 47c2f14 | 2016-03-16 18:16:32 +0000 | [diff] [blame] | 90 | case op_set_function_name: |
sbarati@apple.com | 6cfefd8 | 2016-08-13 02:14:42 +0000 | [diff] [blame] | 91 | case op_log_shadow_chicken_tail: { |
sbarati@apple.com | ed271f9 | 2016-01-19 04:08:56 +0000 | [diff] [blame] | 92 | ASSERT(opcodeLengths[opcodeID] > 2); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 93 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 94 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 95 | return; |
| 96 | } |
| 97 | case op_put_by_val_direct: |
| 98 | case op_put_by_val: { |
sbarati@apple.com | ed271f9 | 2016-01-19 04:08:56 +0000 | [diff] [blame] | 99 | ASSERT(opcodeLengths[opcodeID] > 3); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 100 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 101 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 102 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 103 | return; |
| 104 | } |
| 105 | case op_put_by_index: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 106 | case op_put_by_id: |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 107 | case op_put_to_scope: |
| 108 | case op_put_to_arguments: { |
sbarati@apple.com | ed271f9 | 2016-01-19 04:08:56 +0000 | [diff] [blame] | 109 | ASSERT(opcodeLengths[opcodeID] > 3); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 110 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 111 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 112 | return; |
| 113 | } |
sbarati@apple.com | 23315d6 | 2016-05-09 20:17:23 +0000 | [diff] [blame] | 114 | case op_put_by_id_with_this: { |
| 115 | ASSERT(opcodeLengths[opcodeID] > 4); |
| 116 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 117 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 118 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
| 119 | return; |
| 120 | } |
| 121 | case op_put_by_val_with_this: { |
| 122 | ASSERT(opcodeLengths[opcodeID] > 4); |
| 123 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 124 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 125 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 126 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
| 127 | return; |
| 128 | } |
rniwa@webkit.org | 87ae29c | 2015-08-14 23:50:25 +0000 | [diff] [blame] | 129 | case op_put_getter_by_id: |
| 130 | case op_put_setter_by_id: { |
sbarati@apple.com | ed271f9 | 2016-01-19 04:08:56 +0000 | [diff] [blame] | 131 | ASSERT(opcodeLengths[opcodeID] > 4); |
rniwa@webkit.org | 87ae29c | 2015-08-14 23:50:25 +0000 | [diff] [blame] | 132 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 133 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
| 134 | return; |
| 135 | } |
utatane.tea@gmail.com | 059a71f | 2015-11-02 18:32:55 +0000 | [diff] [blame] | 136 | case op_put_getter_setter_by_id: { |
sbarati@apple.com | ed271f9 | 2016-01-19 04:08:56 +0000 | [diff] [blame] | 137 | ASSERT(opcodeLengths[opcodeID] > 5); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 138 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 139 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
rniwa@webkit.org | 87ae29c | 2015-08-14 23:50:25 +0000 | [diff] [blame] | 140 | functor(codeBlock, instruction, opcodeID, instruction[5].u.operand); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 141 | return; |
| 142 | } |
utatane.tea@gmail.com | f0153d0 | 2015-09-08 19:43:58 +0000 | [diff] [blame] | 143 | case op_put_getter_by_val: |
| 144 | case op_put_setter_by_val: { |
sbarati@apple.com | ed271f9 | 2016-01-19 04:08:56 +0000 | [diff] [blame] | 145 | ASSERT(opcodeLengths[opcodeID] > 4); |
utatane.tea@gmail.com | f0153d0 | 2015-09-08 19:43:58 +0000 | [diff] [blame] | 146 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 147 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 148 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
| 149 | return; |
| 150 | } |
utatane.tea@gmail.com | f7db559 | 2016-10-04 19:31:24 +0000 | [diff] [blame] | 151 | case op_define_data_property: { |
| 152 | ASSERT(opcodeLengths[opcodeID] > 4); |
| 153 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 154 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 155 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 156 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
| 157 | return; |
| 158 | } |
| 159 | case op_define_accessor_property: { |
| 160 | ASSERT(opcodeLengths[opcodeID] > 5); |
| 161 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 162 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 163 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 164 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
| 165 | functor(codeBlock, instruction, opcodeID, instruction[5].u.operand); |
| 166 | return; |
| 167 | } |
sbarati@apple.com | 99ed479 | 2016-11-12 02:58:11 +0000 | [diff] [blame] | 168 | case op_spread: |
msaboff@apple.com | b644c25 | 2015-03-24 10:05:21 +0000 | [diff] [blame] | 169 | case op_get_property_enumerator: |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 170 | case op_get_enumerable_length: |
msaboff@apple.com | 5e62e3f | 2014-11-21 23:41:26 +0000 | [diff] [blame] | 171 | case op_new_func_exp: |
utatane.tea@gmail.com | fdd9bf4 | 2015-12-02 03:16:28 +0000 | [diff] [blame] | 172 | case op_new_generator_func_exp: |
caitp@igalia.com | 04d4f60 | 2016-10-28 16:37:38 +0000 | [diff] [blame] | 173 | case op_new_async_func_exp: |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 174 | case op_to_index_string: |
saambarati1@gmail.com | 144f17c | 2015-07-15 21:41:08 +0000 | [diff] [blame] | 175 | case op_create_lexical_environment: |
msaboff@apple.com | 5e62e3f | 2014-11-21 23:41:26 +0000 | [diff] [blame] | 176 | case op_resolve_scope: |
gskachkov@gmail.com | 077d7d5 | 2017-04-30 08:06:23 +0000 | [diff] [blame] | 177 | case op_resolve_scope_for_hoisting_func_decl_in_eval: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 178 | case op_get_from_scope: |
| 179 | case op_to_primitive: |
keith_miller@apple.com | 8844d30 | 2016-04-07 19:38:00 +0000 | [diff] [blame] | 180 | case op_try_get_by_id: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 181 | case op_get_by_id: |
keith_miller@apple.com | 30e9026 | 2016-06-02 21:24:21 +0000 | [diff] [blame] | 182 | case op_get_by_id_proto_load: |
| 183 | case op_get_by_id_unset: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 184 | case op_get_array_length: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 185 | case op_typeof: |
gskachkov@gmail.com | 086f8f6 | 2016-04-26 18:40:41 +0000 | [diff] [blame] | 186 | case op_is_empty: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 187 | case op_is_undefined: |
| 188 | case op_is_boolean: |
| 189 | case op_is_number: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 190 | case op_is_object: |
utatane.tea@gmail.com | 0bfb74c | 2015-02-24 23:01:58 +0000 | [diff] [blame] | 191 | case op_is_object_or_null: |
utatane.tea@gmail.com | 3634afe | 2016-09-19 17:00:25 +0000 | [diff] [blame] | 192 | case op_is_cell_with_type: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 193 | case op_is_function: |
| 194 | case op_to_number: |
utatane.tea@gmail.com | 4014aea | 2015-04-27 00:27:28 +0000 | [diff] [blame] | 195 | case op_to_string: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 196 | case op_negate: |
| 197 | case op_neq_null: |
| 198 | case op_eq_null: |
| 199 | case op_not: |
| 200 | case op_mov: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 201 | case op_new_array_with_size: |
commit-queue@webkit.org | 19660ce | 2015-05-12 05:48:57 +0000 | [diff] [blame] | 202 | case op_create_this: |
fpizlo@apple.com | 9089acb | 2013-12-14 06:33:42 +0000 | [diff] [blame] | 203 | case op_del_by_id: |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 204 | case op_unsigned: |
| 205 | case op_new_func: |
gskachkov@gmail.com | ab749fd | 2017-08-23 17:05:33 +0000 | [diff] [blame] | 206 | case op_new_async_generator_func: |
| 207 | case op_new_async_generator_func_exp: |
utatane.tea@gmail.com | fdd9bf4 | 2015-12-02 03:16:28 +0000 | [diff] [blame] | 208 | case op_new_generator_func: |
caitp@igalia.com | 04d4f60 | 2016-10-28 16:37:38 +0000 | [diff] [blame] | 209 | case op_new_async_func: |
saambarati1@gmail.com | 144f17c | 2015-07-15 21:41:08 +0000 | [diff] [blame] | 210 | case op_get_parent_scope: |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 211 | case op_create_scoped_arguments: |
sbarati@apple.com | 6cfefd8 | 2016-08-13 02:14:42 +0000 | [diff] [blame] | 212 | case op_create_rest: |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 213 | case op_get_from_arguments: { |
sbarati@apple.com | ed271f9 | 2016-01-19 04:08:56 +0000 | [diff] [blame] | 214 | ASSERT(opcodeLengths[opcodeID] > 2); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 215 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 216 | return; |
| 217 | } |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 218 | case op_has_generic_property: |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 219 | case op_has_indexed_property: |
msaboff@apple.com | b644c25 | 2015-03-24 10:05:21 +0000 | [diff] [blame] | 220 | case op_enumerator_structure_pname: |
| 221 | case op_enumerator_generic_pname: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 222 | case op_get_by_val: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 223 | case op_in: |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 224 | case op_overrides_has_instance: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 225 | case op_instanceof: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 226 | case op_add: |
| 227 | case op_mul: |
| 228 | case op_div: |
| 229 | case op_mod: |
| 230 | case op_sub: |
utatane.tea@gmail.com | e990638 | 2016-07-21 07:33:28 +0000 | [diff] [blame] | 231 | case op_pow: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 232 | case op_lshift: |
| 233 | case op_rshift: |
| 234 | case op_urshift: |
| 235 | case op_bitand: |
| 236 | case op_bitxor: |
| 237 | case op_bitor: |
| 238 | case op_less: |
| 239 | case op_lesseq: |
| 240 | case op_greater: |
| 241 | case op_greatereq: |
utatane.tea@gmail.com | fcab24f | 2017-09-27 18:51:12 +0000 | [diff] [blame^] | 242 | case op_below: |
| 243 | case op_beloweq: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 244 | case op_nstricteq: |
| 245 | case op_stricteq: |
| 246 | case op_neq: |
| 247 | case op_eq: |
saambarati1@gmail.com | e85426c | 2015-08-07 17:41:22 +0000 | [diff] [blame] | 248 | case op_push_with_scope: |
sbarati@apple.com | 23315d6 | 2016-05-09 20:17:23 +0000 | [diff] [blame] | 249 | case op_get_by_id_with_this: |
keith_miller@apple.com | e497e20 | 2016-06-13 21:05:36 +0000 | [diff] [blame] | 250 | case op_del_by_val: |
| 251 | case op_tail_call_forward_arguments: { |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 252 | ASSERT(opcodeLengths[opcodeID] > 3); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 253 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 254 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 255 | return; |
| 256 | } |
sbarati@apple.com | 23315d6 | 2016-05-09 20:17:23 +0000 | [diff] [blame] | 257 | case op_get_by_val_with_this: { |
| 258 | ASSERT(opcodeLengths[opcodeID] > 4); |
| 259 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 260 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 261 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
| 262 | return; |
| 263 | } |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 264 | case op_instanceof_custom: |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 265 | case op_has_structure_property: |
oliver@apple.com | 177c2b9 | 2014-03-28 01:10:25 +0000 | [diff] [blame] | 266 | case op_construct_varargs: |
msaboff@apple.com | c15ae7e | 2015-09-16 23:40:35 +0000 | [diff] [blame] | 267 | case op_call_varargs: |
| 268 | case op_tail_call_varargs: { |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 269 | ASSERT(opcodeLengths[opcodeID] > 4); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 270 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 271 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 272 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
| 273 | return; |
| 274 | } |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 275 | case op_get_direct_pname: { |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 276 | ASSERT(opcodeLengths[opcodeID] > 5); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 277 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 278 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 279 | functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); |
| 280 | functor(codeBlock, instruction, opcodeID, instruction[5].u.operand); |
| 281 | return; |
| 282 | } |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 283 | case op_switch_string: |
| 284 | case op_switch_char: |
| 285 | case op_switch_imm: { |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 286 | ASSERT(opcodeLengths[opcodeID] > 3); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 287 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
| 288 | return; |
| 289 | } |
sbarati@apple.com | 99ed479 | 2016-11-12 02:58:11 +0000 | [diff] [blame] | 290 | case op_new_array_with_spread: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 291 | case op_new_array: |
| 292 | case op_strcat: { |
| 293 | int base = instruction[2].u.operand; |
| 294 | int count = instruction[3].u.operand; |
| 295 | for (int i = 0; i < count; i++) |
| 296 | functor(codeBlock, instruction, opcodeID, base - i); |
| 297 | return; |
| 298 | } |
| 299 | case op_construct: |
| 300 | case op_call_eval: |
msaboff@apple.com | c15ae7e | 2015-09-16 23:40:35 +0000 | [diff] [blame] | 301 | case op_call: |
| 302 | case op_tail_call: { |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 303 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 304 | int argCount = instruction[3].u.operand; |
| 305 | int registerOffset = -instruction[4].u.operand; |
| 306 | int lastArg = registerOffset + CallFrame::thisArgumentOffset(); |
rniwa@webkit.org | fda6b5e | 2015-02-25 00:41:35 +0000 | [diff] [blame] | 307 | for (int i = 0; i < argCount; i++) |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 308 | functor(codeBlock, instruction, opcodeID, lastArg + i); |
fpizlo@apple.com | 48bf58d | 2016-07-18 19:32:34 +0000 | [diff] [blame] | 309 | if (opcodeID == op_call_eval) |
| 310 | functor(codeBlock, instruction, opcodeID, codeBlock->scopeRegister().offset()); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 311 | return; |
| 312 | } |
utatane.tea@gmail.com | c258519 | 2016-08-25 22:55:10 +0000 | [diff] [blame] | 313 | case op_yield: { |
utatane.tea@gmail.com | fdd9bf4 | 2015-12-02 03:16:28 +0000 | [diff] [blame] | 314 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
utatane.tea@gmail.com | c258519 | 2016-08-25 22:55:10 +0000 | [diff] [blame] | 315 | functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); |
utatane.tea@gmail.com | fdd9bf4 | 2015-12-02 03:16:28 +0000 | [diff] [blame] | 316 | return; |
| 317 | } |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 318 | default: |
| 319 | RELEASE_ASSERT_NOT_REACHED(); |
| 320 | break; |
| 321 | } |
| 322 | } |
| 323 | |
utatane.tea@gmail.com | c258519 | 2016-08-25 22:55:10 +0000 | [diff] [blame] | 324 | template<typename Block, typename Instruction, typename Functor> |
| 325 | void computeDefsForBytecodeOffset(Block* codeBlock, OpcodeID opcodeID, Instruction* instruction, const Functor& functor) |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 326 | { |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 327 | switch (opcodeID) { |
| 328 | // These don't define anything. |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 329 | case op_put_to_scope: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 330 | case op_end: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 331 | case op_throw: |
| 332 | case op_throw_static_error: |
youenn.fablet@crf.canon.fr | 5f0b7be | 2015-11-09 14:15:21 +0000 | [diff] [blame] | 333 | case op_assert: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 334 | case op_debug: |
| 335 | case op_ret: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 336 | case op_jmp: |
| 337 | case op_jtrue: |
| 338 | case op_jfalse: |
| 339 | case op_jeq_null: |
| 340 | case op_jneq_null: |
| 341 | case op_jneq_ptr: |
| 342 | case op_jless: |
| 343 | case op_jlesseq: |
| 344 | case op_jgreater: |
| 345 | case op_jgreatereq: |
| 346 | case op_jnless: |
| 347 | case op_jnlesseq: |
| 348 | case op_jngreater: |
| 349 | case op_jngreatereq: |
utatane.tea@gmail.com | fcab24f | 2017-09-27 18:51:12 +0000 | [diff] [blame^] | 350 | case op_jbelow: |
| 351 | case op_jbeloweq: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 352 | case op_loop_hint: |
| 353 | case op_switch_imm: |
| 354 | case op_switch_char: |
| 355 | case op_switch_string: |
| 356 | case op_put_by_id: |
sbarati@apple.com | 23315d6 | 2016-05-09 20:17:23 +0000 | [diff] [blame] | 357 | case op_put_by_id_with_this: |
| 358 | case op_put_by_val_with_this: |
commit-queue@webkit.org | fb471b4 | 2015-05-14 01:32:25 +0000 | [diff] [blame] | 359 | case op_put_getter_by_id: |
| 360 | case op_put_setter_by_id: |
utatane.tea@gmail.com | 059a71f | 2015-11-02 18:32:55 +0000 | [diff] [blame] | 361 | case op_put_getter_setter_by_id: |
utatane.tea@gmail.com | f0153d0 | 2015-09-08 19:43:58 +0000 | [diff] [blame] | 362 | case op_put_getter_by_val: |
| 363 | case op_put_setter_by_val: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 364 | case op_put_by_val: |
| 365 | case op_put_by_val_direct: |
| 366 | case op_put_by_index: |
utatane.tea@gmail.com | f7db559 | 2016-10-04 19:31:24 +0000 | [diff] [blame] | 367 | case op_define_data_property: |
| 368 | case op_define_accessor_property: |
commit-queue@webkit.org | 2ed31ec | 2014-08-21 01:03:20 +0000 | [diff] [blame] | 369 | case op_profile_type: |
saambarati1@gmail.com | b4f28a5 | 2014-12-05 05:58:07 +0000 | [diff] [blame] | 370 | case op_profile_control_flow: |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 371 | case op_put_to_arguments: |
mark.lam@apple.com | 47c2f14 | 2016-03-16 18:16:32 +0000 | [diff] [blame] | 372 | case op_set_function_name: |
mark.lam@apple.com | 03916fe | 2017-02-28 01:20:54 +0000 | [diff] [blame] | 373 | case op_check_traps: |
fpizlo@apple.com | 39303e0 | 2016-04-05 22:17:35 +0000 | [diff] [blame] | 374 | case op_log_shadow_chicken_prologue: |
| 375 | case op_log_shadow_chicken_tail: |
utatane.tea@gmail.com | c258519 | 2016-08-25 22:55:10 +0000 | [diff] [blame] | 376 | case op_yield: |
sbarati@apple.com | 12cb945 | 2017-05-25 18:47:38 +0000 | [diff] [blame] | 377 | case op_nop: |
fpizlo@apple.com | f502684 | 2017-06-06 18:08:17 +0000 | [diff] [blame] | 378 | case op_unreachable: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 379 | #define LLINT_HELPER_OPCODES(opcode, length) case opcode: |
| 380 | FOR_EACH_LLINT_OPCODE_EXTENSION(LLINT_HELPER_OPCODES); |
| 381 | #undef LLINT_HELPER_OPCODES |
| 382 | return; |
| 383 | // These all have a single destination for the first argument. |
keith_miller@apple.com | 85aeabb | 2016-06-03 23:06:39 +0000 | [diff] [blame] | 384 | case op_argument_count: |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 385 | case op_to_index_string: |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 386 | case op_get_enumerable_length: |
| 387 | case op_has_indexed_property: |
| 388 | case op_has_structure_property: |
| 389 | case op_has_generic_property: |
| 390 | case op_get_direct_pname: |
msaboff@apple.com | b644c25 | 2015-03-24 10:05:21 +0000 | [diff] [blame] | 391 | case op_get_property_enumerator: |
| 392 | case op_enumerator_structure_pname: |
| 393 | case op_enumerator_generic_pname: |
saambarati1@gmail.com | 144f17c | 2015-07-15 21:41:08 +0000 | [diff] [blame] | 394 | case op_get_parent_scope: |
msaboff@apple.com | 5e62e3f | 2014-11-21 23:41:26 +0000 | [diff] [blame] | 395 | case op_push_with_scope: |
saambarati1@gmail.com | 144f17c | 2015-07-15 21:41:08 +0000 | [diff] [blame] | 396 | case op_create_lexical_environment: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 397 | case op_resolve_scope: |
gskachkov@gmail.com | 077d7d5 | 2017-04-30 08:06:23 +0000 | [diff] [blame] | 398 | case op_resolve_scope_for_hoisting_func_decl_in_eval: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 399 | case op_strcat: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 400 | case op_to_primitive: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 401 | case op_create_this: |
| 402 | case op_new_array: |
sbarati@apple.com | 99ed479 | 2016-11-12 02:58:11 +0000 | [diff] [blame] | 403 | case op_new_array_with_spread: |
| 404 | case op_spread: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 405 | case op_new_array_buffer: |
| 406 | case op_new_array_with_size: |
| 407 | case op_new_regexp: |
| 408 | case op_new_func: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 409 | case op_new_func_exp: |
utatane.tea@gmail.com | fdd9bf4 | 2015-12-02 03:16:28 +0000 | [diff] [blame] | 410 | case op_new_generator_func: |
| 411 | case op_new_generator_func_exp: |
gskachkov@gmail.com | ab749fd | 2017-08-23 17:05:33 +0000 | [diff] [blame] | 412 | case op_new_async_generator_func: |
| 413 | case op_new_async_generator_func_exp: |
caitp@igalia.com | 04d4f60 | 2016-10-28 16:37:38 +0000 | [diff] [blame] | 414 | case op_new_async_func: |
| 415 | case op_new_async_func_exp: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 416 | case op_call_varargs: |
msaboff@apple.com | c15ae7e | 2015-09-16 23:40:35 +0000 | [diff] [blame] | 417 | case op_tail_call_varargs: |
keith_miller@apple.com | e497e20 | 2016-06-13 21:05:36 +0000 | [diff] [blame] | 418 | case op_tail_call_forward_arguments: |
oliver@apple.com | 177c2b9 | 2014-03-28 01:10:25 +0000 | [diff] [blame] | 419 | case op_construct_varargs: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 420 | case op_get_from_scope: |
| 421 | case op_call: |
msaboff@apple.com | c15ae7e | 2015-09-16 23:40:35 +0000 | [diff] [blame] | 422 | case op_tail_call: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 423 | case op_call_eval: |
| 424 | case op_construct: |
keith_miller@apple.com | 8844d30 | 2016-04-07 19:38:00 +0000 | [diff] [blame] | 425 | case op_try_get_by_id: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 426 | case op_get_by_id: |
keith_miller@apple.com | 30e9026 | 2016-06-02 21:24:21 +0000 | [diff] [blame] | 427 | case op_get_by_id_proto_load: |
| 428 | case op_get_by_id_unset: |
sbarati@apple.com | 23315d6 | 2016-05-09 20:17:23 +0000 | [diff] [blame] | 429 | case op_get_by_id_with_this: |
| 430 | case op_get_by_val_with_this: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 431 | case op_get_array_length: |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 432 | case op_overrides_has_instance: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 433 | case op_instanceof: |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 434 | case op_instanceof_custom: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 435 | case op_get_by_val: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 436 | case op_typeof: |
keith_miller@apple.com | 591a67d | 2017-08-15 04:18:56 +0000 | [diff] [blame] | 437 | case op_identity_with_profile: |
gskachkov@gmail.com | 086f8f6 | 2016-04-26 18:40:41 +0000 | [diff] [blame] | 438 | case op_is_empty: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 439 | case op_is_undefined: |
| 440 | case op_is_boolean: |
| 441 | case op_is_number: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 442 | case op_is_object: |
utatane.tea@gmail.com | 0bfb74c | 2015-02-24 23:01:58 +0000 | [diff] [blame] | 443 | case op_is_object_or_null: |
utatane.tea@gmail.com | 3634afe | 2016-09-19 17:00:25 +0000 | [diff] [blame] | 444 | case op_is_cell_with_type: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 445 | case op_is_function: |
| 446 | case op_in: |
| 447 | case op_to_number: |
utatane.tea@gmail.com | 4014aea | 2015-04-27 00:27:28 +0000 | [diff] [blame] | 448 | case op_to_string: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 449 | case op_negate: |
| 450 | case op_add: |
| 451 | case op_mul: |
| 452 | case op_div: |
| 453 | case op_mod: |
| 454 | case op_sub: |
utatane.tea@gmail.com | e990638 | 2016-07-21 07:33:28 +0000 | [diff] [blame] | 455 | case op_pow: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 456 | case op_lshift: |
| 457 | case op_rshift: |
| 458 | case op_urshift: |
| 459 | case op_bitand: |
| 460 | case op_bitxor: |
| 461 | case op_bitor: |
| 462 | case op_inc: |
| 463 | case op_dec: |
| 464 | case op_eq: |
| 465 | case op_neq: |
| 466 | case op_stricteq: |
| 467 | case op_nstricteq: |
| 468 | case op_less: |
| 469 | case op_lesseq: |
| 470 | case op_greater: |
| 471 | case op_greatereq: |
utatane.tea@gmail.com | fcab24f | 2017-09-27 18:51:12 +0000 | [diff] [blame^] | 472 | case op_below: |
| 473 | case op_beloweq: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 474 | case op_neq_null: |
| 475 | case op_eq_null: |
| 476 | case op_not: |
| 477 | case op_mov: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 478 | case op_new_object: |
| 479 | case op_to_this: |
rniwa@webkit.org | eb7ac19 | 2015-03-13 01:11:15 +0000 | [diff] [blame] | 480 | case op_check_tdz: |
msaboff@apple.com | 8b6b341 | 2014-11-04 03:36:28 +0000 | [diff] [blame] | 481 | case op_get_scope: |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 482 | case op_create_direct_arguments: |
| 483 | case op_create_scoped_arguments: |
keith_miller@apple.com | 2636739 | 2016-03-14 20:55:15 +0000 | [diff] [blame] | 484 | case op_create_cloned_arguments: |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 485 | case op_del_by_id: |
fpizlo@apple.com | 9089acb | 2013-12-14 06:33:42 +0000 | [diff] [blame] | 486 | case op_del_by_val: |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 487 | case op_unsigned: |
sbarati@apple.com | 855d560 | 2015-11-30 20:36:54 +0000 | [diff] [blame] | 488 | case op_get_from_arguments: |
utatane.tea@gmail.com | bebf785 | 2016-11-10 06:34:05 +0000 | [diff] [blame] | 489 | case op_get_argument: |
sbarati@apple.com | 6cfefd8 | 2016-08-13 02:14:42 +0000 | [diff] [blame] | 490 | case op_create_rest: |
sbarati@apple.com | 855d560 | 2015-11-30 20:36:54 +0000 | [diff] [blame] | 491 | case op_get_rest_length: { |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 492 | ASSERT(opcodeLengths[opcodeID] > 1); |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 493 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 494 | return; |
| 495 | } |
saambarati1@gmail.com | 144f17c | 2015-07-15 21:41:08 +0000 | [diff] [blame] | 496 | case op_catch: { |
keith_miller@apple.com | cb11fe4 | 2015-12-18 00:37:35 +0000 | [diff] [blame] | 497 | ASSERT(opcodeLengths[opcodeID] > 2); |
msaboff@apple.com | 5e62e3f | 2014-11-21 23:41:26 +0000 | [diff] [blame] | 498 | functor(codeBlock, instruction, opcodeID, instruction[1].u.operand); |
| 499 | functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); |
| 500 | return; |
| 501 | } |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 502 | case op_enter: { |
| 503 | for (unsigned i = codeBlock->m_numVars; i--;) |
| 504 | functor(codeBlock, instruction, opcodeID, virtualRegisterForLocal(i).offset()); |
| 505 | return; |
utatane.tea@gmail.com | fdd9bf4 | 2015-12-02 03:16:28 +0000 | [diff] [blame] | 506 | } |
utatane.tea@gmail.com | fdd9bf4 | 2015-12-02 03:16:28 +0000 | [diff] [blame] | 507 | } |
fpizlo@apple.com | 0309686b | 2013-12-02 19:49:43 +0000 | [diff] [blame] | 508 | } |
| 509 | |
| 510 | } // namespace JSC |