diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-05-08 15:58:46 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-05-08 15:58:46 -0300 |
| commit | 42ff788e53ecffdd6741ca4da63fdedb220178d7 (patch) | |
| tree | 0d4c380638fdad813d39951287c916d068a88057 | |
| parent | 1bd70a8e40a8600658c706d5f171138e9b902aba (diff) | |
| download | lua-42ff788e53ecffdd6741ca4da63fdedb220178d7.tar.gz lua-42ff788e53ecffdd6741ca4da63fdedb220178d7.tar.bz2 lua-42ff788e53ecffdd6741ca4da63fdedb220178d7.zip | |
comments
| -rw-r--r-- | lcode.c | 11 |
1 files changed, 6 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.c,v 2.88 2014/04/27 14:41:11 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.89 2014/04/29 18:14:16 roberto Exp roberto $ |
| 3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -346,8 +346,9 @@ int luaK_stringK (FuncState *fs, TString *s) { | |||
| 346 | 346 | ||
| 347 | 347 | ||
| 348 | /* | 348 | /* |
| 349 | ** use userdata as key to avoid collision with float with same value; | 349 | ** Integers use userdata as keys to avoid collision with floats with same |
| 350 | ** conversion to 'void*' used only for hash, no "precision" problems | 350 | ** value; conversion to 'void*' used only for hashing, no "precision" |
| 351 | ** problems | ||
| 351 | */ | 352 | */ |
| 352 | int luaK_intK (FuncState *fs, lua_Integer n) { | 353 | int luaK_intK (FuncState *fs, lua_Integer n) { |
| 353 | TValue k, o; | 354 | TValue k, o; |
| @@ -359,8 +360,8 @@ int luaK_intK (FuncState *fs, lua_Integer n) { | |||
| 359 | 360 | ||
| 360 | /* | 361 | /* |
| 361 | ** Both NaN and -0.0 should not go to the constant table, as they have | 362 | ** Both NaN and -0.0 should not go to the constant table, as they have |
| 362 | ** problems with the hashing. (NaN is not ** a valid key, | 363 | ** problems with the hashing. (NaN is not a valid key, -0.0 collides |
| 363 | ** -0.0 collides with +0.0.) | 364 | ** with +0.0.) |
| 364 | */ | 365 | */ |
| 365 | static int luaK_numberK (FuncState *fs, lua_Number r) { | 366 | static int luaK_numberK (FuncState *fs, lua_Number r) { |
| 366 | TValue o; | 367 | TValue o; |
