Bug in StoreIC::GenerateMegamorphic: strict_mode/extra_ic_state mismatch.

When computing the code flags for a megamorphic store IC, we mistakenly
passed a strict_mode variable when an ExtraICState was expected.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/98633005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 37e2c7e5
......@@ -1503,7 +1503,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
StrictModeFlag strict_mode) {
ExtraICState extra_ic_state) {
// ----------- S t a t e -------------
// -- r0 : value
// -- r1 : receiver
......@@ -1513,7 +1513,7 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
// Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::ComputeFlags(
Code::HANDLER, MONOMORPHIC, strict_mode,
Code::HANDLER, MONOMORPHIC, extra_ic_state,
Code::NORMAL, Code::STORE_IC);
masm->isolate()->stub_cache()->GenerateProbe(
......
......@@ -1412,12 +1412,14 @@ static void Generate_StoreIC_Normal(MacroAssembler* masm) {
static void Generate_StoreIC_Megamorphic(MacroAssembler* masm) {
StoreIC::GenerateMegamorphic(masm, kNonStrictMode);
StoreIC::GenerateMegamorphic(masm,
StoreIC::ComputeExtraICState(kNonStrictMode));
}
static void Generate_StoreIC_Megamorphic_Strict(MacroAssembler* masm) {
StoreIC::GenerateMegamorphic(masm, kStrictMode);
StoreIC::GenerateMegamorphic(masm,
StoreIC::ComputeExtraICState(kStrictMode));
}
......
......@@ -1435,16 +1435,15 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
StrictModeFlag strict_mode) {
ExtraICState extra_ic_state) {
// ----------- S t a t e -------------
// -- eax : value
// -- ecx : name
// -- edx : receiver
// -- esp[0] : return address
// -----------------------------------
Code::Flags flags = Code::ComputeFlags(
Code::HANDLER, MONOMORPHIC, strict_mode,
Code::HANDLER, MONOMORPHIC, extra_ic_state,
Code::NORMAL, Code::STORE_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, edx, ecx, ebx, no_reg);
......
......@@ -595,7 +595,7 @@ class StoreIC: public IC {
}
static void GenerateMiss(MacroAssembler* masm);
static void GenerateMegamorphic(MacroAssembler* masm,
StrictModeFlag strict_mode);
ExtraICState extra_ic_state);
static void GenerateNormal(MacroAssembler* masm);
static void GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictModeFlag strict_mode);
......
......@@ -1514,7 +1514,7 @@ void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
StrictModeFlag strict_mode) {
ExtraICState extra_ic_state) {
// ----------- S t a t e -------------
// -- a0 : value
// -- a1 : receiver
......@@ -1524,7 +1524,7 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
// Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::ComputeFlags(
Code::HANDLER, MONOMORPHIC, strict_mode,
Code::HANDLER, MONOMORPHIC, extra_ic_state,
Code::NORMAL, Code::STORE_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, a1, a2, a3, t0, t1, t2);
......
......@@ -1463,7 +1463,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
StrictModeFlag strict_mode) {
ExtraICState extra_ic_state) {
// ----------- S t a t e -------------
// -- rax : value
// -- rcx : name
......@@ -1473,7 +1473,7 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
// Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::ComputeFlags(
Code::HANDLER, MONOMORPHIC, strict_mode,
Code::HANDLER, MONOMORPHIC, extra_ic_state,
Code::NORMAL, Code::STORE_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, rdx, rcx, rbx, no_reg);
......
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