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

Unified Diff: src/ia32/lithium-codegen-ia32.cc

Issue 7482044: Tiny cleanup of LCodeGen::DoBranch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-codegen-ia32.cc
===================================================================
--- src/ia32/lithium-codegen-ia32.cc (revision 8758)
+++ src/ia32/lithium-codegen-ia32.cc (working copy)
@@ -1392,10 +1392,9 @@
EmitBranch(true_block, false_block, not_equal);
} else {
ASSERT(r.IsTagged());
- Factory* factory = this->factory();
Register reg = ToRegister(instr->InputAt(0));
if (instr->hydrogen()->value()->type().IsBoolean()) {
- __ cmp(reg, factory->true_value());
+ __ cmp(reg, factory()->true_value());
EmitBranch(true_block, false_block, equal);
} else {
Label* true_label = chunk_->GetAssemblyLabel(true_block);
@@ -1407,41 +1406,41 @@
if (expected.Contains(ToBooleanStub::UNDEFINED)) {
// undefined -> false.
- __ cmp(reg, factory->undefined_value());
+ __ cmp(reg, factory()->undefined_value());
__ j(equal, false_label);
} else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) {
// We've seen undefined for the first time -> deopt.
- __ cmp(reg, factory->undefined_value());
+ __ cmp(reg, factory()->undefined_value());
DeoptimizeIf(equal, instr->environment());
}
if (expected.Contains(ToBooleanStub::BOOLEAN)) {
// true -> true.
- __ cmp(reg, factory->true_value());
+ __ cmp(reg, factory()->true_value());
__ j(equal, true_label);
} else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) {
- // We've seen a string for the first time -> deopt.
- __ cmp(reg, factory->true_value());
+ // We've seen a boolean for the first time -> deopt.
+ __ cmp(reg, factory()->true_value());
DeoptimizeIf(equal, instr->environment());
}
if (expected.Contains(ToBooleanStub::BOOLEAN)) {
// false -> false.
- __ cmp(reg, factory->false_value());
+ __ cmp(reg, factory()->false_value());
__ j(equal, false_label);
} else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) {
- // We've seen a string for the first time -> deopt.
- __ cmp(reg, factory->false_value());
+ // We've seen a boolean for the first time -> deopt.
+ __ cmp(reg, factory()->false_value());
DeoptimizeIf(equal, instr->environment());
}
if (expected.Contains(ToBooleanStub::NULL_TYPE)) {
// 'null' -> false.
- __ cmp(reg, factory->null_value());
+ __ cmp(reg, factory()->null_value());
__ j(equal, false_label);
} else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) {
// We've seen null for the first time -> deopt.
- __ cmp(reg, factory->null_value());
+ __ cmp(reg, factory()->null_value());
DeoptimizeIf(equal, instr->environment());
}
@@ -1497,7 +1496,7 @@
// heap number -> false iff +0, -0, or NaN.
Label not_heap_number;
__ cmp(FieldOperand(reg, HeapObject::kMapOffset),
- factory->heap_number_map());
+ factory()->heap_number_map());
__ j(not_equal, &not_heap_number, Label::kNear);
__ fldz();
__ fld_d(FieldOperand(reg, HeapNumber::kValueOffset));
@@ -1508,7 +1507,7 @@
} else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) {
// We've seen a heap number for the first time -> deopt.
__ cmp(FieldOperand(reg, HeapObject::kMapOffset),
- factory->heap_number_map());
+ factory()->heap_number_map());
DeoptimizeIf(equal, instr->environment());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698