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

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

Issue 556563005: Fix Smi vs. HeapObject confusion in HConstants. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/hydrogen-types.cc » ('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 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2808 if (object->IsJSObject()) { 2808 if (object->IsJSObject()) {
2809 // Try to eagerly migrate JSObjects that have deprecated maps. 2809 // Try to eagerly migrate JSObjects that have deprecated maps.
2810 Handle<JSObject> js_object = Handle<JSObject>::cast(object); 2810 Handle<JSObject> js_object = Handle<JSObject>::cast(object);
2811 if (js_object->map()->is_deprecated()) { 2811 if (js_object->map()->is_deprecated()) {
2812 JSObject::TryMigrateInstance(js_object); 2812 JSObject::TryMigrateInstance(js_object);
2813 } 2813 }
2814 } 2814 }
2815 r = Representation::Tagged(); 2815 r = Representation::Tagged();
2816 } 2816 }
2817 } 2817 }
2818 if (r.IsSmi()) {
2819 // If we have an existing handle, zap it, because it might be a heap
2820 // number which we must not re-use when copying this HConstant to
2821 // Tagged representation later, because having Smi representation now
2822 // could cause heap object checks not to get emitted.
2823 object_ = Unique<Object>(Handle<Object>::null());
2824 }
2818 set_representation(r); 2825 set_representation(r);
2819 SetFlag(kUseGVN); 2826 SetFlag(kUseGVN);
2820 } 2827 }
2821 2828
2822 2829
2823 bool HConstant::ImmortalImmovable() const { 2830 bool HConstant::ImmortalImmovable() const {
2824 if (has_int32_value_) { 2831 if (has_int32_value_) {
2825 return false; 2832 return false;
2826 } 2833 }
2827 if (has_double_value_) { 2834 if (has_double_value_) {
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after
4768 break; 4775 break;
4769 case HObjectAccess::kExternalMemory: 4776 case HObjectAccess::kExternalMemory:
4770 os << "[external-memory]"; 4777 os << "[external-memory]";
4771 break; 4778 break;
4772 } 4779 }
4773 4780
4774 return os << "@" << access.offset(); 4781 return os << "@" << access.offset();
4775 } 4782 }
4776 4783
4777 } } // namespace v8::internal 4784 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/hydrogen-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698