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

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

Issue 897263002: Fix HConstant(double, ...) constructor (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-3865.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 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 object_map_(Handle<Map>::null()), 2803 object_map_(Handle<Map>::null()),
2804 bit_field_(HasStableMapValueField::encode(false) | 2804 bit_field_(HasStableMapValueField::encode(false) |
2805 HasInt32ValueField::encode(IsInteger32(double_value)) | 2805 HasInt32ValueField::encode(IsInteger32(double_value)) |
2806 HasDoubleValueField::encode(true) | 2806 HasDoubleValueField::encode(true) |
2807 HasExternalReferenceValueField::encode(false) | 2807 HasExternalReferenceValueField::encode(false) |
2808 IsNotInNewSpaceField::encode(is_not_in_new_space) | 2808 IsNotInNewSpaceField::encode(is_not_in_new_space) |
2809 BooleanValueField::encode(double_value != 0 && 2809 BooleanValueField::encode(double_value != 0 &&
2810 !std::isnan(double_value)) | 2810 !std::isnan(double_value)) |
2811 IsUndetectableField::encode(false) | 2811 IsUndetectableField::encode(false) |
2812 InstanceTypeField::encode(kUnknownInstanceType)), 2812 InstanceTypeField::encode(kUnknownInstanceType)),
2813 int32_value_(HasInteger32Value() ? DoubleToInt32(double_value) : 0), 2813 int32_value_(DoubleToInt32(double_value)),
2814 double_value_(double_value) { 2814 double_value_(double_value) {
2815 bit_field_ = HasSmiValueField::update( 2815 bit_field_ = HasSmiValueField::update(
2816 bit_field_, HasInteger32Value() && Smi::IsValid(int32_value_)); 2816 bit_field_, HasInteger32Value() && Smi::IsValid(int32_value_));
2817 // It's possible to create a constant with a value in Smi-range but stored 2817 // It's possible to create a constant with a value in Smi-range but stored
2818 // in a (pre-existing) HeapNumber. See crbug.com/349878. 2818 // in a (pre-existing) HeapNumber. See crbug.com/349878.
2819 bool could_be_heapobject = r.IsTagged() && !object.handle().is_null(); 2819 bool could_be_heapobject = r.IsTagged() && !object.handle().is_null();
2820 bool is_smi = HasSmiValue() && !could_be_heapobject; 2820 bool is_smi = HasSmiValue() && !could_be_heapobject;
2821 set_type(is_smi ? HType::Smi() : HType::TaggedNumber()); 2821 set_type(is_smi ? HType::Smi() : HType::TaggedNumber());
2822 Initialize(r); 2822 Initialize(r);
2823 } 2823 }
(...skipping 1992 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-3865.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698