@@ -138,7 +138,7 @@ class InstanceMethodType : public ValuedCompilerType<RawInstanceMethod*> {
138
138
139
139
CompilerVariable* call (IREmitter& emitter, const OpInfo& info, ValuedCompilerVariable<RawInstanceMethod*>* var,
140
140
ArgPassSpec argspec, const std::vector<CompilerVariable*>& args,
141
- BoxedTuple * keyword_names) override {
141
+ const std::vector<BoxedString*> * keyword_names) override {
142
142
std::vector<CompilerVariable*> new_args;
143
143
new_args.push_back (var->getValue ()->obj );
144
144
new_args.insert (new_args.end (), args.begin (), args.end ());
@@ -225,10 +225,11 @@ class UnknownType : public ConcreteCompilerType {
225
225
CompilerVariable* getattr (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var, BoxedString* attr,
226
226
bool cls_only) override ;
227
227
CompilerVariable* call (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var, ArgPassSpec argspec,
228
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names) override ;
228
+ const std::vector<CompilerVariable*>& args,
229
+ const std::vector<BoxedString*>* keyword_names) override ;
229
230
CompilerVariable* callattr (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var, BoxedString* attr,
230
231
CallattrFlags flags, const std::vector<CompilerVariable*>& args,
231
- BoxedTuple * keyword_names) override ;
232
+ const std::vector<BoxedString*> * keyword_names) override ;
232
233
ConcreteCompilerVariable* nonzero (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var) override ;
233
234
ConcreteCompilerVariable* unaryop (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var,
234
235
AST_TYPE::AST_TYPE op_type) override ;
@@ -592,11 +593,10 @@ CompilerVariable* UnknownType::getattr(IREmitter& emitter, const OpInfo& info, C
592
593
return new ConcreteCompilerVariable (UNKNOWN, rtn_val);
593
594
}
594
595
595
- static ConcreteCompilerVariable* _call (IREmitter& emitter, const OpInfo& info, llvm::Value* func,
596
- ExceptionStyle target_exception_style, void * func_addr,
597
- const std::vector<llvm::Value*>& other_args, ArgPassSpec argspec,
598
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names,
599
- ConcreteCompilerType* rtn_type, bool nullable_return = false ) {
596
+ static ConcreteCompilerVariable*
597
+ _call (IREmitter& emitter, const OpInfo& info, llvm::Value* func, ExceptionStyle target_exception_style, void * func_addr,
598
+ const std::vector<llvm::Value*>& other_args, ArgPassSpec argspec, const std::vector<CompilerVariable*>& args,
599
+ const std::vector<BoxedString*>* keyword_names, ConcreteCompilerType* rtn_type, bool nullable_return = false ) {
600
600
bool pass_keyword_names = (keyword_names != nullptr );
601
601
assert (pass_keyword_names == (argspec.num_keywords > 0 ));
602
602
@@ -718,7 +718,7 @@ static ConcreteCompilerVariable* _call(IREmitter& emitter, const OpInfo& info, l
718
718
719
719
CompilerVariable* UnknownType::call (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var,
720
720
ArgPassSpec argspec, const std::vector<CompilerVariable*>& args,
721
- BoxedTuple * keyword_names) {
721
+ const std::vector<BoxedString*> * keyword_names) {
722
722
bool pass_keywords = (argspec.num_keywords != 0 );
723
723
int npassed_args = argspec.totalPassed ();
724
724
@@ -750,7 +750,8 @@ CompilerVariable* UnknownType::call(IREmitter& emitter, const OpInfo& info, Conc
750
750
751
751
CompilerVariable* UnknownType::callattr (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var,
752
752
BoxedString* attr, CallattrFlags flags,
753
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names) {
753
+ const std::vector<CompilerVariable*>& args,
754
+ const std::vector<BoxedString*>* keyword_names) {
754
755
bool pass_keywords = (flags.argspec .num_keywords != 0 );
755
756
int npassed_args = flags.argspec .totalPassed ();
756
757
@@ -1162,7 +1163,8 @@ class IntType : public UnboxedType<llvm::Value*, IntType> {
1162
1163
}
1163
1164
1164
1165
CompilerVariable* callattr (IREmitter& emitter, const OpInfo& info, VAR* var, BoxedString* attr, CallattrFlags flags,
1165
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names) override {
1166
+ const std::vector<CompilerVariable*>& args,
1167
+ const std::vector<BoxedString*>* keyword_names) override {
1166
1168
ConcreteCompilerVariable* converted = var->makeConverted (emitter, BOXED_INT);
1167
1169
CompilerVariable* rtn = converted->callattr (emitter, info, attr, flags, args, keyword_names);
1168
1170
return rtn;
@@ -1449,7 +1451,8 @@ class FloatType : public UnboxedType<llvm::Value*, FloatType> {
1449
1451
}
1450
1452
1451
1453
CompilerVariable* callattr (IREmitter& emitter, const OpInfo& info, VAR* var, BoxedString* attr, CallattrFlags flags,
1452
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names) override {
1454
+ const std::vector<CompilerVariable*>& args,
1455
+ const std::vector<BoxedString*>* keyword_names) override {
1453
1456
ConcreteCompilerVariable* converted = var->makeConverted (emitter, BOXED_FLOAT);
1454
1457
CompilerVariable* rtn = converted->callattr (emitter, info, attr, flags, args, keyword_names);
1455
1458
return rtn;
@@ -1836,16 +1839,18 @@ class NormalObjectType : public ConcreteCompilerType {
1836
1839
}
1837
1840
1838
1841
CompilerVariable* call (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var, ArgPassSpec argspec,
1839
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names) override {
1842
+ const std::vector<CompilerVariable*>& args,
1843
+ const std::vector<BoxedString*>* keyword_names) override {
1840
1844
ConcreteCompilerVariable* converted = var->makeConverted (emitter, UNKNOWN);
1841
1845
CompilerVariable* rtn = converted->call (emitter, info, argspec, args, keyword_names);
1842
1846
return rtn;
1843
1847
}
1844
1848
1845
1849
CompilerVariable* tryCallattrConstant (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var,
1846
1850
BoxedString* attr, bool clsonly, ArgPassSpec argspec,
1847
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names,
1848
- bool * no_attribute = NULL , ExceptionStyle exception_style = CXX) {
1851
+ const std::vector<CompilerVariable*>& args,
1852
+ const std::vector<BoxedString*>* keyword_names, bool * no_attribute = NULL ,
1853
+ ExceptionStyle exception_style = CXX) {
1849
1854
if (!canStaticallyResolveGetattrs ())
1850
1855
return NULL ;
1851
1856
@@ -1997,7 +2002,7 @@ class NormalObjectType : public ConcreteCompilerType {
1997
2002
1998
2003
CompilerVariable* callattr (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var, BoxedString* attr,
1999
2004
CallattrFlags flags, const std::vector<CompilerVariable*>& args,
2000
- BoxedTuple * keyword_names) override {
2005
+ const std::vector<BoxedString*> * keyword_names) override {
2001
2006
ExceptionStyle exception_style = info.preferredExceptionStyle ();
2002
2007
2003
2008
bool no_attribute = false ;
@@ -2309,7 +2314,8 @@ class StrConstantType : public ValuedCompilerType<BoxedString*> {
2309
2314
}
2310
2315
2311
2316
CompilerVariable* callattr (IREmitter& emitter, const OpInfo& info, VAR* var, BoxedString* attr, CallattrFlags flags,
2312
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names) override {
2317
+ const std::vector<CompilerVariable*>& args,
2318
+ const std::vector<BoxedString*>* keyword_names) override {
2313
2319
ConcreteCompilerVariable* converted = var->makeConverted (emitter, STR);
2314
2320
CompilerVariable* rtn = converted->callattr (emitter, info, attr, flags, args, keyword_names);
2315
2321
return rtn;
@@ -2428,7 +2434,7 @@ class BoolType : public ConcreteCompilerType {
2428
2434
2429
2435
CompilerVariable* callattr (IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var, BoxedString* attr,
2430
2436
CallattrFlags flags, const std::vector<CompilerVariable*>& args,
2431
- BoxedTuple * keyword_names) override {
2437
+ const std::vector<BoxedString*> * keyword_names) override {
2432
2438
ConcreteCompilerVariable* converted = var->makeConverted (emitter, BOXED_BOOL);
2433
2439
CompilerVariable* rtn = converted->callattr (emitter, info, attr, flags, args, keyword_names);
2434
2440
return rtn;
@@ -2664,7 +2670,8 @@ class TupleType : public UnboxedType<const std::vector<CompilerVariable*>, Tuple
2664
2670
}
2665
2671
2666
2672
CompilerVariable* callattr (IREmitter& emitter, const OpInfo& info, VAR* var, BoxedString* attr, CallattrFlags flags,
2667
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names) override {
2673
+ const std::vector<CompilerVariable*>& args,
2674
+ const std::vector<BoxedString*>* keyword_names) override {
2668
2675
return makeConverted (emitter, var, getConcreteType ())
2669
2676
->callattr (emitter, info, attr, flags, args, keyword_names);
2670
2677
}
@@ -2805,7 +2812,8 @@ class UndefType : public ConcreteCompilerType {
2805
2812
}
2806
2813
2807
2814
CompilerVariable* call (IREmitter& emitter, const OpInfo& info, VAR* var, ArgPassSpec argspec,
2808
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names) override {
2815
+ const std::vector<CompilerVariable*>& args,
2816
+ const std::vector<BoxedString*>* keyword_names) override {
2809
2817
return undefVariable ();
2810
2818
}
2811
2819
CompilerVariable* dup (VAR* v, DupCache& cache) override {
@@ -2826,7 +2834,8 @@ class UndefType : public ConcreteCompilerType {
2826
2834
}
2827
2835
2828
2836
CompilerVariable* callattr (IREmitter& emitter, const OpInfo& info, VAR* var, BoxedString* attr, CallattrFlags flags,
2829
- const std::vector<CompilerVariable*>& args, BoxedTuple* keyword_names) override {
2837
+ const std::vector<CompilerVariable*>& args,
2838
+ const std::vector<BoxedString*>* keyword_names) override {
2830
2839
return undefVariable ();
2831
2840
}
2832
2841
0 commit comments