Revision: 19385
Author:   [email protected]
Date:     Fri Feb 14 15:17:26 2014 UTC
Log: Remove HandlerKindField and just encode the handlerkind as the only extra-ic-state.

[email protected]

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

Modified:
 /branches/bleeding_edge/src/a64/ic-a64.cc
 /branches/bleeding_edge/src/arm/ic-arm.cc
 /branches/bleeding_edge/src/code-stubs.h
 /branches/bleeding_edge/src/ia32/ic-ia32.cc
 /branches/bleeding_edge/src/ic.h
 /branches/bleeding_edge/src/objects-inl.h
 /branches/bleeding_edge/src/objects.h
 /branches/bleeding_edge/src/stub-cache.cc
 /branches/bleeding_edge/src/x64/ic-x64.cc

=======================================
--- /branches/bleeding_edge/src/a64/ic-a64.cc   Fri Feb 14 15:15:08 2014 UTC
+++ /branches/bleeding_edge/src/a64/ic-a64.cc   Fri Feb 14 15:17:26 2014 UTC
@@ -426,8 +426,7 @@
 }


-void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
-                                 ExtraICState extra_state) {
+void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
   // ----------- S t a t e -------------
   //  -- x2    : name
   //  -- lr    : return address
@@ -435,7 +434,7 @@
   // -----------------------------------

   // Probe the stub cache.
- Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state);
+  Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
   masm->isolate()->stub_cache()->GenerateProbe(
       masm, flags, x0, x2, x3, x4, x5, x6);

@@ -1217,8 +1216,7 @@
 }


-void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
-                                  ExtraICState extra_state) {
+void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
   // ----------- S t a t e -------------
   //  -- x0    : value
   //  -- x1    : receiver
@@ -1227,8 +1225,7 @@
   // -----------------------------------

   // Probe the stub cache.
- Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state);
-
+  Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
   masm->isolate()->stub_cache()->GenerateProbe(
       masm, flags, x1, x2, x3, x4, x5, x6);

=======================================
--- /branches/bleeding_edge/src/arm/ic-arm.cc   Fri Feb 14 15:15:08 2014 UTC
+++ /branches/bleeding_edge/src/arm/ic-arm.cc   Fri Feb 14 15:17:26 2014 UTC
@@ -333,8 +333,7 @@
 }


-void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
-                                 ExtraICState extra_state) {
+void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
   // ----------- S t a t e -------------
   //  -- r2    : name
   //  -- lr    : return address
@@ -342,7 +341,7 @@
   // -----------------------------------

   // Probe the stub cache.
- Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state);
+  Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
   masm->isolate()->stub_cache()->GenerateProbe(
       masm, flags, r0, r2, r3, r4, r5, r6);

@@ -1160,8 +1159,7 @@
 }


-void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
-                                  ExtraICState extra_state) {
+void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
   // ----------- S t a t e -------------
   //  -- r0    : value
   //  -- r1    : receiver
@@ -1170,7 +1168,7 @@
   // -----------------------------------

   // Get the receiver from the stack and probe the stub cache.
- Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state);
+  Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);

   masm->isolate()->stub_cache()->GenerateProbe(
       masm, flags, r1, r2, r3, r4, r5, r6);
=======================================
--- /branches/bleeding_edge/src/code-stubs.h    Fri Feb 14 15:15:08 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.h    Fri Feb 14 15:17:26 2014 UTC
@@ -882,9 +882,7 @@
 class HandlerStub: public HICStub {
  public:
   virtual Code::Kind GetCodeKind() const { return Code::HANDLER; }
-  virtual ExtraICState GetExtraICState() {
-    return Code::HandlerKindField::encode(kind());
-  }
+  virtual ExtraICState GetExtraICState() { return kind(); }

  protected:
   HandlerStub() : HICStub() { }
=======================================
--- /branches/bleeding_edge/src/ia32/ic-ia32.cc Fri Feb 14 15:15:08 2014 UTC
+++ /branches/bleeding_edge/src/ia32/ic-ia32.cc Fri Feb 14 15:17:26 2014 UTC
@@ -947,8 +947,7 @@
 }


-void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
-                                 ExtraICState extra_state) {
+void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
   // ----------- S t a t e -------------
   //  -- ecx    : name
   //  -- edx    : receiver
@@ -956,7 +955,7 @@
   // -----------------------------------

   // Probe the stub cache.
- Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state);
+  Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
   masm->isolate()->stub_cache()->GenerateProbe(
       masm, flags, edx, ecx, ebx, eax);

@@ -1062,15 +1061,14 @@
 }


-void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
-                                  ExtraICState extra_state) {
+void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
   // ----------- S t a t e -------------
   //  -- eax    : value
   //  -- ecx    : name
   //  -- edx    : receiver
   //  -- esp[0] : return address
   // -----------------------------------
- Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state);
+  Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
   masm->isolate()->stub_cache()->GenerateProbe(
       masm, flags, edx, ecx, ebx, no_reg);

=======================================
--- /branches/bleeding_edge/src/ic.h    Tue Feb  4 12:44:15 2014 UTC
+++ /branches/bleeding_edge/src/ic.h    Fri Feb 14 15:17:26 2014 UTC
@@ -320,8 +320,7 @@
     GenerateMiss(masm);
   }
   static void GenerateMiss(MacroAssembler* masm);
-  static void GenerateMegamorphic(MacroAssembler* masm,
-                                  ExtraICState extra_state);
+  static void GenerateMegamorphic(MacroAssembler* masm);
   static void GenerateNormal(MacroAssembler* masm);
   static void GenerateRuntimeGetProperty(MacroAssembler* masm);

