Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/globals.h" // Needed here to get TARGET_ARCH_DBC. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. |
| 6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 331 EMIT_NATIVE_CODE(LoadClassId, 1, Location::RequiresRegister()) { | 331 EMIT_NATIVE_CODE(LoadClassId, 1, Location::RequiresRegister()) { |
| 332 if (compiler->is_optimizing()) { | 332 if (compiler->is_optimizing()) { |
| 333 __ LoadClassId(locs()->out(0).reg(), locs()->in(0).reg()); | 333 __ LoadClassId(locs()->out(0).reg(), locs()->in(0).reg()); |
| 334 } else { | 334 } else { |
| 335 __ LoadClassIdTOS(); | 335 __ LoadClassIdTOS(); |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 | 338 |
| 339 | 339 |
| 340 EMIT_NATIVE_CODE(Constant, 0, Location::RequiresRegister()) { | 340 EMIT_NATIVE_CODE(Constant, 0, Location::RequiresRegister()) { |
| 341 if (compiler->is_optimizing()) { | 341 if (compiler->is_optimizing() && locs()->out(0).IsRegister()) { |
|
Vyacheslav Egorov (Google)
2016/11/03 11:11:50
We will end up Pushing the constant on the stack h
Florian Schneider
2016/11/03 11:22:59
Done. Yes, of course. I simplfified the code incor
| |
| 342 __ LoadConstant(locs()->out(0).reg(), value()); | 342 __ LoadConstant(locs()->out(0).reg(), value()); |
| 343 } else { | 343 } else { |
| 344 __ PushConstant(value()); | 344 __ PushConstant(value()); |
| 345 } | 345 } |
| 346 } | 346 } |
| 347 | 347 |
| 348 | 348 |
| 349 EMIT_NATIVE_CODE(UnboxedConstant, 0, Location::RequiresRegister()) { | 349 EMIT_NATIVE_CODE(UnboxedConstant, 0, Location::RequiresRegister()) { |
| 350 // The register allocator drops constant definitions that have no uses. | 350 // The register allocator drops constant definitions that have no uses. |
| 351 if (locs()->out(0).IsInvalid()) { | 351 if (locs()->out(0).IsInvalid()) { |
| (...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1964 __ IfULe(length, index); | 1964 __ IfULe(length, index); |
| 1965 compiler->EmitDeopt(deopt_id(), | 1965 compiler->EmitDeopt(deopt_id(), |
| 1966 ICData::kDeoptCheckArrayBound, | 1966 ICData::kDeoptCheckArrayBound, |
| 1967 (generalized_ ? ICData::kGeneralized : 0) | | 1967 (generalized_ ? ICData::kGeneralized : 0) | |
| 1968 (licm_hoisted_ ? ICData::kHoisted : 0)); | 1968 (licm_hoisted_ ? ICData::kHoisted : 0)); |
| 1969 } | 1969 } |
| 1970 | 1970 |
| 1971 } // namespace dart | 1971 } // namespace dart |
| 1972 | 1972 |
| 1973 #endif // defined TARGET_ARCH_DBC | 1973 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |