| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 6891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6902 __ cmp(key_, CodeGenerator::FixedArrayElementOperand(cache_, dst_)); | 6902 __ cmp(key_, CodeGenerator::FixedArrayElementOperand(cache_, dst_)); |
| 6903 __ j(not_equal, &second_loop); | 6903 __ j(not_equal, &second_loop); |
| 6904 | 6904 |
| 6905 __ mov(FieldOperand(cache_, JSFunctionResultCache::kFingerOffset), dst_); | 6905 __ mov(FieldOperand(cache_, JSFunctionResultCache::kFingerOffset), dst_); |
| 6906 __ mov(dst_, CodeGenerator::FixedArrayElementOperand(cache_, dst_, 1)); | 6906 __ mov(dst_, CodeGenerator::FixedArrayElementOperand(cache_, dst_, 1)); |
| 6907 __ jmp(exit_label()); | 6907 __ jmp(exit_label()); |
| 6908 | 6908 |
| 6909 __ bind(&cache_miss); | 6909 __ bind(&cache_miss); |
| 6910 __ push(cache_); // store a reference to cache | 6910 __ push(cache_); // store a reference to cache |
| 6911 __ push(key_); // store a key | 6911 __ push(key_); // store a key |
| 6912 Handle<Object> receiver(Top::global_context()->global()); | 6912 __ push(Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX))); |
| 6913 __ push(Immediate(receiver)); | |
| 6914 __ push(key_); | 6913 __ push(key_); |
| 6915 // On ia32 function must be in edi. | 6914 // On ia32 function must be in edi. |
| 6916 __ mov(edi, FieldOperand(cache_, JSFunctionResultCache::kFactoryOffset)); | 6915 __ mov(edi, FieldOperand(cache_, JSFunctionResultCache::kFactoryOffset)); |
| 6917 ParameterCount expected(1); | 6916 ParameterCount expected(1); |
| 6918 __ InvokeFunction(edi, expected, CALL_FUNCTION); | 6917 __ InvokeFunction(edi, expected, CALL_FUNCTION); |
| 6919 | 6918 |
| 6920 // Find a place to put new cached value into. | 6919 // Find a place to put new cached value into. |
| 6921 Label add_new_entry, update_cache; | 6920 Label add_new_entry, update_cache; |
| 6922 __ mov(ecx, Operand(esp, kPointerSize)); // restore the cache | 6921 __ mov(ecx, Operand(esp, kPointerSize)); // restore the cache |
| 6923 // Possible optimization: cache size is constant for the given cache | 6922 // Possible optimization: cache size is constant for the given cache |
| (...skipping 6777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13701 masm.GetCode(&desc); | 13700 masm.GetCode(&desc); |
| 13702 // Call the function from C++. | 13701 // Call the function from C++. |
| 13703 return FUNCTION_CAST<MemCopyFunction>(buffer); | 13702 return FUNCTION_CAST<MemCopyFunction>(buffer); |
| 13704 } | 13703 } |
| 13705 | 13704 |
| 13706 #undef __ | 13705 #undef __ |
| 13707 | 13706 |
| 13708 } } // namespace v8::internal | 13707 } } // namespace v8::internal |
| 13709 | 13708 |
| 13710 #endif // V8_TARGET_ARCH_IA32 | 13709 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |