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

Side by Side Diff: src/mips/lithium-mips.cc

Issue 14305024: MIPS: Track storage types of instance variables. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 } else { 1981 } else {
1982 context = UseRegister(instr->context()); 1982 context = UseRegister(instr->context());
1983 value = UseRegister(instr->value()); 1983 value = UseRegister(instr->value());
1984 } 1984 }
1985 LInstruction* result = new(zone()) LStoreContextSlot(context, value); 1985 LInstruction* result = new(zone()) LStoreContextSlot(context, value);
1986 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; 1986 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result;
1987 } 1987 }
1988 1988
1989 1989
1990 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { 1990 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
1991 return DefineAsRegister( 1991 LOperand* obj = UseRegisterAtStart(instr->object());
1992 new(zone()) LLoadNamedField(UseRegisterAtStart(instr->object()))); 1992 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
1993 } 1993 }
1994 1994
1995 1995
1996 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic( 1996 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic(
1997 HLoadNamedFieldPolymorphic* instr) { 1997 HLoadNamedFieldPolymorphic* instr) {
1998 ASSERT(instr->representation().IsTagged()); 1998 ASSERT(instr->representation().IsTagged());
1999 if (instr->need_generic()) { 1999 if (instr->need_generic()) {
2000 LOperand* obj = UseFixed(instr->object(), a0); 2000 LOperand* obj = UseFixed(instr->object(), a0);
2001 LLoadNamedFieldPolymorphic* result = 2001 LLoadNamedFieldPolymorphic* result =
2002 new(zone()) LLoadNamedFieldPolymorphic(obj); 2002 new(zone()) LLoadNamedFieldPolymorphic(obj);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2187 if (needs_write_barrier) { 2187 if (needs_write_barrier) {
2188 obj = instr->is_in_object() 2188 obj = instr->is_in_object()
2189 ? UseRegister(instr->object()) 2189 ? UseRegister(instr->object())
2190 : UseTempRegister(instr->object()); 2190 : UseTempRegister(instr->object());
2191 } else { 2191 } else {
2192 obj = needs_write_barrier_for_map 2192 obj = needs_write_barrier_for_map
2193 ? UseRegister(instr->object()) 2193 ? UseRegister(instr->object())
2194 : UseRegisterAtStart(instr->object()); 2194 : UseRegisterAtStart(instr->object());
2195 } 2195 }
2196 2196
2197 LOperand* val = needs_write_barrier 2197 LOperand* val =
2198 ? UseTempRegister(instr->value()) 2198 needs_write_barrier ||
2199 : UseRegister(instr->value()); 2199 (FLAG_track_fields && instr->field_representation().IsSmi())
2200 ? UseTempRegister(instr->value()) : UseRegister(instr->value());
2200 2201
2201 // We need a temporary register for write barrier of the map field. 2202 // We need a temporary register for write barrier of the map field.
2202 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; 2203 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL;
2203 2204
2204 return new(zone()) LStoreNamedField(obj, val, temp); 2205 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp);
2206 if ((FLAG_track_fields && instr->field_representation().IsSmi()) ||
2207 (FLAG_track_double_fields && instr->field_representation().IsDouble())) {
2208 return AssignEnvironment(result);
2209 }
2210 return result;
2205 } 2211 }
2206 2212
2207 2213
2208 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2214 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2209 LOperand* obj = UseFixed(instr->object(), a1); 2215 LOperand* obj = UseFixed(instr->object(), a1);
2210 LOperand* val = UseFixed(instr->value(), a0); 2216 LOperand* val = UseFixed(instr->value(), a0);
2211 2217
2212 LInstruction* result = new(zone()) LStoreNamedGeneric(obj, val); 2218 LInstruction* result = new(zone()) LStoreNamedGeneric(obj, val);
2213 return MarkAsCall(result, instr); 2219 return MarkAsCall(result, instr);
2214 } 2220 }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 2495
2490 2496
2491 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2497 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2492 LOperand* object = UseRegister(instr->object()); 2498 LOperand* object = UseRegister(instr->object());
2493 LOperand* index = UseRegister(instr->index()); 2499 LOperand* index = UseRegister(instr->index());
2494 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2500 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2495 } 2501 }
2496 2502
2497 2503
2498 } } // namespace v8::internal 2504 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698