Lines Matching +refs:jit +refs:verify +refs:assembler

11 	* jit-playback.c: Likewise.
15 * jit-playback.c (gcc::jit::playback::context::handle_locations):
23 subclasses of the gcc::jit::recording classes.
165 * jit-playback.c: Drop includes of debug.h, langhooks.h,
171 * jit-recording.c: Include tm.h. Don't include function.h.
221 * jit-recording.c (gcc::jit::dump::dump): Handle fopen failures
223 (gcc::jit::dump::~dump): Likewise for fclose failures.
224 (gcc::jit::dump::write): Don't attempt further work if the fopen
230 * Make-lang.in (jit.install-common): Drop installation of
232 * config-lang.in (outputs): Drop jit/libgccjit.pc.
237 * Make-lang.in (jit): Add $(FULL_DRIVER_NAME) as a dependency, so
240 * jit-playback.c (gcc::jit::playback::context::compile): Add
254 include the comment from jit-common.h as rst, rather than as a
256 * jit-common.h: Convert the summary format to valid reStructured
258 * notes.txt: Clarify where libgccjit.c, jit-recording.c and
259 jit-playback.c fit into the high-level diagram.
263 * Make-lang.in (jit_OBJS): Drop jit/internal-api.o.
264 Add jit/jit-recording.o and jit/jit-playback.o.
266 * internal-api.c: Delete, moving content to new files jit-recording.c
267 and jit-playback.c.
269 jit-common.h, jit-playback.h, jit-recording.h.
270 * jit-common.h: New file, containing the forward decls of classes
272 * jit-recording.c: New file, containing the gcc::jit::recording
273 code formerly in internal-api.c, and gcc::jit::dump.
274 * jit-recording.h: New file, containing the gcc::jit::recording
276 * jit-playback.c: New file, containing the gcc::jit::playback
278 * jit-playback.h: New file, containing the gcc::jit::playback
282 of jit-common.h and jit-playback.h.
283 * jit-builtins.h: Replace include of internal-api.h with
284 jit-common.h.
285 * jit-builtins.c: Replace include of internal-api.h with
286 jit-common.h. Add include of jit-recording.h.
303 (gcc::jit::playback::context::compile): Rather than looking for a
310 * Make-lang.in (jit.info): Implement.
311 (jit.install-info): Implement.
312 (jit.dvi): Implement.
313 (jit.pdf): Implement in terms of new target "jit.texinfo.pdf".
314 (jit.install-pdf): Likewise for new target
315 "jit.texinfo.install-pdf".
316 (jit.install-html): Implement in terms of
317 "jit.$(doc_build_sys).install-html" to redirect to new targets
318 "jit.sphinx.install-html" or "jit.texinfo.install-html".
319 (jit.html): Implement in terms of "jit.$(doc_build_sys).html" to
320 redirect to new targets "jit.sphinx.html" or "jit.texinfo.html".
322 (jit.texinfo.html): New target.
323 (jit.texinfo.install-html): New target.
324 (jit.texinfo.pdf): New target.
325 (jit.texinfo.install-pdf): New target.
327 (jit.sphinx.html): New target.
329 (jit.sphinx.install-html): New target.
330 (jit.sphinx.pdf): New target.
334 * internal-api.h (gcc::jit::recording::context): Convert field
338 * internal-api.c (gcc::jit::recording::context::context): Update
340 (gcc::jit::recording::context::~context): Free m_first_error_str
342 (gcc::jit::recording::context::add_error_va): When capturing the
346 (gcc::jit::recording::context::get_first_error): Update for change
351 * internal-api.c (gcc::jit::playback::context::compile): Use
358 (gcc::jit::playback::context::compile): Call
382 (gcc::jit::recording::context::compile): Update for renaming of
387 * jit-builtins.c: Likewise.
391 * internal-api.c (gcc::jit::dump::write): Eliminate fixed-size
395 (gcc::jit::recording::context::add_error_va): Likewise, using
399 (gcc::jit::recording::string::from_printf): Eliminate fixed-size
410 * jit-builtins.c: Likewise.
415 * ChangeLog.jit: Add copyright footer.
434 (gcc::jit::playback::context::new_binary_op): Likewise.
524 * Make-lang.in (jit.install-common): Install libgccjit.pc to
526 * config-lang.in (outputs): Define this, adding jit/libgccjit.pc
528 jit/libgccjit.pc.in at configure time.
614 (gcc::jit::playback::wrapper::operator new): Use
617 (gcc::jit::playback::function::postprocess): Update call to
619 (gcc::jit::playback::block::add_comment): Update call to
633 * internal-api.h (gcc::jit::recording::compound_type): New class
634 (gcc::jit::recording::union): New class.
635 (gcc::jit::playback::struct_): Rename this class to...
636 (gcc::jit::playback::compound_type): ...this.
637 (gcc::jit::recording::context::new_union_type): New method.
638 (gcc::jit::recording::context): Rename field "m_structs" to
641 (gcc::jit::recording::field): Update field m_container from
643 (gcc::jit::recording::field::get_container): Generalize from
645 (gcc::jit::recording::field::set_container): Likewise.
646 (gcc::jit::recording::compound_type): New subclass of type, to
648 (gcc::jit::recording::struct_::get_name): Move to...
649 (gcc::jit::recording::compound_type::get_name): ...here.
650 (gcc::jit::recording::struct_::get_loc): Move to...
651 (gcc::jit::recording::compound_type::get_loc): ...here.
652 (gcc::jit::recording::struct_::set_fields): Move to...
653 (gcc::jit::recording::compound_type::set_fields): ...here.
654 (gcc::jit::recording::struct_::dereference): Move to...
655 (gcc::jit::recording::compound_type::dereference): ...here.
656 (gcc::jit::recording::struct_::is_int): Move to...
657 (gcc::jit::recording::compound_type::is_int): ...here.
658 (gcc::jit::recording::struct_::is_float): Move to...
659 (gcc::jit::recording::compound_type::is_float): ...here.
660 (gcc::jit::recording::struct_::is_bool): Move to...
661 (gcc::jit::recording::compound_type::is_bool): ...here.
662 (gcc::jit::recording::struct_::is_pointer): Move to...
663 (gcc::jit::recording::compound_type::is_pointer): ...here.
664 (gcc::jit::recording::struct_::is_array): Move to...
665 (gcc::jit::recording::compound_type::is_array): ...here.
666 (gcc::jit::recording::struct_::playback_struct): Move to...
667 (gcc::jit::recording::compound_type::playback_compound_type):
669 (gcc::jit::recording::struct_): Inherit from compound_type,
671 (gcc::jit::recording::fields): Update to work on compound_type *
673 (gcc::jit::recording::union): New subclass of compound_type.
674 (gcc::jit::playback::context::new_struct_type): Generalize by
676 (gcc::jit::playback::context::new_compound_type): ...this, and
678 (gcc::jit::playback::struct_): Generalize by renaming class to...
679 (gcc::jit::playback::compound_type): ...this.
681 * internal-api.c (gcc::jit::recording::context::context): Rename
683 (gcc::jit::recording::context::new_struct_type): Likewise.
684 (gcc::jit::recording::context::new_union_type): New method.
685 (gcc::jit::recording::context::dump_to_file): Field "m_structs"
688 (gcc::jit::recording::compound_type::compound_type): New ctor,
689 built from old body of gcc::jit::recording::struct_::struct_.
690 (gcc::jit::recording::struct_::set_fields): Move class to...
691 (gcc::jit::recording::compound_type::set_fields): ... here.
692 (gcc::jit::recording::struct_::dereference): Move class to...
693 (gcc::jit::recording::compound_type::dereference): ...here.
694 (gcc::jit::recording::struct_::struct_): Reimplement by calling
696 (gcc::jit::recording::struct_::replay_into): The playback hook
699 (gcc::jit::recording::struct_::make_debug_string): "m_name" is
701 (gcc::jit::recording::union_::union_): New function.
702 (gcc::jit::recording::union_::replay_into): New function.
703 (gcc::jit::recording::union_::make_debug_string): New function.
704 (gcc::jit::recording::fields::fields): Update first param from
707 (gcc::jit::recording::fields::replay_into): "m_struct" is now
710 (gcc::jit::recording::fields::write_to_dump): Update for
712 (gcc::jit::playback::context::new_struct_type): Rename method
714 (gcc::jit::playback::context::new_compound_type): this,
717 (gcc::jit::playback::struct_::set_fields): This method's class has
719 (gcc::jit::playback::compound_type::set_fields): ...this method.
727 (gcc::jit::recording::context::new_function_ptr_type): New method.
728 (gcc::jit::recording::context::new_call_through_ptr): New method.
729 (gcc::jit::recording::memento_of_get_pointer::make_debug_string):
731 (gcc::jit::recording::function_type::make_debug_string_with_ptr):
733 (gcc::jit::recording::function_type::make_debug_string):
735 (gcc::jit::recording::function_type::make_debug_string_with): New
738 (gcc::jit::recording::call_through_ptr::call_through_ptr): New
740 (gcc::jit::recording::call_through_ptr::replay_into): New method.
741 (gcc::jit::recording::call_through_ptr::make_debug_string): New
743 (gcc::jit::playback::context::new_call): Reimplement in terms of...
744 (gcc::jit::playback::context::build_call): New method, using parts
747 (gcc::jit::playback::context::new_call_through_ptr): New method.
749 (gcc::jit::recording::context::new_function_ptr_type): New method.
750 (gcc::jit::recording::context::new_call_through_ptr): New method.
751 (gcc::jit::recording::type::dyn_cast_function_type): New method.
752 (gcc::jit::recording::function_type::dyn_cast_function_type): New
754 (gcc::jit::recording::function_type::make_debug_string_with_ptr):
756 (gcc::jit::recording::function_type::make_debug_string_with): New
758 (gcc::jit::recording::call_through_ptr): New subclass of rvalue.
759 (gcc::jit::playback::context::new_call_through_ptr): New method.
760 (gcc::jit::playback::context::build_call): New method.
774 * internal-api.h (gcc::jit::recording::type::is_numeric): New.
785 * internal-api.c (gcc::jit::recording::context::new_array_type):
788 * internal-api.h (gcc::jit::recording::type::dyn_cast_struct): New
790 (gcc::jit::recording::struct_::dyn_cast_struct): New, overriding
792 (gcc::jit::recording::struct_::get_name): New.
804 (jit): Add symlink targets.
807 (jit.install-common): Install the library with a soname, and
812 * internal-api.c (gcc::jit::playback::context::compile): Put
828 * internal-api.c (gcc::jit::recording::context::add_error_va):
831 (gcc::jit::playback::context::compile): Likewise.
835 * internal-api.c (gcc::jit::recording::memento_of_get_pointer::
838 * internal-api.h (gcc::jit::recording::type::is_pointer): New.
839 (gcc::jit::recording::type::is_array): New.
840 (gcc::jit::recording::memento_of_get_type::accepts_writes_from):
842 (gcc::jit::recording::memento_of_get_type::is_pointer): New.
843 (gcc::jit::recording::memento_of_get_type::is_array): New.
844 (gcc::jit::recording::memento_of_get_pointer::is_pointer): New.
845 (gcc::jit::recording::memento_of_get_pointer::is_array): New.
846 (gcc::jit::recording::memento_of_get_const::is_pointer): New.
847 (gcc::jit::recording::memento_of_get_const::is_array): New.
848 (gcc::jit::recording::memento_of_get_volatile::is_pointer): New.
849 (gcc::jit::recording::memento_of_get_volatile::is_array): New.
850 (gcc::jit::recording::array_type::is_pointer): New.
851 (gcc::jit::recording::array_type::is_array): New.
852 (gcc::jit::recording::function_type::is_pointer): New.
853 (gcc::jit::recording::function_type::is_array): New.
854 (gcc::jit::recording::struct_::is_pointer): New.
855 (gcc::jit::recording::struct_::is_array): New.
875 (gcc::jit::playback::context::build_cast): Handle pointers. Report
883 * internal-api.c (gcc::jit::recording::memento_of_get_type::
885 (gcc::jit::recording::memento_of_get_type::is_float): New.
886 (gcc::jit::recording::memento_of_get_type::is_bool): New.
888 * internal-api.h (gcc::jit::recording::type::is_int): New.
889 (gcc::jit::recording::type::is_float): New.
890 (gcc::jit::recording::type::is_bool): New.
892 (gcc::jit::recording::memento_of_get_type::is_int): New.
893 (gcc::jit::recording::memento_of_get_type::is_float): New.
894 (gcc::jit::recording::memento_of_get_type::is_bool): New.
896 (gcc::jit::recording::memento_of_get_pointer::is_int): New.
897 (gcc::jit::recording::memento_of_get_pointer::is_float): New.
898 (gcc::jit::recording::memento_of_get_pointer::is_bool): New.
900 (gcc::jit::recording::memento_of_get_const::is_int): New.
901 (gcc::jit::recording::memento_of_get_const::is_float): New.
902 (gcc::jit::recording::memento_of_get_const::is_bool): New.
904 (gcc::jit::recording::memento_of_get_volatile::is_int): New.
905 (gcc::jit::recording::memento_of_get_volatile::is_float): New.
906 (gcc::jit::recording::memento_of_get_volatile::is_bool): New.
908 (gcc::jit::recording::array_type::is_int): New.
909 (gcc::jit::recording::array_type::is_float): New.
910 (gcc::jit::recording::array_type::is_bool): New.
912 (gcc::jit::recording::function_type::is_int): New.
913 (gcc::jit::recording::function_type::is_float): New.
914 (gcc::jit::recording::function_type::is_bool): New.
916 (gcc::jit::recording::struct_::is_int): New.
917 (gcc::jit::recording::struct_::is_float): New.
918 (gcc::jit::recording::struct_::is_bool): New.
922 * internal-api.c (gcc::jit::recording::context::set_str_option):
924 (gcc::jit::recording::context::set_int_option): Likewise.
925 (gcc::jit::recording::context::set_bool_option): Likewise.
926 (gcc::jit::playback::context::compile): Likewise.
927 (gcc::jit::recording::context::add_error): Add recording::location
929 (gcc::jit::recording::context::add_error_va): Likewise; print it
931 (gcc::jit::recording::location::replay_into): Provide
934 (gcc::jit::recording::function::validate): Add locations to the
936 (gcc::jit::recording::block::validate): Likewise.
937 (gcc::jit::playback::context::get_type): Likewise.
938 (gcc::jit::playback::context::new_unary_op): Likewise.
939 (gcc::jit::playback::context::new_binary_op): Likewise.
940 (gcc::jit::playback::context::new_comparison): Likewise.
942 (gcc::jit::recording::block::get_loc): New.
943 (gcc::jit::recording::block::get_first_statement): New.
945 (gcc::jit::playback::context::build_cast): Pass in higher-level
948 (gcc::jit::playback::context::new_cast): As above.
950 (gcc::jit::playback::context::add_error): Add playback::location
954 (gcc::jit::playback::context::add_error_va): Likewise.
955 (gcc::jit::playback::context::new_location): Likewise.
956 (gcc::jit::playback::source_line::get_location): Likewise.
957 (gcc::jit::playback::location::location): Likewise.
959 * internal-api.h (gcc::jit::recording::context::add_error): Add
961 (gcc::jit::recording::context::add_error_va): Likewise.
963 (gcc::jit::recording::context::errors_occurred): Also consider
966 (gcc::jit::recording::block::get_loc): New.
967 (gcc::jit::recording::block::get_first_statement): New.
968 (gcc::jit::recording::statement::get_loc): New.
970 (gcc::jit::playback::context::new_location): Add recording::location
973 (gcc::jit::playback::context::add_error): Add playback::location
975 (gcc::jit::playback::context::add_error_va): Likewise.
977 (gcc::jit::playback::context::build_cast): Pass in higher-level
981 (gcc::jit::playback::source_line::get_location): Add
983 (gcc::jit::playback::location::location): Likewise.
984 (gcc::jit::playback::location::get_recording_loc): New.
985 (gcc::jit::playback::location::m_recording_loc): New.
987 * jit-builtins.c (gcc::jit::builtins_manager::get_builtin_function):
989 (gcc::jit::builtins_manager::make_primitive_type): Likewise.
1118 * internal-api.c (gcc::jit::recording::function::write_to_dump):
1120 (gcc::jit::playback::context::new_function): Likewise.
1121 (gcc::jit::playback::context::postprocess): Handle
1133 * internal-api.c (gcc::jit::playback::context::handle_locations):
1136 (gcc::jit::playback::context::set_tree_location): Assert that
1138 (gcc::jit::playback::location::location): Initialize m_src_loc
1145 * internal-api.c (gcc::jit::recording::context::
1154 * internal-api.h (gcc::jit::recording::function::dump_to_dot): New.
1155 (gcc::jit::recording::block::block): Add m_index member.
1156 (gcc::jit::recording::block::dump_to_dot): New.
1157 (gcc::jit::recording::block::dump_edges_to_dot): New.
1158 * internal-api.c (gcc::jit::recording::function::new_block): Give
1160 (gcc::jit::recording::function::dump_to_dot): New.
1161 (gcc::jit::recording::block::dump_to_dot): New.
1162 (gcc::jit::recording::block::dump_edges_to_dot): New.
1166 * internal-api.c (gcc::jit::recording::memento_of_get_pointer::
1169 * internal-api.h (gcc::jit::recording::accepts_writes_from): Add
1180 * internal-api.c (gcc::jit::recording::type::get_volatile): New.
1181 (gcc::jit::recording::memento_of_get_volatile::replay_into): New.
1182 (gcc::jit::recording::memento_of_get_volatile::make_debug_string): New.
1183 * internal-api.h (gcc::jit::recording::type::get_volatile): New.
1184 (gcc::jit::recording::type::accepts_writes_from): Strip off
1186 (gcc::jit::recording::memento_of_get_volatile): New class.
1187 (gcc::jit::playback::type::get_volatile): New.
1211 * internal-api.h (gcc::jit::recording::context::new_cast): New method.
1212 (gcc::jit::recording::cast): New subclass of rvalue.
1213 (gcc::jit::playback::context::new_cast): New method.
1214 (gcc::jit::playback::context::build_cast): New method.
1217 (gcc::jit::recording::context::new_cast): New.
1218 (gcc::jit::recording::cast::replay_into): New.
1219 (gcc::jit::recording::cast::make_debug_string): New.
1220 (gcc::jit::playback::context::build_cast): New.
1221 (gcc::jit::playback::context::new_cast): New.
1363 * internal-api.h (gcc::jit::recording::label): Delete class in
1365 (gcc::jit::recording::block): New class.
1366 (gcc::jit::recording::loop): Delete class.
1367 (gcc::jit::recording::loop_end): Delete class.
1369 (gcc::jit::playback::label): Delete class in favor of...
1370 (gcc::jit::playback::block): New class.
1372 (gcc::jit::playback::loop): Delete class.
1374 (gcc::jit::recording::playback_label): Delete function in favor of...
1375 (gcc::jit::recording::playback_block): New function.
1377 (gcc::jit::recording::context::validate): New.
1379 (gcc::jit::recording::function::new_forward_label): Delete method.
1380 (gcc::jit::recording::function::add_eval): Delete method in favor
1381 of method of new gcc::jit::recording::block class.
1382 (gcc::jit::recording::function::add_assignment): Likewise.
1383 (gcc::jit::recording::function::add_assignment_op): Likewise.
1384 (gcc::jit::recording::function::add_comment): Likewise.
1385 (gcc::jit::recording::function::add_conditional): Likewise.
1386 (gcc::jit::recording::function::place_forward_label): Likewise.
1387 (gcc::jit::recording::function::add_jump): Likewise.
1388 (gcc::jit::recording::function::add_return): Likewise.
1390 (gcc::jit::recording::function::add_label): Delete method in favor of...
1391 (gcc::jit::recording::function::new_block): New method.
1393 (gcc::jit::recording::function::new_loop): Delete method.
1395 (gcc::jit::recording::function::validate): New method.
1396 (gcc::jit::recording::function::m_activity): Delete field in favor of...
1397 (gcc::jit::recording::function::m_blocks): New field.
1399 (gcc::jit::recording::statement::get_successor_blocks): New method.
1400 (gcc::jit::recording::statement::write_to_dump): Make public.
1401 (gcc::jit::recording::statement::statement): Accept a block rather
1403 (gcc::jit::recording::statement::playback_function): Delete.
1404 (gcc::jit::recording::statement::get_block): New.
1405 (gcc::jit::recording::statement::m_func): Delete in favor of...
1406 (gcc::jit::recording::statement::m_block): ...this.
1408 (gcc::jit::recording::eval::eval): Accept a block rather than a
1410 (gcc::jit::recording::assignment::assignment): Likewise.
1411 (gcc::jit::recording::assignment_op::assignment_op): Likewise.
1412 (gcc::jit::recording::comment::comment): Likewise.
1413 (gcc::jit::recording::return::return): Likewise.
1414 (gcc::jit::recording::conditional::conditional): Likewise; accept
1416 (gcc::jit::recording::jump::jump): Likewise.
1417 (gcc::jit::recording::conditional::get_successor_blocks): New.
1418 (gcc::jit::recording::jump::get_successor_blocks): New.
1420 (gcc::jit::playback::function::new_forward_label): Delete method
1422 (gcc::jit::playback::function::new_block): New method.
1423 (gcc::jit::playback::function::build_stmt_list): New method.
1424 (gcc::jit::playback::function::m_blocks): New field.
1439 * internal-api.c (gcc::jit::recording::playback_label): Delete in
1441 (gcc::jit::recording::playback_block): New.
1442 (gcc::jit::recording::context::compile): Validate.
1443 (gcc::jit::recording::context::validate): New.
1444 (gcc::jit::recording::function::function): Update.
1445 (gcc::jit::recording::function::new_forward_label): Delete.
1446 (gcc::jit::recording::function::add_eval): Delete.
1447 (gcc::jit::recording::function::add_assignment): Delete.
1448 (gcc::jit::recording::function::add_assignment_op): Delete.
1449 (gcc::jit::recording::function::new_block): New.
1450 (gcc::jit::recording::function::add_comment): Delete.
1451 (gcc::jit::ecording::function::add_conditional): Delete.
1452 (gcc::jit::recording::function::add_label): Delete.
1453 (gcc::jit::recording::function::place_forward_label): Delete.
1454 (gcc::jit::recording::function::add_jump): Delete.
1455 (gcc::jit::recording::function::add_return): Delete.
1456 (gcc::jit::recording::function::new_loop): Delete.
1457 (gcc::jit::recording::function::write_to_dump): Port to block-based
1459 (gcc::jit::recording::function::validate): New.
1460 (gcc::jit::recording::block::add_eval): New.
1461 (gcc::jit::recording::block::add_assignment): New.
1462 (gcc::jit::recording::label::replay_into): Delete.
1463 (gcc::jit::recording::block::add_assignment_op): New.
1464 (gcc::jit::recording::block::add_comment): New.
1465 (gcc::jit::recording::block::end_with_conditional): New.
1466 (gcc::jit::recording::block::end_with_jump): New.
1467 (gcc::jit::recording::block::end_with_return): New.
1468 (gcc::jit::recording::block::write_to_dump): New.
1469 (gcc::jit::recording::block::validate): New.
1470 (gcc::jit::recording::block::get_last_statement): New.
1471 (gcc::jit::recording::block::get_successor_blocks): New.
1472 (gcc::jit::recording::block::replay_into): New.
1473 (gcc::jit::recording::label::make_debug_string): Delete.
1474 (gcc::jit::recording::block::make_debug_string): New.
1475 (gcc::jit::recording::statement::get_successor_blocks): New.
1476 (gcc::jit::recording::eval::replay_into): Port to block-based
1478 (gcc::jit::recording::assignment::replay_into): Likewise.
1479 (gcc::jit::recording::assignment_op::replay_into): Likewise.
1480 (gcc::jit::recording::comment::replay_into): Likewise.
1481 (gcc::jit::recording::conditional::replay_into): Likewise.
1482 (gcc::jit::recording::jump::replay_into): Likewise.
1483 (gcc::jit::recording::return_::replay_into): Likewise.
1485 (gcc::jit::recording::conditional::get_successor_blocks): New.
1486 (gcc::jit::recording::place_label::place_label): Delete.
1487 (gcc::jit::recording::place_label::replay_into): Delete.
1488 (gcc::jit::recording::place_label::make_debug_string): Delete.
1489 (gcc::jit::recording::place_label::write_to_dump): Delete.
1491 (gcc::jit::recording::jump::get_successor_blocks): New.
1492 (gcc::jit::recording::return_::get_successor_blocks): New.
1494 (gcc::jit::recording::loop::replay_into): Delete.
1495 (gcc::jit::recording::loop::make_debug_string): Delete.
1496 (gcc::jit::recording::loop::end): Delete.
1497 (gcc::jit::recording::loop_end::replay_into): Delete.
1498 (gcc::jit::recording::loop_end::make_debug_string): Delete.
1500 (gcc::jit::playback::function::new_forward_label): Delete.
1501 (gcc::jit::playback::function::new_block): New.
1502 (gcc::jit::playback::function::build_stmt_list): New.
1503 (gcc::jit::playback::function::add_eval): Replace with...
1504 (gcc::jit::playback::block::add_eval): New.
1505 (gcc::jit::playback::function::add_assignment): Replace with...
1506 (gcc::jit::playback::block::add_assignment): New.
1507 (gcc::jit::playback::function::add_comment): Replace with...
1508 (gcc::jit::playback::block::add_comment): New, reimplementing,
1510 (gcc::jit::playback::function::add_conditional): Replace with...
1511 (gcc::jit::playback::block::add_conditional): New, reworking,
1513 (gcc::jit::playback::function::add_label): Delete.
1514 (gcc::jit::playback::function::place_forward_label): Delete.
1515 (gcc::jit::playback::function::add_jump): Replace with...
1516 (gcc::jit::playback::block::add_jump): New.
1517 (gcc::jit::playback::function::add_return): Replace with...
1518 (gcc::jit::playback::block::add_return): New.
1519 (gcc::jit::playback::function::new_loop): Delete.
1520 (gcc::jit::playback::label::label): Replace with...
1521 (gcc::jit::playback::block::block): ...this.
1523 (gcc::jit::playback::loop::loop): Delete.
1524 (gcc::jit::playback::loop::end): Delete.
1526 (gcc::jit::playback::context::replay): Call each function's
1539 * internal-api.c (gcc::jit::recording::function::add_return): Add
1541 (gcc::jit::playback::function::add_return): Support rvalue being
1546 * internal-api.h (gcc::jit::playback::function): Add field
1549 * internal-api.c (gcc::jit::playback::function::function):
1551 (gcc::jit::playback::function::gt_ggc_mx): Walk m_inner_block.
1552 (gcc::jit::playback::function::postprocess): Set up BLOCK_VARS on
1557 * Make-lang.in (jit.install-common): Implement.
1566 * internal-api.h (gcc::jit::dump): New class.
1567 (gcc::jit::recording::playback_location): Add a replayer argument,
1569 (gcc::jit::recording::location::playback_location): Likewise.
1570 (gcc::jit::recording::statement::playback_location): Likewise.
1571 (gcc::jit::recording::context::dump_to_file): New.
1572 (gcc::jit::recording::context::m_structs): New field, for use by
1574 (gcc::jit::recording::context::m_functions): Likewise.
1575 (gcc::jit::recording::memento::write_to_dump): New virtual function.
1576 (gcc::jit::recording::field::write_to_dump): New.
1577 (gcc::jit::recording::fields::write_to_dump): New.
1578 (gcc::jit::recording::function::write_to_dump): New.
1579 (gcc::jit::recording::function::m_locals): New field for use by
1581 (gcc::jit::recording::function::m_activity): Likewise.
1582 (gcc::jit::recording::local::write_to_dump): New.
1583 (gcc::jit::recording::statement::write_to_dump): New.
1584 (gcc::jit::recording::place_label::write_to_dump): New.
1586 * internal-api.c (gcc::jit::dump::dump): New.
1587 (gcc::jit::dump::~dump): New.
1588 (gcc::jit::dump::write): New.
1589 (gcc::jit::dump::make_location): New.
1590 (gcc::jit::recording::playback_location): Add a replayer argument,
1593 (gcc::jit::recording::context::context): Initialize new fields.
1594 (gcc::jit::recording::function::function): Likewise.
1596 (gcc::jit::recording::context::new_struct_type): Add struct to the
1598 (gcc::jit::recording::context::new_function): Add function to the
1600 (gcc::jit::recording::context::dump_to_file): New.
1601 (gcc::jit::recording::memento::write_to_dump): New.
1602 (gcc::jit::recording::field::write_to_dump): New.
1603 (gcc::jit::recording::fields::write_to_dump): New.
1604 (gcc::jit::recording::function::write_to_dump): New.
1605 (gcc::jit::recording::local::write_to_dump): New.
1606 (gcc::jit::recording::statement::write_to_dump): New.
1607 (gcc::jit::recording::place_label::write_to_dump): New.
1609 (gcc::jit::recording::array_type::replay_into): Pass on replayer
1611 (gcc::jit::recording::field::replay_into): Likewise.
1612 (gcc::jit::recording::struct_::replay_into): Likewise.
1613 (gcc::jit::recording::param::replay_into): Likewise.
1614 (gcc::jit::recording::function::replay_into): Likewise.
1615 (gcc::jit::recording::global::replay_into): Likewise.
1616 (gcc::jit::recording::unary_op::replay_into): Likewise.
1617 (gcc::jit::recording::binary_op::replay_into): Likewise.
1618 (gcc::jit::recording::comparison::replay_into): Likewise.
1619 (gcc::jit::recording::call::replay_into): Likewise.
1620 (gcc::jit::recording::array_access::replay_into): Likewise.
1621 (gcc::jit::recording::access_field_of_lvalue::replay_into): Likewise.
1622 (gcc::jit::recording::access_field_rvalue::replay_into): Likewise.
1623 (gcc::jit::recording::dereference_field_rvalue::replay_into): Likewise.
1624 (gcc::jit::recording::dereference_rvalue::replay_into): Likewise.
1625 (gcc::jit::recording::get_address_of_lvalue::replay_into): Likewise.
1626 (gcc::jit::recording::local::replay_into): Likewise.
1627 (gcc::jit::recording::eval::replay_into): Likewise.
1628 (gcc::jit::recording::assignment::replay_into): Likewise.
1629 (gcc::jit::recording::assignment_op::replay_into): Likewise.
1630 (gcc::jit::recording::comment::replay_into): Likewise.
1631 (gcc::jit::recording::conditional::replay_into): Likewise.
1632 (gcc::jit::recording::place_label::replay_into): Likewise.
1633 (gcc::jit::recording::jump::replay_into): Likewise.
1634 (gcc::jit::recording::return_::replay_into): Likewise.
1635 (gcc::jit::recording::loop::replay_into): Likewise.
1636 (gcc::jit::recording::loop_end::replay_into): Likewise.
1638 (gcc::jit::recording::function::new_local): Add to the function's
1640 (gcc::jit::recording::function::add_eval): Add to the function's
1642 (gcc::jit::recording::function::add_assignment): Likewise.
1643 (gcc::jit::recording::function::add_assignment_op): Likewise.
1644 (gcc::jit::recording::function::add_comment): Likewise.
1645 (gcc::jit::recording::function::add_conditional): Likewise.
1646 (gcc::jit::recording::function::place_forward_label): Likewise.
1647 (gcc::jit::recording::function::add_jump): Likewise.
1648 (gcc::jit::recording::function::add_return): Likewise.
1649 (gcc::jit::recording::function::new_loop): Likewise.
1651 (gcc::jit::recording::conditional::make_debug_string): Add missing
1698 reporting on a NULL field; verify that the field has been placed
1703 when reporting errors; verify that boolval's type is indeed
1707 * internal-api.h (gcc::jit::recording::context::new_struct_type):
1710 (gcc::jit::recording::struct_::struct_): Store a (fields *) rather
1712 (gcc::jit::recording::struct_::as_type): New.
1713 (gcc::jit::recording::struct_::get_fields): New.
1714 (gcc::jit::recording::struct_::set_fields): New.
1715 (gcc::jit::recording::struct_::playback_struct): New.
1716 (gcc::jit::recording::fields): New class.
1717 (gcc::jit::playback::context::new_struct_type): Don't accept
1720 (gcc::jit::playback::struct_): New subclass of type.
1722 * internal-api.c (gcc::jit::recording::context::get_type): With
1726 (gcc::jit::recording::context::new_struct_type): Don't accept
1729 (gcc::jit::recording::context::get_opaque_FILE_type): Update for
1731 (gcc::jit::recording::struct_::struct_): Store a (fields *) rather
1733 (gcc::jit::recording::struct_::set_fields): New.
1734 (gcc::jit::recording::struct_::replay_into): Don't playback the
1736 (gcc::jit::recording::fields::fields): New.
1737 (gcc::jit::recording::fields::replay_into): New.
1738 (gcc::jit::recording::fields::make_debug_string): New.
1739 (gcc::jit:: playback::context::new_struct_type): Don't accept
1742 (gcc::jit::playback::struct_::set_fields): New.
1768 * Make-lang.in (jit_OBJS): Add jit/jit-builtins.o
1769 * jit-builtins.c: New source file, for managing builtin functions
1771 * jit-builtins.h: Likewise.
1778 (gcc::jit::recording::context::new_function): Add parameter
1780 (gcc::jit::recording::context::get_builtin_function): New method.
1781 (gcc::jit::recording::context::m_builtins_manager): New field.
1782 (gcc::jit::recording::type::as_a_function_type): New virtual function.
1783 (gcc::jit::recording::function_type): New subclass of type.
1784 (gcc::jit::recording::function::function): Add parameter for
1786 (gcc::jit::recording::function::m_builtin_id): New field.
1787 (gcc::jit::recording::function::new_function_type): New method.
1788 (gcc::jit::playback::function::function): Add parameter for
1790 * internal-api.c (gcc::jit::recording::context::context):
1792 (gcc::jit::recording::context::~context): Clean up the builtins
1794 (gcc::jit::recording::context::new_function): Add parameter
1795 (gcc::jit::recording::context::get_builtin_function): New method.
1796 (gcc::jit::recording::function_type::function_type): Implement
1798 (gcc::jit::recording::function_type::dereference): Implement
1800 (gcc::jit::recording::function_type::replay_into): Likewise.
1801 (gcc::jit::recording::function_type::make_debug_string): Likewise.
1802 (gcc::jit::recording::function::function): Add parameter for
1804 (gcc::jit::recording::function::replay_into): Likewise for
1806 (gcc::jit::recording::function::new_function_type): New method.
1807 (gcc::jit::playback::function::new_function): Add parameter for
1816 C identifiers for now, to avoid later problems in the assembler.
1822 * internal-api.h (gcc::jit::recording::comparison::comparison): Use
1826 * internal-api.c (gcc::jit::recording::memento_of_get_type::
1833 * internal-api.c (gcc::jit::recording::context::add_error_va): If
1836 (gcc::jit::recording::label::replay_into): When reporting on an
1855 * internal-api.h (gcc::jit::recording::context::get_int_type): New.
1856 (gcc::jit::recording::context::get_int_type<T>): New template.
1857 * internal-api.c (gcc::jit::recording::context::get_int_type): New.
2058 * internal-api.h (gcc::jit::recording::memento::get_context): New.
2059 (gcc::jit::recording::memento::as_object): New.
2169 * internal-api.h (gcc::jit::recording::context::
2171 (gcc::jit::recording::context::
2173 (gcc::jit::recording::memento_of_new_rvalue_from_int::
2175 (gcc::jit::recording::memento_of_new_rvalue_from_double::
2177 (gcc::jit::recording::memento_of_new_rvalue_from_ptr::
2184 * internal-api.c (gcc::jit::recording::context::replay_into): Give
2186 (gcc::jit::recording::label::replay_into): Issue an error if the
2188 (gcc::jit::recording::place_label::place_label): Move this here
2192 * internal-api.h (gcc::jit::recording::label): Add an
2195 (gcc::jit::recording::label::has_been_placed): New accessor.
2196 (gcc::jit::recording::place_label::place_label): Move to
2199 (gcc::jit::playback::context::errors_occurred): Make public, for
2200 use by gcc::jit::recording::context::replay_into.
2204 * internal-api.c (gcc::jit::recording::type::get_pointer):
2206 (gcc::jit::recording::memento_of_get_pointer::
2208 (gcc::jit::recording::context::new_call): Move
2216 * internal-api.h (gcc::jit::recording::type): New field
2218 (gcc::jit::recording::memento_of_get_pointer::
2220 (gcc::jit::recording::function::get_param): New.
2239 (jit_error): Take a gcc::jit::recording::context rather than
2264 (gcc::jit::recording::context::record): Move from here to
2266 (gcc::jit::recording::context::get_opaque_FILE_type): New.
2267 (gcc::jit::recording::context::m_basic_types): New field.
2268 (gcc::jit::recording::context::m_FILE_type): New field.
2270 (gcc::jit::recording::memento::get_debug_string): New method.
2271 (gcc::jit::recording::memento::memento): Initialize new field
2272 m_debug_string, and verify context is non-NULL.
2273 (gcc::jit::recording::memento::make_debug_string): New
2275 (gcc::jit::recording::memento::m_debug_string): New field, for
2278 (gcc::jit::recording::string): Rename field m_copy to m_buffer.
2279 (gcc::jit::recording::from_printf): New factory function.
2280 (gcc::jit::recording::make_debug_string): New.
2282 (gcc::jit::recording::location::make_debug_string): New.
2284 (gcc::jit::recording::type::dereference): New pure-virtual
2286 (gcc::jit::recording::type::accepts_writes_from): New virtual
2288 (gcc::jit::recording::type::unqualified): New virtual function.
2290 (gcc::jit::recording::memento_of_get_type::dereference): New.
2291 (gcc::jit::recording::memento_of_get_type::
2293 (gcc::jit::recording::memento_of_get_type::make_debug_string):
2296 (gcc::jit::recording::memento_of_get_pointer::make_debug_string):
2298 (gcc::jit::recording::memento_of_get_pointer::dereference): New.
2301 (gcc::jit::recording::memento_of_get_const::make_debug_string):
2303 (gcc::jit::recording::memento_of_get_const::dereference): New.
2305 (gcc::jit::recording::memento_of_get_const::accepts_writes_from):
2307 (gcc::jit::recording::memento_of_get_const::unqualified): New.
2309 (gcc::jit::recording::field): New field m_container, for the
2311 (gcc::jit::recording::field::get_type): New.
2312 (gcc::jit::recording::field::get_container): New.
2313 (gcc::jit::recording::field:set_container): New.
2314 (gcc::jit::recording::field::make_debug_string): New.
2316 (gcc::jit::recording::struct_::struct_): Move ctor implementation
2318 (gcc::jit::recording::struct_::dereference): New.
2319 (gcc::jit::recording::struct_::make_debug_string): New.
2321 (gcc::jit::recording::rvalue::m_type): New field.
2322 (gcc::jit::recording::rvalue::rvalue): Require a non-NULL type for
2324 (gcc::jit::recording::rvalue::get_type): New accessor.
2326 (gcc::jit::recording::lvalue): Eliminate field m_type in favor of
2329 (gcc::jit::recording::param::make_debug_string): New.
2331 (gcc::jit::recording::function::get_return_type): New accessor.
2332 (gcc::jit::recording::function::make_debug_string): New.
2334 (gcc::jit::recording::label::make_debug_string): New.
2336 (gcc::jit::recording::global): Eliminate field m_type in favor of
2338 (gcc::jit::recording::make_debug_string): New.
2340 (gcc::jit::recording::memento_of_new_rvalue_from_int): Eliminate
2342 (gcc::jit::recording::memento_of_new_rvalue_from_int::
2345 (gcc::jit::recording::memento_of_new_rvalue_from_double): Eliminate
2347 (gcc::jit::recording::memento_of_new_rvalue_from_double::
2350 (gcc::jit::recording::memento_of_new_rvalue_from_ptr): Eliminate
2352 (gcc::jit::recording::memento_of_new_rvalue_from_ptr::
2355 (gcc::jit::recording::memento_of_new_string_literal::
2357 (gcc::jit::recording::memento_of_new_string_literal::
2360 (gcc::jit::recording::unary_op): Eliminate field m_result_type in
2362 (gcc::jit::recording::unary_op::make_debug_string): New.
2364 (gcc::jit::recording::binary_op): Eliminate field m_result_type in
2366 (gcc::jit::recording::binary_op::make_debug_string): New.
2368 (gcc::jit::recording::comparison): Eliminate field m_result_type
2370 (gcc::jit::recording::comparison::make_debug_string): New.
2372 (gcc::jit::recording::make_debug_string): New.
2374 (gcc::jit::recording::array_lookup::array_lookup): Initialize type
2376 (gcc::jit::recording::array_lookup::make_debug_string): New.
2378 (gcc::jit::recording::access_field_of_lvalue::
2380 (gcc::jit::recording::access_field_of_lvalue::
2383 (gcc::jit::recording::access_field_rvalue::
2385 (gcc::jit::recording::access_field_rvalue::make_debug_string):
2388 (gcc::jit::recording::dereference_field_rvalue::
2390 (gcc::jit::recording::dereference_field_rvalue::
2393 (gcc::jit::recording::dereference_rvalue::dereference_rvalue):
2395 (gcc::jit::recording::dereference_rvalue::make_debug_string): New.
2397 (gcc::jit::recording::get_address_of_lvalue::
2400 (gcc::jit::recording::get_address_of_lvalue::make_debug_string):
2403 (gcc::jit::recording::local): Eliminate field m_type in favor of
2405 (gcc::jit::recording::make_debug_string): New.
2407 (gcc::jit::recording::eval::make_debug_string): New.
2408 (gcc::jit::recording::assignment::make_debug_string): New.
2409 (gcc::jit::recording::assignment_op::make_debug_string): New.
2410 (gcc::jit::recording::comment::make_debug_string): New.
2411 (gcc::jit::recording::conditional::make_debug_string): New.
2412 (gcc::jit::recording::place_label::make_debug_string): New.
2413 (gcc::jit::recording::jump::make_debug_string): New.
2414 (gcc::jit::recording::return_::make_debug_string): New.
2415 (gcc::jit::recording::loop::make_debug_string): New.
2416 (gcc::jit::recording::loop_end::make_debug_string): New.
2418 * internal-api.c (gcc::jit::recording::context::context):
2420 (gcc::jit::recording::context::record): Move here from
2422 (gcc::jit::recording::context::replay_into): Add a disabled way to
2425 (gcc::jit::recording::context::get_type): Cache and reuse the
2427 (gcc::jit::recording::context::get_opaque_FILE_type): New, for
2430 (gcc::jit::recording::memento::get_debug_string): New method,
2435 (gcc::jit::recording::string::string): Rename field m_copy to m_buffer.
2436 (gcc::jit::recording::string::~string): Likewise.
2437 (gcc::jit::recording::string::from_printf): New factory function,
2440 (gcc::jit::recording::string::make_debug_string): New.
2442 (gcc::jit::recording::location::make_debug_string): New.
2444 (gcc::jit::recording::memento_of_get_type::dereference): New.
2447 (gcc::jit::recording::memento_of_get_type::make_debug_string): New.
2449 (gcc::jit::recording::memento_of_get_pointer::make_debug_string): New.
2451 (gcc::jit::recording::memento_of_get_const::make_debug_string): New.
2453 (gcc::jit::recording::field::make_debug_string): New.
2455 (gcc::jit::recording::struct_::struct_): Move here from
2458 (gcc::jit::recording::struct_::dereference): New.
2459 (gcc::jit::recording::struct_::make_debug_string): New.
2461 (gcc::jit::recording::function::make_debug_string): New.
2463 (gcc::jit::recording::label::make_debug_string): New.
2465 (gcc::jit::recording::memento_of_new_rvalue_from_int::
2467 (gcc::jit::recording::memento_of_new_rvalue_from_double::
2469 (gcc::jit::recording::memento_of_new_rvalue_from_ptr::
2471 (gcc::jit::recording::memento_of_new_string_literal::
2474 (gcc::jit::recording::unary_op::replay_into): Use get_type ()
2476 (gcc::jit::recording::binary_op::replay_into): Likewise.
2479 (gcc::jit::recording::unary_op::make_debug_string): New.
2482 (gcc::jit::recording::binary_op::make_debug_string): New.
2485 (gcc::jit::recording::comparison::make_debug_string): New.
2487 (gcc::jit::recording::call::call): Initialize the type.
2488 (gcc::jit::recording::call::make_debug_string): New.
2490 (gcc::jit::recording::array_lookup::make_debug_string): New.
2491 (gcc::jit::recording::access_field_of_lvalue::
2493 (gcc::jit::recording::access_field_rvalue::
2495 (gcc::jit::recording::dereference_field_rvalue::
2497 (gcc::jit::recording::dereference_rvalue::make_debug_string): New.
2498 (gcc::jit::recording::get_address_of_lvalue::
2500 (gcc::jit::recording::eval::make_debug_string): New.
2501 (gcc::jit::recording::assignment::make_debug_string): New.
2502 (gcc::jit::recording::assignment_op::make_debug_string): New.
2503 (gcc::jit::recording::comment::make_debug_string): New.
2504 (gcc::jit::recording::conditional::make_debug_string): New.
2505 (gcc::jit::recording::place_label::make_debug_string): New.
2506 (gcc::jit::recording::jump::make_debug_string): New.
2507 (gcc::jit::recording::return_::make_debug_string): New.
2508 (gcc::jit::recording::loop::make_debug_string): New.
2509 (gcc::jit::recording::loop_end::make_debug_string): New.
2523 * internal-api.c (gcc::jit::recording::rvalue::access_field):
2525 (gcc::jit::recording::rvalue::dereference_field): Likewise.
2526 (gcc::jit::recording::lvalue::access_field): Likewise.
2528 (gcc::jit::recording::access_field_of_lvalue::replay_into): Update
2530 (gcc::jit::recording::access_field_rvalue::replay_into): Likewise.
2531 (gcc::jit::recording::dereference_field_rvalue::replay_into): Likewise.
2537 (gcc::jit::playback::context::new_field_access): Require a field
2541 (gcc::jit::playback::lvalue::access_field): Likewise.
2542 (gcc::jit::playback::rvalue::access_field): Likewise.
2543 (gcc::jit::playback::rvalue::dereference_field): Likewise.
2545 * internal-api.h (gcc::jit::recording::rvalue::access_field):
2547 (gcc::jit::recording::rvalue::dereference_field): Likewise.
2548 (gcc::jit::recording::lvalue::access_field): Likewise.
2550 (gcc::jit::recording::access_field_of_lvalue::access_field_of_lvalue):
2552 (gcc::jit::recording::access_field_of_lvalue::m_fieldname): Drop
2554 (gcc::jit::recording::access_field_of_lvalue::m_field):
2557 (gcc::jit::recording::access_field_of_rvalue::access_field_of_rvalue):
2559 (gcc::jit::recording::access_field_of_rvalue::m_fieldname): Drop
2561 (gcc::jit::recording::access_field_of_rvalue::m_field):
2564 (gcc::jit::recording::dereference_field_rvalue::
2566 (gcc::jit::recording::dereference_field_rvalue::m_fieldname): Drop
2568 (gcc::jit::recording::dereference_field_rvalue::m_field):
2571 (gcc::jit::playback::context::new_field_access): Require a field
2573 (gcc::jit::playback::context::access_field): Likewise.
2574 (gcc::jit::playback::context::dereference_field): Likewise.
2575 (gcc::jit::playback::rvalue::access_field):
2589 * internal-api.h (gcc::jit::recording::context::context): New
2591 (gcc::jit::recording::context::m_parent_ctxt): New field.
2593 * internal-api.c (gcc::jit::recording::context::context): New
2595 (gcc::jit::recording::context::replay_into): Replay parent contexts
2600 * internal-api.c (gcc::jit::playback::context::compile): Removal
2607 * internal-api (gcc::jit::recording::context::new_call): Verify
2611 * internal-api.h (gcc::jit::recording::function::get_name): New.
2612 * (gcc::jit::recording::function::get_params): New.
2613 * (gcc::jit::recording::function::is_variadic): New.
2638 * internal-api.h (gcc::jit): Split the existing API into two
2640 (gcc::jit::recording): ...a class hierarchy used to implement
2643 (gcc::jit::playback): ...a class hierarchy used within the
2647 * internal-api.c (gcc::jit::recording::playback_location): New
2650 (gcc::jit::recording::playback_string): Likewise.
2651 (gcc::jit::recording::playback_label): Likewise.
2652 (gcc::jit::recording::context::~context): Likewise.
2653 (gcc::jit::recording::context::replay_into): Likewise.
2654 (gcc::jit::recording::context::disassociate_from_playback): Likewise.
2655 (gcc::jit::recording::context::new_string): Likewise.
2656 (gcc::jit::recording::context::new_location): Likewise.
2657 (gcc::jit::recording::context::get_type): Likewise.
2658 (gcc::jit::recording::context::new_field): Likewise.
2659 (gcc::jit::recording::context::new_struct_type): Likewise.
2660 (gcc::jit::recording::context::new_param): Likewise.
2661 (gcc::jit::recording::context::new_function): Likewise.
2662 (gcc::jit::recording::context::new_global): Likewise.
2663 (gcc::jit::recording::context::new_rvalue_from_int): Likewise.
2664 (gcc::jit::recording::context::new_rvalue_from_double): Likewise.
2665 (gcc::jit::recording::context::new_rvalue_from_ptr): Likewise.
2666 (gcc::jit::recording::context::new_string_literal): Likewise.
2667 (gcc::jit::recording::context::new_unary_op): Likewise.
2668 (gcc::jit::recording::context::new_binary_op): Likewise.
2669 (gcc::jit::recording::context::new_comparison): Likewise.
2670 (gcc::jit::recording::context::new_call): Likewise.
2671 (gcc::jit::recording::context::new_array_lookup): Likewise.
2672 (gcc::jit::recording::string::string): Likewise.
2673 (gcc::jit::recording::string::~string): Likewise.
2674 (gcc::jit::recording::location::replay_into): Likewise.
2675 (gcc::jit::recording::type::get_pointer): Likewise.
2676 (gcc::jit::recording::type::get_const): Likewise.
2677 (gcc::jit::recording::memento_of_get_type::replay_into): Likewise.
2678 (gcc::jit::recording::memento_of_get_pointer::replay_into): Likewise.
2679 (gcc::jit::recording::memento_of_get_const::replay_into): Likewise.
2680 (gcc::jit::recording::field::replay_into): Likewise.
2681 (gcc::jit::recording::struct_::replay_into): Likewise.
2682 (gcc::jit::recording::rvalue::access_field): Likewise.
2683 (gcc::jit::recording::rvalue::dereference_field): Likewise.
2684 (gcc::jit::recording::rvalue::dereference): Likewise.
2685 (gcc::jit::recording::lvalue::access_field): Likewise.
2686 (gcc::jit::recording::lvalue::get_address): Likewise.
2687 (gcc::jit::recording::param::replay_into): Likewise.
2688 (gcc::jit::recording::function::function): Likewise.
2689 (gcc::jit::recording::function::replay_into): Likewise.
2690 (gcc::jit::recording::function::new_local): Likewise.
2691 (gcc::jit::recording::function::new_forward_label): Likewise.
2692 (gcc::jit::recording::function::add_eval): Likewise.
2693 (gcc::jit::recording::function::add_assignment): Likewise.
2694 (gcc::jit::recording::function::add_assignment_op): Likewise.
2695 (gcc::jit::recording::function::add_comment): Likewise.
2696 (gcc::jit::recording::function::add_conditional): Likewise.
2697 (gcc::jit::recording::function::add_label): Likewise.
2698 (gcc::jit::recording::function::place_forward_label): Likewise.
2699 (gcc::jit::recording::function::add_jump): Likewise.
2700 (gcc::jit::recording::function::add_return): Likewise.
2701 (gcc::jit::recording::function::new_loop): Likewise.
2702 (gcc::jit::recording::label::replay_into): Likewise.
2703 (gcc::jit::recording::global::replay_into): Likewise.
2704 (gcc::jit::recording::memento_of_new_rvalue_from_int::replay_into):
2706 (gcc::jit::recording::memento_of_new_rvalue_from_double::replay_into):
2708 (gcc::jit::recording::memento_of_new_rvalue_from_ptr::replay_into):
2710 (gcc::jit::recording::memento_of_new_string_literal::replay_into):
2712 (gcc::jit::recording::unary_op::replay_into): Likewise.
2713 (gcc::jit::recording::binary_op::replay_into): Likewise.
2714 (gcc::jit::recording::comparison::replay_into): Likewise.
2715 (gcc::jit::recording::call::call): Likewise.
2716 (gcc::jit::recording::call::replay_into): Likewise.
2717 (gcc::jit::recording::array_lookup::replay_into): Likewise.
2718 (gcc::jit::recording::access_field_of_lvalue::replay_into): Likewise.
2719 (gcc::jit::recording::access_field_rvalue::replay_into): Likewise.
2720 (gcc::jit::recording::dereference_field_rvalue::replay_into): Likewise.
2721 (gcc::jit::recording::dereference_rvalue::replay_into): Likewise.
2722 (gcc::jit::recording::get_address_of_lvalue::replay_into): Likewise.
2723 (gcc::jit::recording::local::replay_into): Likewise.
2724 (gcc::jit::recording::eval::replay_into): Likewise.
2725 (gcc::jit::recording::assignment::replay_into): Likewise.
2726 (gcc::jit::recording::assignment_op::replay_into): Likewise.
2727 (gcc::jit::recording::comment::replay_into): Likewise.
2728 (gcc::jit::recording::conditional::replay_into): Likewise.
2729 (gcc::jit::recording::place_label::replay_into): Likewise.
2730 (gcc::jit::recording::jump::replay_into): Likewise.
2731 (gcc::jit::recording::return_::replay_into): Likewise.
2732 (gcc::jit::recording::loop::replay_into): Likewise.
2733 (gcc::jit::recording::loop::end): Likewise.
2734 (gcc::jit::recording::loop_end::replay_into): Likewise.
2736 (gcc::jit::recording::context::set_str_option): Likewise.
2740 (gcc::jit::recording::context::set_int_option): Likewise.
2741 (gcc::jit::recording::context::set_bool_option): Likewise.
2742 (gcc::jit::recording::context::compile): Likewise.
2743 (gcc::jit::recording::context::add_error): Likewise.
2744 (gcc::jit::recording::context::add_error_va): Likewise.
2745 (gcc::jit::recording::context::get_first_error): Likewise.
2747 (gcc::jit::context::context): Rename to...
2748 (gcc::jit::playback::context::context): ...this.
2749 (gcc::jit::context::~context): Rename to...
2750 (gcc::jit::playback::context::~context): ...this.
2751 (gcc::jit::context::gt_ggc_mx): Rename to...
2752 (gcc::jit::playback::context::gt_ggc_mx): ...this.
2754 (gcc::jit::context::set_code_factory): Eliminate.
2756 (gcc::jit::context::get_type): Rename to...
2757 (gcc::jit::playback::context::get_type): ...this.
2758 (gcc::jit::context::new_field): Rename to...
2759 (gcc::jit::playback::context::new_field): ...this.
2760 (gcc::jit::context::new_struct_type): Rename to...
2761 (gcc::jit::playback::context::new_struct_type): ...this, and
2763 (gcc::jit::context::new_param): Rename to...
2764 (gcc::jit::playback::context::new_param): ...this.
2765 (gcc::jit::context::new_function): Rename to...
2766 (gcc::jit::playback::context::new_function): ...this, and update
2768 (gcc::jit::context::new_global): Rename to...
2769 (gcc::jit::playback::context::new_global): ...this.
2770 (gcc::jit::context::new_rvalue_from_int): Rename to...
2771 (gcc::jit::playback::context::new_rvalue_from_int): ...this.
2772 (gcc::jit::context::new_rvalue_from_double): Rename to...
2773 (gcc::jit::playback::context::new_rvalue_from_double): ...this.
2774 (gcc::jit::context::new_rvalue_from_ptr): Rename to...
2775 (gcc::jit::playback::context::new_rvalue_from_ptr): ...this.
2776 (gcc::jit::context::new_string_literal): Rename to...
2777 (gcc::jit::playback::context::new_string_literal): ...this.
2778 (gcc::jit::context::as_truth_value): Rename to...
2779 (gcc::jit::playback::context::as_truth_value): ...this.
2780 (gcc::jit::context::new_unary_op): Rename to...
2781 (gcc::jit::playback::context::new_unary_op): ...this.
2782 (gcc::jit::context::new_binary_op): Rename to...
2783 (gcc::jit::playback::context::new_binary_op): ...this.
2784 (gcc::jit::context::new_comparison): Rename to...
2785 (gcc::jit::playback::context::new_comparison): ...this.
2786 (gcc::jit::context::new_call): Rename to...
2787 (gcc::jit::playback::context::new_call): ...this, and update
2789 (gcc::jit::context::new_array_lookup): Rename to...
2790 (gcc::jit::playback::context::new_array_lookup): ...this.
2791 (gcc::jit::context::new_field_access): Rename to...
2792 (gcc::jit::playback::context::new_field_access): ...this.
2793 (gcc::jit::context::new_dereference): Rename to...
2794 (gcc::jit::playback::context::new_dereference): ...this.
2796 (gcc::jit::lvalue::access_field): Rename to...
2797 (gcc::jit::playback::lvalue::access_field): ...this.
2798 (gcc::jit::lvalue::get_address): Rename to...
2799 (gcc::jit::playback::lvalue::get_address): ...this.
2801 (gcc::jit::rvalue::dereference_field): Rename to...
2802 (gcc::jit::playback::rvalue::dereference_field): ...this.
2804 (gcc::jit::rvalue::dereference): Rename to...
2805 (gcc::jit::playback::rvalue::dereference): ...this.
2807 (gcc::jit::wrapper::operator new): Rename to...
2808 (gcc::jit::playback::wrapper::operator new): ...this.
2810 (gcc::jit::function::function): Rename to...
2811 (gcc::jit::playback::function::function): ...this.
2812 (gcc::jit::function::gt_ggc_mx): Rename to...
2813 (gcc::jit::playback::function::gt_ggc_mx): ...this.
2814 (gcc::jit::function::get_return_type_as_tree): Rename to...
2815 (gcc::jit::playback::function::get_return_type_as_tree): ...this.
2816 (gcc::jit::function::new_local): Rename to...
2817 (gcc::jit::playback::function::new_local): ...this.
2818 (gcc::jit::function::new_forward_label): Rename to...
2819 (gcc::jit::playback::function::new_forward_label): ...this.
2820 (gcc::jit::function::postprocess): Rename to...
2821 (gcc::jit::playback::function::postprocess): ...this.
2822 (gcc::jit::function::add_eval): Rename to...
2823 (gcc::jit::playback::function::add_eval): ...this.
2824 (gcc::jit::function::add_assignment): Rename to...
2825 (gcc::jit::playback::function::add_assignment): ...this.
2826 (gcc::jit::function::add_comment): Rename to...
2827 (gcc::jit::playback::function::add_comment): ...this.
2828 (gcc::jit::function::add_conditional): Rename to...
2829 (gcc::jit::playback::function::add_conditional): ...this.
2830 (gcc::jit::function::add_label): Rename to...
2831 (gcc::jit::playback::function::add_label): ...this.
2832 (gcc::jit::function::place_forward_label): Rename to...
2833 (gcc::jit::playback::function::place_forward_label): ...this.
2834 (gcc::jit::function::add_jump): Rename to...
2835 (gcc::jit::playback::function::add_jump): ...this.
2836 (gcc::jit::function::add_return): Rename to...
2837 (gcc::jit::playback::function::add_return): ...this.
2838 (gcc::jit::function::new_loop): Rename to...
2839 (gcc::jit::playback::function::new_loop): ...this.
2841 (gcc::jit::label::label): Rename to...
2842 (gcc::jit::playback::label::label): ...this.
2844 (gcc::jit::loop::loop): Rename to...
2845 (gc::jit::playback::loop::loop): ...this.
2846 (gcc::jit::loop::end): Rename to...
2847 (gcc::jit::playback::loop): ...this.
2849 (gcc::jit::active_jit_ctxt): Eliminate in favor of...
2850 (gcc::jit::active_playback_ctxt): ...this.
2852 (gcc::jit::context::compile): Rename to...
2853 (gcc::jit::playback::context::compile): ...this, and eliminate the
2856 (gcc::jit::context::invoke_code_factory): Rename to...
2857 (gcc::jit::playback::context::replay): this. Rather than call
2861 (gcc::jit::context::dump_generated_code): Rename to...
2862 (gcc::jit::playback::context::dump_generated_code): ...this.
2866 (gcc::jit::context::handle_locations): Rename to...
2867 (gcc::jit::playback::context::handle_locations): ...this.
2869 (gcc::jit::context::add_error): Rename to...
2870 (gcc::jit::playback::context::add_error): this, and delegate to
2873 (gcc::jit::context::add_error_va): Rename to...
2874 (gcc::jit::playback::context::add_error_va): this, and delegate
2877 (gcc::jit::context::new_location): Rename to...
2878 (gcc::jit::playback::context::new_location): ...this.
2879 (gcc::jit::context::set_tree_location): Rename to...
2880 (gcc::jit::playback::context::set_tree_location): ...this.
2881 (gcc::jit::context::get_source_file): Rename to...
2882 (gcc::jit::playback::context::get_source_file): ...this.
2883 (gcc::jit::source_file::source_file): Rename to...
2884 (gcc::jit::playback::source_file::source_file): ...this.
2885 (gcc::jit::source_file::get_source_line): Rename to...
2886 (gcc::jit::playback::source_file::get_source_line): ...this.
2887 (gcc::jit::source_line::source_line): Rename to...
2888 (gcc::jit::playback::source_line::source_line): ...this.
2889 (gcc::jit::source_line::get_location): Rename to...
2890 (gcc::jit::playback::source_line::get_location): ...this.
2892 (gcc::jit::location::location): Rename to...
2893 (gcc::jit::playback::location::location): ...this.
2895 * libgccjit.c: Update classes to derive from the "jit::recording"
2901 (jit_error): There isn't an "active jit context" anymore, except
2948 * internal-api.c (gcc::jit::context::new_binary_op): Likewise.
2952 * internal-api.h (gcc::jit::context::get_str_option): New access
2954 (gcc::jit::context::get_int_option): Likewise.
2956 * internal-api.c (gcc::jit::context::~context): Use access methods
2958 (gcc::jit::context::compile): Likewise.
2965 * internal-api.c (gcc::jit::context::compile): Call
2967 (gcc::jit::context::dump_generated_code): New, copying
2970 * internal-api.h (gcc::jit::context::dump_generated_code): New.
2974 * internal-api.h (gcc::jit::function): Add field
2976 * internal-api.c (gcc::jit::function::function): Create a BIND_EXPR
2979 (gcc::jit::function::gt_ggc_mx): Visit m_inner_bind_expr.
2980 (gcc::jit::function::new_local): Set the DECL_CONTEXT of the new
2983 (gcc::jit::function::postprocess): Set the DECL_SAVED_TREE of the
2989 * internal-api.h (gcc::jit::function::add_stmt): New.
2991 * internal-api.c (gcc::jit::function::add_eval): Replace use of
2993 (gcc::jit::function::add_assignment): Likewise.
2994 (gcc::jit::function::add_conditional): Likewise.
2995 (gcc::jit::function::place_forward_label): Likewise.
2996 (gcc::jit::function::add_jump): Likewise.
2997 (gcc::jit::function::add_return): Likewise.
3001 * internal-api.c (gcc::jit::function::add_comment): New.
3002 * internal-api.h (gcc::jit::function::add_comment): New.
3009 * internal-api.c (gcc::jit::function::add_eval): Handle non-NULL
3011 (gcc::jit::context::handle_locations): Fix test for the various
3030 * internal-api.c (gcc::jit::context::add_error_va): Record the
3032 (gcc::jit::context::get_first_error): New.
3033 * internal-api.h (gcc::jit::context::get_first_error): New.
3034 (gcc::jit::context::m_first_error_str): New.
3041 * internal-api.c (gcc::jit::context::compile): Correctly cleanup
3049 * internal-api.c (gcc::jit::context::postprocess): Show source
3061 * internal-api.c (gcc::jit::lvalue::get_address): New.
3062 * internal-api.h (gcc::jit::lvalue::get_address): New.
3069 * internal-api.c (gcc::jit::context::new_param): Add context
3071 (gcc::jit::context::new_global): Likewise.
3072 (gcc::jit::context::new_rvalue_from_int): Likewise.
3073 (gcc::jit::context::new_rvalue_from_double): Likewise.
3074 (gcc::jit::context::new_rvalue_from_ptr): Likewise.
3075 (gcc::jit::context::new_string_literal): Likewise.
3076 (gcc::jit::context::new_call): Likewise.
3077 (gcc::jit::context::new_array_lookup): Likewise.
3078 (gcc::jit::function::new_local): Likewise.
3079 (gcc::jit::context::new_binary_op): Likewise; add new
3081 (gcc::jit::context::new_comparison): Likewise; add new
3083 (gcc::jit::context::as_truth_value): New.
3084 (gcc::jit::context::new_unary_op): New.
3085 (gcc::jit::context::new_field_access): Convert to a helper
3087 (gcc::jit::context::new_dereference): New.
3088 (gcc::jit::lvalue::access_field): New.
3089 (gcc::jit::rvalue::access_field): New.
3090 (gcc::jit::rvalue::dereference_field): New.
3091 (gcc::jit::rvalue::dereference): New.
3092 * internal-api.h (gcc::jit::context::new_unary_op): New.
3093 (gcc::jit::context::new_field_access): Work
3094 (gcc::jit::context::new_dereference): New.
3095 (gcc::jit::context::as_truth_value): New.
3096 (gcc::jit::rvalue): Add a context field.
3097 (gcc::jit::rvalue::access_field): New.
3098 (gcc::jit::rvalue::dereference_field): New.
3099 (gcc::jit::rvalue::dereference): New.
3100 (gcc::jit::lvalue::lvalue): Add context to ctor.
3101 (gcc::jit::lvalue::access_field): New.
3102 (gcc::jit::param::param): Add context to ctor.
3139 * internal-api.c (gcc::jit::context::get_type): Improve error
3141 (gcc::jit::context::new_binary_op): Likewise.
3142 (gcc::jit::context::new_comparison): Likewise.
3143 (gcc::jit::context::set_str_option): Likewise.
3144 (gcc::jit::context::set_int_option): Likewise.
3145 (gcc::jit::context::set_bool_option): Likewise.
3146 (gcc::jit::context::compile): Likewise, and make the errors
3149 (gcc::jit::context::add_error): Add varargs and provide
3151 (gcc::jit::context::add_error_va): New.
3153 (gcc::jit::context::add_error): Add varargs and GNU_PRINTF
3155 (gcc::jit::context::add_error_va): New.
3156 (gcc::jit::context::errors_occurred): New.
3157 (gcc::jit::context::m_error_count): New.
3158 (gcc::jit::function::get_kind): New.
3221 * internal-api.c (gcc::jit::context::get_void_type): Remove.
3222 (gcc::jit::context::get_char_type): Remove.
3223 (gcc::jit::context::get_int_type): Remove.
3224 (gcc::jit::context::get_float_type): Remove.
3225 (gcc::jit::context::get_double_type): Remove.
3227 (gcc::jit::context::get_type): New.
3228 (gcc::jit::context::new_rvalue_from_double): New.
3229 (gcc::jit::context::new_rvalue_from_ptr): New.
3230 * internal-api.h (gcc::jit::context::get_void_type): Remove.
3231 (gcc::jit::context::get_char_type): Remove.
3232 (gcc::jit::context::get_int_type): Remove.
3233 (gcc::jit::context::get_float_type): Remove.
3234 (gcc::jit::context::get_double_type): Remove.
3235 (gcc::jit::context::get_type): New.
3236 (gcc::jit::context::new_rvalue_from_double): New.
3237 (gcc::jit::context::new_rvalue_from_ptr): New.
3278 * internal-api.c (gcc::jit::context::new_local): Replace with...
3279 (gcc::jit::function::new_local): ...this, and change return type
3281 * internal-api.h (gcc::jit::local): Eliminate.
3282 (gcc::jit::context::new_local): Replace with...
3283 (gcc::jit::function::new_local): ...this, and change return type
3320 * internal-api.c (gcc::jit::context::new_field): Implement
3322 (gcc::jit::context::new_struct_type): Likewise.
3323 (gcc::jit::context::new_param): Likewise.
3324 (gcc::jit::context::new_function): Likewise.
3325 (gcc::jit::context::new_global): Likewise.
3326 (gcc::jit::context::new_local): Likewise.
3327 (gcc::jit::context::new_binary_op): Likewise.
3328 (gcc::jit::context::new_comparison): Likewise.
3329 (gcc::jit::context::new_call): Likewise.
3330 (gcc::jit::context::new_array_lookup): Likewise.
3331 (gcc::jit::context::new_field_access): Likewise.
3332 (gcc::jit::context::add_assignment): Likewise.
3333 (gcc::jit::context::add_conditional): Likewise.
3334 (gcc::jit::function::add_label): Likewise.
3335 (gcc::jit::function::add_jump): Likewise.
3336 (gcc::jit::function::add_return): Likewise.
3337 (gcc::jit::function::place_forward_label): Likewise, adding
3339 (gcc::jit::loop::loop): Add loc arg to place_forward_label.
3340 (gcc::jit::loop::end): Likewise.
3341 (gcc::jit::context::invoke_code_factory): Call handle_locations
3345 (gcc::jit::context::handle_locations): New.
3346 (gcc::jit::context::new_location): New.
3347 (gcc::jit::context::set_tree_location): New.
3348 (gcc::jit::context::get_source_file): New.
3349 (gcc::jit::source_file::source_file): New.
3350 (gcc::jit::source_file::get_source_line): New.
3351 (gcc::jit::source_line::source_line): New.
3352 (gcc::jit::source_line::get_location): New.
3353 (gcc::jit::location::location): New.
3354 * internal-api.h (gcc::jit::context::new_location): New.
3355 (gcc::jit::context::set_tree_location): New.
3356 (gcc::jit::context::handle_locations): New.
3357 (gcc::jit::context::get_source_file): New.
3358 (gcc::jit::context::m_source_files): New field.
3359 (gcc::jit::context::m_cached_locations: New field.
3360 (gcc::jit::function::place_forward_label): Add location
3362 (gcc::jit::function::set_tree_location): New.
3363 (gcc::jit::source_file): New class.
3364 (gcc::jit::source_line): New class.
3365 (gcc::jit::location): New class.
3385 * internal-api.c ((gcc::jit::context::compile): Implement
3406 * internal-api.c (gcc::jit::context::~context): Fix indentation;
3414 * internal-api.c (gcc::jit::context::compile): Implement
3421 * internal-api.c (gcc::jit::context::~context): Implement
3426 * internal-api.c (gcc::jit::context::compile): Use mkdtemp to
3432 (gcc::jit::context::~context): Clean up tempfiles and path
3434 * internal-api.h (gcc::jit::context): Add fields
3440 * internal-api.c (gcc::jit::context::new_function): Fix leak of
3445 * internal-api.c (gcc::jit::context::~context): New.
3446 * internal-api.h (gcc::jit::context::~context): New.
3450 * internal-api.c (gcc::jit::context::compile): Implement
3463 * internal-api.c (gcc::jit::context::new_global): New.
3464 * internal-api.h (gcc::jit::context::new_global): New.
3477 * internal-api.c (gcc::jit::function::postprocess): Dump gimple