Revision: 18202
Author:   [email protected]
Date:     Mon Dec  2 15:38:50 2013 UTC
Log: 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.

[email protected]

Review URL: https://codereview.chromium.org/98633005
http://code.google.com/p/v8/source/detail?r=18202

Modified:
 /branches/bleeding_edge/src/arm/ic-arm.cc
 /branches/bleeding_edge/src/builtins.cc
 /branches/bleeding_edge/src/ia32/ic-ia32.cc
 /branches/bleeding_edge/src/ic.h
 /branches/bleeding_edge/src/mips/ic-mips.cc
 /branches/bleeding_edge/src/x64/ic-x64.cc

=======================================
--- /branches/bleeding_edge/src/arm/ic-arm.cc   Thu Nov 28 15:32:55 2013 UTC
+++ /branches/bleeding_edge/src/arm/ic-arm.cc   Mon Dec  2 15:38:50 2013 UTC
@@ -1503,7 +1503,7 @@


 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 @@

   // 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(
=======================================
--- /branches/bleeding_edge/src/builtins.cc     Mon Dec  2 09:51:37 2013 UTC
+++ /branches/bleeding_edge/src/builtins.cc     Mon Dec  2 15:38:50 2013 UTC
@@ -1412,12 +1412,14 @@


 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));
 }


=======================================
--- /branches/bleeding_edge/src/ia32/ic-ia32.cc Thu Nov 28 15:32:55 2013 UTC
+++ /branches/bleeding_edge/src/ia32/ic-ia32.cc Mon Dec  2 15:38:50 2013 UTC
@@ -1435,16 +1435,15 @@


 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);
=======================================
--- /branches/bleeding_edge/src/ic.h    Mon Dec  2 13:14:07 2013 UTC
+++ /branches/bleeding_edge/src/ic.h    Mon Dec  2 15:38:50 2013 UTC
@@ -595,7 +595,7 @@
   }
   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);
=======================================
--- /branches/bleeding_edge/src/mips/ic-mips.cc Thu Nov 28 15:32:55 2013 UTC
+++ /branches/bleeding_edge/src/mips/ic-mips.cc Mon Dec  2 15:38:50 2013 UTC
@@ -1514,7 +1514,7 @@


 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 @@

   // 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);
=======================================
--- /branches/bleeding_edge/src/x64/ic-x64.cc   Thu Nov 28 15:32:55 2013 UTC
+++ /branches/bleeding_edge/src/x64/ic-x64.cc   Mon Dec  2 15:38:50 2013 UTC
@@ -1463,7 +1463,7 @@


 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 @@

   // 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);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to