| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/crankshaft/s390/lithium-s390.h" | 5 #include "src/crankshaft/s390/lithium-s390.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 310 |
| 311 if (value() == NULL) { | 311 if (value() == NULL) { |
| 312 DCHECK(hydrogen()->IsConstantHoleStore() && | 312 DCHECK(hydrogen()->IsConstantHoleStore() && |
| 313 hydrogen()->value()->representation().IsDouble()); | 313 hydrogen()->value()->representation().IsDouble()); |
| 314 stream->Add("<the hole(nan)>"); | 314 stream->Add("<the hole(nan)>"); |
| 315 } else { | 315 } else { |
| 316 value()->PrintTo(stream); | 316 value()->PrintTo(stream); |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 | 319 |
| 320 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | |
| 321 object()->PrintTo(stream); | |
| 322 stream->Add("["); | |
| 323 key()->PrintTo(stream); | |
| 324 stream->Add("] <- "); | |
| 325 value()->PrintTo(stream); | |
| 326 } | |
| 327 | |
| 328 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { | 320 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { |
| 329 object()->PrintTo(stream); | 321 object()->PrintTo(stream); |
| 330 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); | 322 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); |
| 331 } | 323 } |
| 332 | 324 |
| 333 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { | 325 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { |
| 334 // Skip a slot if for a double-width slot. | 326 // Skip a slot if for a double-width slot. |
| 335 if (kind == DOUBLE_REGISTERS) current_frame_slots_++; | 327 if (kind == DOUBLE_REGISTERS) current_frame_slots_++; |
| 336 return current_frame_slots_++; | 328 return current_frame_slots_++; |
| 337 } | 329 } |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1953 (instr->value()->representation().IsDouble() && | 1945 (instr->value()->representation().IsDouble() && |
| 1954 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 1946 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
| 1955 DCHECK(instr->elements()->representation().IsExternal()); | 1947 DCHECK(instr->elements()->representation().IsExternal()); |
| 1956 LOperand* val = UseRegister(instr->value()); | 1948 LOperand* val = UseRegister(instr->value()); |
| 1957 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 1949 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 1958 LOperand* backing_store = UseRegister(instr->elements()); | 1950 LOperand* backing_store = UseRegister(instr->elements()); |
| 1959 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); | 1951 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); |
| 1960 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); | 1952 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); |
| 1961 } | 1953 } |
| 1962 | 1954 |
| 1963 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | |
| 1964 LOperand* context = UseFixed(instr->context(), cp); | |
| 1965 LOperand* obj = | |
| 1966 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | |
| 1967 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | |
| 1968 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | |
| 1969 | |
| 1970 DCHECK(instr->object()->representation().IsTagged()); | |
| 1971 DCHECK(instr->key()->representation().IsTagged()); | |
| 1972 DCHECK(instr->value()->representation().IsTagged()); | |
| 1973 | |
| 1974 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister()); | |
| 1975 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister()); | |
| 1976 | |
| 1977 LStoreKeyedGeneric* result = | |
| 1978 new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector); | |
| 1979 return MarkAsCall(result, instr); | |
| 1980 } | |
| 1981 | |
| 1982 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 1955 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
| 1983 HTransitionElementsKind* instr) { | 1956 HTransitionElementsKind* instr) { |
| 1984 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { | 1957 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { |
| 1985 LOperand* object = UseRegister(instr->object()); | 1958 LOperand* object = UseRegister(instr->object()); |
| 1986 LOperand* new_map_reg = TempRegister(); | 1959 LOperand* new_map_reg = TempRegister(); |
| 1987 LTransitionElementsKind* result = | 1960 LTransitionElementsKind* result = |
| 1988 new (zone()) LTransitionElementsKind(object, NULL, new_map_reg); | 1961 new (zone()) LTransitionElementsKind(object, NULL, new_map_reg); |
| 1989 return result; | 1962 return result; |
| 1990 } else { | 1963 } else { |
| 1991 LOperand* object = UseFixed(instr->object(), r2); | 1964 LOperand* object = UseFixed(instr->object(), r2); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2211 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2239 LOperand* object = UseRegister(instr->object()); | 2212 LOperand* object = UseRegister(instr->object()); |
| 2240 LOperand* index = UseTempRegister(instr->index()); | 2213 LOperand* index = UseTempRegister(instr->index()); |
| 2241 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2214 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
| 2242 LInstruction* result = DefineSameAsFirst(load); | 2215 LInstruction* result = DefineSameAsFirst(load); |
| 2243 return AssignPointerMap(result); | 2216 return AssignPointerMap(result); |
| 2244 } | 2217 } |
| 2245 | 2218 |
| 2246 } // namespace internal | 2219 } // namespace internal |
| 2247 } // namespace v8 | 2220 } // namespace v8 |
| OLD | NEW |