Reviewers: mvstanton,

Description:
Minor-key-ify BinaryOpICWithAllocationSiteStub.

[email protected]

Please review this at https://codereview.chromium.org/506003002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+13, -14 lines):
  M src/arm/code-stubs-arm.cc
  M src/arm64/code-stubs-arm64.cc
  M src/code-stubs.h
  M src/code-stubs.cc
  M src/ia32/code-stubs-ia32.cc
  M src/x64/code-stubs-x64.cc


Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index ab7c8dfd2e1df392fdecd4999837dcf5ba9fedd6..f60a0653c5c9ec2be13a59778d58c73c9007b07b 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -3723,7 +3723,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {

   // Tail call into the stub that handles binary operations with allocation
   // sites.
-  BinaryOpWithAllocationSiteStub stub(isolate(), state_);
+  BinaryOpWithAllocationSiteStub stub(isolate(), state());
   __ TailCallStub(&stub);
 }

Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index 508296ff97ee4e32a12f54fa3225074363811a03..54c14e87c3ac9ea9d00d4203782fb4db6f95e42b 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -4332,7 +4332,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {

   // Tail call into the stub that handles binary operations with allocation
   // sites.
-  BinaryOpWithAllocationSiteStub stub(isolate(), state_);
+  BinaryOpWithAllocationSiteStub stub(isolate(), state());
   __ TailCallStub(&stub);
 }

Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 1c5c7a23e985fe5e26b77143eca21e454a14f61d..03d6b7bfd2103b377f0ba1fb782a73e78114f3d3 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -291,7 +291,7 @@ void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {

 void BinaryOpICWithAllocationSiteStub::PrintState(
     OStream& os) const {  // NOLINT
-  os << state_;
+  os << state();
 }


Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index c99302a44052997e1027eaedac0d48e483c037d5..7f7691fdb69b0c8ed48d3a4cf4d8ff43889ae990 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -1191,7 +1191,9 @@ class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub {
  public:
   BinaryOpICWithAllocationSiteStub(Isolate* isolate,
                                    const BinaryOpIC::State& state)
-      : PlatformCodeStub(isolate), state_(state) {}
+      : PlatformCodeStub(isolate) {
+    minor_key_ = state.GetExtraICState();
+  }

   static void GenerateAheadOfTime(Isolate* isolate);

@@ -1206,11 +1208,7 @@ class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub {
   }

   virtual InlineCacheState GetICState() const V8_OVERRIDE {
-    return state_.GetICState();
-  }
-
-  virtual ExtraICState GetExtraICState() const V8_OVERRIDE {
-    return state_.GetExtraICState();
+    return state().GetICState();
   }

   virtual void Generate(MacroAssembler* masm) V8_OVERRIDE;
@@ -1220,14 +1218,15 @@ class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub {
   virtual Major MajorKey() const V8_OVERRIDE {
     return BinaryOpICWithAllocationSite;
   }
- virtual uint32_t MinorKey() const V8_OVERRIDE { return GetExtraICState(); }

  private:
+  BinaryOpIC::State state() const {
+ return BinaryOpIC::State(isolate(), static_cast<ExtraICState>(minor_key_));
+  }
+
   static void GenerateAheadOfTime(Isolate* isolate,
                                   const BinaryOpIC::State& state);

-  BinaryOpIC::State state_;
-
   DISALLOW_COPY_AND_ASSIGN(BinaryOpICWithAllocationSiteStub);
 };

Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index ec0ea57e68a56571fa493c0f0282c3cc0d9ac110..20cb1d4343dbd58e9bba7ecf127e9bd60f04b018 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -3626,7 +3626,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {

   // Tail call into the stub that handles binary operations with allocation
   // sites.
-  BinaryOpWithAllocationSiteStub stub(isolate(), state_);
+  BinaryOpWithAllocationSiteStub stub(isolate(), state());
   __ TailCallStub(&stub);
 }

Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index edf2eb45ed66d969ba5c27208e75a266822c50bc..11ef6c6b8f124b07e68223e5f7641165026a9c4a 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -3593,7 +3593,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {

   // Tail call into the stub that handles binary operations with allocation
   // sites.
-  BinaryOpWithAllocationSiteStub stub(isolate(), state_);
+  BinaryOpWithAllocationSiteStub stub(isolate(), state());
   __ TailCallStub(&stub);
 }



--
--
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/d/optout.

Reply via email to