OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 384 |
385 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | 385 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { |
386 object()->PrintTo(stream); | 386 object()->PrintTo(stream); |
387 stream->Add("["); | 387 stream->Add("["); |
388 key()->PrintTo(stream); | 388 key()->PrintTo(stream); |
389 stream->Add("] <- "); | 389 stream->Add("] <- "); |
390 value()->PrintTo(stream); | 390 value()->PrintTo(stream); |
391 } | 391 } |
392 | 392 |
393 | 393 |
| 394 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { |
| 395 object()->PrintTo(stream); |
| 396 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); |
| 397 } |
| 398 |
| 399 |
394 LChunk::LChunk(CompilationInfo* info, HGraph* graph) | 400 LChunk::LChunk(CompilationInfo* info, HGraph* graph) |
395 : spill_slot_count_(0), | 401 : spill_slot_count_(0), |
396 info_(info), | 402 info_(info), |
397 graph_(graph), | 403 graph_(graph), |
398 instructions_(32), | 404 instructions_(32), |
399 pointer_maps_(8), | 405 pointer_maps_(8), |
400 inlined_closures_(1) { | 406 inlined_closures_(1) { |
401 } | 407 } |
402 | 408 |
403 | 409 |
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 LOperand* val = UseFixed(instr->value(), r0); | 1969 LOperand* val = UseFixed(instr->value(), r0); |
1964 | 1970 |
1965 ASSERT(instr->object()->representation().IsTagged()); | 1971 ASSERT(instr->object()->representation().IsTagged()); |
1966 ASSERT(instr->key()->representation().IsTagged()); | 1972 ASSERT(instr->key()->representation().IsTagged()); |
1967 ASSERT(instr->value()->representation().IsTagged()); | 1973 ASSERT(instr->value()->representation().IsTagged()); |
1968 | 1974 |
1969 return MarkAsCall(new LStoreKeyedGeneric(obj, key, val), instr); | 1975 return MarkAsCall(new LStoreKeyedGeneric(obj, key, val), instr); |
1970 } | 1976 } |
1971 | 1977 |
1972 | 1978 |
| 1979 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
| 1980 HTransitionElementsKind* instr) { |
| 1981 if (instr->original_map()->elements_kind() == FAST_SMI_ONLY_ELEMENTS && |
| 1982 instr->transitioned_map()->elements_kind() == FAST_ELEMENTS) { |
| 1983 LOperand* object = UseRegister(instr->object()); |
| 1984 LOperand* new_map_reg = TempRegister(); |
| 1985 LTransitionElementsKind* result = |
| 1986 new LTransitionElementsKind(object, new_map_reg, NULL); |
| 1987 return DefineSameAsFirst(result); |
| 1988 } else { |
| 1989 LOperand* object = UseFixed(instr->object(), r0); |
| 1990 LOperand* fixed_object_reg = FixedTemp(r2); |
| 1991 LOperand* new_map_reg = FixedTemp(r3); |
| 1992 LTransitionElementsKind* result = |
| 1993 new LTransitionElementsKind(object, new_map_reg, fixed_object_reg); |
| 1994 return MarkAsCall(DefineFixed(result, r0), instr); |
| 1995 } |
| 1996 } |
| 1997 |
| 1998 |
1973 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 1999 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
1974 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2000 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
1975 | 2001 |
1976 LOperand* obj = needs_write_barrier | 2002 LOperand* obj = needs_write_barrier |
1977 ? UseTempRegister(instr->object()) | 2003 ? UseTempRegister(instr->object()) |
1978 : UseRegisterAtStart(instr->object()); | 2004 : UseRegisterAtStart(instr->object()); |
1979 | 2005 |
1980 LOperand* val = needs_write_barrier | 2006 LOperand* val = needs_write_barrier |
1981 ? UseTempRegister(instr->value()) | 2007 ? UseTempRegister(instr->value()) |
1982 : UseRegister(instr->value()); | 2008 : UseRegister(instr->value()); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2184 | 2210 |
2185 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2211 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
2186 LOperand* key = UseRegisterAtStart(instr->key()); | 2212 LOperand* key = UseRegisterAtStart(instr->key()); |
2187 LOperand* object = UseRegisterAtStart(instr->object()); | 2213 LOperand* object = UseRegisterAtStart(instr->object()); |
2188 LIn* result = new LIn(key, object); | 2214 LIn* result = new LIn(key, object); |
2189 return MarkAsCall(DefineFixed(result, r0), instr); | 2215 return MarkAsCall(DefineFixed(result, r0), instr); |
2190 } | 2216 } |
2191 | 2217 |
2192 | 2218 |
2193 } } // namespace v8::internal | 2219 } } // namespace v8::internal |
OLD | NEW |