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

Unified Diff: src/arm/lithium-arm.cc

Issue 6961019: Prevent deopt on double value assignment to typed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Kevin's feedback Created 9 years, 7 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
Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index 38aa8f8260b414b836c3d25dfa54d5edf8b4b0b3..668e0a9159925431113bad2d0f10efc59ff38bed 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -1767,6 +1767,32 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
}
+LInstruction* LChunkBuilder::DoToInt32(HToInt32* instr) {
+ HValue* value = instr->value();
+ Representation input_rep = value->representation();
+ LOperand* reg = UseRegister(value);
+ if (input_rep.IsDouble()) {
+ LDoubleToI* res = new LDoubleToI(reg,
Kevin Millikin (Chromium) 2011/05/26 07:53:37 Two space indent here. I'd name the two TempRegis
danno 2011/06/01 13:14:41 Done.
+ TempRegister(),
+ TempRegister());
+ return AssignEnvironment(DefineAsRegister(res));
+ } else if (input_rep.IsInteger32()) {
+ // Canonicalization should already have removed the hydrogen instruction in
+ // this case, since it is a noop.
+ UNREACHABLE();
+ return NULL;
+ } else {
+ ASSERT(input_rep.IsTagged());
+ LOperand* temp1 = TempRegister();
+ LOperand* temp2 = TempRegister();
+ LOperand* temp3 = FixedTemp(d3);
+ LInstruction* res = DefineSameAsFirst(
Kevin Millikin (Chromium) 2011/05/26 07:53:37 I like LTaggedToI* res = new LTaggedToI(reg, temp
danno 2011/06/01 13:14:41 Done.
+ new LTaggedToI(reg, temp1, temp2, temp3));
+ return AssignEnvironment(res);
+ }
+}
+
+
LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
return new LReturn(UseFixed(instr->value(), r0));
}
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | src/arm/stub-cache-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698