Chromium Code Reviews| Index: src/compiler/instruction.cc |
| diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc |
| index 994ade6a3f7e90879e4192fe9f8859d4012e994d..57b72c739255cad887a0af350acd3f2a8adf5716 100644 |
| --- a/src/compiler/instruction.cc |
| +++ b/src/compiler/instruction.cc |
| @@ -513,6 +513,16 @@ Constant::Constant(RelocatablePtrConstantInfo info) |
| } |
| #endif |
| +Handle<HeapObject> Constant::ToHeapObject() const { |
| + DCHECK_EQ(kHeapObject, type()); |
| + Handle<HeapObject> value = |
| + bit_cast<Handle<HeapObject> >(static_cast<intptr_t>(value_)); |
|
Michael Starzinger
2016/04/28 12:18:17
nit: Would it be possible to use the "Handle(T** l
Benedikt Meurer
2016/04/28 12:20:52
Done.
|
| + if (value->IsConsString()) { |
| + value = String::Flatten(Handle<String>::cast(value), TENURED); |
| + } |
| + return value; |
| +} |
| + |
| std::ostream& operator<<(std::ostream& os, const Constant& constant) { |
| switch (constant.type()) { |
| case Constant::kInt32: |