Reviewers: Paul Lind, Toon Verwaest, danno, kisg, kilvadyb,
Description:
MIPS: Track heap objects.
Port r14625 (bfb25ed8)
BUG=
Please review this at https://codereview.chromium.org/15102002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/mips/lithium-codegen-mips.cc
M src/mips/lithium-mips.cc
M src/mips/stub-cache-mips.cc
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc
b/src/mips/lithium-codegen-mips.cc
index
a4e40a6a8dd3f843388b5ae88ebaae60e6af873a..d94f40e299dd47cbb312dee087f90c0cb18958ab
100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -3911,6 +3911,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField*
instr) {
if (!instr->hydrogen()->value()->range()->IsInSmiRange()) {
DeoptimizeIf(lt, instr->environment(), scratch, Operand(zero_reg));
}
+ } else if (FLAG_track_heap_object_fields &&
representation.IsHeapObject()) {
+ Register value = ToRegister(instr->value());
+ if (!instr->hydrogen()->value()->type().IsHeapObject()) {
+ __ And(scratch, value, Operand(kSmiTagMask));
+ DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
+ }
} else if (FLAG_track_double_fields && representation.IsDouble()) {
ASSERT(transition.is_null());
ASSERT(instr->is_in_object());
Index: src/mips/lithium-mips.cc
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
index
7142bc1423ab86b01681ab8b358f380b720195bf..b5c47ef859317aee52b457b00b55ceeef6fee598
100644
--- a/src/mips/lithium-mips.cc
+++ b/src/mips/lithium-mips.cc
@@ -2209,7 +2209,9 @@ LInstruction*
LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL;
LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp);
- if (FLAG_track_fields && instr->field_representation().IsSmi()) {
+ if ((FLAG_track_fields && instr->field_representation().IsSmi()) ||
+ (FLAG_track_heap_object_fields &&
+ instr->field_representation().IsHeapObject())) {
return AssignEnvironment(result);
}
return result;
Index: src/mips/stub-cache-mips.cc
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc
index
80ab31a5e46124d236573fe2f325d52571214e95..5b36cc2fb30faf66ddd986a942999ff60cdc7af3
100644
--- a/src/mips/stub-cache-mips.cc
+++ b/src/mips/stub-cache-mips.cc
@@ -507,6 +507,8 @@ void
StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
if (FLAG_track_fields && representation.IsSmi()) {
__ JumpIfNotSmi(value_reg, miss_restore_name);
+ } else if (FLAG_track_heap_object_fields &&
representation.IsHeapObject()) {
+ __ JumpIfSmi(value_reg, miss_restore_name);
} else if (FLAG_track_double_fields && representation.IsDouble()) {
Label do_store, heap_number;
__ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex);
@@ -677,6 +679,8 @@ void StubCompiler::GenerateStoreField(MacroAssembler*
masm,
ASSERT(!representation.IsNone());
if (FLAG_track_fields && representation.IsSmi()) {
__ JumpIfNotSmi(value_reg, miss_label);
+ } else if (FLAG_track_heap_object_fields &&
representation.IsHeapObject()) {
+ __ JumpIfSmi(value_reg, miss_label);
} else if (FLAG_track_double_fields && 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/groups/opt_out.