Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1401)

Side by Side Diff: src/ia32/codegen-ia32.cc

Issue 2822003: Remove direct reference from builtins code to global object. Load the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/x64/codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698