Skip to content

Commit 77034a8

Browse files
authored
Merge pull request #1644 from clasp-developers/smart-ptr-cleanup
Mostly deleting a lot of dead code. Also leverages fancy template stuff to make smart pointers a little smarter. Notably you can now use operator[] on smart pointers if their underlying _O type has an operator[]. This also works with begin and end, so you can use smart pointers in e.g. range for statements.
2 parents 7f1f296 + ea939d2 commit 77034a8

File tree

99 files changed

+919
-4854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+919
-4854
lines changed

include/clasp/asttooling/otherPackageClasses.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

include/clasp/cffi-old/otherPackageClasses.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

include/clasp/clbind/class.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,17 +470,15 @@ struct property_registration : registration {
470470
using VariadicGetterType = WRAPPER_Getter<reg::null_type, Class, Get>;
471471
core::SimpleFun_sp entryPoint = makeSimpleFunAndFunctionDescription<VariadicGetterType>(sym);
472472
maybe_register_symbol_using_dladdr((void*)VariadicGetterType::entry_point);
473-
auto raw_getter = gc::GC<VariadicGetterType>::allocate(entryPoint, get);
474-
core::BuiltinClosure_sp getter = gc::As<core::BuiltinClosure_sp>(raw_getter);
473+
auto getter = gc::GC<VariadicGetterType>::allocate(entryPoint, get);
475474
lisp_defineSingleDispatchMethod(sym, classSymbol, getter, 0, true, m_arguments, m_declares,
476475
m_doc_string, true, 1);
477476
core::T_sp setf_name = core::Cons_O::createList(cl::_sym_setf, sym);
478477
using VariadicSetterType = WRAPPER_Setter<reg::null_type, Class, Set>;
479478
core::SimpleFun_sp setterEntryPoint =
480479
makeSimpleFunAndFunctionDescription<VariadicSetterType>(setf_name);
481480
maybe_register_symbol_using_dladdr((void*)VariadicSetterType::entry_point);
482-
auto raw_setter = gc::GC<VariadicSetterType>::allocate(setterEntryPoint, set);
483-
core::BuiltinClosure_sp setter = gc::As<core::BuiltinClosure_sp>(raw_setter);
481+
auto setter = gc::GC<VariadicSetterType>::allocate(setterEntryPoint, set);
484482
lisp_defineSingleDispatchMethod(setf_name, classSymbol, setter, 1, true, m_arguments, m_declares,
485483
m_doc_string, true, 2);
486484
// printf("%s:%d - allocated a getter@%p for %s\n", __FILE__, __LINE__, getter, name);

include/clasp/clbind/class_rep.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ THE SOFTWARE.
5858
#include <clasp/core/object.h>
5959
#include <clasp/core/instance.h>
6060
#include <clasp/core/numbers.h>
61+
#include <clasp/core/symbol.h>
6162
#include <clasp/clbind/class_registry.h>
6263
#include <clasp/clbind/primitives.h>
6364
#include <clasp/clbind/typeid.h>

include/clasp/clbind/clbind.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ THE SOFTWARE.
3838
#include <clasp/clbind/derivable.h>
3939
#include <clasp/clbind/derivable_class.h>
4040
#include <clasp/clbind/clbind_wrappers.h>
41-
#include <clasp/clbind/clbind_taggedCast.h>

include/clasp/clbind/clbind_taggedCast.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

include/clasp/clbind/otherPackageClasses.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)