示例#1
0
  bool InlineCache::update_and_validate_private(STATE, CallFrame* call_frame, Object* recv) {
    if(valid_p(state, recv)) return true;

    set_klass(recv->lookup_begin(state));

    if(!fill_private(state, name, klass())) {
      return false;
    }

    update_seen_classes();
    run_wb(state, call_frame->cm);

    return true;
  }
示例#2
0
  MethodCacheEntry* InlineCache::update_and_validate_private(STATE, CallFrame* call_frame, Object* recv) {
    MethodCacheEntry* mce = cache_;

    Class* const recv_class = recv->lookup_begin(state);

    if(likely(mce && mce->receiver_class() == recv_class)) return mce;

    if(!fill_private(state, name, recv_class, recv_class, mce)) return 0;

    update_seen_classes(mce);
    call_frame->cm->write_barrier(state, mce);

    return mce;
  }