Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(882)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 898753003: Infer HConstant::NotInNewSpace only if the supplied handle is null. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-449291.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/double.h" 8 #include "src/double.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/hydrogen-infer-representation.h" 10 #include "src/hydrogen-infer-representation.h"
(...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after
2862 r = Representation::Tagged(); 2862 r = Representation::Tagged();
2863 } 2863 }
2864 } 2864 }
2865 if (r.IsSmi()) { 2865 if (r.IsSmi()) {
2866 // If we have an existing handle, zap it, because it might be a heap 2866 // If we have an existing handle, zap it, because it might be a heap
2867 // number which we must not re-use when copying this HConstant to 2867 // number which we must not re-use when copying this HConstant to
2868 // Tagged representation later, because having Smi representation now 2868 // Tagged representation later, because having Smi representation now
2869 // could cause heap object checks not to get emitted. 2869 // could cause heap object checks not to get emitted.
2870 object_ = Unique<Object>(Handle<Object>::null()); 2870 object_ = Unique<Object>(Handle<Object>::null());
2871 } 2871 }
2872 if (r.IsSmiOrInteger32()) { 2872 if (r.IsSmiOrInteger32() && object_.handle().is_null()) {
2873 // If it's not a heap object, it can't be in new space. 2873 // If it's not a heap object, it can't be in new space.
2874 bit_field_ = IsNotInNewSpaceField::update(bit_field_, true); 2874 bit_field_ = IsNotInNewSpaceField::update(bit_field_, true);
2875 } 2875 }
2876 set_representation(r); 2876 set_representation(r);
2877 SetFlag(kUseGVN); 2877 SetFlag(kUseGVN);
2878 } 2878 }
2879 2879
2880 2880
2881 bool HConstant::ImmortalImmovable() const { 2881 bool HConstant::ImmortalImmovable() const {
2882 if (HasInteger32Value()) { 2882 if (HasInteger32Value()) {
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
4816 break; 4816 break;
4817 case HObjectAccess::kExternalMemory: 4817 case HObjectAccess::kExternalMemory:
4818 os << "[external-memory]"; 4818 os << "[external-memory]";
4819 break; 4819 break;
4820 } 4820 }
4821 4821
4822 return os << "@" << access.offset(); 4822 return os << "@" << access.offset();
4823 } 4823 }
4824 4824
4825 } } // namespace v8::internal 4825 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-449291.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698