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

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

Issue 14146005: Track representations of fields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make double support consistent. Now DOUBLE always contains smi or heapnumber Created 7 years, 8 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/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index 494daa617bcb7b7a9eee62f9e27896aca2bb37ac..22c64244a30377e7642d2da07472fcc04431cdf7 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -2166,9 +2166,10 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
- ASSERT(instr->representation().IsTagged());
LOperand* obj = UseRegisterAtStart(instr->object());
- return DefineAsRegister(new(zone()) LLoadNamedField(obj));
+ LOperand* temp = instr->representation().IsDouble() ? TempRegister() : NULL;
+ ASSERT(temp == NULL || FLAG_track_double_fields);
+ return DefineAsRegister(new(zone()) LLoadNamedField(obj, temp));
}
@@ -2443,6 +2444,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
val = UseTempRegister(instr->value());
} else if (StoreConstantValueAllowed(instr->value())) {
val = UseRegisterOrConstant(instr->value());
+ } else if (FLAG_track_fields && instr->storage_type() == SMI) {
+ val = UseTempRegister(instr->value());
} else {
val = UseRegister(instr->value());
}
@@ -2455,7 +2458,13 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
// We need a temporary register for write barrier of the map field.
LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL;
- return new(zone()) LStoreNamedField(obj, val, temp, temp_map);
+ LStoreNamedField* result = new(zone()) LStoreNamedField(
+ obj, val, temp, temp_map, instr->storage_type());
+ if ((FLAG_track_fields && instr->storage_type() == SMI) ||
+ (FLAG_track_double_fields && instr->storage_type() == DOUBLE)) {
+ return AssignEnvironment(result);
+ }
+ return result;
}
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698