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 3775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3786 Register cache = ebx; | 3786 Register cache = ebx; |
3787 Register tmp = ecx; | 3787 Register tmp = ecx; |
3788 __ mov(cache, ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX)); | 3788 __ mov(cache, ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX)); |
3789 __ mov(cache, | 3789 __ mov(cache, |
3790 FieldOperand(cache, GlobalObject::kNativeContextOffset)); | 3790 FieldOperand(cache, GlobalObject::kNativeContextOffset)); |
3791 __ mov(cache, ContextOperand(cache, Context::JSFUNCTION_RESULT_CACHES_INDEX)); | 3791 __ mov(cache, ContextOperand(cache, Context::JSFUNCTION_RESULT_CACHES_INDEX)); |
3792 __ mov(cache, | 3792 __ mov(cache, |
3793 FieldOperand(cache, FixedArray::OffsetOfElementAt(cache_id))); | 3793 FieldOperand(cache, FixedArray::OffsetOfElementAt(cache_id))); |
3794 | 3794 |
3795 Label done, not_found; | 3795 Label done, not_found; |
3796 // tmp now holds finger offset as a smi. | |
3797 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize == 1); | 3796 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize == 1); |
3798 __ mov(tmp, FieldOperand(cache, JSFunctionResultCache::kFingerOffset)); | 3797 __ mov(tmp, FieldOperand(cache, JSFunctionResultCache::kFingerOffset)); |
3799 __ cmp(key, CodeGenerator::FixedArrayElementOperand(cache, tmp)); | 3798 // tmp now holds finger offset as a smi. |
| 3799 __ cmp(key, FixedArrayElementOperand(cache, tmp)); |
3800 __ j(not_equal, ¬_found); | 3800 __ j(not_equal, ¬_found); |
3801 | 3801 |
3802 __ mov(eax, CodeGenerator::FixedArrayElementOperand(cache, tmp, 1)); | 3802 __ mov(eax, FixedArrayElementOperand(cache, tmp, 1)); |
3803 __ jmp(&done); | 3803 __ jmp(&done); |
3804 | 3804 |
3805 __ bind(¬_found); | 3805 __ bind(¬_found); |
3806 // Call runtime to perform the lookup. | 3806 // Call runtime to perform the lookup. |
3807 __ push(cache); | 3807 __ push(cache); |
3808 __ push(key); | 3808 __ push(key); |
3809 __ CallRuntime(Runtime::kGetFromCache, 2); | 3809 __ CallRuntime(Runtime::kGetFromCache, 2); |
3810 | 3810 |
3811 __ bind(&done); | 3811 __ bind(&done); |
3812 context()->Plug(eax); | 3812 context()->Plug(eax); |
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4912 | 4912 |
4913 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4913 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4914 Assembler::target_address_at(call_target_address)); | 4914 Assembler::target_address_at(call_target_address)); |
4915 return OSR_AFTER_STACK_CHECK; | 4915 return OSR_AFTER_STACK_CHECK; |
4916 } | 4916 } |
4917 | 4917 |
4918 | 4918 |
4919 } } // namespace v8::internal | 4919 } } // namespace v8::internal |
4920 | 4920 |
4921 #endif // V8_TARGET_ARCH_IA32 | 4921 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |