Commit e5a1973d authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

2nd try at fixing coverage of inline keyed access on IA32.

Review URL: http://codereview.chromium.org/92067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 35e78919
...@@ -5273,12 +5273,14 @@ void DeferredReferenceGetKeyedValue::Generate() { ...@@ -5273,12 +5273,14 @@ void DeferredReferenceGetKeyedValue::Generate() {
// instruction. // instruction.
ASSERT(value.is_register() && value.reg().is(eax)); ASSERT(value.is_register() && value.reg().is(eax));
// The delta from the start of the map-compare instruction to the // The delta from the start of the map-compare instruction to the
// test eax instruction. We use masm_ directly here instead of the // test instruction. We use masm_ directly here instead of the
// double underscore macro because the macro sometimes uses macro // double underscore macro because the macro sometimes uses macro
// expansion to turn into something that can't return a value. This // expansion to turn into something that can't return a value. This
// is encountered when doing generated code coverage tests. // is encountered when doing generated code coverage tests.
int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(patch_site()); int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(patch_site());
__ test(value.reg(), Immediate(-delta_to_patch_site)); // Here we use masm_-> instead of the double underscore macro because this
// is the instruction that gets patched and coverage code gets in the way.
masm_->test(value.reg(), Immediate(-delta_to_patch_site));
__ IncrementCounter(&Counters::keyed_load_inline_miss, 1); __ IncrementCounter(&Counters::keyed_load_inline_miss, 1);
// The receiver and key were spilled by the call, so their state as // The receiver and key were spilled by the call, so their state as
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment