Minor-key-ify BinaryOpICWithAllocationSiteStub.
authoryangguo@chromium.org <yangguo@chromium.org>
Wed, 27 Aug 2014 10:00:06 +0000 (10:00 +0000)
committeryangguo@chromium.org <yangguo@chromium.org>
Wed, 27 Aug 2014 10:00:06 +0000 (10:00 +0000)
R=mvstanton@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/arm/code-stubs-arm.cc
src/arm64/code-stubs-arm64.cc
src/code-stubs.cc
src/code-stubs.h
src/ia32/code-stubs-ia32.cc
src/x64/code-stubs-x64.cc

index 73b68ae..3c9da2f 100644 (file)
@@ -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 5daca9c..03c07f4 100644 (file)
@@ -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 e347c13..e6209f5 100644 (file)
@@ -291,7 +291,7 @@ void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
 
 void BinaryOpICWithAllocationSiteStub::PrintState(
     OStream& os) const {  // NOLINT
-  os << state_;
+  os << state();
 }
 
 
index 85314d0..613e637 100644 (file)
@@ -1201,7 +1201,7 @@ class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub {
  public:
   BinaryOpICWithAllocationSiteStub(Isolate* isolate,
                                    const BinaryOpIC::State& state)
-      : PlatformCodeStub(isolate), state_(state) {
+      : PlatformCodeStub(isolate) {
     minor_key_ = state.GetExtraICState();
   }
 
@@ -1218,11 +1218,11 @@ class BinaryOpICWithAllocationSiteStub V8_FINAL : public PlatformCodeStub {
   }
 
   virtual InlineCacheState GetICState() const V8_OVERRIDE {
-    return state_.GetICState();
+    return state().GetICState();
   }
 
   virtual ExtraICState GetExtraICState() const V8_OVERRIDE {
-    return state_.GetExtraICState();
+    return static_cast<ExtraICState>(minor_key_);
   }
 
   virtual void Generate(MacroAssembler* masm) V8_OVERRIDE;
@@ -1232,14 +1232,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 f6f2dff..bea150c 100644 (file)
@@ -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 51e372c..b2e9297 100644 (file)
@@ -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);
 }