Commit Graph

62 Commits (d358dd83e79017472d73a512aeac383cc1636a3f)

Author SHA1 Message Date
Daniel Kolesa d358dd83e7 halve the size of any_value by removing state pointer from it
this brings more advantages too like actually being default
constructible, so it can be used more easily in data structures etc
2021-04-11 03:32:33 +02:00
Daniel Kolesa 83aa8bfd07 hide bcode pointers from public api 2021-04-10 03:37:59 +02:00
Daniel Kolesa 63023f8c5e remove parser_state::gen_main 2021-04-10 00:54:28 +02:00
Daniel Kolesa c0fc1aa452 abstract away ugly bcode reference creation 2021-04-09 01:12:52 +02:00
Daniel Kolesa dcd5f61748 fewer direct accesses to code vector 2021-04-09 01:03:29 +02:00
Daniel Kolesa e5a05a3199 remove parser_state::done() 2021-04-09 00:56:58 +02:00
Daniel Kolesa 5f67b205df initial bits for separation of codegen from parser 2021-04-09 00:41:55 +02:00
Daniel Kolesa ccb0c09d59 rename codegen_state to parser_state and move it
later commits will rewrite the parser and separate the codegen
bits into their own API
2021-04-08 23:35:30 +02:00
Daniel Kolesa 4da0cb54a8 use format contants in default ivar/fvar/svar handlers 2021-04-06 21:23:17 +02:00
Daniel Kolesa e531ab3434 clean up any_value APIs for consistency 2021-04-06 00:54:46 +02:00
Daniel Kolesa 8c8aa26c20 return refs for new_*var and new_ident (guarantee valid result) 2021-04-05 19:52:13 +02:00
Daniel Kolesa 06b1661afd hide thread_state, remove state::thread_pointer() 2021-04-05 04:10:39 +02:00
Daniel Kolesa f0bb6b1410 make more api private 2021-04-03 06:16:43 +02:00
Daniel Kolesa b2caade276 remove all raw bcode passing in public api 2021-04-01 05:06:26 +02:00
Daniel Kolesa 13d46881e8 windows fixes and other correctness/portability stuff 2021-03-31 01:13:35 +02:00
Daniel Kolesa 89e5f5f004 move everything to alias_stack and remove stacked_value 2021-03-30 20:55:50 +02:00
Daniel Kolesa 970e37f318 make alias pushing separate from setting value 2021-03-30 20:24:46 +02:00
Daniel Kolesa 4154944726 remove fixed-size argument stacks and reliance on argument ids 2021-03-30 00:28:06 +02:00
Daniel Kolesa 9e82dc0d2f get rid of cycle check from push_arg 2021-03-29 23:42:08 +02:00
Daniel Kolesa 71f45b2f07 fix up usage of IDENT_FLAG_UNKNOWN 2021-03-28 00:38:41 +01:00
Daniel Kolesa b27d4fa7e6 make p_tstate actually private 2021-03-26 03:05:14 +01:00
Daniel Kolesa 0b2c4c7038 pass thread_state in more places 2021-03-26 02:29:54 +01:00
Daniel Kolesa 468c3a07d4 get rid of some indirections 2021-03-25 01:52:03 +01:00
Daniel Kolesa d80af7b159 hide internal_state from public state struct 2021-03-25 01:37:42 +01:00
Daniel Kolesa 3d37ea22c3 put force_ident and force_code in any_value 2021-03-24 21:01:01 +01:00
Daniel Kolesa 4ded59ce70 launder aligned_storage pointers 2021-03-24 02:42:33 +01:00
Daniel Kolesa d774db675a separate cs_gen.hh, various refactors 2021-03-24 02:21:32 +01:00
Daniel Kolesa 21aec59ad3 rename namespace to cubescript 2021-03-23 23:32:25 +01:00
Daniel Kolesa b9b344cba6 remove cs_ namespace in all API 2021-03-23 23:29:32 +01:00
Daniel Kolesa b3b4624af1 drop cubescript.cc, move parsing stuff from cs_std to cs_parser 2021-03-23 22:17:25 +01:00
Daniel Kolesa 4b6c284ea1 separate cs_parser.cc, drop cs_util.cc 2021-03-23 02:00:23 +01:00
Daniel Kolesa 2cc1b0e271 add cs_std.cc, drop cs_util.hh 2021-03-23 01:46:56 +01:00
Daniel Kolesa 4588ae2373 separate cs_state, cs_std 2021-03-23 01:11:21 +01:00
Daniel Kolesa 83e92e6881 ditch a bunch of reinterpret_casts 2021-03-22 21:37:13 +01:00
Daniel Kolesa 3f866baccb strict reference counting for bytecode references 2021-03-21 18:45:59 +01:00
Daniel Kolesa 436098cc38 drop the whole cs_alias_internal nonsense 2021-03-21 02:59:37 +01:00
Daniel Kolesa f8eb07ee2b hide implementation details of idents 2021-03-21 02:47:02 +01:00
Daniel Kolesa cb926a5750 get rid of ostd requirements inside library entirely 2021-03-20 07:24:25 +01:00
Daniel Kolesa 55d5397f4f implement move behavior for cs_value
this prevents things from going horribly wrong when people
do move the values (since the implicit implementations don't
take care of handling the refcounts)
2021-03-20 04:49:47 +01:00
Daniel Kolesa 5648c1a757 use string_view everywhere that returns or takes a string 2021-03-20 04:10:27 +01:00
Daniel Kolesa fece7ce769 get rid of most remaining cs_string 2021-03-19 22:32:28 +01:00
Daniel Kolesa af1a85fb91 get rid of public format_int/float (use cs_value) 2021-03-19 00:34:12 +01:00
Daniel Kolesa 64d9c0e749 make intstr/floatstr internal to cs_value 2021-03-19 00:12:47 +01:00
Daniel Kolesa 704f9217f7 unify enum style 2021-03-18 20:55:14 +01:00
Daniel Kolesa 7eaf3679a4 get rid of cs_value::get_strr 2021-03-17 21:59:37 +01:00
Daniel Kolesa 2f5bb697eb use string refs more instead of allocated strings 2021-03-17 21:46:37 +01:00
Daniel Kolesa 8b7f36319d eliminate length field in cs_value 2021-03-17 21:16:25 +01:00
Daniel Kolesa 64130a12bf remove handling of constants from codegen, bytecode and cs_value
also drop move semantics on cs_value
2021-03-17 20:41:08 +01:00
Daniel Kolesa 8def7ce85c intern all strings in cs_value 2021-03-17 02:47:34 +01:00
Daniel Kolesa c004db42c6 refactor cs_value and related structures to contain state
this will allow us to intern strings inside cs_value
2021-03-17 01:26:30 +01:00