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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 411 __ LoadField(locs()->out(0).reg(), | 411 __ LoadField(locs()->out(0).reg(), |
| 412 locs()->in(0).reg(), | 412 locs()->in(0).reg(), |
| 413 Field::static_value_offset() / kWordSize); | 413 Field::static_value_offset() / kWordSize); |
| 414 } else { | 414 } else { |
| 415 const intptr_t kidx = __ AddConstant(StaticField()); | 415 const intptr_t kidx = __ AddConstant(StaticField()); |
| 416 __ PushStatic(kidx); | 416 __ PushStatic(kidx); |
| 417 } | 417 } |
| 418 } | 418 } |
| 419 | 419 |
| 420 | 420 |
| 421 EMIT_NATIVE_CODE(InitStaticField, 0) { | 421 EMIT_NATIVE_CODE(InitStaticField, 1) { |
| 422 ASSERT(!compiler->is_optimizing()); | 422 if (compiler->is_optimizing()) { |
| 423 __ InitStaticTOS(); | 423 __ Push(locs()->in(0).reg()); |
| 424 __ InitStaticTOS(); | |
|
Vyacheslav Egorov (Google)
2016/11/09 09:28:28
This looks like a call. Does this need compiler->R
Florian Schneider
2016/11/09 13:51:52
Actually yes, good point. It could throw, or cause
Vyacheslav Egorov (Google)
2016/11/09 13:55:11
I think it should work.
Maybe write a test?
| |
| 425 } else { | |
| 426 __ InitStaticTOS(); | |
| 427 } | |
| 424 } | 428 } |
| 425 | 429 |
| 426 | 430 |
| 427 EMIT_NATIVE_CODE(ClosureCall, | 431 EMIT_NATIVE_CODE(ClosureCall, |
| 428 1, | 432 1, |
| 429 Location::RegisterLocation(0), | 433 Location::RegisterLocation(0), |
| 430 LocationSummary::kCall) { | 434 LocationSummary::kCall) { |
| 431 if (compiler->is_optimizing()) { | 435 if (compiler->is_optimizing()) { |
| 432 __ Push(locs()->in(0).reg()); | 436 __ Push(locs()->in(0).reg()); |
| 433 } | 437 } |
| (...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1966 __ IfULe(length, index); | 1970 __ IfULe(length, index); |
| 1967 compiler->EmitDeopt(deopt_id(), | 1971 compiler->EmitDeopt(deopt_id(), |
| 1968 ICData::kDeoptCheckArrayBound, | 1972 ICData::kDeoptCheckArrayBound, |
| 1969 (generalized_ ? ICData::kGeneralized : 0) | | 1973 (generalized_ ? ICData::kGeneralized : 0) | |
| 1970 (licm_hoisted_ ? ICData::kHoisted : 0)); | 1974 (licm_hoisted_ ? ICData::kHoisted : 0)); |
| 1971 } | 1975 } |
| 1972 | 1976 |
| 1973 } // namespace dart | 1977 } // namespace dart |
| 1974 | 1978 |
| 1975 #endif // defined TARGET_ARCH_DBC | 1979 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |