Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2033 UNREACHABLE(); | 2033 UNREACHABLE(); |
| 2034 return NULL; | 2034 return NULL; |
| 2035 } | 2035 } |
| 2036 | 2036 |
| 2037 | 2037 |
| 2038 void MaterializeObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2038 void MaterializeObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2039 UNREACHABLE(); | 2039 UNREACHABLE(); |
| 2040 } | 2040 } |
| 2041 | 2041 |
| 2042 | 2042 |
| 2043 // This function should be kept in sync with | |
| 2044 // FlowGraphCompiler::SlowPathEnvironmentFor(). | |
| 2045 void MaterializeObjectInstr::RemapRegisters(intptr_t* fpu_reg_slots, | |
| 2046 intptr_t* cpu_reg_slots) { | |
| 2047 for (intptr_t i = 0; i < InputCount(); i++) { | |
| 2048 Location loc = LocationAt(i); | |
| 2049 if (loc.IsRegister()) { | |
| 2050 intptr_t index = cpu_reg_slots[loc.reg()]; | |
| 2051 ASSERT(index >= 0); | |
| 2052 // OS::PrintErr("REMAPPING register xx(%d)\n", loc.reg()); | |
|
Florian Schneider
2014/04/25 05:55:33
Remove commented-out code.
turnidge
2014/04/25 20:16:33
Done.
| |
| 2053 locations_[i] = Location::StackSlot(index); | |
| 2054 } else if (loc.IsFpuRegister()) { | |
| 2055 intptr_t index = fpu_reg_slots[loc.fpu_reg()]; | |
| 2056 ASSERT(index >= 0); | |
| 2057 Value* value = InputAt(i); | |
| 2058 switch (value->definition()->representation()) { | |
| 2059 case kUnboxedDouble: | |
| 2060 case kUnboxedMint: | |
| 2061 locations_[i] = Location::DoubleStackSlot(index); | |
| 2062 break; | |
| 2063 case kUnboxedFloat32x4: | |
| 2064 case kUnboxedInt32x4: | |
| 2065 case kUnboxedFloat64x2: | |
| 2066 locations_[i] = Location::QuadStackSlot(index); | |
| 2067 break; | |
| 2068 default: | |
| 2069 UNREACHABLE(); | |
| 2070 } | |
| 2071 } else if (loc.IsInvalid()) { | |
| 2072 // TODO(turnidge): Can materialized objects refer to other | |
|
Florian Schneider
2014/04/25 05:55:33
I think right now this is the case - it may change
turnidge
2014/04/25 20:16:33
Updated comment.
| |
| 2073 // materialized objects? If so, then we need to recurse here. | |
| 2074 // Additionally, we might also need to check for cycles in the | |
| 2075 // graph of materialized objects to avoid getting stuck. For | |
| 2076 // now, mark this UNREACHABLE. | |
| 2077 UNREACHABLE(); | |
| 2078 } | |
| 2079 } | |
| 2080 } | |
| 2081 | |
| 2082 | |
| 2043 LocationSummary* StoreContextInstr::MakeLocationSummary(bool optimizing) const { | 2083 LocationSummary* StoreContextInstr::MakeLocationSummary(bool optimizing) const { |
| 2044 const intptr_t kNumInputs = 1; | 2084 const intptr_t kNumInputs = 1; |
| 2045 const intptr_t kNumTemps = 0; | 2085 const intptr_t kNumTemps = 0; |
| 2046 LocationSummary* summary = | 2086 LocationSummary* summary = |
| 2047 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 2087 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 2048 summary->set_in(0, Location::RegisterLocation(CTX)); | 2088 summary->set_in(0, Location::RegisterLocation(CTX)); |
| 2049 return summary; | 2089 return summary; |
| 2050 } | 2090 } |
| 2051 | 2091 |
| 2052 | 2092 |
| (...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3251 case Token::kTRUNCDIV: return 0; | 3291 case Token::kTRUNCDIV: return 0; |
| 3252 case Token::kMOD: return 1; | 3292 case Token::kMOD: return 1; |
| 3253 default: UNIMPLEMENTED(); return -1; | 3293 default: UNIMPLEMENTED(); return -1; |
| 3254 } | 3294 } |
| 3255 } | 3295 } |
| 3256 | 3296 |
| 3257 | 3297 |
| 3258 #undef __ | 3298 #undef __ |
| 3259 | 3299 |
| 3260 } // namespace dart | 3300 } // namespace dart |
| OLD | NEW |