Source-Changes-D archive

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

Re: CVS commit: src

On Wed, Dec 4, 2013 at 6:36 PM, Alexander Nasonov <> 
> Lourival Vieira Neto wrote:
>> On Tue, Dec 3, 2013 at 9:26 PM, Alexander Nasonov 
>> <> wrote:
>> > Do you have a test to prove that 'return 2^3' doesn't break in the
>> > kernel?
>> Yes; you can just load the script you've mentioned. There is no reason
>> to break anything. It is just defined as the multiplication operator.
> Well, you can certainly do this or tweak something else in the language
> but you should stop calling your thing Lua. Because it's not Lua anymore.

Are you aware that we have already changed the language number type?
Thus, we have already changed the language itself? If you insist, we
can call that Lua', kernel Lua, or whatever you like.

>> >> Is there an issue with lua_error?
>> >
>> > I don't think that lua_error would work because lua_State isn't passed
>> > to luai_numpow(a,b). I wanted to say that you need a stub that breaks
>> > in a very noticeable way.
>> I really miss your point here. Why lua_State should be passed to
>> luai_numpow()? Anyway, I just checked and lua_error is working fine.
> What do you mean by "working fine"?

By that I mean lua_error() function is working properly, AFAIK.

> Are you talking about this change:
> #define luai_numpow(a,b)        lua_error(L, "")
> ?

No. Why I should? I really don't understand why you want to do that.

> It can't work because luai_numpow is used inside constfolding (defined
> in lcode.c) where L is undefined.

Yes. It wasn't designed to work in that way.

> Since you can't use lua_error, you may consider this
> #define luai_numpow(a,b) \
>         panic("I take this opportunity to say that I need "
>               "a volunteer to implement luai_numpow in the kernel. ")
> ;-)
> But seriously, you can easily implement it. It doesn't even have to be
> in a Lua core file. You can create a new file in you lua module directory.

Yes, we can (how Obama says =). However, I don't see this as a priority.

>> Do you have an example that breaks it? If you want a verbose output,
>> just push your error message (like, lua_pushstring(L, "my error")) and
>> call lua_error(L). If kern.lua.verbose is set, you will get "my error"
>> printed.
> You guys keep adding sysctls. Why do you need kern.lua.verbose? I assume
> that all kernel Lua code should have a protected call at top-level. If
> they don't, you definitely want to see an error printed to the console.

I didn't add any sysctl. Anyway, it can be discussed in tech-kern@.

Lourival Vieira Neto

Home | Main Index | Thread Index | Old Index