OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3147 GenerateLoadArrayLength(masm(), rdx, rcx, &miss); | 3147 GenerateLoadArrayLength(masm(), rdx, rcx, &miss); |
3148 __ bind(&miss); | 3148 __ bind(&miss); |
3149 __ DecrementCounter(counters->keyed_load_array_length(), 1); | 3149 __ DecrementCounter(counters->keyed_load_array_length(), 1); |
3150 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 3150 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
3151 | 3151 |
3152 // Return the generated code. | 3152 // Return the generated code. |
3153 return GetCode(Code::CALLBACKS, name); | 3153 return GetCode(Code::CALLBACKS, name); |
3154 } | 3154 } |
3155 | 3155 |
3156 | 3156 |
3157 Handle<Code> KeyedLoadStubCompiler::CompileLoadStringLength( | |
3158 Handle<String> name) { | |
3159 // ----------- S t a t e ------------- | |
3160 // -- rax : key | |
3161 // -- rdx : receiver | |
3162 // -- rsp[0] : return address | |
3163 // ----------------------------------- | |
3164 Label miss; | |
3165 | |
3166 Counters* counters = isolate()->counters(); | |
3167 __ IncrementCounter(counters->keyed_load_string_length(), 1); | |
3168 | |
3169 // Check that the name has not changed. | |
3170 __ Cmp(rax, name); | |
3171 __ j(not_equal, &miss); | |
3172 | |
3173 GenerateLoadStringLength(masm(), rdx, rcx, rbx, &miss, true); | |
3174 __ bind(&miss); | |
3175 __ DecrementCounter(counters->keyed_load_string_length(), 1); | |
3176 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | |
3177 | |
3178 // Return the generated code. | |
3179 return GetCode(Code::CALLBACKS, name); | |
3180 } | |
3181 | |
3182 | |
3183 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype( | 3157 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype( |
3184 Handle<String> name) { | 3158 Handle<String> name) { |
3185 // ----------- S t a t e ------------- | 3159 // ----------- S t a t e ------------- |
3186 // -- rax : key | 3160 // -- rax : key |
3187 // -- rdx : receiver | 3161 // -- rdx : receiver |
3188 // -- rsp[0] : return address | 3162 // -- rsp[0] : return address |
3189 // ----------------------------------- | 3163 // ----------------------------------- |
3190 Label miss; | 3164 Label miss; |
3191 | 3165 |
3192 Counters* counters = isolate()->counters(); | 3166 Counters* counters = isolate()->counters(); |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3932 __ jmp(ic_slow, RelocInfo::CODE_TARGET); | 3906 __ jmp(ic_slow, RelocInfo::CODE_TARGET); |
3933 } | 3907 } |
3934 } | 3908 } |
3935 | 3909 |
3936 | 3910 |
3937 #undef __ | 3911 #undef __ |
3938 | 3912 |
3939 } } // namespace v8::internal | 3913 } } // namespace v8::internal |
3940 | 3914 |
3941 #endif // V8_TARGET_ARCH_X64 | 3915 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |