| 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 3110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3121 name, &miss); | 3121 name, &miss); |
| 3122 __ bind(&miss); | 3122 __ bind(&miss); |
| 3123 __ DecrementCounter(counters->keyed_load_interceptor(), 1); | 3123 __ DecrementCounter(counters->keyed_load_interceptor(), 1); |
| 3124 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 3124 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
| 3125 | 3125 |
| 3126 // Return the generated code. | 3126 // Return the generated code. |
| 3127 return GetCode(Code::INTERCEPTOR, name); | 3127 return GetCode(Code::INTERCEPTOR, name); |
| 3128 } | 3128 } |
| 3129 | 3129 |
| 3130 | 3130 |
| 3131 Handle<Code> KeyedLoadStubCompiler::CompileLoadArrayLength( | |
| 3132 Handle<String> name) { | |
| 3133 // ----------- S t a t e ------------- | |
| 3134 // -- rax : key | |
| 3135 // -- rdx : receiver | |
| 3136 // -- rsp[0] : return address | |
| 3137 // ----------------------------------- | |
| 3138 Label miss; | |
| 3139 | |
| 3140 Counters* counters = isolate()->counters(); | |
| 3141 __ IncrementCounter(counters->keyed_load_array_length(), 1); | |
| 3142 | |
| 3143 // Check that the name has not changed. | |
| 3144 __ Cmp(rax, name); | |
| 3145 __ j(not_equal, &miss); | |
| 3146 | |
| 3147 GenerateLoadArrayLength(masm(), rdx, rcx, &miss); | |
| 3148 __ bind(&miss); | |
| 3149 __ DecrementCounter(counters->keyed_load_array_length(), 1); | |
| 3150 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | |
| 3151 | |
| 3152 // Return the generated code. | |
| 3153 return GetCode(Code::CALLBACKS, name); | |
| 3154 } | |
| 3155 | |
| 3156 | |
| 3157 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype( | 3131 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype( |
| 3158 Handle<String> name) { | 3132 Handle<String> name) { |
| 3159 // ----------- S t a t e ------------- | 3133 // ----------- S t a t e ------------- |
| 3160 // -- rax : key | 3134 // -- rax : key |
| 3161 // -- rdx : receiver | 3135 // -- rdx : receiver |
| 3162 // -- rsp[0] : return address | 3136 // -- rsp[0] : return address |
| 3163 // ----------------------------------- | 3137 // ----------------------------------- |
| 3164 Label miss; | 3138 Label miss; |
| 3165 | 3139 |
| 3166 Counters* counters = isolate()->counters(); | 3140 Counters* counters = isolate()->counters(); |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3906 __ jmp(ic_slow, RelocInfo::CODE_TARGET); | 3880 __ jmp(ic_slow, RelocInfo::CODE_TARGET); |
| 3907 } | 3881 } |
| 3908 } | 3882 } |
| 3909 | 3883 |
| 3910 | 3884 |
| 3911 #undef __ | 3885 #undef __ |
| 3912 | 3886 |
| 3913 } } // namespace v8::internal | 3887 } } // namespace v8::internal |
| 3914 | 3888 |
| 3915 #endif // V8_TARGET_ARCH_X64 | 3889 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |