monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] RFC: Restricting app_state to commands


From: Markus Schiltknecht
Subject: Re: [Monotone-devel] RFC: Restricting app_state to commands
Date: Tue, 10 Apr 2007 11:00:27 +0200
User-agent: Icedove 1.5.0.10 (X11/20070329)

Hi,

Zack Weinberg wrote:
Your point is well-taken - but I think you're not being ambitious
enough.

Huh? Did you see the n.v.m.experiment.encapsulation branch already?

As you mention, app.signers and app.verifiers ought to be
combined with the key_store - but probably so should app.agent; I
haven't looked at the code in enough detail to be sure, but I think
Justin just made it a separate object because that was the path of
least resistance, not because it actually *needs* to be separate - and
logically, it is part of the key store.

Agreed.

Furthermore, if you look at the specific options and hooks that are
being used, I'd argue that they ought to be properties of the
key_store too.  With the exception of the get_passphrase hook (which
we are killing, aren't we?) they are constant across the application
run.

Sure. If we are going to split the app_state into multiple context objects, we need to sort out what to put where. See the README.encapsulation in that branch.

Anyway, I would also really like to get a better separation. I have
started with (partly) ripping out the database from app_state and
passing only that where possible.

Cool. I will look at your branch when I get a chance (probably not this week).

:-) answers my question above... Anyway, I'd certainly like to get some review before going all the way to change calling conventions for a whole lot of objects and functions.

How do you count that stuff? Is there a script? Or a makefile target or
something?

Build before and after (in two separate directories) with "make
CXXFLAGS='-g -O2 -save-temps'", and then

$ (cd before && wc -l *.ii) > A
$ (cd before && wc -l *.s) > As
$ (cd after && wc -l *.ii) > B
$ (cd after && wc -l *.s) > Bs
$ paste A B As Bs |  awk 'BEGIN{ OFS="\t"; print "file", ".ii", ".s" }
{ if ($3 - $1 != 0 || $7 - $5 != 0) { sub(/\.ii/, "", $2); print $2,
$3 - $1, $7 - $5 } }'

(I really wish coreutils' join(1) utility were more powerful, but this works.)

Thanks for these instructions, very helpful! Especially the -save-temps option is new to me.

Regards

Markus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]