Changeset 131516 in webkit for trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
- Timestamp:
- Oct 16, 2012, 3:28:32 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r131276 r131516 816 816 end 817 817 818 macro resolveGlobal(size, slow)819 # Operands are as follows:820 # 8[PB, PC, 8] Destination for the load.821 # 16[PB, PC, 8] Property identifier index in the code block.822 # 24[PB, PC, 8] Structure pointer, initialized to 0 by bytecode generator.823 # 32[PB, PC, 8] Offset in global object, initialized to 0 by bytecode generator.824 loadp CodeBlock[cfr], t0825 loadp CodeBlock::m_globalObject[t0], t0826 loadp JSCell::m_structure[t0], t1827 bpneq t1, 24[PB, PC, 8], slow828 loadis 32[PB, PC, 8], t1829 loadPropertyAtVariableOffsetKnownNotInline(t1, t0, t2)830 loadis 8[PB, PC, 8], t0831 storep t2, [cfr, t0, 8]832 loadp (size - 1) * 8[PB, PC, 8], t0833 valueProfile(t2, t0)834 end835 836 _llint_op_resolve_global:837 traceExecution()838 resolveGlobal(6, .opResolveGlobalSlow)839 dispatch(6)840 841 .opResolveGlobalSlow:842 callSlowPath(_llint_slow_path_resolve_global)843 dispatch(6)844 845 846 # Gives you the scope in t0, while allowing you to optionally perform additional checks on the847 # scopes as they are traversed. scopeCheck() is called with two arguments: the register848 # holding the scope, and a register that can be used for scratch. Note that this does not849 # use t3, so you can hold stuff in t3 if need be.850 macro getScope(deBruijinIndexOperand, scopeCheck)851 loadp ScopeChain[cfr], t0852 loadis deBruijinIndexOperand, t2853 854 btiz t2, .done855 856 loadp CodeBlock[cfr], t1857 bineq CodeBlock::m_codeType[t1], FunctionCode, .loop858 btbz CodeBlock::m_needsFullScopeChain[t1], .loop859 860 loadis CodeBlock::m_activationRegister[t1], t1861 862 # Need to conditionally skip over one scope.863 btpz [cfr, t1, 8], .noActivation864 scopeCheck(t0, t1)865 loadp JSScope::m_next[t0], t0866 .noActivation:867 subi 1, t2868 869 btiz t2, .done870 .loop:871 scopeCheck(t0, t1)872 loadp JSScope::m_next[t0], t0873 subi 1, t2874 btinz t2, .loop875 876 .done:877 end878 879 _llint_op_resolve_global_dynamic:880 traceExecution()881 loadp CodeBlock[cfr], t3882 loadp CodeBlock::m_globalObject[t3], t3883 loadp JSGlobalObject::m_activationStructure[t3], t3884 getScope(885 40[PB, PC, 8],886 macro (scope, scratch)887 bpneq JSCell::m_structure[scope], t3, .opResolveGlobalDynamicSuperSlow888 end)889 resolveGlobal(7, .opResolveGlobalDynamicSlow)890 dispatch(7)891 892 .opResolveGlobalDynamicSuperSlow:893 callSlowPath(_llint_slow_path_resolve_for_resolve_global_dynamic)894 dispatch(7)895 896 .opResolveGlobalDynamicSlow:897 callSlowPath(_llint_slow_path_resolve_global_dynamic)898 dispatch(7)899 900 901 _llint_op_get_scoped_var:902 traceExecution()903 # Operands are as follows:904 # 8[PB, PC, 8] Destination for the load905 # 16[PB, PC, 8] Index of register in the scope906 # 24[PB, PC, 8] De Bruijin index.907 getScope(24[PB, PC, 8], macro (scope, scratch) end)908 loadis 8[PB, PC, 8], t1909 loadis 16[PB, PC, 8], t2910 loadp JSVariableObject::m_registers[t0], t0911 loadp [t0, t2, 8], t3912 storep t3, [cfr, t1, 8]913 loadp 32[PB, PC, 8], t1914 valueProfile(t3, t1)915 dispatch(5)916 917 918 _llint_op_put_scoped_var:919 traceExecution()920 getScope(16[PB, PC, 8], macro (scope, scratch) end)921 loadis 24[PB, PC, 8], t1922 loadConstantOrVariable(t1, t3)923 loadis 8[PB, PC, 8], t1924 writeBarrier(t3)925 loadp JSVariableObject::m_registers[t0], t0926 storep t3, [t0, t1, 8]927 dispatch(4)928 929 930 macro getGlobalVar(size)931 traceExecution()932 loadp 16[PB, PC, 8], t0933 loadis 8[PB, PC, 8], t3934 loadp [t0], t1935 storep t1, [cfr, t3, 8]936 loadp (size - 1) * 8[PB, PC, 8], t0937 valueProfile(t1, t0)938 dispatch(size)939 end940 941 _llint_op_get_global_var:942 getGlobalVar(4)943 944 945 _llint_op_get_global_var_watchable:946 getGlobalVar(5)947 948 949 818 _llint_op_init_global_const: 950 _llint_op_put_global_var:951 819 traceExecution() 952 820 loadis 16[PB, PC, 8], t1 … … 959 827 960 828 _llint_op_init_global_const_check: 961 _llint_op_put_global_var_check:962 829 traceExecution() 963 830 loadp 24[PB, PC, 8], t2 964 831 loadis 16[PB, PC, 8], t1 965 832 loadp 8[PB, PC, 8], t0 966 btbnz [t2], .op PutGlobalVarCheckSlow833 btbnz [t2], .opInitGlobalConstCheckSlow 967 834 loadConstantOrVariable(t1, t2) 968 835 writeBarrier(t2) 969 836 storep t2, [t0] 970 837 dispatch(5) 971 .op PutGlobalVarCheckSlow:972 callSlowPath(_llint_slow_path_ put_global_var_check)838 .opInitGlobalConstCheckSlow: 839 callSlowPath(_llint_slow_path_init_global_const_check) 973 840 dispatch(5) 974 975 841 976 842 macro getById(getPropertyStorage)
Note:
See TracChangeset
for help on using the changeset viewer.