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

Unified Diff: src/hydrogen-instructions.cc

Issue 196353004: Fixed handling of polymorphic array accesses with constant index (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/property-details.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index c93bc1144af36376167cbac155e664ec57cda72c..fc8c91b4a8ec51f5072289cc1f745c77c116970b 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -30,6 +30,7 @@
#include "double.h"
#include "factory.h"
#include "hydrogen-infer-representation.h"
+#include "property-details-inl.h"
#if V8_TARGET_ARCH_IA32
#include "ia32/lithium-ia32.h"
@@ -1433,19 +1434,19 @@ void HTypeof::PrintDataTo(StringStream* stream) {
HInstruction* HForceRepresentation::New(Zone* zone, HValue* context,
- HValue* value, Representation required_representation) {
+ HValue* value, Representation representation) {
if (FLAG_fold_constants && value->IsConstant()) {
HConstant* c = HConstant::cast(value);
if (c->HasNumberValue()) {
double double_res = c->DoubleValue();
- if (IsInt32Double(double_res)) {
+ if (representation.CanContainDouble(double_res)) {
return HConstant::New(zone, context,
static_cast<int32_t>(double_res),
- required_representation);
+ representation);
}
}
}
- return new(zone) HForceRepresentation(value, required_representation);
+ return new(zone) HForceRepresentation(value, representation);
}
« no previous file with comments | « no previous file | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698