Revision: 20774
Author: [email protected]
Date: Tue Apr 15 15:11:36 2014 UTC
Log: MIPS: Reland "Track field types.".
Port r20746 (09f9176)
Original commit message:
This is an initial step towards tracking the exact types instead of just
the representations of fields. It adds support to track up to one map of
heap object field values, eliminating various map checks on values
loaded from such fields, at the cost of making stores to such fields
slightly more expensive.
Issues with transitioning stores and fast object literals in Crankshaft
fixed.
TEST=mjsunit/field-type-tracking
BUG=
[email protected]
Review URL: https://codereview.chromium.org/238943002
Patch from Balazs Kilvady <[email protected]>.
http://code.google.com/p/v8/source/detail?r=20774
Modified:
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/stub-cache-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Fri Apr 11
12:40:26 2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Apr 15
15:11:36 2014 UTC
@@ -4085,7 +4085,7 @@
__ SmiTst(value, scratch);
DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
- // We know that value is a smi now, so we can omit the check below.
+ // We know now that value is not a smi, so we can omit the check
below.
check_needed = OMIT_SMI_CHECK;
}
} else if (representation.IsDouble()) {
=======================================
--- /branches/bleeding_edge/src/mips/stub-cache-mips.cc Mon Mar 17 18:16:19
2014 UTC
+++ /branches/bleeding_edge/src/mips/stub-cache-mips.cc Tue Apr 15 15:11:36
2014 UTC
@@ -415,7 +415,14 @@
} else if (representation.IsSmi()) {
__ JumpIfNotSmi(value_reg, miss_label);
} else if (representation.IsHeapObject()) {
- __ JumpIfSmi(value_reg, miss_label);
+ HeapType* field_type = descriptors->GetFieldType(descriptor);
+ if (field_type->IsClass()) {
+ __ CheckMap(value_reg, scratch1, field_type->AsClass(),
+ miss_label, DO_SMI_CHECK);
+ } else {
+ ASSERT(HeapType::Any()->Is(field_type));
+ __ JumpIfSmi(value_reg, miss_label);
+ }
} else if (representation.IsDouble()) {
Label do_store, heap_number;
__ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex);
@@ -578,7 +585,14 @@
if (representation.IsSmi()) {
__ JumpIfNotSmi(value_reg, miss_label);
} else if (representation.IsHeapObject()) {
- __ JumpIfSmi(value_reg, miss_label);
+ HeapType* field_type = lookup->GetFieldType();
+ if (field_type->IsClass()) {
+ __ CheckMap(value_reg, scratch1, field_type->AsClass(),
+ miss_label, DO_SMI_CHECK);
+ } else {
+ ASSERT(HeapType::Any()->Is(field_type));
+ __ JumpIfSmi(value_reg, miss_label);
+ }
} else if (representation.IsDouble()) {
// Load the double storage.
if (index < 0) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.