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 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3334 GenerateLoadArrayLength(masm(), edx, eax, &miss); | 3334 GenerateLoadArrayLength(masm(), edx, eax, &miss); |
3335 __ bind(&miss); | 3335 __ bind(&miss); |
3336 __ DecrementCounter(counters->keyed_load_array_length(), 1); | 3336 __ DecrementCounter(counters->keyed_load_array_length(), 1); |
3337 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 3337 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
3338 | 3338 |
3339 // Return the generated code. | 3339 // Return the generated code. |
3340 return GetCode(Code::CALLBACKS, name); | 3340 return GetCode(Code::CALLBACKS, name); |
3341 } | 3341 } |
3342 | 3342 |
3343 | 3343 |
3344 Handle<Code> KeyedLoadStubCompiler::CompileLoadStringLength( | |
3345 Handle<String> name) { | |
3346 // ----------- S t a t e ------------- | |
3347 // -- ecx : key | |
3348 // -- edx : receiver | |
3349 // -- esp[0] : return address | |
3350 // ----------------------------------- | |
3351 Label miss; | |
3352 | |
3353 Counters* counters = isolate()->counters(); | |
3354 __ IncrementCounter(counters->keyed_load_string_length(), 1); | |
3355 | |
3356 // Check that the name has not changed. | |
3357 __ cmp(ecx, Immediate(name)); | |
3358 __ j(not_equal, &miss); | |
3359 | |
3360 GenerateLoadStringLength(masm(), edx, eax, ebx, &miss, true); | |
3361 __ bind(&miss); | |
3362 __ DecrementCounter(counters->keyed_load_string_length(), 1); | |
3363 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | |
3364 | |
3365 // Return the generated code. | |
3366 return GetCode(Code::CALLBACKS, name); | |
3367 } | |
3368 | |
3369 | |
3370 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype( | 3344 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype( |
3371 Handle<String> name) { | 3345 Handle<String> name) { |
3372 // ----------- S t a t e ------------- | 3346 // ----------- S t a t e ------------- |
3373 // -- ecx : key | 3347 // -- ecx : key |
3374 // -- edx : receiver | 3348 // -- edx : receiver |
3375 // -- esp[0] : return address | 3349 // -- esp[0] : return address |
3376 // ----------------------------------- | 3350 // ----------------------------------- |
3377 Label miss; | 3351 Label miss; |
3378 | 3352 |
3379 Counters* counters = isolate()->counters(); | 3353 Counters* counters = isolate()->counters(); |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4164 __ jmp(ic_slow, RelocInfo::CODE_TARGET); | 4138 __ jmp(ic_slow, RelocInfo::CODE_TARGET); |
4165 } | 4139 } |
4166 } | 4140 } |
4167 | 4141 |
4168 | 4142 |
4169 #undef __ | 4143 #undef __ |
4170 | 4144 |
4171 } } // namespace v8::internal | 4145 } } // namespace v8::internal |
4172 | 4146 |
4173 #endif // V8_TARGET_ARCH_IA32 | 4147 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |