| Index: runtime/vm/object.cc
|
| ===================================================================
|
| --- runtime/vm/object.cc (revision 15037)
|
| +++ runtime/vm/object.cc (working copy)
|
| @@ -7002,6 +7002,30 @@
|
| }
|
|
|
|
|
| +void Code::set_static_calls_target_table(const Array& value) const {
|
| + StorePointer(&raw_ptr()->static_calls_target_table_, value.raw());
|
| +}
|
| +
|
| +
|
| +RawFunction* Code::GetStaticCallTargetAt(uword pc) {
|
| + const Code& code = Code::Handle(Code::LookupCode(pc));
|
| + if (!code.IsNull()) {
|
| + RawObject* raw_code_offset =
|
| + reinterpret_cast<RawObject*>(Smi::New(pc - code.EntryPoint()));
|
| + const Array& array =
|
| + Array::Handle(code.raw_ptr()->static_calls_target_table_);
|
| + for (intptr_t i = 0; i < array.Length(); i += 2) {
|
| + if (array.At(i) == raw_code_offset) {
|
| + Function& function = Function::Handle();
|
| + function ^= array.At(i + 1);
|
| + return function.raw();
|
| + }
|
| + }
|
| + }
|
| + return Function::null();
|
| +}
|
| +
|
| +
|
| void Code::set_resolved_static_calls(const GrowableObjectArray& val) const {
|
| StorePointer(&raw_ptr()->resolved_static_calls_, val.raw());
|
| }
|
|
|