Chromium Code Reviews| Index: runtime/vm/assembler_arm64.cc |
| =================================================================== |
| --- runtime/vm/assembler_arm64.cc (revision 39909) |
| +++ runtime/vm/assembler_arm64.cc (working copy) |
| @@ -31,7 +31,8 @@ |
| patchable_pool_entries_(), |
| prologue_offset_(-1), |
| use_far_branches_(use_far_branches), |
| - comments_() { |
| + comments_(), |
| + allow_constant_pool_(true) { |
| if (Isolate::Current() != Dart::vm_isolate()) { |
| object_pool_ = GrowableObjectArray::New(Heap::kOld); |
| @@ -488,6 +489,8 @@ |
| bool Assembler::CanLoadObjectFromPool(const Object& object) { |
| + if (!allow_constant_pool()) return false; |
|
zra
2014/09/05 20:26:49
Please use curly braces.
Also, Null, True, and Fa
Florian Schneider
2014/09/08 11:12:39
Ok, I made those objects to be loaded from the con
|
| + |
| // TODO(zra, kmillikin): Also load other large immediates from the object |
| // pool |
| if (object.IsSmi()) { |
| @@ -508,6 +511,7 @@ |
| bool Assembler::CanLoadImmediateFromPool(int64_t imm, Register pp) { |
| + if (!allow_constant_pool()) return false; |
|
zra
2014/09/05 20:26:49
Please use curly braces.
Florian Schneider
2014/09/08 11:12:39
Done.
|
| return !Utils::IsInt(32, imm) && |
| (pp != kNoPP) && |
| // We *could* put constants in the pool in a VM isolate, but it is |
| @@ -567,7 +571,9 @@ |
| void Assembler::LoadDecodableImmediate(Register reg, int64_t imm, Register pp) { |
| - if ((pp != kNoPP) && (Isolate::Current() != Dart::vm_isolate())) { |
| + if ((pp != kNoPP) && |
| + (Isolate::Current() != Dart::vm_isolate()) && |
| + allow_constant_pool()) { |
| int64_t val_smi_tag = imm & kSmiTagMask; |
| imm &= ~kSmiTagMask; // Mask off the tag bits. |
| const int32_t offset = Array::element_offset(FindImmediate(imm)); |