@@ -482,8 +481,7 @@
     GenerateMiss(masm);
   }
   static void GenerateMiss(MacroAssembler* masm);
-  static void GenerateMegamorphic(MacroAssembler* masm,
-                                  ExtraICState extra_ic_state);
+  static void GenerateMegamorphic(MacroAssembler* masm);
   static void GenerateNormal(MacroAssembler* masm);
   static void GenerateRuntimeSetProperty(MacroAssembler* masm,
                                          StrictModeFlag strict_mode);
=======================================
--- /branches/bleeding_edge/src/objects-inl.h   Fri Feb 14 15:15:08 2014 UTC
+++ /branches/bleeding_edge/src/objects-inl.h   Fri Feb 14 15:17:26 2014 UTC
@@ -4498,11 +4498,9 @@


 Code::Flags Code::ComputeHandlerFlags(Kind handler_kind,
-                                      ExtraICState extra_ic_state,
                                       StubType type,
                                       InlineCacheHolderFlag holder) {
- ExtraICState extra = HandlerKindField::encode(handler_kind) | extra_ic_state;
-  return ComputeFlags(Code::HANDLER, MONOMORPHIC, extra, type, holder);
+ return ComputeFlags(Code::HANDLER, MONOMORPHIC, handler_kind, type, holder);
 }


=======================================
--- /branches/bleeding_edge/src/objects.h       Fri Feb 14 15:15:08 2014 UTC
+++ /branches/bleeding_edge/src/objects.h       Fri Feb 14 15:17:26 2014 UTC
@@ -5385,7 +5385,6 @@

   static inline Flags ComputeHandlerFlags(
       Kind handler_kind,
-      ExtraICState extra_ic_state = kNoExtraICState,
       StubType type = NORMAL,
       InlineCacheHolderFlag holder = OWN_MAP);

@@ -5613,8 +5612,6 @@
   class BackEdgesPatchedForOSRField: public BitField<bool,
       kIsCrankshaftedBit + 1 + 29, 1> {};  // NOLINT

-  class HandlerKindField: public BitField<Kind, 17, 4> {};
-
   static const int kArgumentsBits = 16;
   static const int kMaxArguments = (1 << kArgumentsBits) - 1;

=======================================
--- /branches/bleeding_edge/src/stub-cache.cc   Fri Feb 14 15:15:08 2014 UTC
+++ /branches/bleeding_edge/src/stub-cache.cc   Fri Feb 14 15:17:26 2014 UTC
@@ -689,9 +689,7 @@


 Handle<Code> StubCompiler::CompileLoadMegamorphic(Code::Flags flags) {
-  ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
-  ContextualMode mode = LoadIC::GetContextualMode(extra_state);
-  LoadIC::GenerateMegamorphic(masm(), mode);
+  LoadIC::GenerateMegamorphic(masm());
   Handle<Code> code = GetCodeWithFlags(flags, "CompileLoadMegamorphic");
   PROFILE(isolate(),
           CodeCreateEvent(Logger::LOAD_MEGAMORPHIC_TAG, *code, 0));
@@ -733,8 +731,7 @@


 Handle<Code> StubCompiler::CompileStoreMegamorphic(Code::Flags flags) {
-  ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
-  StoreIC::GenerateMegamorphic(masm(), extra_state);
+  StoreIC::GenerateMegamorphic(masm());
   Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreMegamorphic");
   PROFILE(isolate(),
           CodeCreateEvent(Logger::STORE_MEGAMORPHIC_TAG, *code, 0));
@@ -1235,8 +1232,8 @@
 Handle<Code> BaseLoadStoreStubCompiler::GetCode(Code::Kind kind,
                                                 Code::StubType type,
                                                 Handle<Name> name) {
-  Code::Flags flags = Code::ComputeHandlerFlags(
-      kind, extra_state(), type, cache_holder_);
+  ASSERT_EQ(kNoExtraICState, extra_state());
+  Code::Flags flags = Code::ComputeHandlerFlags(kind, type, cache_holder_);
   Handle<Code> code = GetCodeWithFlags(flags, name);
   PROFILE(isolate(), CodeCreateEvent(log_kind(code), *code, *name));
   JitEvent(name, code);
=======================================
--- /branches/bleeding_edge/src/x64/ic-x64.cc   Fri Feb 14 15:15:08 2014 UTC
+++ /branches/bleeding_edge/src/x64/ic-x64.cc   Fri Feb 14 15:17:26 2014 UTC
@@ -973,8 +973,7 @@
 }


-void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
-                                 ExtraICState extra_state) {
+void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
   // ----------- S t a t e -------------
   //  -- rax    : receiver
   //  -- rcx    : name
@@ -982,7 +981,7 @@
   // -----------------------------------

   // Probe the stub cache.
- Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state);
+  Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
   masm->isolate()->stub_cache()->GenerateProbe(
       masm, flags, rax, rcx, rbx, rdx);

@@ -1089,8 +1088,7 @@
 }


-void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
-                                  ExtraICState extra_state) {
+void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
   // ----------- S t a t e -------------
   //  -- rax    : value
   //  -- rcx    : name
@@ -1099,7 +1097,7 @@
   // -----------------------------------

   // Get the receiver from the stack and probe the stub cache.
- Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state);
+  Code::Flags flags = Code::ComputeHandlerFlags(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