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

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

Issue 92067: 2nd try at fixing coverage of inline keyed access on IA32. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 5255 matching lines...) Expand 10 before | Expand all | Expand 10 after
5266 // KeyedLoadIC stubs in other places. 5266 // KeyedLoadIC stubs in other places.
5267 RelocInfo::Mode mode = is_global_ 5267 RelocInfo::Mode mode = is_global_
5268 ? RelocInfo::CODE_TARGET_CONTEXT 5268 ? RelocInfo::CODE_TARGET_CONTEXT
5269 : RelocInfo::CODE_TARGET; 5269 : RelocInfo::CODE_TARGET;
5270 Result value = cgen->frame()->CallKeyedLoadIC(mode); 5270 Result value = cgen->frame()->CallKeyedLoadIC(mode);
5271 // The result needs to be specifically the eax register because the 5271 // The result needs to be specifically the eax register because the
5272 // offset to the patch site will be expected in a test eax 5272 // offset to the patch site will be expected in a test eax
5273 // instruction. 5273 // instruction.
5274 ASSERT(value.is_register() && value.reg().is(eax)); 5274 ASSERT(value.is_register() && value.reg().is(eax));
5275 // The delta from the start of the map-compare instruction to the 5275 // The delta from the start of the map-compare instruction to the
5276 // test eax instruction. We use masm_ directly here instead of the 5276 // test instruction. We use masm_ directly here instead of the
5277 // double underscore macro because the macro sometimes uses macro 5277 // double underscore macro because the macro sometimes uses macro
5278 // expansion to turn into something that can't return a value. This 5278 // expansion to turn into something that can't return a value. This
5279 // is encountered when doing generated code coverage tests. 5279 // is encountered when doing generated code coverage tests.
5280 int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(patch_site()); 5280 int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(patch_site());
5281 __ test(value.reg(), Immediate(-delta_to_patch_site)); 5281 // Here we use masm_-> instead of the double underscore macro because this
5282 // is the instruction that gets patched and coverage code gets in the way.
5283 masm_->test(value.reg(), Immediate(-delta_to_patch_site));
5282 __ IncrementCounter(&Counters::keyed_load_inline_miss, 1); 5284 __ IncrementCounter(&Counters::keyed_load_inline_miss, 1);
5283 5285
5284 // The receiver and key were spilled by the call, so their state as 5286 // The receiver and key were spilled by the call, so their state as
5285 // constants or copies has been changed. Thus, they need to be 5287 // constants or copies has been changed. Thus, they need to be
5286 // "mergable" in the block at the exit label and are therefore 5288 // "mergable" in the block at the exit label and are therefore
5287 // passed as return results here. 5289 // passed as return results here.
5288 key = cgen->frame()->Pop(); 5290 key = cgen->frame()->Pop();
5289 receiver = cgen->frame()->Pop(); 5291 receiver = cgen->frame()->Pop();
5290 exit_.Jump(&receiver, &key, &value); 5292 exit_.Jump(&receiver, &key, &value);
5291 } 5293 }
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
7119 7121
7120 // Slow-case: Go through the JavaScript implementation. 7122 // Slow-case: Go through the JavaScript implementation.
7121 __ bind(&slow); 7123 __ bind(&slow);
7122 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); 7124 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION);
7123 } 7125 }
7124 7126
7125 7127
7126 #undef __ 7128 #undef __
7127 7129
7128 } } // namespace v8::internal 7130 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698