hexsha
stringlengths
40
40
size
int64
19
11.4M
ext
stringclasses
13 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
270
max_stars_repo_name
stringlengths
5
110
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
9
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
270
max_issues_repo_name
stringlengths
5
116
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
9
max_issues_count
float64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
270
max_forks_repo_name
stringlengths
5
116
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
9
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
19
11.4M
avg_line_length
float64
1.93
229k
max_line_length
int64
12
688k
alphanum_fraction
float64
0.07
0.99
matches
listlengths
1
10
80cd9cfe6ac6d3f003dce74075c5d924f4dcfabd
4,048
cc
C++
cpp/src/arrow/pretty_print-test.cc
jimhester/arrow
ddda3039e6fb6a9d4f2c5b1189369204bfe1ea93
[ "Apache-2.0" ]
null
null
null
cpp/src/arrow/pretty_print-test.cc
jimhester/arrow
ddda3039e6fb6a9d4f2c5b1189369204bfe1ea93
[ "Apache-2.0" ]
null
null
null
cpp/src/arrow/pretty_print-test.cc
jimhester/arrow
ddda3039e6fb6a9d4f2c5b1189369204bfe1ea93
[ "Apache-2.0" ]
1
2019-06-27T22:17:43.000Z
2019-06-27T22:17:43.000Z
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <memory> #include <sstream> #include <vector> #include "gtest/gtest.h" #include "arrow/array.h" #include "arrow/builder.h" #include "arrow/pretty_print.h" #include "arrow/test-util.h" #include "arrow/type.h" #include "arrow/type_traits.h" namespace arrow { class TestPrettyPrint : public ::testing::Test { public: void SetUp() {} void Print(const Array& array) {} private: std::ostringstream sink_; }; void CheckArray(const Array& arr, int indent, const char* expected) { std::ostringstream sink; ASSERT_OK(PrettyPrint(arr, indent, &sink)); std::string result = sink.str(); ASSERT_EQ(std::string(expected, strlen(expected)), result); } template <typename TYPE, typename C_TYPE> void CheckPrimitive(int indent, const std::vector<bool>& is_valid, const std::vector<C_TYPE>& values, const char* expected) { std::shared_ptr<Array> array; ArrayFromVector<TYPE, C_TYPE>(is_valid, values, &array); CheckArray(*array, indent, expected); } TEST_F(TestPrettyPrint, PrimitiveType) { std::vector<bool> is_valid = {true, true, false, true, false}; std::vector<int32_t> values = {0, 1, 2, 3, 4}; static const char* expected = R"expected([0, 1, null, 3, null])expected"; CheckPrimitive<Int32Type, int32_t>(0, is_valid, values, expected); std::vector<std::string> values2 = {"foo", "bar", "", "baz", ""}; static const char* ex2 = R"expected(["foo", "bar", null, "baz", null])expected"; CheckPrimitive<StringType, std::string>(0, is_valid, values2, ex2); } TEST_F(TestPrettyPrint, BinaryType) { std::vector<bool> is_valid = {true, true, false, true, false}; std::vector<std::string> values = {"foo", "bar", "", "baz", ""}; static const char* ex = R"expected([666F6F, 626172, null, 62617A, null])expected"; CheckPrimitive<BinaryType, std::string>(0, is_valid, values, ex); } TEST_F(TestPrettyPrint, FixedSizeBinaryType) { std::vector<bool> is_valid = {true, true, false, true, false}; std::vector<std::string> values = {"foo", "bar", "baz"}; static const char* ex = R"expected([666F6F, 626172, 62617A])expected"; std::shared_ptr<Array> array; auto type = fixed_size_binary(3); FixedSizeBinaryBuilder builder(default_memory_pool(), type); builder.Append(values[0]); builder.Append(values[1]); builder.Append(values[2]); builder.Finish(&array); CheckArray(*array, 0, ex); } TEST_F(TestPrettyPrint, DictionaryType) { std::vector<bool> is_valid = {true, true, false, true, true, true}; std::shared_ptr<Array> dict; std::vector<std::string> dict_values = {"foo", "bar", "baz"}; ArrayFromVector<StringType, std::string>(dict_values, &dict); std::shared_ptr<DataType> dict_type = dictionary(int16(), dict); std::shared_ptr<Array> indices; std::vector<int16_t> indices_values = {1, 2, -1, 0, 2, 0}; ArrayFromVector<Int16Type, int16_t>(is_valid, indices_values, &indices); auto arr = std::make_shared<DictionaryArray>(dict_type, indices); static const char* expected = R"expected( -- is_valid: [true, true, false, true, true, true] -- dictionary: ["foo", "bar", "baz"] -- indices: [1, 2, null, 0, 2, 0])expected"; CheckArray(*arr.get(), 0, expected); } } // namespace arrow
33.733333
84
0.704051
[ "vector" ]
80d367f40e7b66e2df7378bf56b9690cb58f7753
13,955
cpp
C++
first-c++-impl/src/ast.cpp
jtolds/pants-lang
33d0a4238598af12068f650edb6d72766ca180ec
[ "MIT" ]
5
2015-04-28T02:13:22.000Z
2017-11-25T07:41:21.000Z
first-c++-impl/src/ast.cpp
jtolds/pants-lang
33d0a4238598af12068f650edb6d72766ca180ec
[ "MIT" ]
null
null
null
first-c++-impl/src/ast.cpp
jtolds/pants-lang
33d0a4238598af12068f650edb6d72766ca180ec
[ "MIT" ]
null
null
null
#include "ast.h" std::string pants::ast::Application::format() const { std::ostringstream os; os << "Application("; for(unsigned int i = 0; i < terms.size(); ++i) { if(i > 0) os << ", "; os << terms[i]->format(); } os << ")"; return os.str(); } std::string pants::ast::Mutation::format() const { std::ostringstream os; os << "Mutation(" << assignee->format() << ", " << exp->format() << ")"; return os.str(); } std::string pants::ast::Definition::format() const { std::ostringstream os; os << "Definition(" << assignee->format() << ", " << exp->format() << ")"; return os.str(); } pants::ast::Term::Term(const std::vector<PTR<ValueModifier> >& headers_, PTR<Value> value_, const std::vector<PTR<ValueModifier> >& trailers_) : value(value_) { trailers.reserve(trailers_.size() + headers_.size()); for(unsigned int i = 0; i < trailers_.size(); ++i) { if(trailers_[i]) trailers.push_back(trailers_[i]); } for(unsigned int i = headers_.size(); i > 0; --i) { if(headers_[i-1]) trailers.push_back(headers_[i-1]); } } std::string pants::ast::Term::format() const { std::ostringstream os; os << "Term(Value(" << value->format() << "), Trailers("; for(unsigned int i = 0; i < trailers.size(); ++i) { if(i > 0) os << ", "; os << trailers[i]->format(); } os << "))"; return os.str(); } std::string pants::ast::Variable::format() const { std::ostringstream os; os << "Variable(" << name << (user_provided ? ", user_provided)" : ", compiler_provided)"); return os.str(); } pants::ast::SubExpression::SubExpression(const std::vector<PTR<Expression> >& expressions_) { expressions.reserve(expressions_.size()); for(unsigned int i = 0; i < expressions_.size(); ++i) { if(expressions_[i]) expressions.push_back(expressions_[i]); } } std::string pants::ast::SubExpression::format() const { std::ostringstream os; os << "SubExpression("; for(unsigned int i = 0; i < expressions.size(); ++i) { if(i > 0) os << ", "; os << expressions[i]->format(); } os << ")"; return os.str(); } std::string pants::ast::Integer::format() const { std::ostringstream os; os << "Integer(" << value << ")"; return os.str(); } std::string pants::ast::CharString::format() const { std::ostringstream os; os << "CharString(" << value << ")"; return os.str(); } std::string pants::ast::ByteString::format() const { std::ostringstream os; os << "ByteString(" << value << ")"; return os.str(); } std::string pants::ast::Float::format() const { std::ostringstream os; os << "Float(" << value << ")"; return os.str(); } std::string pants::ast::DictDefinition::format() const { std::ostringstream os; os << "DictDefinition(" << key->format() << ", " << value->format() << ")"; return os.str(); } pants::ast::Dictionary::Dictionary(const std::vector<DictDefinition>& values_) { values.reserve(values_.size()); for(unsigned int i = 0; i < values_.size(); ++i) { if(values_[i].key.get() && values_[i].value.get()) values.push_back(values_[i]); } } std::string pants::ast::Dictionary::format() const { std::ostringstream os; os << "Dictionary("; for(unsigned int i = 0; i < values.size(); ++i) { if(i > 0) os << ", "; os << values[i].format(); } os << ")"; return os.str(); } pants::ast::Array::Array(const std::vector<PTR<Expression> >& values_) { values.reserve(values_.size()); for(unsigned int i = 0; i < values_.size(); ++i) { if(values_[i].get()) values.push_back(values_[i]); } } std::string pants::ast::Array::format() const { std::ostringstream os; os << "Array("; for(unsigned int i = 0; i < values.size(); ++i) { if(i > 0) os << ", "; os << values[i]->format(); } os << ")"; return os.str(); } std::string pants::ast::RequiredInArgument::format() const { std::ostringstream os; os << "RequiredInArgument(" << name.format() << ")"; return os.str(); } std::string pants::ast::OptionalInArgument::format() const { std::ostringstream os; os << "OptionalInArgument(" << name.format() << ", " << application->format() << ")"; return os.str(); } std::string pants::ast::ArbitraryInArgument::format() const { std::ostringstream os; os << "ArbitraryInArgument(" << name.format() << ")"; return os.str(); } std::string pants::ast::KeywordInArgument::format() const { std::ostringstream os; os << "KeywordInArgument(" << name.format() << ")"; return os.str(); } std::string pants::ast::RequiredOutArgument::format() const { std::ostringstream os; os << "RequiredOutArgument(" << application->format() << ")"; return os.str(); } std::string pants::ast::OptionalOutArgument::format() const { std::ostringstream os; os << "OptionalOutArgument(" << name.format() << ", " << application->format() << ")"; return os.str(); } pants::ast::ArbitraryOutArgument::ArbitraryOutArgument( const std::vector<PTR<Expression> >& array_) { array.reserve(array_.size()); for(unsigned int i = 0; i < array_.size(); ++i) { if(array_[i]) array.push_back(array_[i]); } } std::string pants::ast::ArbitraryOutArgument::format() const { std::ostringstream os; os << "ArbitraryOutArgument("; for(unsigned int i = 0; i < array.size(); ++i) { if(i > 0) os << ", "; os << array[i]->format(); } os << ")"; return os.str(); } pants::ast::KeywordOutArgument::KeywordOutArgument( const std::vector<PTR<Expression> >& object_) { object.reserve(object_.size()); for(unsigned int i = 0; i < object_.size(); ++i) { if(object_[i]) object.push_back(object_[i]); } } std::string pants::ast::KeywordOutArgument::format() const { std::ostringstream os; os << "KeywordOutArgument("; for(unsigned int i = 0; i < object.size(); ++i) { if(i > 0) os << ", "; os << object[i]->format(); } os << ")"; return os.str(); } pants::ast::Function::Function(const boost::optional<InArgList>& args_, const std::vector<PTR<Expression> >& expressions_) { expressions.reserve(expressions_.size()); for(unsigned int i = 0; i < expressions_.size(); ++i) { if(expressions_[i]) expressions.push_back(expressions_[i]); } if(!args_) return; if(!!args_->left_args) { const std::vector<PTR<InArgument> >& left_args(args_->left_args.get()); left_required_args.reserve(left_args.size()); for(unsigned int i = 0; i < left_args.size(); ++i) { if(!left_args[i].get()) continue; if(dynamic_cast<RequiredInArgument*>(left_args[i].get())) { left_required_args.push_back( *((RequiredInArgument*)left_args[i].get())); } else if(dynamic_cast<ArbitraryInArgument*>(left_args[i].get())) { if(!!left_arbitrary_arg) throw pants::expectation_failure("only one left arbitrary argument " "expected"); left_arbitrary_arg = *((ArbitraryInArgument*)left_args[i].get()); } else if(dynamic_cast<KeywordInArgument*>(left_args[i].get())) { throw pants::expectation_failure("left keyword argument not " "supported"); } else if(dynamic_cast<OptionalInArgument*>(left_args[i].get())) { left_optional_args.push_back( *((OptionalInArgument*)left_args[i].get())); } else { throw pants::expectation_failure("unknown argument type"); } } } const std::vector<PTR<InArgument> >& right_args(args_->right_args); right_required_args.reserve(right_args.size()); right_optional_args.reserve(right_args.size()); for(unsigned int i = 0; i < right_args.size(); ++i) { if(!right_args[i].get()) continue; if(dynamic_cast<ArbitraryInArgument*>(right_args[i].get())) { if(!!right_arbitrary_arg) throw pants::expectation_failure( "only one right arbitrary argument expected"); right_arbitrary_arg = *((ArbitraryInArgument*)right_args[i].get()); } else if(dynamic_cast<KeywordInArgument*>(right_args[i].get())) { if(!!right_keyword_arg) throw pants::expectation_failure("only one right keyword argument " "expected"); right_keyword_arg = *((KeywordInArgument*)right_args[i].get()); } else if(dynamic_cast<OptionalInArgument*>(right_args[i].get())) { right_optional_args.push_back( *((OptionalInArgument*)right_args[i].get())); } else if(dynamic_cast<RequiredInArgument*>(right_args[i].get())) { right_required_args.push_back( *((RequiredInArgument*)right_args[i].get())); } else { throw pants::expectation_failure("unknown argument type"); } } } std::string pants::ast::Function::format() const { std::ostringstream os; os << "Function(Left("; os << "Required("; for(unsigned int i = 0; i < left_required_args.size(); ++i) { if(i > 0) os << ", "; os << left_required_args[i].format(); } os << ")"; if(!!left_arbitrary_arg) os << ", Arbitrary(" << left_arbitrary_arg->name.format() << ")"; os << "), Right("; os << "Required("; for(unsigned int i = 0; i < right_required_args.size(); ++i) { if(i > 0) os << ", "; os << right_required_args[i].format(); } os << "), Optional("; for(unsigned int i = 0; i < right_optional_args.size(); ++i) { if(i > 0) os << ", "; os << right_optional_args[i].format(); } os << ")"; if(!!right_arbitrary_arg) os << ", Arbitrary(" << right_arbitrary_arg->name.format() << ")"; if(!!right_keyword_arg) os << ", Keyword(" << right_keyword_arg->name.format() << ")"; os << "), Expressions("; for(unsigned int i = 0; i < expressions.size(); ++i) { if(i > 0) os << ", "; os << expressions[i]->format(); } os << "))"; return os.str(); } std::string pants::ast::OpenCall::format() const { return "OpenCall()"; } std::string pants::ast::Field::format() const { std::ostringstream os; os << "Field(" << variable.format() << ")"; return os.str(); } pants::ast::Index::Index( const std::vector<PTR<Expression> >& expressions_) { expressions.reserve(expressions_.size()); for(unsigned int i = 0; i < expressions_.size(); ++i) { if(expressions_[i]) expressions.push_back(expressions_[i]); } } std::string pants::ast::Index::format() const { std::ostringstream os; os << "Index("; for(unsigned int i = 0; i < expressions.size(); ++i) { if(i > 0) os << ", "; os << expressions[i]->format(); } os << ")"; return os.str(); } void pants::ast::ClosedCall::init( const std::vector<PTR<OutArgument> >& left_args_, const std::vector<PTR<OutArgument> >& right_args_) { left_required_args.reserve(left_args_.size()); for(unsigned int i = 0; i < left_args_.size(); ++i) { if(!left_args_[i].get()) continue; if(dynamic_cast<RequiredOutArgument*>(left_args_[i].get())) { left_required_args.push_back( *((RequiredOutArgument*)left_args_[i].get())); } else if(dynamic_cast<ArbitraryOutArgument*>( left_args_[i].get())) { if(!!left_arbitrary_arg) throw pants::expectation_failure("only one left arbitrary argument " "supported"); left_arbitrary_arg = *( (ArbitraryOutArgument*)left_args_[i].get()); } else if(dynamic_cast<KeywordOutArgument*>(left_args_[i].get())) { throw pants::expectation_failure("left keyword argument not supported"); } else if(dynamic_cast<OptionalOutArgument*>(left_args_[i].get())) { throw pants::expectation_failure("left optional argument not " "supported"); } else { throw pants::expectation_failure("unknown argument type"); } } right_required_args.reserve(right_args_.size()); right_optional_args.reserve(right_args_.size()); for(unsigned int i = 0; i < right_args_.size(); ++i) { if(!right_args_[i].get()) continue; if(dynamic_cast<RequiredOutArgument*>(right_args_[i].get())) { right_required_args.push_back( *((RequiredOutArgument*)right_args_[i].get())); } else if(dynamic_cast<OptionalOutArgument*>(right_args_[i].get())) { right_optional_args.push_back( *((OptionalOutArgument*)right_args_[i].get())); } else if(dynamic_cast<KeywordOutArgument*>(right_args_[i].get())) { if(!!right_keyword_arg) throw pants::expectation_failure("only one right keyword argument " "expected"); right_keyword_arg = *((KeywordOutArgument*)right_args_[i].get()); } else if(dynamic_cast<ArbitraryOutArgument*>(right_args_[i].get())) { if(!!right_arbitrary_arg) throw pants::expectation_failure( "only one right arbitrary argument expected"); right_arbitrary_arg = *((ArbitraryOutArgument*)right_args_[i].get()); } else { throw pants::expectation_failure("unknown argument type"); } } } std::string pants::ast::ClosedCall::format() const { std::ostringstream os; os << "ClosedCall(Left("; for(unsigned int i = 0; i < left_required_args.size(); ++i) { if(i > 0) os << ", "; os << left_required_args[i].format(); } if(!!left_arbitrary_arg) { if(left_required_args.size() > 0) os << ", "; os << left_arbitrary_arg.get().format(); } os << "), Right("; for(unsigned int i = 0; i < right_required_args.size(); ++i) { if(i > 0) os << ", "; os << right_required_args[i].format(); } for(unsigned int i = 0; i < right_optional_args.size(); ++i) { if(i > 0 || right_required_args.size() > 0) os << ", "; os << right_optional_args[i].format(); } if(!!right_arbitrary_arg) { if(right_required_args.size() + right_optional_args.size() > 0) os << ", "; os << right_arbitrary_arg.get().format(); } if(!!right_keyword_arg) { if(right_required_args.size() + right_optional_args.size() > 0 || !!right_arbitrary_arg) os << ", "; os << right_keyword_arg.get().format(); } os << "))"; return os.str(); } std::string pants::ast::Assignee::format() const { std::ostringstream os; os << "Assignee(" << term->format() << ")"; return os.str(); }
32.154378
80
0.616267
[ "object", "vector" ]
80d468bab9cc5570db384547ce8ab32aa83bc500
6,417
cpp
C++
src/caffe/SSD/prior_rbox_layer.cpp
xyt2008/frcnn
32a559e881cceeba09a90ff45ad4aae1dabf92a1
[ "BSD-2-Clause" ]
198
2018-01-07T13:44:29.000Z
2022-03-21T12:06:16.000Z
src/caffe/SSD/prior_rbox_layer.cpp
xyt2008/frcnn
32a559e881cceeba09a90ff45ad4aae1dabf92a1
[ "BSD-2-Clause" ]
18
2018-02-01T13:24:53.000Z
2021-04-26T10:51:47.000Z
src/caffe/SSD/prior_rbox_layer.cpp
xyt2008/frcnn
32a559e881cceeba09a90ff45ad4aae1dabf92a1
[ "BSD-2-Clause" ]
82
2018-01-06T14:21:43.000Z
2022-02-16T09:39:58.000Z
#include <algorithm> #include <functional> #include <utility> #include <vector> #include "prior_rbox_layer.hpp" //#include "caffe/layers/prior_rbox_layer.hpp" namespace caffe { template <typename Dtype> void PriorRBoxLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { const PriorRBoxParameter& prior_rbox_param = this->layer_param_.prior_rbox_param(); regress_size_ = prior_rbox_param.regress_size(); regress_angle_ = prior_rbox_param.regress_angle(); num_param_ = 2; if (regress_size_) num_param_ += 2; if (regress_angle_) num_param_ ++; CHECK_EQ(prior_rbox_param.prior_widths_size(), prior_rbox_param.prior_heights_size()); for (int i = 0; i < prior_rbox_param.prior_widths_size(); i++) { prior_widths_.push_back(prior_rbox_param.prior_widths(i)); prior_heights_.push_back(prior_rbox_param.prior_heights(i)); } if (!regress_size_) { CHECK_EQ(prior_widths_.size(), 1); prior_width_ = prior_widths_[0]; prior_height_ = prior_heights_[0]; } if (regress_angle_) for (int i=0;i<prior_rbox_param.rotated_angles_size();i++) { rotated_angles_.push_back(prior_rbox_param.rotated_angles(i)); } else rotated_angles_.push_back(0); num_priors_ = rotated_angles_.size() * prior_widths_.size(); clip_ = prior_rbox_param.clip(); if (prior_rbox_param.variance_size() > 1) { // Must and only provide $num_param_ variance. CHECK_EQ(prior_rbox_param.variance_size(), num_param_); for (int i = 0; i < prior_rbox_param.variance_size(); ++i) { CHECK_GT(prior_rbox_param.variance(i), 0); variance_.push_back(prior_rbox_param.variance(i)); } } else if (prior_rbox_param.variance_size() == 1) { CHECK_GT(prior_rbox_param.variance(0), 0); variance_.push_back(prior_rbox_param.variance(0)); } else { // Set default to 0.1. variance_.push_back(0.1); } if (prior_rbox_param.has_img_h() || prior_rbox_param.has_img_w()) { CHECK(!prior_rbox_param.has_img_size()) << "Either img_size or img_h/img_w should be specified; not both."; img_h_ = prior_rbox_param.img_h(); CHECK_GT(img_h_, 0) << "img_h should be larger than 0."; img_w_ = prior_rbox_param.img_w(); CHECK_GT(img_w_, 0) << "img_w should be larger than 0."; } else if (prior_rbox_param.has_img_size()) { const int img_size = prior_rbox_param.img_size(); CHECK_GT(img_size, 0) << "img_size should be larger than 0."; img_h_ = img_size; img_w_ = img_size; } else { img_h_ = 0; img_w_ = 0; } if (prior_rbox_param.has_step_h() || prior_rbox_param.has_step_w()) { CHECK(!prior_rbox_param.has_step()) << "Either step or step_h/step_w should be specified; not both."; step_h_ = prior_rbox_param.step_h(); CHECK_GT(step_h_, 0.) << "step_h should be larger than 0."; step_w_ = prior_rbox_param.step_w(); CHECK_GT(step_w_, 0.) << "step_w should be larger than 0."; } else if (prior_rbox_param.has_step()) { const float step = prior_rbox_param.step(); CHECK_GT(step, 0) << "step should be larger than 0."; step_h_ = step; step_w_ = step; } else { step_h_ = 0; step_w_ = 0; } offset_ = prior_rbox_param.offset(); } template <typename Dtype> void PriorRBoxLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { const int layer_width = bottom[0]->width(); const int layer_height = bottom[0]->height(); vector<int> top_shape(3, 1); // Since all images in a batch has same height and width, we only need to // generate one set of priors which can be shared across all images. top_shape[0] = 1; // 2 channels. First channel stores the mean of each prior coordinate. // Second channel stores the variance of each prior coordinate. top_shape[1] = 2; top_shape[2] = layer_width * layer_height * num_priors_ * num_param_; //each prior box has three parameters: cx,cy and angle CHECK_GT(top_shape[2], 0); top[0]->Reshape(top_shape); } template <typename Dtype> void PriorRBoxLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { const int layer_width = bottom[0]->width(); const int layer_height = bottom[0]->height(); int img_width, img_height; if (img_h_ == 0 || img_w_ == 0) { img_width = bottom[1]->width(); img_height = bottom[1]->height(); } else { img_width = img_w_; img_height = img_h_; } float step_w, step_h; if (step_w_ == 0 || step_h_ == 0) { step_w = static_cast<float>(img_width) / layer_width; step_h = static_cast<float>(img_height) / layer_height; } else { step_w = step_w_; step_h = step_h_; } Dtype* top_data = top[0]->mutable_cpu_data(); int dim = layer_height * layer_width * num_priors_ * num_param_; int idx = 0; for (int h = 0; h < layer_height; ++h) { for (int w = 0; w < layer_width; ++w) { float center_x = (w + offset_) * step_w; //offset is default set to 0.5 float center_y = (h + offset_) * step_h; //float box_width, box_height; //box_width = prior_width_; //box_height = prior_height_;// box_width and box_height are not used recently for (int i=0;i<rotated_angles_.size();i++){ for (int j=0;j<prior_widths_.size();j++){ // x_center top_data[idx++] = center_x / img_width; // y_center top_data[idx++] = center_y / img_height; if (regress_size_) { top_data[idx++] = prior_widths_[j]; top_data[idx++] = prior_heights_[j]; } // angle if (regress_angle_) top_data[idx++] = rotated_angles_[i]; } } } } // clip the prior's coordidate such that it is within [0, 1] if (clip_) { for (int d = 0; d < dim; ++d) { top_data[d] = std::min<Dtype>(std::max<Dtype>(top_data[d], 0.), 1.); } } // set the variance. top_data += top[0]->offset(0, 1); if (variance_.size() == 1) { caffe_set<Dtype>(dim, Dtype(variance_[0]), top_data); } else { int count = 0; for (int h = 0; h < layer_height; ++h) { for (int w = 0; w < layer_width; ++w) { for (int i = 0; i < num_priors_; ++i) { for (int j = 0; j < num_param_; ++j) { top_data[count] = variance_[j]; ++count; } } } } } } INSTANTIATE_CLASS(PriorRBoxLayer); REGISTER_LAYER_CLASS(PriorRBox); } // namespace caffe
33.773684
126
0.653265
[ "vector" ]
80d85832505c1fb32d6cf1e00b382be466ff3d5f
33,434
cpp
C++
arangosh/V8Client/arangorestore.cpp
asaaki/ArangoDB
a1d4f6f33c09ffd6f67744dbe748e83dc0fe6b82
[ "Apache-2.0" ]
15
2019-08-08T02:06:36.000Z
2019-10-15T17:52:58.000Z
arangosh/V8Client/arangorestore.cpp
asaaki/ArangoDB
a1d4f6f33c09ffd6f67744dbe748e83dc0fe6b82
[ "Apache-2.0" ]
null
null
null
arangosh/V8Client/arangorestore.cpp
asaaki/ArangoDB
a1d4f6f33c09ffd6f67744dbe748e83dc0fe6b82
[ "Apache-2.0" ]
null
null
null
//////////////////////////////////////////////////////////////////////////////// /// @brief arango restore tool /// /// @file /// /// DISCLAIMER /// /// Copyright 2014 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except in compliance with the License. /// You may obtain a copy of the License at /// /// http://www.apache.org/licenses/LICENSE-2.0 /// /// Unless required by applicable law or agreed to in writing, software /// distributed under the License is distributed on an "AS IS" BASIS, /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// See the License for the specific language governing permissions and /// limitations under the License. /// /// Copyright holder is ArangoDB GmbH, Cologne, Germany /// /// @author Jan Steemann /// @author Copyright 2014, ArangoDB GmbH, Cologne, Germany /// @author Copyright 2011-2013, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// #include "Basics/Common.h" #include "ArangoShell/ArangoClient.h" #include "Basics/FileUtils.h" #include "Basics/JsonHelper.h" #include "Basics/ProgramOptions.h" #include "Basics/ProgramOptionsDescription.h" #include "Basics/StringUtils.h" #include "BasicsC/files.h" #include "Basics/init.h" #include "BasicsC/logging.h" #include "BasicsC/tri-strings.h" #include "BasicsC/terminal-utils.h" #include "Rest/Endpoint.h" #include "Rest/InitialiseRest.h" #include "Rest/HttpResponse.h" #include "SimpleHttpClient/GeneralClientConnection.h" #include "SimpleHttpClient/SimpleHttpClient.h" #include "SimpleHttpClient/SimpleHttpResult.h" using namespace std; using namespace triagens::basics; using namespace triagens::httpclient; using namespace triagens::rest; using namespace triagens::arango; // ----------------------------------------------------------------------------- // --SECTION-- private variables // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// /// @brief base class for clients //////////////////////////////////////////////////////////////////////////////// ArangoClient BaseClient("arangorestore"); //////////////////////////////////////////////////////////////////////////////// /// @brief the initial default connection //////////////////////////////////////////////////////////////////////////////// triagens::httpclient::GeneralClientConnection* Connection = 0; //////////////////////////////////////////////////////////////////////////////// /// @brief HTTP client //////////////////////////////////////////////////////////////////////////////// triagens::httpclient::SimpleHttpClient* Client = 0; //////////////////////////////////////////////////////////////////////////////// /// @brief chunk size //////////////////////////////////////////////////////////////////////////////// static uint64_t ChunkSize = 1024 * 1024 * 8; //////////////////////////////////////////////////////////////////////////////// /// @brief collections //////////////////////////////////////////////////////////////////////////////// static vector<string> Collections; //////////////////////////////////////////////////////////////////////////////// /// @brief include system collections //////////////////////////////////////////////////////////////////////////////// static bool IncludeSystemCollections; //////////////////////////////////////////////////////////////////////////////// /// @brief input directory //////////////////////////////////////////////////////////////////////////////// static string InputDirectory; //////////////////////////////////////////////////////////////////////////////// /// @brief import data //////////////////////////////////////////////////////////////////////////////// static bool ImportData = true; //////////////////////////////////////////////////////////////////////////////// /// @brief import structure //////////////////////////////////////////////////////////////////////////////// static bool ImportStructure = true; //////////////////////////////////////////////////////////////////////////////// /// @brief progress //////////////////////////////////////////////////////////////////////////////// static bool Progress = true; //////////////////////////////////////////////////////////////////////////////// /// @brief overwrite collections if they exist //////////////////////////////////////////////////////////////////////////////// static bool Overwrite = true; //////////////////////////////////////////////////////////////////////////////// /// @brief re-use revision ids on import //////////////////////////////////////////////////////////////////////////////// static bool RecycleIds = false; //////////////////////////////////////////////////////////////////////////////// /// @brief continue restore even in the face of errors //////////////////////////////////////////////////////////////////////////////// static bool Force = false; //////////////////////////////////////////////////////////////////////////////// /// @brief cluster mode flag //////////////////////////////////////////////////////////////////////////////// static bool clusterMode = false; //////////////////////////////////////////////////////////////////////////////// /// @brief statistics //////////////////////////////////////////////////////////////////////////////// static struct { uint64_t _totalBatches; uint64_t _totalCollections; uint64_t _totalRead; } Stats; // ----------------------------------------------------------------------------- // --SECTION-- private functions // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// /// @brief parses the program options //////////////////////////////////////////////////////////////////////////////// static void ParseProgramOptions (int argc, char* argv[]) { ProgramOptionsDescription description("STANDARD options"); description ("collection", &Collections, "restrict to collection name (can be specified multiple times)") ("batch-size", &ChunkSize, "maximum size for individual data batches (in bytes)") ("import-data", &ImportData, "import data into collection") ("recycle-ids", &RecycleIds, "recycle collection and revision ids from dump") ("force", &Force, "continue restore even in the face of some server-side errors") ("create-collection", &ImportStructure, "create collection structure") ("include-system-collections", &IncludeSystemCollections, "include system collections") ("input-directory", &InputDirectory, "input directory") ("overwrite", &Overwrite, "overwrite collections if they exist") ("progress", &Progress, "show progress") ; BaseClient.setupGeneral(description); BaseClient.setupServer(description); vector<string> arguments; description.arguments(&arguments); ProgramOptions options; BaseClient.parse(options, description, "", argc, argv, "arangorestore.conf"); if (1 == arguments.size()) { InputDirectory = arguments[0]; } } // ----------------------------------------------------------------------------- // --SECTION-- public functions // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// /// @brief startup and exit functions //////////////////////////////////////////////////////////////////////////////// static void arangorestoreEntryFunction (); static void arangorestoreExitFunction (int, void*); #ifdef _WIN32 // ............................................................................. // Call this function to do various initialisations for windows only // ............................................................................. void arangorestoreEntryFunction () { int maxOpenFiles = 1024; int res = 0; // ........................................................................... // Uncomment this to call this for extended debug information. // If you familiar with valgrind ... then this is not like that, however // you do get some similar functionality. // ........................................................................... //res = initialiseWindows(TRI_WIN_INITIAL_SET_DEBUG_FLAG, 0); res = initialiseWindows(TRI_WIN_INITIAL_SET_INVALID_HANLE_HANDLER, 0); if (res != 0) { _exit(1); } res = initialiseWindows(TRI_WIN_INITIAL_SET_MAX_STD_IO,(const char*)(&maxOpenFiles)); if (res != 0) { _exit(1); } res = initialiseWindows(TRI_WIN_INITIAL_WSASTARTUP_FUNCTION_CALL, 0); if (res != 0) { _exit(1); } TRI_Application_Exit_SetExit(arangorestoreExitFunction); } static void arangorestoreExitFunction (int exitCode, void* data) { int res = 0; // ........................................................................... // TODO: need a terminate function for windows to be called and cleanup // any windows specific stuff. // ........................................................................... res = finaliseWindows(TRI_WIN_FINAL_WSASTARTUP_FUNCTION_CALL, 0); if (res != 0) { exit(1); } exit(exitCode); } #else static void arangorestoreEntryFunction () { } static void arangorestoreExitFunction (int exitCode, void* data) { } #endif //////////////////////////////////////////////////////////////////////////////// /// @brief extract an error message from a response //////////////////////////////////////////////////////////////////////////////// static string GetHttpErrorMessage (SimpleHttpResult* result) { const StringBuffer& body = result->getBody(); string details; TRI_json_t* json = JsonHelper::fromString(body.c_str(), body.length()); if (json != 0) { const string& errorMessage = JsonHelper::getStringValue(json, "errorMessage", ""); const int errorNum = JsonHelper::getNumericValue<int>(json, "errorNum", 0); TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json); if (errorMessage != "" && errorNum > 0) { details = ": ArangoError " + StringUtils::itoa(errorNum) + ": " + errorMessage; } } return "got error from server: HTTP " + StringUtils::itoa(result->getHttpReturnCode()) + " (" + result->getHttpReturnMessage() + ")" + details; } //////////////////////////////////////////////////////////////////////////////// /// @brief fetch the version from the server //////////////////////////////////////////////////////////////////////////////// static string GetArangoVersion () { map<string, string> headers; SimpleHttpResult* response = Client->request(HttpRequest::HTTP_REQUEST_GET, "/_api/version", 0, 0, headers); if (response == 0 || ! response->isComplete()) { if (response != 0) { delete response; } return ""; } string version; if (response->getHttpReturnCode() == HttpResponse::OK) { // default value version = "arango"; // convert response body to json TRI_json_t* json = TRI_JsonString(TRI_UNKNOWN_MEM_ZONE, response->getBody().c_str()); if (json) { // look up "server" value const string server = JsonHelper::getStringValue(json, "server", ""); // "server" value is a string and content is "arango" if (server == "arango") { // look up "version" value version = JsonHelper::getStringValue(json, "version", ""); } TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json); } } else { if (response->wasHttpError()) { Client->setErrorMessage(GetHttpErrorMessage(response), false); } Connection->disconnect(); } delete response; return version; } //////////////////////////////////////////////////////////////////////////////// /// @brief check if server is a coordinator of a cluster //////////////////////////////////////////////////////////////////////////////// static bool GetArangoIsCluster () { map<string, string> headers; SimpleHttpResult* response = Client->request(HttpRequest::HTTP_REQUEST_GET, "/_admin/server/role", "", 0, headers); if (response == 0 || ! response->isComplete()) { if (response != 0) { delete response; } return false; } string role = "UNDEFINED"; if (response->getHttpReturnCode() == HttpResponse::OK) { // convert response body to json TRI_json_t* json = TRI_JsonString(TRI_UNKNOWN_MEM_ZONE, response->getBody().c_str()); if (json != 0) { // look up "server" value role = JsonHelper::getStringValue(json, "role", "UNDEFINED"); TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json); } } else { if (response->wasHttpError()) { Client->setErrorMessage(GetHttpErrorMessage(response), false); } Connection->disconnect(); } delete response; return role == "COORDINATOR"; } //////////////////////////////////////////////////////////////////////////////// /// @brief send the request to re-create a collection //////////////////////////////////////////////////////////////////////////////// static int SendRestoreCollection (TRI_json_t const* json, string& errorMsg) { map<string, string> headers; const string url = "/_api/replication/restore-collection" "?overwrite=" + string(Overwrite ? "true" : "false") + "&recycleIds=" + string(RecycleIds ? "true" : "false") + "&force=" + string(Force ? "true" : "false"); const string body = JsonHelper::toString(json); SimpleHttpResult* response = Client->request(HttpRequest::HTTP_REQUEST_PUT, url, body.c_str(), body.size(), headers); if (response == 0 || ! response->isComplete()) { errorMsg = "got invalid response from server: " + Client->getErrorMessage(); if (response != 0) { delete response; } return TRI_ERROR_INTERNAL; } if (response->wasHttpError()) { errorMsg = GetHttpErrorMessage(response); delete response; return TRI_ERROR_INTERNAL; } delete response; return TRI_ERROR_NO_ERROR; } //////////////////////////////////////////////////////////////////////////////// /// @brief send the request to re-create indexes for a collection //////////////////////////////////////////////////////////////////////////////// static int SendRestoreIndexes (TRI_json_t const* json, string& errorMsg) { map<string, string> headers; const string url = "/_api/replication/restore-indexes?force=" + string(Force ? "true" : "false"); const string body = JsonHelper::toString(json); SimpleHttpResult* response = Client->request(HttpRequest::HTTP_REQUEST_PUT, url, body.c_str(), body.size(), headers); if (response == 0 || ! response->isComplete()) { errorMsg = "got invalid response from server: " + Client->getErrorMessage(); if (response != 0) { delete response; } return TRI_ERROR_INTERNAL; } if (response->wasHttpError()) { errorMsg = GetHttpErrorMessage(response); delete response; return TRI_ERROR_INTERNAL; } delete response; return TRI_ERROR_NO_ERROR; } //////////////////////////////////////////////////////////////////////////////// /// @brief send the request to load data into a collection //////////////////////////////////////////////////////////////////////////////// static int SendRestoreData (string const& cname, char const* buffer, size_t bufferSize, string& errorMsg) { map<string, string> headers; const string url = "/_api/replication/restore-data?collection=" + StringUtils::urlEncode(cname) + "&recycleIds=" + (RecycleIds ? "true" : "false") + "&force=" + (Force ? "true" : "false"); SimpleHttpResult* response = Client->request(HttpRequest::HTTP_REQUEST_PUT, url, buffer, bufferSize, headers); if (response == 0 || ! response->isComplete()) { errorMsg = "got invalid response from server: " + Client->getErrorMessage(); if (response != 0) { delete response; } return TRI_ERROR_INTERNAL; } if (response->wasHttpError()) { errorMsg = GetHttpErrorMessage(response); delete response; return TRI_ERROR_INTERNAL; } delete response; return TRI_ERROR_NO_ERROR; } //////////////////////////////////////////////////////////////////////////////// /// @brief comparator to sort collections /// sort order is by collection type first (vertices before edges, this is /// because edges depend on vertices being there), then name //////////////////////////////////////////////////////////////////////////////// static int SortCollections (const void* l, const void* r) { TRI_json_t const* left = JsonHelper::getArrayElement((TRI_json_t const*) l, "parameters"); TRI_json_t const* right = JsonHelper::getArrayElement((TRI_json_t const*) r, "parameters"); int leftType = JsonHelper::getNumericValue<int>(left, "type", 0); int rightType = JsonHelper::getNumericValue<int>(right, "type", 0); if (leftType != rightType) { return leftType - rightType; } string leftName = JsonHelper::getStringValue(left, "name", ""); string rightName = JsonHelper::getStringValue(right, "name", ""); return strcasecmp(leftName.c_str(), rightName.c_str()); } //////////////////////////////////////////////////////////////////////////////// /// @brief process all files from the input directory //////////////////////////////////////////////////////////////////////////////// static int ProcessInputDirectory (string& errorMsg) { // create a lookup table for collections map<string, bool> restrictList; for (size_t i = 0; i < Collections.size(); ++i) { restrictList.insert(pair<string, bool>(Collections[i], true)); } TRI_json_t* collections = TRI_CreateListJson(TRI_UNKNOWN_MEM_ZONE); if (collections == 0) { errorMsg = "out of memory"; return TRI_ERROR_OUT_OF_MEMORY; } // step1: determine all collections to process { const vector<string> files = FileUtils::listFiles(InputDirectory); const size_t n = files.size(); // TODO: externalise file extension const string suffix = string(".structure.json"); // loop over all files in InputDirectory, and look for all structure.json files for (size_t i = 0; i < n; ++i) { const size_t nameLength = files[i].size(); if (nameLength <= suffix.size() || files[i].substr(files[i].size() - suffix.size()) != suffix) { // some other file continue; } // found a structure.json file const string name = files[i].substr(0, files[i].size() - suffix.size()); if (name[0] == '_' && ! IncludeSystemCollections) { continue; } if (restrictList.size() > 0 && restrictList.find(name) == restrictList.end()) { // collection name not in list continue; } const string fqn = InputDirectory + TRI_DIR_SEPARATOR_STR + files[i]; TRI_json_t* json = TRI_JsonFile(TRI_UNKNOWN_MEM_ZONE, fqn.c_str(), 0); TRI_json_t const* parameters = JsonHelper::getArrayElement(json, "parameters"); TRI_json_t const* indexes = JsonHelper::getArrayElement(json, "indexes"); if (! JsonHelper::isArray(json) || ! JsonHelper::isArray(parameters) || ! JsonHelper::isList(indexes)) { errorMsg = "could not read collection structure file '" + name + "'"; if (json != 0) { TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json); } TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, collections); return TRI_ERROR_INTERNAL; } const string cname = JsonHelper::getStringValue(parameters, "name", ""); if (cname != name) { // file has a different name than found in structure file if (ImportStructure) { // we cannot go on if there is a mismatch errorMsg = "collection name mismatch in collection structure file '" + name + "' (offending value: '" + cname + "')"; TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json); TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, collections); return TRI_ERROR_INTERNAL; } else { // we can patch the name in our array and go on cout << "ignoring collection name mismatch in collection structure file '" + name + "' (offending value: '" + cname + "')" << endl; TRI_json_t* nameAttribute = TRI_LookupArrayJson(parameters, "name"); if (TRI_IsStringJson(nameAttribute)) { char* old = nameAttribute->_value._string.data; // file name wins over "name" attribute value nameAttribute->_value._string.data = TRI_DuplicateStringZ(TRI_UNKNOWN_MEM_ZONE, name.c_str()); nameAttribute->_value._string.length = (uint32_t) name.size() + 1; // + NUL byte TRI_Free(TRI_UNKNOWN_MEM_ZONE, old); } } } TRI_PushBack3ListJson(TRI_UNKNOWN_MEM_ZONE, collections, json); } } // sort collections according to type (documents before edges) qsort(collections->_value._objects._buffer, collections->_value._objects._length, sizeof(TRI_json_t), &SortCollections); StringBuffer buffer(TRI_UNKNOWN_MEM_ZONE); // step2: run the actual import { const size_t n = collections->_value._objects._length; for (size_t i = 0; i < n; ++i) { TRI_json_t const* json = (TRI_json_t const*) TRI_AtVector(&collections->_value._objects, i); TRI_json_t const* parameters = JsonHelper::getArrayElement(json, "parameters"); TRI_json_t const* indexes = JsonHelper::getArrayElement(json, "indexes"); const string cname = JsonHelper::getStringValue(parameters, "name", ""); const string cid = JsonHelper::getStringValue(parameters, "cid", ""); if (ImportStructure) { // re-create collection if (Progress) { if (Overwrite) { cout << "Re-creating collection '" << cname << "'..." << endl; } else { cout << "Creating collection '" << cname << "'..." << endl; } } int res = SendRestoreCollection(json, errorMsg); if (res != TRI_ERROR_NO_ERROR) { if (Force) { cerr << errorMsg << endl; continue; } TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, collections); return TRI_ERROR_INTERNAL; } } Stats._totalCollections++; if (ImportData) { // import data. check if we have a datafile // TODO: externalise file extension const string datafile = InputDirectory + TRI_DIR_SEPARATOR_STR + cname + ".data.json"; if (TRI_ExistsFile(datafile.c_str())) { // found a datafile if (Progress) { cout << "Loading data into collection '" << cname << "'..." << endl; } int fd = TRI_OPEN(datafile.c_str(), O_RDONLY); if (fd < 0) { errorMsg = "cannot open collection data file '" + datafile + "'"; TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, collections); return TRI_ERROR_INTERNAL; } buffer.clear(); while (true) { if (buffer.reserve(16384) != TRI_ERROR_NO_ERROR) { TRI_CLOSE(fd); errorMsg = "out of memory"; TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, collections); return TRI_ERROR_OUT_OF_MEMORY; } ssize_t numRead = TRI_READ(fd, buffer.end(), 16384); if (numRead < 0) { // error while reading int res = TRI_errno(); TRI_CLOSE(fd); errorMsg = string(TRI_errno_string(res)); TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, collections); return res; } // read something buffer.increaseLength(numRead); Stats._totalRead += (uint64_t) numRead; if (buffer.length() < ChunkSize && numRead > 0) { // still continue reading continue; } // do we have a buffer? if (buffer.length() > 0) { // look for the last \n in the buffer char* found = (char*) memrchr((const void*) buffer.begin(), '\n', buffer.length()); size_t length; if (found == 0) { // no \n found... if (numRead == 0) { // we're at the end. send the complete buffer anyway length = buffer.length(); } else { // read more continue; } } else { // found a \n somewhere length = found - buffer.begin(); } TRI_ASSERT(length > 0); Stats._totalBatches++; int res = SendRestoreData(cname, buffer.begin(), length, errorMsg); if (res != TRI_ERROR_NO_ERROR) { TRI_CLOSE(fd); if (errorMsg.empty()) { errorMsg = string(TRI_errno_string(res)); } else { errorMsg = string(TRI_errno_string(res)) + ": " + errorMsg; } if (Force) { cerr << errorMsg << endl; continue; } TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, collections); return res; } buffer.erase_front(length); } if (numRead == 0) { // EOF break; } } TRI_CLOSE(fd); } } if (ImportStructure) { // re-create indexes if (TRI_LengthVector(&indexes->_value._objects) > 0) { // we actually have indexes if (Progress) { cout << "Creating indexes for collection '" << cname << "'..." << endl; } int res = SendRestoreIndexes(json, errorMsg); if (res != TRI_ERROR_NO_ERROR) { if (Force) { cerr << errorMsg << endl; continue; } TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, collections); return TRI_ERROR_INTERNAL; } } } } } TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, collections); return TRI_ERROR_NO_ERROR; } //////////////////////////////////////////////////////////////////////////////// /// @brief request location rewriter (injects database name) //////////////////////////////////////////////////////////////////////////////// static string rewriteLocation (void* data, const string& location) { if (location.substr(0, 5) == "/_db/") { // location already contains /_db/ return location; } if (location[0] == '/') { return "/_db/" + BaseClient.databaseName() + location; } else { return "/_db/" + BaseClient.databaseName() + "/" + location; } } //////////////////////////////////////////////////////////////////////////////// /// @brief main //////////////////////////////////////////////////////////////////////////////// int main (int argc, char* argv[]) { int ret = EXIT_SUCCESS; arangorestoreEntryFunction(); TRIAGENS_C_INITIALISE(argc, argv); TRIAGENS_REST_INITIALISE(argc, argv); TRI_InitialiseLogging(false); // ............................................................................. // set defaults // ............................................................................. BaseClient.setEndpointString(Endpoint::getDefaultEndpoint()); // ............................................................................. // parse the program options // ............................................................................. ParseProgramOptions(argc, argv); // use a minimum value for batches if (ChunkSize < 1024 * 128) { ChunkSize = 1024 * 128; } // ............................................................................. // check input directory // ............................................................................. if (InputDirectory == "" || ! TRI_IsDirectory(InputDirectory.c_str())) { cerr << "input directory '" << InputDirectory << "' does not exist" << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } if (! ImportStructure && ! ImportData) { cerr << "must specify either --create-collection or --import-data" << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } // ............................................................................. // set-up client connection // ............................................................................. BaseClient.createEndpoint(); if (BaseClient.endpointServer() == 0) { cerr << "invalid value for --server.endpoint ('" << BaseClient.endpointString() << "')" << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } Connection = GeneralClientConnection::factory(BaseClient.endpointServer(), BaseClient.requestTimeout(), BaseClient.connectTimeout(), ArangoClient::DEFAULT_RETRIES, BaseClient.sslProtocol()); if (Connection == 0) { cerr << "out of memory" << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } Client = new SimpleHttpClient(Connection, BaseClient.requestTimeout(), false); if (Client == 0) { cerr << "out of memory" << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } Client->setLocationRewriter(0, &rewriteLocation); Client->setUserNamePassword("/", BaseClient.username(), BaseClient.password()); const string versionString = GetArangoVersion(); if (! Connection->isConnected()) { cerr << "Could not connect to endpoint " << BaseClient.endpointServer()->getSpecification() << endl; cerr << "Error message: '" << Client->getErrorMessage() << "'" << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } // successfully connected cout << "Server version: " << versionString << endl; // validate server version int major = 0; int minor = 0; if (sscanf(versionString.c_str(), "%d.%d", &major, &minor) != 2) { cerr << "invalid server version '" << versionString << "'" << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } if (major < 1 || major > 2 || (major == 1 && minor < 4)) { // we can connect to 1.4, 2.0 and higher only cerr << "got incompatible server version '" << versionString << "'" << endl; if (! Force) { TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } } if (major >= 2) { // Version 1.4 did not yet have a cluster mode clusterMode = GetArangoIsCluster(); } if (Progress) { cout << "Connected to ArangoDB '" << BaseClient.endpointServer()->getSpecification() << endl; } memset(&Stats, 0, sizeof(Stats)); string errorMsg = ""; int res = ProcessInputDirectory(errorMsg); if (Progress) { if (ImportData) { cout << "Processed " << Stats._totalCollections << " collection(s), " << "read " << Stats._totalRead << " byte(s) from datafiles, " << "sent " << Stats._totalBatches << " batch(es)" << endl; } else if (ImportStructure) { cout << "Processed " << Stats._totalCollections << " collection(s)" << endl; } } if (res != TRI_ERROR_NO_ERROR) { cerr << errorMsg << endl; ret = EXIT_FAILURE; } if (Client != 0) { delete Client; } TRIAGENS_REST_SHUTDOWN; arangorestoreExitFunction(ret, NULL); return ret; } // ----------------------------------------------------------------------------- // --SECTION-- END-OF-FILE // ----------------------------------------------------------------------------- // Local Variables: // mode: outline-minor // outline-regexp: "/// @brief\\|/// {@inheritDoc}\\|/// @page\\|// --SECTION--\\|/// @\\}" // End:
32.972387
141
0.482862
[ "vector" ]
80dd9f0be2f15e4001947a68d9ae400d0cc9f892
19,403
cpp
C++
cvt/vision/Vision.cpp
tuxmike/cvt
c6a5df38af4653345e795883b8babd67433746e9
[ "MIT" ]
11
2017-04-04T16:38:31.000Z
2021-08-04T11:31:26.000Z
cvt/vision/Vision.cpp
tuxmike/cvt
c6a5df38af4653345e795883b8babd67433746e9
[ "MIT" ]
null
null
null
cvt/vision/Vision.cpp
tuxmike/cvt
c6a5df38af4653345e795883b8babd67433746e9
[ "MIT" ]
8
2016-04-11T00:58:27.000Z
2022-02-22T07:35:40.000Z
/* The MIT License (MIT) Copyright (c) 2011 - 2013, Philipp Heise and Sebastian Klose Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <cvt/vision/Vision.h> #include <cvt/util/CVTTest.h> #include <cvt/math/Matrix.h> #include <cvt/gfx/IMapScoped.h> #include <vector> namespace cvt { void Vision::unprojectToScenePoints( ScenePoints& scenepts, const Image& texture, const Image& depthmap, const CameraCalibration& calibration, float dscale ) { Matrix3f Kinv = calibration.intrinsics().inverse(); std::vector<Vector3f> pts; std::vector<Vector4f> colors; scenepts.clear(); if( texture.format() != IFormat::RGBA_FLOAT || depthmap.format() != IFormat::GRAY_FLOAT || texture.width() != depthmap.width() || texture.height() != depthmap.height() ) throw CVTException( "unprojectToScenePoints: invalid texture or depth-map!" ); IMapScoped<const float> tex( texture ); IMapScoped<const float> dmap( depthmap ); size_t w = depthmap.width(); size_t h = depthmap.height(); for( size_t y = 0; y < h; y++ ) { const float* dmapptr = dmap.ptr(); const float* texptr = tex.ptr(); for( size_t x = 0; x < w; x++ ) { if( dmapptr[ x ] > 0 ) { Vector3f pt = Kinv * Vector3f( x, y, 1.0f ); pts.push_back( pt * dmapptr[ x ] * dscale ); colors.push_back( Vector4f( texptr[ x * 4 + 0 ], texptr[ x * 4 + 1 ], texptr[ x * 4 + 2 ], texptr[ x * 4 + 3 ] ) ); } } dmap++; tex++; } scenepts.setVerticesWithColor( &pts[ 0 ], &colors[ 0 ], pts.size() ); scenepts.transform( calibration.extrinsics().inverse() ); } void Vision::unprojectToScenePoints( ScenePoints& scenepts, const Image& texture, const Image& depthmap, float dscale ) { std::vector<Vector3f> pts; std::vector<Vector4f> colors; scenepts.clear(); if( texture.format() != IFormat::RGBA_FLOAT || depthmap.format() != IFormat::GRAY_FLOAT || texture.width() != depthmap.width() || texture.height() != depthmap.height() ) throw CVTException( "unprojectToScenePoints: invalid texture or depth-map!" ); IMapScoped<const float> tex( texture ); IMapScoped<const float> dmap( depthmap ); size_t w = depthmap.width(); size_t h = depthmap.height(); float dx = 0.5f * depthmap.width(); float dy = 0.5f * depthmap.height(); for( size_t y = 0; y < h; y++ ) { const float* dmapptr = dmap.ptr(); const float* texptr = tex.ptr(); for( size_t x = 0; x < w; x++ ) { if( dmapptr[ x ] > 0 ) { Vector3f pt = Vector3f( ( x - dx ) / ( float ) w , ( y - dy ) / ( float ) h, dmapptr[ x ] * dscale ); pts.push_back( pt ); colors.push_back( Vector4f( texptr[ x * 4 + 0 ], texptr[ x * 4 + 1 ], texptr[ x * 4 + 2 ], texptr[ x * 4 + 3 ] ) ); } } dmap++; tex++; } scenepts.setVerticesWithColor( &pts[ 0 ], &colors[ 0 ], pts.size() ); } void Vision::unprojectToXYZ( PointSet3f& pts, Image& depth, const Matrix3f& K, float depthScale ) { if( depth.format() == IFormat::GRAY_UINT16 ){ IMapScoped<const uint16_t> depthMap( depth ); float invFx = 1.0f / K[ 0 ][ 0 ]; float invFy = 1.0f / K[ 1 ][ 1 ]; float cx = K[ 0 ][ 2 ]; float cy = K[ 1 ][ 2 ]; // temp vals std::vector<float> tmpx( depth.width() ); std::vector<float> tmpy( depth.height() ); for( size_t i = 0; i < tmpx.size(); i++ ){ tmpx[ i ] = ( i - cx ) * invFx; } for( size_t i = 0; i < tmpy.size(); i++ ){ tmpy[ i ] = ( i - cy ) * invFy; } Vector3f p3d; for( size_t y = 0; y < depth.height(); y++ ){ const uint16_t* dptr = depthMap.ptr(); for( size_t x = 0; x < depth.width(); x++ ){ float d = dptr[ x ] * depthScale; p3d[ 0 ] = tmpx[ x ] * d; p3d[ 1 ] = tmpy[ y ] * d; p3d[ 2 ] = d; pts.add( p3d ); } // next line in depth image depthMap++; } } else { throw CVTException( "Unproject not implemented for given format" ); } } void Vision::disparityToDepthmap( Image& depthmap, const Image& disparity, const float dispscale, const float focallength, const float baseline, const float dispthres ) { depthmap.reallocate( disparity.width(), disparity.height(), IFormat::GRAY_FLOAT ); IMapScoped<const float> src( disparity ); IMapScoped<float> dst( depthmap ); float fb = focallength * baseline; size_t height = disparity.height(); while( height-- ){ float* dptr = dst.ptr(); const float* sptr = src.ptr(); for( size_t x = 0; x < disparity.width(); x++ ){ float disp = sptr[ x ] * dispscale; if( disp > dispthres ) dptr[ x ] = fb / disp; else dptr[ x ] = 0; } src++; dst++; } } template <typename T> static bool _compare( const Matrix3<T> & a, const Matrix3<T> & b, T epsilon ) { for( size_t i = 0; i < 3; i++ ){ for( size_t k = 0; k < 3; k++ ){ if( Math::abs( a[ i ][ k ] - b[ i ][ k ] ) > epsilon ) return false; } } return true; } template <typename T> static bool _compareVectors( const Vector3<T> & a, const Vector3<T> & b, T epsilon ) { if( Math::abs( a[ 0 ] - b[ 0 ] ) > epsilon ) return false; if( Math::abs( a[ 1 ] - b[ 1 ] ) > epsilon ) return false; if( Math::abs( a[ 2 ] - b[ 2 ] ) > epsilon ) return false; return true; } template <typename T> static bool _compareVectorsNormalized( const Vector3<T> & a, const Vector3<T> & b, T epsilon ) { Vector3<T> a0 = a; a0.normalize(); Vector3<T> b0 = b; b0.normalize(); return _compareVectors( a0, b0, epsilon ); } template <typename T> static bool _essentialTest() { bool result = true; Matrix3<T> K( 230.0, 0.0, 320.0, 0.0, 235.0, 240.0, 0.0, 0.0, 1.0 ); Matrix3<T> R, tSkew; srandom( time( NULL ) ); for( size_t i = 0; i < 100; i++ ){ R.setRotationXYZ( Math::rand( ( T )-Math::PI/6.0, ( T )Math::PI/6.0 ), Math::rand( ( T )-Math::PI/6.0, ( T )Math::PI/6.0 ), Math::rand( ( T )-Math::PI/6.0, ( T )Math::PI/6.0 )); Vector3<T> t( Math::rand( ( T )-1000, ( T )1000 ), Math::rand( ( T )-1000, ( T )1000 ), Math::rand( ( T )-1000, ( T )1000 ) ); tSkew.setSkewSymmetric( t ); Matrix3<T> E = tSkew * R; E *= 1.0 / E[ 2 ][ 2 ]; Matrix3<T> R0, R1, RR; Vector3<T> t0, t1, tt; Vision::decomposeEssential( R0, R1, t0, t1, E ); bool b = true; b = _compare( R, R0, (T)0.0001 ) || _compare( R, R1, (T)0.0001 ); result &= b; if( !b ){ std::cout << "Ground Truth Rotation: \n" << R << std::endl; std::cout << "Decomposed R0: \n" << R0 << std::endl; std::cout << "Decomposed R1: \n" << R1 << std::endl; } b = _compareVectorsNormalized( t, t0, (T)0.0001 ) || _compareVectorsNormalized( t, t1, (T)0.0001 ); result &= b; if( !b ){ std::cout << "Ground Truth Translation: \n" << t << std::endl; std::cout << "Decomposed t0: \n" << t0 << std::endl; std::cout << "Decomposed t1: \n" << t1 << std::endl; } } return result; } template <typename T> static bool _triangulateMultiView() { bool ret = true; Matrix3<T> K( 600.0, 0.0, 320.0, 0.0, 600.0, 240.0, 0.0, 0.0, 1.0 ); Matrix4<T> T0; T0.setIdentity(); size_t ncams = 5; std::vector<Matrix4<T> > pmats( ncams ); std::vector<Vector2<T> > ipts( ncams ); for( size_t i = 0; i < 100; i++ ){ Vector4<T> truePoint( Math::rand( ( T )-50, ( T )50 ), Math::rand( ( T )-50, ( T )50 ), Math::rand( ( T )5, ( T )50 ), ( T )1 ); Vector4<T> tmp; Vector2<T> proj; for( size_t c = 0; c < ncams; c++ ){ T0.setRotationXYZ( Math::rand( ( T )-Math::PI/12.0, ( T )Math::PI/12.0 ), Math::rand( ( T )-Math::PI/12.0, ( T )Math::PI/12.0 ), Math::rand( ( T )-Math::PI/12.0, ( T )Math::PI/12.0 )); T0.setTranslation( Math::rand( ( T )-0.5, ( T )0.5 ), Math::rand( ( T )-0.5, ( T )0.5 ), Math::rand( ( T )-0.5, ( T )0.5 ) ); T0[ 3 ][ 3 ] = ( T )1; Matrix3<T> R = T0.toMatrix3(); Matrix4<T> P0( K*R ); Vector3<T> t( T0[ 0 ][ 3 ], T0[ 1 ][ 3 ], T0[ 2 ][ 3 ] ); t = K * t; P0[ 0 ][ 3 ] = t[ 0 ]; P0[ 1 ][ 3 ] = t[ 1 ]; P0[ 2 ][ 3 ] = t[ 2 ]; P0[ 3 ][ 3 ] = ( T )1; pmats[ c ] = P0; tmp = P0 * truePoint; proj[ 0 ] = tmp[ 0 ] / tmp[ 2 ]; proj[ 1 ] = tmp[ 1 ] / tmp[ 2 ]; proj[ 0 ] += Math::rand( ( T )-0.2, ( T )0.2 ); proj[ 1 ] += Math::rand( ( T )-0.2, ( T )0.2 ); ipts[ c ] = proj; } Vision::triangulate( tmp, &pmats[ 0 ], &ipts[ 0 ], ncams ); // normalize tmp *= ( T )1 / tmp[ 3 ]; bool b = ( ( tmp - truePoint ).length() < 3 ); ret &= b; if( !b ){ std::cout << "Ground Truth point:\t\t" << truePoint << std::endl; std::cout << "Estimated \t\t: " << tmp << std::endl; std::cout << "Distance \t\t: " << ( tmp - truePoint ).length() << std::endl; } } return ret; } template <typename T> static bool _triangulate() { bool ret = true; Matrix3<T> K( 600.0, 0.0, 320.0, 0.0, 600.0, 240.0, 0.0, 0.0, 1.0 ); Matrix4<T> T0; T0.setIdentity(); Matrix3<T> fund; std::vector<Matrix4<T> > pmats( 2 ); std::vector<Vector2<T> > ipts( 2 ); for( size_t i = 0; i < 100; i++ ){ Matrix4<T> T1; T1.setRotationXYZ( Math::rand( ( T )-Math::PI/12.0, ( T )Math::PI/12.0 ), Math::rand( ( T )-Math::PI/12.0, ( T )Math::PI/12.0 ), Math::rand( ( T )-Math::PI/12.0, ( T )Math::PI/12.0 )); T1.setTranslation( Math::rand( ( T )-0.5, ( T )0.5 ), Math::rand( ( T )-0.5, ( T )0.5 ), Math::rand( ( T )-0.5, ( T )0.5 ) ); T1[ 3 ][ 3 ] = ( T )1; Vision::composeFundamental( fund, K, T0, K, T1 ); Vector4<T> truePoint( Math::rand( ( T )-50, ( T )50 ), Math::rand( ( T )-50, ( T )50 ), Math::rand( ( T )5, ( T )50 ), ( T )1 ); Matrix3<T> R = T1.toMatrix3(); Matrix4<T> P0( K ), P1( K*R ); Vector3<T> t( T1[ 0 ][ 3 ], T1[ 1 ][ 3 ], T1[ 2 ][ 3 ] ); t = K * t; P1[ 0 ][ 3 ] = t[ 0 ]; P1[ 1 ][ 3 ] = t[ 1 ]; P1[ 2 ][ 3 ] = t[ 2 ]; P1[ 3 ][ 3 ] = ( T )1; P0[ 3 ][ 3 ] = ( T )1; pmats[ 0 ] = P0; pmats[ 1 ] = P1; Vector4<T> tmp; Vector2<T> proj0, proj1; tmp = P0 * truePoint; proj0[ 0 ] = tmp[ 0 ] / tmp[ 2 ]; proj0[ 1 ] = tmp[ 1 ] / tmp[ 2 ]; tmp = P1 * truePoint; proj1[ 0 ] = tmp[ 0 ] / tmp[ 2 ]; proj1[ 1 ] = tmp[ 1 ] / tmp[ 2 ]; proj0[ 0 ] += Math::rand( ( T )-0.2, ( T )0.2 ); proj0[ 1 ] += Math::rand( ( T )-0.2, ( T )0.2 ); proj1[ 0 ] += Math::rand( ( T )-0.2, ( T )0.2 ); proj1[ 1 ] += Math::rand( ( T )-0.2, ( T )0.2 ); Vision::correctCorrespondencesSampson( proj0, proj1, fund ); ipts[ 0 ] = proj0; ipts[ 1 ] = proj1; //Vision::triangulate( tmp, P0, P1, proj0, proj1 ); Vision::triangulate( tmp, &pmats[ 0 ], &ipts[ 0 ], 2 ); // normalize tmp *= ( T )1 / tmp[ 3 ]; bool b = ( ( tmp - truePoint ).length() < 3 ); ret &= b; if( !b ){ std::cout << "Ground Truth point:\t\t" << truePoint << std::endl; std::cout << "Estimated \t\t: " << tmp << std::endl; std::cout << "Distance \t\t: " << ( tmp - truePoint ).length() << std::endl; } } return ret; } template <typename T> static bool _poseFromHomography() { Matrix3<T> K( 600.0, 0.0, 320.0, 0.0, 600.0, 240.0, 0.0, 0.0, 1.0 ); for( size_t i = 0; i < 100; i++ ){ Matrix4<T> T1, T2; T1.setRotationXYZ( Math::rand( ( T )-Math::PI/4.0, ( T )Math::PI/4.0 ), Math::rand( ( T )-Math::PI/4.0, ( T )Math::PI/4.0 ), Math::rand( ( T )-Math::PI/4.0, ( T )Math::PI/4.0 )); T1.setTranslation( Math::rand( ( T )-5, ( T )5 ), Math::rand( ( T )-5, ( T )5 ), Math::rand( ( T )0.1, ( T )5 ) ); Matrix3<T> RT = T1.toMatrix3(); RT[ 0 ][ 2 ] = T1[ 0 ][ 3 ]; RT[ 1 ][ 2 ] = T1[ 1 ][ 3 ]; RT[ 2 ][ 2 ] = T1[ 2 ][ 3 ]; Matrix3<T> H = K * RT; H *= ( T )1.0 / H[ 2 ][ 2 ]; Vision::poseFromHomography( T2, K, H ); T1 -= T2; T sum = 0; for( int y = 0; y < 4; y++ ) for( int x = 0; x < 4; x++ ) sum += T1[ y ][ x ]; sum /= ( T ) 16; if( sum > (T)1e-3 ){ std::cout << T1 << std::endl; return false; } } return true; } template<typename T> static bool _planeSweepHomography() { Matrix3<T> H25( 0.96062, 0.013129, 313.42, -0.025338, 1.0067, -32.779, -2.4123e-05, 6.9148e-06, 1.0251 ); Matrix3<T> H75( 0.96062, 0.013129, 257.86, -0.025338, 1.0067, -26.737, -2.4123e-05, 6.9148e-06, 1.0269 ); Matrix3<T> H100( 0.96062, 0.013129, 250.92, -0.025338, 1.0067, -25.982, -2.4123e-05, 6.9148e-06, 1.0271 ); Matrix3<T> H150( 0.96062, 0.013129, 243.97, -0.025338, 1.0067, -25.227, -2.4123e-05, 6.9148e-06, 1.0273 ); Matrix4<T> T0( 9.9776885e-01, -1.5470000e-02, -6.4946200e-02, 8.6385170e-01, 1.7084844e-02, 9.9955669e-01, 2.4383000e-02, -2.7568581e-01, 6.4540204e-02, -2.5438193e-02, 9.9759083e-01, -1.0694305e+00, 0.00000000 , 0.00000000 , 0.00000000 ,1.00000000 ); Matrix3<T> K0( 2780.1700000000000728, 0, 1539.25, 0, 2773.5399999999999636, 1001.2699999999999818, 0, 0, 1 ); Matrix4<T> T1( 9.9989024e-01, -1.4662000e-02, 2.1287000e-03, 7.7862946e-02, 1.4650766e-02, 9.9987915e-01, 5.2004500e-03, -2.1781616e-01, -2.2046917e-03, -5.1686921e-03, 9.9998421e-01, -1.0034388e+00, 0.00000000, 0.00000000, 0.00000000, 1.00000000 ); Matrix3<T> K1( 2780.1700000000000728, 0, 1539.25, 0, 2773.5399999999999636, 1001.2699999999999818, 0, 0, 1 ); Matrix3<T> H; Vision::planeSweepHomography<T>( H, K1, T1, K0, T0, Vector3<T>( 0, 0, 1 ), 25.0 ); bool b = _compare( H25, H, (T)0.01 ); Vision::planeSweepHomography<T>( H, K1, T1, K0, T0, Vector3<T>( 0, 0, 1 ), 75.0 ); b &= _compare( H75, H, (T)0.01 ); Vision::planeSweepHomography<T>( H, K1, T1, K0, T0, Vector3<T>( 0, 0, 1 ), 100.0 ); b &= _compare( H100, H, (T)0.01 ); Vision::planeSweepHomography<T>( H, K1, T1, K0, T0, Vector3<T>( 0, 0, 1 ), 150.0 ); b &= _compare( H150, H, (T)0.01 ); return b; } BEGIN_CVTTEST( Vision ) bool testResult = true; bool b; b = _essentialTest<float>(); CVTTEST_PRINT( "decomposeEssential<float>()\t", b ); testResult &= b; b = _essentialTest<double>(); CVTTEST_PRINT( "decomposeEssential<double>()\t", b ); testResult &= b; b = _triangulate<float>(); CVTTEST_PRINT( "triangulate<float>()\t", b ); testResult &= b; b = _triangulate<double>(); CVTTEST_PRINT( "triangulate<double>()\t", b ); testResult &= b; b = _triangulateMultiView<double>(); CVTTEST_PRINT( "triangulateMultiView<double>()\t", b ); testResult &= b; b = _poseFromHomography<float>(); CVTTEST_PRINT( "poseFromHomography<float>()\t", b ); testResult &= b; b = _poseFromHomography<double>(); CVTTEST_PRINT( "poseFromHomography<double>()\t", b ); testResult &= b; b = _planeSweepHomography<float>(); CVTTEST_PRINT( "planeSweepHomography<float>()\t", b ); testResult &= b; b = _planeSweepHomography<double>(); CVTTEST_PRINT( "planeSweepHomography<double>()\t", b ); testResult &= b; return testResult; END_CVTTEST }
34.402482
177
0.46132
[ "vector", "transform" ]
80e00602991a247f23b01c1fe695a988189240a2
73,847
cpp
C++
assignment-client/src/octree/OctreeServer.cpp
GeorgeDeac/project-athena
0fb1f374506ac0ecf51b00d1bfba2b4f224823f0
[ "Apache-2.0" ]
14
2020-02-23T12:51:54.000Z
2021-11-14T17:09:34.000Z
assignment-client/src/octree/OctreeServer.cpp
GeorgeDeac/project-athena
0fb1f374506ac0ecf51b00d1bfba2b4f224823f0
[ "Apache-2.0" ]
2
2018-11-01T02:16:43.000Z
2018-11-16T00:45:44.000Z
assignment-client/src/octree/OctreeServer.cpp
GeorgeDeac/project-athena
0fb1f374506ac0ecf51b00d1bfba2b4f224823f0
[ "Apache-2.0" ]
5
2020-04-02T09:42:00.000Z
2021-03-15T00:54:07.000Z
// // OctreeServer.cpp // assignment-client/src/octree // // Created by Brad Hefta-Gaub on 9/16/13. // Copyright 2013 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include "OctreeServer.h" #include <QJsonDocument> #include <QJsonObject> #include <QTimer> #include <time.h> #include <AccountManager.h> #include <Gzip.h> #include <HTTPConnection.h> #include <LogHandler.h> #include <shared/NetworkUtils.h> #include <NumericalConstants.h> #include <UUID.h> #include "../AssignmentClient.h" #include "OctreeQueryNode.h" #include "OctreeServerConsts.h" #include <QtCore/QStandardPaths> #include <PathUtils.h> #include <QtCore/QDir> #include <OctreeDataUtils.h> Q_LOGGING_CATEGORY(octree_server, "hifi.octree-server") int OctreeServer::_clientCount = 0; const int MOVING_AVERAGE_SAMPLE_COUNTS = 1000; float OctreeServer::SKIP_TIME = -1.0f; // use this for trackXXXTime() calls for non-times SimpleMovingAverage OctreeServer::_averageLoopTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageInsideTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageEncodeTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageShortEncodeTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageLongEncodeTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageExtraLongEncodeTime(MOVING_AVERAGE_SAMPLE_COUNTS); int OctreeServer::_extraLongEncode = 0; int OctreeServer::_longEncode = 0; int OctreeServer::_shortEncode = 0; int OctreeServer::_noEncode = 0; SimpleMovingAverage OctreeServer::_averageTreeWaitTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageTreeShortWaitTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageTreeLongWaitTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageTreeExtraLongWaitTime(MOVING_AVERAGE_SAMPLE_COUNTS); int OctreeServer::_extraLongTreeWait = 0; int OctreeServer::_longTreeWait = 0; int OctreeServer::_shortTreeWait = 0; int OctreeServer::_noTreeWait = 0; SimpleMovingAverage OctreeServer::_averageTreeTraverseTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageNodeWaitTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageCompressAndWriteTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageShortCompressTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageLongCompressTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageExtraLongCompressTime(MOVING_AVERAGE_SAMPLE_COUNTS); int OctreeServer::_extraLongCompress = 0; int OctreeServer::_longCompress = 0; int OctreeServer::_shortCompress = 0; int OctreeServer::_noCompress = 0; SimpleMovingAverage OctreeServer::_averagePacketSendingTime(MOVING_AVERAGE_SAMPLE_COUNTS); int OctreeServer::_noSend = 0; SimpleMovingAverage OctreeServer::_averageProcessWaitTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageProcessShortWaitTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageProcessLongWaitTime(MOVING_AVERAGE_SAMPLE_COUNTS); SimpleMovingAverage OctreeServer::_averageProcessExtraLongWaitTime(MOVING_AVERAGE_SAMPLE_COUNTS); int OctreeServer::_extraLongProcessWait = 0; int OctreeServer::_longProcessWait = 0; int OctreeServer::_shortProcessWait = 0; int OctreeServer::_noProcessWait = 0; static const QString PERSIST_FILE_DOWNLOAD_PATH = "/models.json.gz"; void OctreeServer::resetSendingStats() { _averageLoopTime.reset(); _averageEncodeTime.reset(); _averageShortEncodeTime.reset(); _averageLongEncodeTime.reset(); _averageExtraLongEncodeTime.reset(); _extraLongEncode = 0; _longEncode = 0; _shortEncode = 0; _noEncode = 0; _averageInsideTime.reset(); _averageTreeWaitTime.reset(); _averageTreeShortWaitTime.reset(); _averageTreeLongWaitTime.reset(); _averageTreeExtraLongWaitTime.reset(); _extraLongTreeWait = 0; _longTreeWait = 0; _shortTreeWait = 0; _noTreeWait = 0; _averageTreeTraverseTime.reset(); _averageNodeWaitTime.reset(); _averageCompressAndWriteTime.reset(); _averageShortCompressTime.reset(); _averageLongCompressTime.reset(); _averageExtraLongCompressTime.reset(); _extraLongCompress = 0; _longCompress = 0; _shortCompress = 0; _noCompress = 0; _averagePacketSendingTime.reset(); _noSend = 0; _averageProcessWaitTime.reset(); _averageProcessShortWaitTime.reset(); _averageProcessLongWaitTime.reset(); _averageProcessExtraLongWaitTime.reset(); _extraLongProcessWait = 0; _longProcessWait = 0; _shortProcessWait = 0; _noProcessWait = 0; } void OctreeServer::trackEncodeTime(float time) { const float MAX_SHORT_TIME = 10.0f; const float MAX_LONG_TIME = 100.0f; if (time == SKIP_TIME) { _noEncode++; } else { if (time <= MAX_SHORT_TIME) { _shortEncode++; _averageShortEncodeTime.updateAverage(time); } else if (time <= MAX_LONG_TIME) { _longEncode++; _averageLongEncodeTime.updateAverage(time); } else { _extraLongEncode++; _averageExtraLongEncodeTime.updateAverage(time); } _averageEncodeTime.updateAverage(time); } } void OctreeServer::trackTreeWaitTime(float time) { const float MAX_SHORT_TIME = 10.0f; const float MAX_LONG_TIME = 100.0f; if (time == SKIP_TIME) { _noTreeWait++; } else { if (time <= MAX_SHORT_TIME) { _shortTreeWait++; _averageTreeShortWaitTime.updateAverage(time); } else if (time <= MAX_LONG_TIME) { _longTreeWait++; _averageTreeLongWaitTime.updateAverage(time); } else { _extraLongTreeWait++; _averageTreeExtraLongWaitTime.updateAverage(time); } _averageTreeWaitTime.updateAverage(time); } } void OctreeServer::trackCompressAndWriteTime(float time) { const float MAX_SHORT_TIME = 10.0f; const float MAX_LONG_TIME = 100.0f; if (time == SKIP_TIME) { _noCompress++; } else { if (time <= MAX_SHORT_TIME) { _shortCompress++; _averageShortCompressTime.updateAverage(time); } else if (time <= MAX_LONG_TIME) { _longCompress++; _averageLongCompressTime.updateAverage(time); } else { _extraLongCompress++; _averageExtraLongCompressTime.updateAverage(time); } _averageCompressAndWriteTime.updateAverage(time); } } void OctreeServer::trackPacketSendingTime(float time) { if (time == SKIP_TIME) { _noSend++; } else { _averagePacketSendingTime.updateAverage(time); } } void OctreeServer::trackProcessWaitTime(float time) { const float MAX_SHORT_TIME = 10.0f; const float MAX_LONG_TIME = 100.0f; if (time == SKIP_TIME) { _noProcessWait++; } else { if (time <= MAX_SHORT_TIME) { _shortProcessWait++; _averageProcessShortWaitTime.updateAverage(time); } else if (time <= MAX_LONG_TIME) { _longProcessWait++; _averageProcessLongWaitTime.updateAverage(time); } else { _extraLongProcessWait++; _averageProcessExtraLongWaitTime.updateAverage(time); } _averageProcessWaitTime.updateAverage(time); } } OctreeServer::OctreeServer(ReceivedMessage& message) : ThreadedAssignment(message), _argc(0), _argv(nullptr), _parsedArgV(nullptr), _httpManager(nullptr), _statusPort(0), _packetsPerClientPerInterval(10), _packetsTotalPerInterval(DEFAULT_PACKETS_PER_INTERVAL), _tree(nullptr), _wantPersist(true), _debugSending(false), _debugReceiving(false), _verboseDebug(false), _octreeInboundPacketProcessor(nullptr), _persistManager(nullptr), _started(time(0)), _startedUSecs(usecTimestampNow()) { _averageLoopTime.updateAverage(0); qDebug() << "Octree server starting... [" << this << "]"; } OctreeServer::~OctreeServer() { qDebug() << qPrintable(_safeServerName) << "server shutting down... [" << this << "]"; if (_parsedArgV) { for (int i = 0; i < _argc; i++) { delete[] _parsedArgV[i]; } delete[] _parsedArgV; } if (_octreeInboundPacketProcessor) { _octreeInboundPacketProcessor->terminating(); _octreeInboundPacketProcessor->terminate(); _octreeInboundPacketProcessor->deleteLater(); } qDebug() << "Waiting for persist thread to come down"; _persistThread.wait(); // cleanup our tree here... qDebug() << qPrintable(_safeServerName) << "server START cleaning up octree... [" << this << "]"; _tree.reset(); qDebug() << qPrintable(_safeServerName) << "server DONE cleaning up octree... [" << this << "]"; qDebug() << qPrintable(_safeServerName) << "server DONE shutting down... [" << this << "]"; } void OctreeServer::initHTTPManager(int port) { // setup the embedded web server QString documentRoot = QString("%1/web").arg(PathUtils::getAppDataPath()); // setup an httpManager with us as the request handler and the parent _httpManager.reset(new HTTPManager(QHostAddress::AnyIPv4, port, documentRoot, this)); } bool OctreeServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url, bool skipSubHandler) { #ifdef FORCE_CRASH if (connection->requestOperation() == QNetworkAccessManager::GetOperation && path == "/force_crash") { qDebug() << "About to force a crash!"; int foo; int* forceCrash = &foo; QString responseString("forcing a crash..."); connection->respond(HTTPConnection::StatusCode200, qPrintable(responseString)); delete[] forceCrash; return true; } #endif bool showStats = false; if (connection->requestOperation() == QNetworkAccessManager::GetOperation) { if (url.path() == "/") { showStats = true; } else if (url.path() == "/resetStats") { _octreeInboundPacketProcessor->resetStats(); _tree->resetEditStats(); resetSendingStats(); showStats = true; } else if ((url.path() == PERSIST_FILE_DOWNLOAD_PATH) || (url.path() == PERSIST_FILE_DOWNLOAD_PATH + "/")) { if (_persistFileDownload) { QByteArray persistFileContents = getPersistFileContents(); if (persistFileContents.length() > 0) { connection->respond(HTTPConnection::StatusCode200, persistFileContents, qPrintable(getPersistFileMimeType())); } else { connection->respond(HTTPConnection::StatusCode500, HTTPConnection::StatusCode500); } } else { connection->respond(HTTPConnection::StatusCode403, HTTPConnection::StatusCode403); // not allowed } return true; } } if (showStats) { quint64 checkSum; // return a 200 QString statsString("<html><doc>\r\n<pre>\r\n"); statsString += QString("<b>Your %1 Server is running... <a href='/'>[RELOAD]</a></b>\r\n").arg(getMyServerName()); tm* localtm = localtime(&_started); const int MAX_TIME_LENGTH = 128; char buffer[MAX_TIME_LENGTH]; strftime(buffer, MAX_TIME_LENGTH, "%m/%d/%Y %X", localtm); statsString += QString("Running since: %1").arg(buffer); // Convert now to tm struct for UTC tm* gmtm = gmtime(&_started); if (gmtm) { strftime(buffer, MAX_TIME_LENGTH, "%m/%d/%Y %X", gmtm); statsString += (QString(" [%1 UTM] ").arg(buffer)); } statsString += "\r\n"; statsString += "Uptime: " + getUptime(); statsString += "\r\n\r\n"; // display octree file load time if (isInitialLoadComplete()) { if (isPersistEnabled()) { statsString += QString("%1 File Persist Enabled...\r\n").arg(getMyServerName()); } else { statsString += QString("%1 File Persist Disabled...\r\n").arg(getMyServerName()); } statsString += "\r\n"; statsString += QString("%1 File Load Took ").arg(getMyServerName()); statsString += getFileLoadTime(); statsString += "\r\n"; if (_persistFileDownload) { statsString += QString("Persist file: <a href='%1'>Click to Download</a>\r\n").arg(PERSIST_FILE_DOWNLOAD_PATH); } else { statsString += QString("Persist file: %1\r\n").arg(_persistFilePath); } } else { statsString += "Octree file not yet loaded...\r\n"; } statsString += "\r\n\r\n"; statsString += "<b>Configuration:</b>\r\n"; statsString += getConfiguration() + "\r\n"; //one to end the config line statsString += "\r\n"; const int COLUMN_WIDTH = 19; QLocale locale(QLocale::English); const float AS_PERCENT = 100.0; statsString += QString(" Configured Max PPS/Client: %1 pps/client\r\n") .arg(locale.toString((uint)getPacketsPerClientPerSecond()).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Configured Max PPS/Server: %1 pps/server\r\n\r\n") .arg(locale.toString((uint)getPacketsTotalPerSecond()).rightJustified(COLUMN_WIDTH, ' ')); // display scene stats unsigned long nodeCount = OctreeElement::getNodeCount(); unsigned long internalNodeCount = OctreeElement::getInternalNodeCount(); unsigned long leafNodeCount = OctreeElement::getLeafNodeCount(); statsString += "<b>Current Elements in scene:</b>\r\n"; statsString += QString(" Total Elements: %1 nodes\r\n") .arg(locale.toString((uint)nodeCount).rightJustified(16, ' ')); statsString += QString().sprintf(" Internal Elements: %s nodes (%5.2f%%)\r\n", locale.toString((uint)internalNodeCount).rightJustified(16, ' ').toLocal8Bit().constData(), (double)((internalNodeCount / (float)nodeCount) * AS_PERCENT)); statsString += QString().sprintf(" Leaf Elements: %s nodes (%5.2f%%)\r\n", locale.toString((uint)leafNodeCount).rightJustified(16, ' ').toLocal8Bit().constData(), (double)((leafNodeCount / (float)nodeCount) * AS_PERCENT)); statsString += "\r\n"; statsString += "\r\n"; // display outbound packet stats statsString += QString("<b>%1 Outbound Packet Statistics... " "<a href='/resetStats'>[RESET]</a></b>\r\n").arg(getMyServerName()); quint64 totalOutboundPackets = OctreeSendThread::_totalPackets; quint64 totalOutboundBytes = OctreeSendThread::_totalBytes; quint64 totalWastedBytes = OctreeSendThread::_totalWastedBytes; quint64 totalBytesOfOctalCodes = OctreePacketData::getTotalBytesOfOctalCodes(); quint64 totalBytesOfBitMasks = OctreePacketData::getTotalBytesOfBitMasks(); quint64 totalBytesOfColor = OctreePacketData::getTotalBytesOfColor(); quint64 totalOutboundSpecialPackets = OctreeSendThread::_totalSpecialPackets; quint64 totalOutboundSpecialBytes = OctreeSendThread::_totalSpecialBytes; statsString += QString(" Total Clients Connected: %1 clients\r\n") .arg(locale.toString((uint)getCurrentClientCount()).rightJustified(COLUMN_WIDTH, ' ')); quint64 oneSecondAgo = usecTimestampNow() - USECS_PER_SECOND; statsString += QString(" process() last second: %1 clients\r\n") .arg(locale.toString((uint)howManyThreadsDidProcess(oneSecondAgo)).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" packetDistributor() last second: %1 clients\r\n") .arg(locale.toString((uint)howManyThreadsDidPacketDistributor(oneSecondAgo)).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" handlePacketSend() last second: %1 clients\r\n") .arg(locale.toString((uint)howManyThreadsDidHandlePacketSend(oneSecondAgo)).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" writeDatagram() last second: %1 clients\r\n\r\n") .arg(locale.toString((uint)howManyThreadsDidCallWriteDatagram(oneSecondAgo)).rightJustified(COLUMN_WIDTH, ' ')); float averageLoopTime = getAverageLoopTime(); statsString += QString().sprintf(" Average packetLoop() time: %7.2f msecs" " samples: %12d \r\n", (double)averageLoopTime, _averageLoopTime.getSampleCount()); float averageInsideTime = getAverageInsideTime(); statsString += QString().sprintf(" Average 'inside' time: %9.2f usecs" " samples: %12d \r\n\r\n", (double)averageInsideTime, _averageInsideTime.getSampleCount()); // Process Wait { int allWaitTimes = _extraLongProcessWait +_longProcessWait + _shortProcessWait + _noProcessWait; float averageProcessWaitTime = getAverageProcessWaitTime(); statsString += QString().sprintf(" Average process lock wait time:" " %9.2f usecs samples: %12d \r\n", (double)averageProcessWaitTime, allWaitTimes); float zeroVsTotal = (allWaitTimes > 0) ? ((float)_noProcessWait / (float)allWaitTimes) : 0.0f; statsString += QString().sprintf(" No Lock Wait:" " (%6.2f%%) samples: %12d \r\n", (double)(zeroVsTotal * AS_PERCENT), _noProcessWait); float shortVsTotal = (allWaitTimes > 0) ? ((float)_shortProcessWait / (float)allWaitTimes) : 0.0f; statsString += QString().sprintf(" Avg process lock short wait time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n", (double)_averageProcessShortWaitTime.getAverage(), (double)(shortVsTotal * AS_PERCENT), _shortProcessWait); float longVsTotal = (allWaitTimes > 0) ? ((float)_longProcessWait / (float)allWaitTimes) : 0.0f; statsString += QString().sprintf(" Avg process lock long wait time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n", (double)_averageProcessLongWaitTime.getAverage(), (double)(longVsTotal * AS_PERCENT), _longProcessWait); float extraLongVsTotal = (allWaitTimes > 0) ? ((float)_extraLongProcessWait / (float)allWaitTimes) : 0.0f; statsString += QString().sprintf("Avg process lock extralong wait time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n\r\n", (double)_averageProcessExtraLongWaitTime.getAverage(), (double)(extraLongVsTotal * AS_PERCENT), _extraLongProcessWait); } // Tree Wait int allWaitTimes = _extraLongTreeWait +_longTreeWait + _shortTreeWait + _noTreeWait; float averageTreeWaitTime = getAverageTreeWaitTime(); statsString += QString().sprintf(" Average tree lock wait time:" " %9.2f usecs samples: %12d \r\n", (double)averageTreeWaitTime, allWaitTimes); float zeroVsTotal = (allWaitTimes > 0) ? ((float)_noTreeWait / (float)allWaitTimes) : 0.0f; statsString += QString().sprintf(" No Lock Wait:" " (%6.2f%%) samples: %12d \r\n", (double)(zeroVsTotal * AS_PERCENT), _noTreeWait); float shortVsTotal = (allWaitTimes > 0) ? ((float)_shortTreeWait / (float)allWaitTimes) : 0.0f; statsString += QString().sprintf(" Avg tree lock short wait time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n", (double)_averageTreeShortWaitTime.getAverage(), (double)(shortVsTotal * AS_PERCENT), _shortTreeWait); float longVsTotal = (allWaitTimes > 0) ? ((float)_longTreeWait / (float)allWaitTimes) : 0.0f; statsString += QString().sprintf(" Avg tree lock long wait time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n", (double)_averageTreeLongWaitTime.getAverage(), (double)(longVsTotal * AS_PERCENT), _longTreeWait); float extraLongVsTotal = (allWaitTimes > 0) ? ((float)_extraLongTreeWait / (float)allWaitTimes) : 0.0f; statsString += QString().sprintf(" Avg tree lock extra long wait time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n\r\n", (double)_averageTreeExtraLongWaitTime.getAverage(), (double)(extraLongVsTotal * AS_PERCENT), _extraLongTreeWait); // traverse float averageTreeTraverseTime = getAverageTreeTraverseTime(); statsString += QString().sprintf(" Average tree traverse time: %9.2f usecs\r\n\r\n", (double)averageTreeTraverseTime); // encode float averageEncodeTime = getAverageEncodeTime(); statsString += QString().sprintf(" Average encode time: %9.2f usecs\r\n", (double)averageEncodeTime); int allEncodeTimes = _noEncode + _shortEncode + _longEncode + _extraLongEncode; float zeroVsTotalEncode = (allEncodeTimes > 0) ? ((float)_noEncode / (float)allEncodeTimes) : 0.0f; statsString += QString().sprintf(" No Encode:" " (%6.2f%%) samples: %12d \r\n", (double)(zeroVsTotalEncode * AS_PERCENT), _noEncode); float shortVsTotalEncode = (allEncodeTimes > 0) ? ((float)_shortEncode / (float)allEncodeTimes) : 0.0f; statsString += QString().sprintf(" Avg short encode time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n", (double)_averageShortEncodeTime.getAverage(), (double)(shortVsTotalEncode * AS_PERCENT), _shortEncode); float longVsTotalEncode = (allEncodeTimes > 0) ? ((float)_longEncode / (float)allEncodeTimes) : 0.0f; statsString += QString().sprintf(" Avg long encode time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n", (double)_averageLongEncodeTime.getAverage(), (double)(longVsTotalEncode * AS_PERCENT), _longEncode); float extraLongVsTotalEncode = (allEncodeTimes > 0) ? ((float)_extraLongEncode / (float)allEncodeTimes) : 0.0f; statsString += QString().sprintf(" Avg extra long encode time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n\r\n", (double)_averageExtraLongEncodeTime.getAverage(), (double)(extraLongVsTotalEncode * AS_PERCENT), _extraLongEncode); float averageCompressAndWriteTime = getAverageCompressAndWriteTime(); statsString += QString().sprintf(" Average compress and write time: %9.2f usecs\r\n", (double)averageCompressAndWriteTime); int allCompressTimes = _noCompress + _shortCompress + _longCompress + _extraLongCompress; float zeroVsTotalCompress = (allCompressTimes > 0) ? ((float)_noCompress / (float)allCompressTimes) : 0.0f; statsString += QString().sprintf(" No compression:" " (%6.2f%%) samples: %12d \r\n", (double)(zeroVsTotalCompress * AS_PERCENT), _noCompress); float shortVsTotalCompress = (allCompressTimes > 0) ? ((float)_shortCompress / (float)allCompressTimes) : 0.0f; statsString += QString().sprintf(" Avg short compress time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n", (double)_averageShortCompressTime.getAverage(), (double)(shortVsTotalCompress * AS_PERCENT), _shortCompress); float longVsTotalCompress = (allCompressTimes > 0) ? ((float)_longCompress / (float)allCompressTimes) : 0.0f; statsString += QString().sprintf(" Avg long compress time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n", (double)_averageLongCompressTime.getAverage(), (double)(longVsTotalCompress * AS_PERCENT), _longCompress); float extraLongVsTotalCompress = (allCompressTimes > 0) ? ((float)_extraLongCompress / (float)allCompressTimes) : 0.0f; statsString += QString().sprintf(" Avg extra long compress time:" " %9.2f usecs (%6.2f%%) samples: %12d \r\n\r\n", (double)_averageExtraLongCompressTime.getAverage(), (double)(extraLongVsTotalCompress * AS_PERCENT), _extraLongCompress); float averagePacketSendingTime = getAveragePacketSendingTime(); statsString += QString().sprintf(" Average packet sending time: %9.2f usecs (includes node lock)\r\n", (double)averagePacketSendingTime); float noVsTotalSend = (_averagePacketSendingTime.getSampleCount() > 0) ? ((float)_noSend / (float)_averagePacketSendingTime.getSampleCount()) : 0.0f; statsString += QString().sprintf(" Not sending:" " (%6.2f%%) samples: %12d \r\n", (double)(noVsTotalSend * AS_PERCENT), _noSend); float averageNodeWaitTime = getAverageNodeWaitTime(); statsString += QString().sprintf(" Average node lock wait time: %9.2f usecs\r\n", (double)averageNodeWaitTime); statsString += QString().sprintf("--------------------------------------------------------------\r\n"); float encodeToInsidePercent = averageInsideTime == 0.0f ? 0.0f : (averageEncodeTime / averageInsideTime) * AS_PERCENT; statsString += QString().sprintf(" encode ratio: %5.2f%%\r\n", (double)encodeToInsidePercent); float waitToInsidePercent = averageInsideTime == 0.0f ? 0.0f : ((averageTreeWaitTime + averageNodeWaitTime) / averageInsideTime) * AS_PERCENT; statsString += QString().sprintf(" waiting ratio: %5.2f%%\r\n", (double)waitToInsidePercent); float compressAndWriteToInsidePercent = averageInsideTime == 0.0f ? 0.0f : (averageCompressAndWriteTime / averageInsideTime) * AS_PERCENT; statsString += QString().sprintf(" compress and write ratio: %5.2f%%\r\n", (double)compressAndWriteToInsidePercent); float sendingToInsidePercent = averageInsideTime == 0.0f ? 0.0f : (averagePacketSendingTime / averageInsideTime) * AS_PERCENT; statsString += QString().sprintf(" sending ratio: %5.2f%%\r\n", (double)sendingToInsidePercent); statsString += QString("\r\n"); statsString += QString(" Total Outbound Packets: %1 packets\r\n") .arg(locale.toString((uint)totalOutboundPackets).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Total Outbound Bytes: %1 bytes\r\n") .arg(locale.toString((uint)totalOutboundBytes).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Total Outbound Special Packets: %1 packets\r\n") .arg(locale.toString((uint)totalOutboundSpecialPackets).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Total Outbound Special Bytes: %1 bytes\r\n") .arg(locale.toString((uint)totalOutboundSpecialBytes).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Total Wasted Bytes: %1 bytes\r\n") .arg(locale.toString((uint)totalWastedBytes).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString().sprintf(" Total OctalCode Bytes: %s bytes (%5.2f%%)\r\n", locale.toString((uint)totalBytesOfOctalCodes).rightJustified(COLUMN_WIDTH, ' ').toLocal8Bit().constData(), (double)((totalBytesOfOctalCodes / (float)totalOutboundBytes) * AS_PERCENT)); statsString += QString().sprintf(" Total BitMasks Bytes: %s bytes (%5.2f%%)\r\n", locale.toString((uint)totalBytesOfBitMasks).rightJustified(COLUMN_WIDTH, ' ').toLocal8Bit().constData(), (double)(((float)totalBytesOfBitMasks / (float)totalOutboundBytes) * AS_PERCENT)); statsString += QString().sprintf(" Total Color Bytes: %s bytes (%5.2f%%)\r\n", locale.toString((uint)totalBytesOfColor).rightJustified(COLUMN_WIDTH, ' ').toLocal8Bit().constData(), (double)((totalBytesOfColor / (float)totalOutboundBytes) * AS_PERCENT)); statsString += "\r\n"; statsString += "\r\n"; // display inbound packet stats statsString += QString().sprintf("<b>%s Edit Statistics... <a href='/resetStats'>[RESET]</a></b>\r\n", getMyServerName()); quint64 currentPacketsInQueue = _octreeInboundPacketProcessor->packetsToProcessCount(); float incomingPPS = _octreeInboundPacketProcessor->getIncomingPPS(); float processedPPS = _octreeInboundPacketProcessor->getProcessedPPS(); quint64 averageTransitTimePerPacket = _octreeInboundPacketProcessor->getAverageTransitTimePerPacket(); quint64 averageProcessTimePerPacket = _octreeInboundPacketProcessor->getAverageProcessTimePerPacket(); quint64 averageLockWaitTimePerPacket = _octreeInboundPacketProcessor->getAverageLockWaitTimePerPacket(); quint64 averageProcessTimePerElement = _octreeInboundPacketProcessor->getAverageProcessTimePerElement(); quint64 averageLockWaitTimePerElement = _octreeInboundPacketProcessor->getAverageLockWaitTimePerElement(); quint64 totalElementsProcessed = _octreeInboundPacketProcessor->getTotalElementsProcessed(); quint64 totalPacketsProcessed = _octreeInboundPacketProcessor->getTotalPacketsProcessed(); quint64 averageDecodeTime = _tree->getAverageDecodeTime(); quint64 averageLookupTime = _tree->getAverageLookupTime(); quint64 averageUpdateTime = _tree->getAverageUpdateTime(); quint64 averageCreateTime = _tree->getAverageCreateTime(); quint64 averageLoggingTime = _tree->getAverageLoggingTime(); quint64 averageFilterTime = _tree->getAverageFilterTime(); int FLOAT_PRECISION = 3; float averageElementsPerPacket = totalPacketsProcessed == 0 ? 0 : (float)totalElementsProcessed / totalPacketsProcessed; statsString += QString(" Current Inbound Packets Queue: %1 packets \r\n") .arg(locale.toString((uint)currentPacketsInQueue).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Packets Queue Network IN: %1 PPS \r\n") .arg(locale.toString(incomingPPS, 'f', FLOAT_PRECISION).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Packets Queue Processing OUT: %1 PPS \r\n") .arg(locale.toString(processedPPS, 'f', FLOAT_PRECISION).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Total Inbound Packets: %1 packets\r\n") .arg(locale.toString((uint)totalPacketsProcessed).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Total Inbound Elements: %1 elements\r\n") .arg(locale.toString((uint)totalElementsProcessed).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString().sprintf(" Average Inbound Elements/Packet: %f elements/packet\r\n", (double)averageElementsPerPacket); statsString += QString(" Average Transit Time/Packet: %1 usecs\r\n") .arg(locale.toString((uint)averageTransitTimePerPacket).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Process Time/Packet: %1 usecs\r\n") .arg(locale.toString((uint)averageProcessTimePerPacket).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Wait Lock Time/Packet: %1 usecs\r\n") .arg(locale.toString((uint)averageLockWaitTimePerPacket).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Process Time/Element: %1 usecs\r\n") .arg(locale.toString((uint)averageProcessTimePerElement).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Wait Lock Time/Element: %1 usecs\r\n") .arg(locale.toString((uint)averageLockWaitTimePerElement).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Decode Time: %1 usecs\r\n") .arg(locale.toString((uint)averageDecodeTime).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Lookup Time: %1 usecs\r\n") .arg(locale.toString((uint)averageLookupTime).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Update Time: %1 usecs\r\n") .arg(locale.toString((uint)averageUpdateTime).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Create Time: %1 usecs\r\n") .arg(locale.toString((uint)averageCreateTime).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Logging Time: %1 usecs\r\n") .arg(locale.toString((uint)averageLoggingTime).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Filter Time: %1 usecs\r\n") .arg(locale.toString((uint)averageFilterTime).rightJustified(COLUMN_WIDTH, ' ')); int senderNumber = 0; NodeToSenderStatsMap allSenderStats = _octreeInboundPacketProcessor->getSingleSenderStats(); for (NodeToSenderStatsMapConstIterator i = allSenderStats.begin(); i != allSenderStats.end(); i++) { senderNumber++; QUuid senderID = i.key(); const SingleSenderStats& senderStats = i.value(); statsString += QString("\r\n Stats for sender %1 uuid: %2\r\n") .arg(senderNumber).arg(senderID.toString()); averageTransitTimePerPacket = senderStats.getAverageTransitTimePerPacket(); averageProcessTimePerPacket = senderStats.getAverageProcessTimePerPacket(); averageLockWaitTimePerPacket = senderStats.getAverageLockWaitTimePerPacket(); averageProcessTimePerElement = senderStats.getAverageProcessTimePerElement(); averageLockWaitTimePerElement = senderStats.getAverageLockWaitTimePerElement(); totalElementsProcessed = senderStats.getTotalElementsProcessed(); totalPacketsProcessed = senderStats.getTotalPacketsProcessed(); auto received = senderStats._incomingEditSequenceNumberStats.getReceived(); auto expected = senderStats._incomingEditSequenceNumberStats.getExpectedReceived(); auto unreasonable = senderStats._incomingEditSequenceNumberStats.getUnreasonable(); auto outOfOrder = senderStats._incomingEditSequenceNumberStats.getOutOfOrder(); auto early = senderStats._incomingEditSequenceNumberStats.getEarly(); auto late = senderStats._incomingEditSequenceNumberStats.getLate(); auto lost = senderStats._incomingEditSequenceNumberStats.getLost(); auto recovered = senderStats._incomingEditSequenceNumberStats.getRecovered(); averageElementsPerPacket = totalPacketsProcessed == 0 ? 0 : (float)totalElementsProcessed / totalPacketsProcessed; statsString += QString(" Total Inbound Packets: %1 packets\r\n") .arg(locale.toString((uint)totalPacketsProcessed).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Total Inbound Elements: %1 elements\r\n") .arg(locale.toString((uint)totalElementsProcessed).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString().sprintf(" Average Inbound Elements/Packet: %f elements/packet\r\n", (double)averageElementsPerPacket); statsString += QString(" Average Transit Time/Packet: %1 usecs\r\n") .arg(locale.toString((uint)averageTransitTimePerPacket).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Process Time/Packet: %1 usecs\r\n") .arg(locale.toString((uint)averageProcessTimePerPacket).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Wait Lock Time/Packet: %1 usecs\r\n") .arg(locale.toString((uint)averageLockWaitTimePerPacket).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Process Time/Element: %1 usecs\r\n") .arg(locale.toString((uint)averageProcessTimePerElement).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Average Wait Lock Time/Element: %1 usecs\r\n") .arg(locale.toString((uint)averageLockWaitTimePerElement).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString("\r\n Inbound Edit Packets --------------------------------\r\n"); statsString += QString(" Received: %1\r\n") .arg(locale.toString(received).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Expected: %1\r\n") .arg(locale.toString(expected).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Unreasonable: %1\r\n") .arg(locale.toString(unreasonable).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Out of Order: %1\r\n") .arg(locale.toString(outOfOrder).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Early: %1\r\n") .arg(locale.toString(early).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Late: %1\r\n") .arg(locale.toString(late).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Lost: %1\r\n") .arg(locale.toString(lost).rightJustified(COLUMN_WIDTH, ' ')); statsString += QString(" Recovered: %1\r\n") .arg(locale.toString(recovered).rightJustified(COLUMN_WIDTH, ' ')); } statsString += "\r\n\r\n"; // display memory usage stats statsString += "<b>Current Memory Usage Statistics</b>\r\n"; statsString += QString().sprintf("\r\nOctreeElement size... %ld bytes\r\n", sizeof(OctreeElement)); statsString += "\r\n"; const char* memoryScaleLabel; const float MEGABYTES = 1000000.0f; const float GIGABYTES = 1000000000.0f; float memoryScale; if (OctreeElement::getTotalMemoryUsage() / MEGABYTES < 1000.0f) { memoryScaleLabel = "MB"; memoryScale = MEGABYTES; } else { memoryScaleLabel = "GB"; memoryScale = GIGABYTES; } statsString += QString().sprintf("Element Node Memory Usage: %8.2f %s\r\n", OctreeElement::getOctreeMemoryUsage() / (double)memoryScale, memoryScaleLabel); statsString += QString().sprintf("Octcode Memory Usage: %8.2f %s\r\n", OctreeElement::getOctcodeMemoryUsage() / (double)memoryScale, memoryScaleLabel); statsString += QString().sprintf("External Children Memory Usage: %8.2f %s\r\n", OctreeElement::getExternalChildrenMemoryUsage() / (double)memoryScale, memoryScaleLabel); statsString += " -----------\r\n"; statsString += QString().sprintf(" Total: %8.2f %s\r\n", OctreeElement::getTotalMemoryUsage() / (double)memoryScale, memoryScaleLabel); statsString += "\r\n"; statsString += "OctreeElement Children Population Statistics...\r\n"; checkSum = 0; for (int i=0; i <= NUMBER_OF_CHILDREN; i++) { checkSum += OctreeElement::getChildrenCount(i); statsString += QString().sprintf(" Nodes with %d children: %s nodes (%5.2f%%)\r\n", i, locale.toString((uint)OctreeElement::getChildrenCount(i)).rightJustified(16, ' ').toLocal8Bit().constData(), (double)(((float)OctreeElement::getChildrenCount(i) / (float)nodeCount) * AS_PERCENT)); } statsString += " ----------------------\r\n"; statsString += QString(" Total: %1 nodes\r\n") .arg(locale.toString((uint)checkSum).rightJustified(16, ' ')); statsString += "\r\n\r\n"; statsString += serverSubclassStats(); statsString += "\r\n\r\n"; statsString += "</pre>\r\n"; statsString += "</doc></html>"; connection->respond(HTTPConnection::StatusCode200, qPrintable(statsString), "text/html"); return true; } else { // have HTTPManager attempt to process this request from the document_root return false; } } void OctreeServer::setArguments(int argc, char** argv) { _argc = argc; _argv = const_cast<const char**>(argv); qDebug("OctreeServer::setArguments()"); for (int i = 0; i < _argc; i++) { qDebug("_argv[%d]=%s", i, _argv[i]); } } void OctreeServer::parsePayload() { if (getPayload().size() > 0) { QString config(_payload); // Now, parse the config QStringList configList = config.split(" "); int argCount = configList.size() + 1; qDebug("OctreeServer::parsePayload()... argCount=%d",argCount); _parsedArgV = new char*[argCount]; const char* dummy = "config-from-payload"; _parsedArgV[0] = new char[strlen(dummy) + sizeof(char)]; strcpy(_parsedArgV[0], dummy); for (int i = 1; i < argCount; i++) { QString configItem = configList.at(i-1); _parsedArgV[i] = new char[configItem.length() + sizeof(char)]; strcpy(_parsedArgV[i], configItem.toLocal8Bit().constData()); qDebug("OctreeServer::parsePayload()... _parsedArgV[%d]=%s", i, _parsedArgV[i]); } setArguments(argCount, _parsedArgV); } } OctreeServer::UniqueSendThread OctreeServer::createSendThread(const SharedNodePointer& node) { auto sendThread = newSendThread(node); // we want to be notified when the thread finishes connect(sendThread.get(), &GenericThread::finished, this, &OctreeServer::removeSendThread); sendThread->initialize(true); return sendThread; } void OctreeServer::removeSendThread() { // If the object has been deleted since the event was queued, sender() will return nullptr if (auto sendThread = qobject_cast<OctreeSendThread*>(sender())) { // This deletes the unique_ptr, so sendThread is destructed after that line _sendThreads.erase(sendThread->getNodeUuid()); } } void OctreeServer::handleOctreeQueryPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) { if (!_isFinished && !_isShuttingDown) { // If we got a query packet, then we're talking to an agent, and we // need to make sure we have it in our nodeList. auto nodeList = DependencyManager::get<NodeList>(); nodeList->updateNodeWithDataFromPacket(message, senderNode); auto it = _sendThreads.find(senderNode->getUUID()); if (it == _sendThreads.end()) { _sendThreads.emplace(senderNode->getUUID(), createSendThread(senderNode)); } else if (it->second->isShuttingDown()) { _sendThreads.erase(it); // Remove right away and wait on thread to be _sendThreads.emplace(senderNode->getUUID(), createSendThread(senderNode)); } } } void OctreeServer::handleOctreeDataNackPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) { // If we got a nack packet, then we're talking to an agent, and we // need to make sure we have it in our nodeList. OctreeQueryNode* nodeData = dynamic_cast<OctreeQueryNode*>(senderNode->getLinkedData()); if (nodeData) { nodeData->parseNackPacket(*message); } } bool OctreeServer::readOptionBool(const QString& optionName, const QJsonObject& settingsSectionObject, bool& result) { result = false; // assume it doesn't exist bool optionAvailable = false; QString argName = "--" + optionName; bool argExists = cmdOptionExists(_argc, _argv, qPrintable(argName)); if (argExists) { optionAvailable = true; result = argExists; qDebug() << "From payload arguments: " << qPrintable(argName) << ":" << result; } else if (settingsSectionObject.contains(optionName)) { optionAvailable = true; result = settingsSectionObject[optionName].toBool(); qDebug() << "From domain settings: " << qPrintable(optionName) << ":" << result; } return optionAvailable; } bool OctreeServer::readOptionInt(const QString& optionName, const QJsonObject& settingsSectionObject, int& result) { bool optionAvailable = false; QString argName = "--" + optionName; const char* argValue = getCmdOption(_argc, _argv, qPrintable(argName)); if (argValue) { optionAvailable = true; result = atoi(argValue); qDebug() << "From payload arguments: " << qPrintable(argName) << ":" << result; } else if (settingsSectionObject.contains(optionName)) { optionAvailable = true; result = settingsSectionObject[optionName].toString().toInt(&optionAvailable); if (optionAvailable) { qDebug() << "From domain settings: " << qPrintable(optionName) << ":" << result; } } return optionAvailable; } bool OctreeServer::readOptionInt64(const QString& optionName, const QJsonObject& settingsSectionObject, qint64& result) { bool optionAvailable = false; QString argName = "--" + optionName; const char* argValue = getCmdOption(_argc, _argv, qPrintable(argName)); if (argValue) { optionAvailable = true; result = atoll(argValue); qDebug() << "From payload arguments: " << qPrintable(argName) << ":" << result; } else if (settingsSectionObject.contains(optionName)) { optionAvailable = true; result = settingsSectionObject[optionName].toString().toLongLong(&optionAvailable); if (optionAvailable) { qDebug() << "From domain settings: " << qPrintable(optionName) << ":" << result; } } return optionAvailable; } bool OctreeServer::readOptionString(const QString& optionName, const QJsonObject& settingsSectionObject, QString& result) { bool optionAvailable = false; QString argName = "--" + optionName; const char* argValue = getCmdOption(_argc, _argv, qPrintable(argName)); if (argValue) { optionAvailable = true; result = QString(argValue); qDebug() << "From payload arguments: " << qPrintable(argName) << ":" << qPrintable(result); } else if (settingsSectionObject.contains(optionName)) { optionAvailable = true; result = settingsSectionObject[optionName].toString(); qDebug() << "From domain settings: " << qPrintable(optionName) << ":" << qPrintable(result); } return optionAvailable; } void OctreeServer::readConfiguration() { // if the assignment had a payload, read and parse that if (getPayload().size() > 0) { parsePayload(); } const QJsonObject& settingsObject = DependencyManager::get<NodeList>()->getDomainHandler().getSettingsObject(); QString settingsKey = getMyDomainSettingsKey(); QJsonObject settingsSectionObject = settingsObject[settingsKey].toObject(); _settings = settingsSectionObject; // keep this for later if (!readOptionString(QString("statusHost"), settingsSectionObject, _statusHost) || _statusHost.isEmpty()) { _statusHost = getGuessedLocalAddress().toString(); } qDebug("statusHost=%s", qPrintable(_statusHost)); if (readOptionInt(QString("statusPort"), settingsSectionObject, _statusPort)) { initHTTPManager(_statusPort); qDebug() << "statusPort=" << _statusPort; } else { qDebug() << "statusPort= DISABLED"; } readOptionBool(QString("verboseDebug"), settingsSectionObject, _verboseDebug); qDebug("verboseDebug=%s", debug::valueOf(_verboseDebug)); readOptionBool(QString("debugSending"), settingsSectionObject, _debugSending); qDebug("debugSending=%s", debug::valueOf(_debugSending)); readOptionBool(QString("debugReceiving"), settingsSectionObject, _debugReceiving); qDebug("debugReceiving=%s", debug::valueOf(_debugReceiving)); readOptionBool(QString("debugTimestampNow"), settingsSectionObject, _debugTimestampNow); qDebug() << "debugTimestampNow=" << _debugTimestampNow; bool noPersist; readOptionBool(QString("NoPersist"), settingsSectionObject, noPersist); _wantPersist = !noPersist; qDebug() << "wantPersist=" << _wantPersist; if (_wantPersist) { if (!readOptionString("persistFilePath", settingsSectionObject, _persistFilePath) && !readOptionString("persistFilename", settingsSectionObject, _persistFilePath)) { _persistFilePath = getMyDefaultPersistFilename(); } QDir persistPath { _persistFilePath }; if (persistPath.isRelative()) { // if the domain settings passed us a relative path, make an absolute path that is relative to the // default data directory _persistAbsoluteFilePath = QDir(PathUtils::getAppDataFilePath("entities/")).absoluteFilePath(_persistFilePath); } else { _persistAbsoluteFilePath = persistPath.absolutePath(); } qDebug() << "persistFilePath=" << _persistFilePath; qDebug() << "persisAbsoluteFilePath=" << _persistAbsoluteFilePath; _persistAsFileType = "json.gz"; _persistInterval = OctreePersistThread::DEFAULT_PERSIST_INTERVAL; int result { -1 }; readOptionInt(QString("persistInterval"), settingsSectionObject, result); if (result != -1) { _persistInterval = std::chrono::milliseconds(result); } qDebug() << "persistInterval=" << _persistInterval.count(); readOptionBool(QString("persistFileDownload"), settingsSectionObject, _persistFileDownload); qDebug() << "persistFileDownload=" << _persistFileDownload; } else { qDebug("persistFilename= DISABLED"); } // Debug option to demonstrate that the server's local time does not // need to be in sync with any other network node. This forces clock // skew for the individual server node qint64 clockSkew; if (readOptionInt64(QString("clockSkew"), settingsSectionObject, clockSkew)) { usecTimestampNowForceClockSkew(clockSkew); qDebug() << "clockSkew=" << clockSkew; } // Check to see if the user passed in a command line option for setting packet send rate int packetsPerSecondPerClientMax = -1; if (readOptionInt(QString("packetsPerSecondPerClientMax"), settingsSectionObject, packetsPerSecondPerClientMax)) { _packetsPerClientPerInterval = packetsPerSecondPerClientMax / INTERVALS_PER_SECOND; if (_packetsPerClientPerInterval < 1) { _packetsPerClientPerInterval = 1; } } qDebug("packetsPerSecondPerClientMax=%d _packetsPerClientPerInterval=%d", packetsPerSecondPerClientMax, _packetsPerClientPerInterval); // Check to see if the user passed in a command line option for setting packet send rate int packetsPerSecondTotalMax = -1; if (readOptionInt(QString("packetsPerSecondTotalMax"), settingsSectionObject, packetsPerSecondTotalMax)) { _packetsTotalPerInterval = packetsPerSecondTotalMax / INTERVALS_PER_SECOND; if (_packetsTotalPerInterval < 1) { _packetsTotalPerInterval = 1; } } qDebug("packetsPerSecondTotalMax=%d _packetsTotalPerInterval=%d", packetsPerSecondTotalMax, _packetsTotalPerInterval); readAdditionalConfiguration(settingsSectionObject); } void OctreeServer::run() { _safeServerName = getMyServerName(); // Before we do anything else, create our tree... OctreeElement::resetPopulationStatistics(); _tree = createTree(); _tree->setIsServer(true); qDebug() << "Waiting for connection to domain to request settings from domain-server."; // wait until we have the domain-server settings, otherwise we bail DomainHandler& domainHandler = DependencyManager::get<NodeList>()->getDomainHandler(); connect(&domainHandler, &DomainHandler::settingsReceived, this, &OctreeServer::domainSettingsRequestComplete); connect(&domainHandler, &DomainHandler::settingsReceiveFail, this, &OctreeServer::domainSettingsRequestFailed); // use common init to setup common timers and logging commonInit(getMyLoggingServerTargetName(), getMyNodeType()); } void OctreeServer::domainSettingsRequestComplete() { auto& packetReceiver = DependencyManager::get<NodeList>()->getPacketReceiver(); packetReceiver.registerListener(PacketType::OctreeDataNack, this, "handleOctreeDataNackPacket"); packetReceiver.registerListener(getMyQueryMessageType(), this, "handleOctreeQueryPacket"); qDebug(octree_server) << "Received domain settings"; readConfiguration(); // if we want Persistence, set up the local file and persist thread if (_wantPersist) { static const QString ENTITY_PERSIST_EXTENSION = ".json.gz"; // force the persist file to end with .json.gz if (!_persistAbsoluteFilePath.endsWith(ENTITY_PERSIST_EXTENSION, Qt::CaseInsensitive)) { _persistAbsoluteFilePath += ENTITY_PERSIST_EXTENSION; } else { // make sure the casing of .json.gz is correct _persistAbsoluteFilePath.replace(ENTITY_PERSIST_EXTENSION, ENTITY_PERSIST_EXTENSION, Qt::CaseInsensitive); } if (!QFile::exists(_persistAbsoluteFilePath)) { qDebug() << "Persist file does not exist, checking for existence of persist file next to application"; static const QString OLD_DEFAULT_PERSIST_FILENAME = "resources/models.json.gz"; QString oldResourcesDirectory = QCoreApplication::applicationDirPath(); // This is the old persist path, based on the current persist filename, which could // be a custom filename set by the user. auto oldPersistPath = QDir(oldResourcesDirectory).absoluteFilePath(_persistFilePath); // This is the old default persist path. auto oldDefaultPersistPath = QDir(oldResourcesDirectory).absoluteFilePath(OLD_DEFAULT_PERSIST_FILENAME); qDebug() << "Checking for existing persist file at " << oldPersistPath << " and " << oldDefaultPersistPath; QString pathToCopyFrom; bool shouldCopy = false; if (QFile::exists(oldPersistPath)) { shouldCopy = true; pathToCopyFrom = oldPersistPath; } else if (QFile::exists(oldDefaultPersistPath)) { shouldCopy = true; pathToCopyFrom = oldDefaultPersistPath; } QDir persistFileDirectory { QDir::cleanPath(_persistAbsoluteFilePath + "/..") }; if (!persistFileDirectory.exists()) { qDebug() << "Creating data directory " << persistFileDirectory.absolutePath(); persistFileDirectory.mkpath("."); } if (shouldCopy) { qDebug() << "Old persist file found, copying from " << pathToCopyFrom << " to " << _persistAbsoluteFilePath; QFile::copy(pathToCopyFrom, _persistAbsoluteFilePath); } else { qDebug() << "No existing persist file found"; } } auto persistFileDirectory = QFileInfo(_persistAbsoluteFilePath).absolutePath(); // now set up PersistThread _persistManager = new OctreePersistThread(_tree, _persistAbsoluteFilePath, _persistInterval, _debugTimestampNow, _persistAsFileType); _persistManager->moveToThread(&_persistThread); connect(&_persistThread, &QThread::finished, _persistManager, &QObject::deleteLater); connect(&_persistThread, &QThread::started, _persistManager, &OctreePersistThread::start); connect(_persistManager, &OctreePersistThread::loadCompleted, this, [this]() { beginRunning(); }); _persistThread.start(); } else { beginRunning(); } } void OctreeServer::beginRunning() { auto nodeList = DependencyManager::get<NodeList>(); // we need to ask the DS about agents so we can ping/reply with them nodeList->addSetOfNodeTypesToNodeInterestSet({ NodeType::Agent, NodeType::EntityScriptServer, NodeType::AvatarMixer }); beforeRun(); // after payload has been processed connect(nodeList.data(), &NodeList::nodeAdded, this, &OctreeServer::nodeAdded); connect(nodeList.data(), &NodeList::nodeKilled, this, &OctreeServer::nodeKilled); nodeList->linkedDataCreateCallback = [this](Node* node) { auto queryNodeData = createOctreeQueryNode(); queryNodeData->init(); node->setLinkedData(std::move(queryNodeData)); }; srand((unsigned)time(0)); // set up our OctreeServerPacketProcessor _octreeInboundPacketProcessor = new OctreeInboundPacketProcessor(this); _octreeInboundPacketProcessor->initialize(true); // Convert now to tm struct for local timezone tm* localtm = localtime(&_started); const int MAX_TIME_LENGTH = 128; char localBuffer[MAX_TIME_LENGTH] = { 0 }; char utcBuffer[MAX_TIME_LENGTH] = { 0 }; strftime(localBuffer, MAX_TIME_LENGTH, "%m/%d/%Y %X", localtm); // Convert now to tm struct for UTC tm* gmtm = gmtime(&_started); if (gmtm) { strftime(utcBuffer, MAX_TIME_LENGTH, " [%m/%d/%Y %X UTC]", gmtm); } qDebug() << "Now running... started at: " << localBuffer << utcBuffer; } void OctreeServer::nodeAdded(SharedNodePointer node) { // we might choose to use this notifier to track clients in a pending state qDebug() << qPrintable(_safeServerName) << "server added node:" << *node; } void OctreeServer::nodeKilled(SharedNodePointer node) { quint64 start = usecTimestampNow(); // Shutdown send thread auto it = _sendThreads.find(node->getUUID()); if (it != _sendThreads.end()) { auto& sendThread = *it->second; sendThread.setIsShuttingDown(); } // calling this here since nodeKilled slot in ReceivedPacketProcessor can't be triggered by signals yet!! _octreeInboundPacketProcessor->nodeKilled(node); qDebug() << qPrintable(_safeServerName) << "server killed node:" << *node; OctreeQueryNode* nodeData = dynamic_cast<OctreeQueryNode*>(node->getLinkedData()); if (nodeData) { nodeData->nodeKilled(); // tell our node data and sending threads that we'd like to shut down } else { qDebug() << qPrintable(_safeServerName) << "server node missing linked data node:" << *node; } quint64 end = usecTimestampNow(); quint64 usecsElapsed = (end - start); if (usecsElapsed > 1000) { qDebug() << qPrintable(_safeServerName) << "server nodeKilled() took: " << usecsElapsed << " usecs for node:" << *node; } trackViewerGone(node->getUUID()); } void OctreeServer::aboutToFinish() { qDebug() << qPrintable(_safeServerName) << "server STARTING about to finish..."; _isShuttingDown = true; qDebug() << qPrintable(_safeServerName) << "inform Octree Inbound Packet Processor that we are shutting down..."; // we're going down - set the NodeList linkedDataCallback to nullptr so we do not create any more OctreeQueryNode objects. // This ensures that we don't get any more newly connecting nodes DependencyManager::get<NodeList>()->linkedDataCreateCallback = nullptr; if (_octreeInboundPacketProcessor) { _octreeInboundPacketProcessor->terminating(); } // Shut down all the send threads for (auto& it : _sendThreads) { auto& sendThread = *it.second; sendThread.setIsShuttingDown(); sendThread.terminate(); } // Clear will destruct all the unique_ptr to OctreeSendThreads which will call the GenericThread's dtor // which waits on the thread to be done before returning _sendThreads.clear(); // Cleans up all the send threads. if (_persistManager) { _persistThread.quit(); } qDebug() << qPrintable(_safeServerName) << "server ENDING about to finish..."; } QString OctreeServer::getUptime() { QString formattedUptime; quint64 now = usecTimestampNow(); const int USECS_PER_MSEC = 1000; quint64 msecsElapsed = (now - _startedUSecs) / USECS_PER_MSEC; const int MSECS_PER_SEC = 1000; const int SECS_PER_MIN = 60; const int MIN_PER_HOUR = 60; const int MSECS_PER_MIN = MSECS_PER_SEC * SECS_PER_MIN; float seconds = (msecsElapsed % MSECS_PER_MIN)/(float)MSECS_PER_SEC; int minutes = (msecsElapsed/(MSECS_PER_MIN)) % MIN_PER_HOUR; int hours = (msecsElapsed/(MSECS_PER_MIN * MIN_PER_HOUR)); if (hours > 0) { formattedUptime += QString("%1 hour").arg(hours); if (hours > 1) { formattedUptime += QString("s"); } } if (minutes > 0) { if (hours > 0) { formattedUptime += QString(" "); } formattedUptime += QString("%1 minute").arg(minutes); if (minutes > 1) { formattedUptime += QString("s"); } } if (seconds > 0) { if (hours > 0 || minutes > 0) { formattedUptime += QString(" "); } formattedUptime += QString().sprintf("%.3f seconds", (double)seconds); } return formattedUptime; } QString OctreeServer::getFileLoadTime() { QString result; if (isInitialLoadComplete()) { const int USECS_PER_MSEC = 1000; const int MSECS_PER_SEC = 1000; const int SECS_PER_MIN = 60; const int MIN_PER_HOUR = 60; const int MSECS_PER_MIN = MSECS_PER_SEC * SECS_PER_MIN; quint64 msecsElapsed = getLoadElapsedTime() / USECS_PER_MSEC;; float seconds = (msecsElapsed % MSECS_PER_MIN)/(float)MSECS_PER_SEC; int minutes = (msecsElapsed/(MSECS_PER_MIN)) % MIN_PER_HOUR; int hours = (msecsElapsed/(MSECS_PER_MIN * MIN_PER_HOUR)); if (hours > 0) { result += QString("%1 hour").arg(hours); if (hours > 1) { result += QString("s"); } } if (minutes > 0) { if (hours > 0) { result += QString(" "); } result += QString("%1 minute").arg(minutes); if (minutes > 1) { result += QString("s"); } } if (seconds >= 0) { if (hours > 0 || minutes > 0) { result += QString(" "); } result += QString().sprintf("%.3f seconds", (double)seconds); } } else { result = "Not yet loaded..."; } return result; } QString OctreeServer::getConfiguration() { QString result; for (int i = 1; i < _argc; i++) { result += _argv[i] + QString(" "); } return result; } QString OctreeServer::getStatusLink() { QString result; if (_statusPort > 0) { QString detailedStats= QString("http://") + _statusHost + QString(":%1").arg(_statusPort); result = "<a href='" + detailedStats + "'>"+detailedStats+"</a>"; } else { result = "Status port not enabled."; } return result; } void OctreeServer::sendStatsPacket() { // Stats Array 1 QJsonObject threadsStats; quint64 oneSecondAgo = usecTimestampNow() - USECS_PER_SECOND; threadsStats["1. processing"] = (double)howManyThreadsDidProcess(oneSecondAgo); threadsStats["2. packetDistributor"] = (double)howManyThreadsDidPacketDistributor(oneSecondAgo); threadsStats["3. handlePacektSend"] = (double)howManyThreadsDidHandlePacketSend(oneSecondAgo); threadsStats["4. writeDatagram"] = (double)howManyThreadsDidCallWriteDatagram(oneSecondAgo); QJsonObject statsArray1; statsArray1["1. configuration"] = getConfiguration(); statsArray1["2. detailed_stats_url"] = getStatusLink(); statsArray1["3. uptime"] = getUptime(); statsArray1["4. persistFileLoadTime"] = getFileLoadTime(); statsArray1["5. clients"] = getCurrentClientCount(); statsArray1["6. threads"] = threadsStats; // Octree Stats QJsonObject octreeStats; octreeStats["1. elementCount"] = (double)OctreeElement::getNodeCount(); octreeStats["2. internalElementCount"] = (double)OctreeElement::getInternalNodeCount(); octreeStats["3. leafElementCount"] = (double)OctreeElement::getLeafNodeCount(); // Stats Object 2 QJsonObject dataObject1; dataObject1["1. totalPackets"] = (double)OctreeSendThread::_totalPackets; dataObject1["2. totalBytes"] = (double)OctreeSendThread::_totalBytes; dataObject1["3. totalBytesWasted"] = (double)OctreeSendThread::_totalWastedBytes; dataObject1["4. totalBytesOctalCodes"] = (double)OctreePacketData::getTotalBytesOfOctalCodes(); dataObject1["5. totalBytesBitMasks"] = (double)OctreePacketData::getTotalBytesOfBitMasks(); dataObject1["6. totalBytesBitMasks"] = (double)OctreePacketData::getTotalBytesOfColor(); QJsonObject timingArray1; timingArray1["1. avgLoopTime"] = getAverageLoopTime(); timingArray1["2. avgInsideTime"] = getAverageInsideTime(); timingArray1["3. avgTreeTraverseTime"] = getAverageTreeTraverseTime(); timingArray1["4. avgEncodeTime"] = getAverageEncodeTime(); timingArray1["5. avgCompressAndWriteTime"] = getAverageCompressAndWriteTime(); timingArray1["6. avgSendTime"] = getAveragePacketSendingTime(); timingArray1["7. nodeWaitTime"] = getAverageNodeWaitTime(); QJsonObject statsObject2; statsObject2["data"] = dataObject1; statsObject2["timing"] = timingArray1; QJsonObject dataArray2; QJsonObject timingArray2; // Stats Object 3 if (_octreeInboundPacketProcessor) { dataArray2["1. packetQueue"] = (double)_octreeInboundPacketProcessor->packetsToProcessCount(); dataArray2["2. totalPackets"] = (double)_octreeInboundPacketProcessor->getTotalPacketsProcessed(); dataArray2["3. totalElements"] = (double)_octreeInboundPacketProcessor->getTotalElementsProcessed(); timingArray2["1. avgTransitTimePerPacket"] = (double)_octreeInboundPacketProcessor->getAverageTransitTimePerPacket(); timingArray2["2. avgProcessTimePerPacket"] = (double)_octreeInboundPacketProcessor->getAverageProcessTimePerPacket(); timingArray2["3. avgLockWaitTimePerPacket"] = (double)_octreeInboundPacketProcessor->getAverageLockWaitTimePerPacket(); timingArray2["4. avgProcessTimePerElement"] = (double)_octreeInboundPacketProcessor->getAverageProcessTimePerElement(); timingArray2["5. avgLockWaitTimePerElement"] = (double)_octreeInboundPacketProcessor->getAverageLockWaitTimePerElement(); } QJsonObject statsObject3; statsObject3["data"] = dataArray2; statsObject3["timing"] = timingArray2; // Merge everything QJsonObject jsonArray; jsonArray["1. misc"] = statsArray1; jsonArray["2. octree"] = octreeStats; jsonArray["3. outbound"] = statsObject2; jsonArray["4. inbound"] = statsObject3; QJsonObject statsObject; statsObject[QString(getMyServerName()) + "Server"] = jsonArray; addPacketStatsAndSendStatsPacket(statsObject); } QMap<OctreeSendThread*, quint64> OctreeServer::_threadsDidProcess; QMap<OctreeSendThread*, quint64> OctreeServer::_threadsDidPacketDistributor; QMap<OctreeSendThread*, quint64> OctreeServer::_threadsDidHandlePacketSend; QMap<OctreeSendThread*, quint64> OctreeServer::_threadsDidCallWriteDatagram; QMutex OctreeServer::_threadsDidProcessMutex; QMutex OctreeServer::_threadsDidPacketDistributorMutex; QMutex OctreeServer::_threadsDidHandlePacketSendMutex; QMutex OctreeServer::_threadsDidCallWriteDatagramMutex; void OctreeServer::didProcess(OctreeSendThread* thread) { QMutexLocker locker(&_threadsDidProcessMutex); _threadsDidProcess[thread] = usecTimestampNow(); } void OctreeServer::didPacketDistributor(OctreeSendThread* thread) { QMutexLocker locker(&_threadsDidPacketDistributorMutex); _threadsDidPacketDistributor[thread] = usecTimestampNow(); } void OctreeServer::didHandlePacketSend(OctreeSendThread* thread) { QMutexLocker locker(&_threadsDidHandlePacketSendMutex); _threadsDidHandlePacketSend[thread] = usecTimestampNow(); } void OctreeServer::didCallWriteDatagram(OctreeSendThread* thread) { QMutexLocker locker(&_threadsDidCallWriteDatagramMutex); _threadsDidCallWriteDatagram[thread] = usecTimestampNow(); } void OctreeServer::stopTrackingThread(OctreeSendThread* thread) { { QMutexLocker locker(&_threadsDidProcessMutex); _threadsDidProcess.remove(thread); } { QMutexLocker locker(&_threadsDidPacketDistributorMutex); _threadsDidPacketDistributor.remove(thread); } { QMutexLocker locker(&_threadsDidHandlePacketSendMutex); _threadsDidHandlePacketSend.remove(thread); } { QMutexLocker locker(&_threadsDidCallWriteDatagramMutex); _threadsDidCallWriteDatagram.remove(thread); } } int howManyThreadsDidSomething(QMutex& mutex, QMap<OctreeSendThread*, quint64>& something, quint64 since) { int count = 0; if (mutex.tryLock()) { if (since == 0) { count = something.size(); } else { QMap<OctreeSendThread*, quint64>::const_iterator i = something.constBegin(); while (i != something.constEnd()) { if (i.value() > since) { count++; } ++i; } } mutex.unlock(); } return count; } int OctreeServer::howManyThreadsDidProcess(quint64 since) { return howManyThreadsDidSomething(_threadsDidProcessMutex, _threadsDidProcess, since); } int OctreeServer::howManyThreadsDidPacketDistributor(quint64 since) { return howManyThreadsDidSomething(_threadsDidPacketDistributorMutex, _threadsDidPacketDistributor, since); } int OctreeServer::howManyThreadsDidHandlePacketSend(quint64 since) { return howManyThreadsDidSomething(_threadsDidHandlePacketSendMutex, _threadsDidHandlePacketSend, since); } int OctreeServer::howManyThreadsDidCallWriteDatagram(quint64 since) { return howManyThreadsDidSomething(_threadsDidCallWriteDatagramMutex, _threadsDidCallWriteDatagram, since); }
46.976463
138
0.635056
[ "object" ]
80e5f57eb39b60baf3a0ce424e3127d967dc7035
17,295
cpp
C++
Adafruit_GPS.cpp
srob1/Adafruit_GPS
e214a45ed6bd974adf71f3fb91586facb327eaf8
[ "BSD-3-Clause" ]
null
null
null
Adafruit_GPS.cpp
srob1/Adafruit_GPS
e214a45ed6bd974adf71f3fb91586facb327eaf8
[ "BSD-3-Clause" ]
null
null
null
Adafruit_GPS.cpp
srob1/Adafruit_GPS
e214a45ed6bd974adf71f3fb91586facb327eaf8
[ "BSD-3-Clause" ]
null
null
null
/**************************************************************************/ /*! @file Adafruit_GPS.cpp @mainpage Adafruit Ultimate GPS Breakout @section intro Introduction This is the Adafruit GPS library - the ultimate GPS library for the ultimate GPS module! Tested and works great with the Adafruit Ultimate GPS module using MTK33x9 chipset ------> http://www.adafruit.com/products/746 Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! @section author Author Written by Limor Fried/Ladyada for Adafruit Industries. @section license License BSD license, check license.txt for more information All text above must be included in any redistribution */ /**************************************************************************/ #if (defined(__AVR__) || defined(ESP8266)) && defined(USE_SW_SERIAL) // Only include software serial on AVR platforms and ESP8266 (i.e. not on Due). #include <SoftwareSerial.h> #endif #include <Adafruit_GPS.h> #define MAXLINELENGTH 120 ///< how long are max NMEA lines to parse? volatile char line1[MAXLINELENGTH]; ///< We double buffer: read one line in and leave one for the main program volatile char line2[MAXLINELENGTH]; ///< Second buffer volatile uint8_t lineidx=0; ///< our index into filling the current line volatile char *currentline; ///< Pointer to current line buffer volatile char *lastline; ///< Pointer to previous line buffer volatile boolean recvdflag; ///< Received flag volatile boolean inStandbyMode; ///< In standby flag /**************************************************************************/ /*! @brief Parse a NMEA string @param nmea Pointer to the NMEA string @return True if we parsed it, false if it has an invalid checksum or invalid data */ /**************************************************************************/ boolean Adafruit_GPS::parse(char *nmea) { // do checksum check // first look if we even have one if (nmea[strlen(nmea)-4] == '*') { uint16_t sum = parseHex(nmea[strlen(nmea)-3]) * 16; sum += parseHex(nmea[strlen(nmea)-2]); // check checksum for (uint8_t i=2; i < (strlen(nmea)-4); i++) { sum ^= nmea[i]; } if (sum != 0) { // bad checksum :( return false; } } int32_t degree; long minutes; char degreebuff[10]; // look for a few common sentences if (strstr(nmea, "$GPGGA")) { // found GGA char *p = nmea; // get time p = strchr(p, ',')+1; float timef = atof(p); uint32_t time = timef; hour = time / 10000; minute = (time % 10000) / 100; seconds = (time % 100); milliseconds = fmod(timef, 1.0) * 1000; // parse out latitude p = strchr(p, ',')+1; if (',' != *p) { strncpy(degreebuff, p, 2); p += 2; degreebuff[2] = '\0'; degree = atol(degreebuff) * 10000000; strncpy(degreebuff, p, 2); // minutes p += 3; // skip decimal point strncpy(degreebuff + 2, p, 4); degreebuff[6] = '\0'; minutes = 50 * atol(degreebuff) / 3; latitude_fixed = degree + minutes; latitude = degree / 100000 + minutes * 0.000006F; latitudeDegrees = (latitude-100*int(latitude/100))/60.0; latitudeDegrees += int(latitude/100); } p = strchr(p, ',')+1; if (',' != *p) { if (p[0] == 'S') latitudeDegrees *= -1.0; if (p[0] == 'N') lat = 'N'; else if (p[0] == 'S') lat = 'S'; else if (p[0] == ',') lat = 0; else return false; } // parse out longitude p = strchr(p, ',')+1; if (',' != *p) { strncpy(degreebuff, p, 3); p += 3; degreebuff[3] = '\0'; degree = atol(degreebuff) * 10000000; strncpy(degreebuff, p, 2); // minutes p += 3; // skip decimal point strncpy(degreebuff + 2, p, 4); degreebuff[6] = '\0'; minutes = 50 * atol(degreebuff) / 3; longitude_fixed = degree + minutes; longitude = degree / 100000 + minutes * 0.000006F; longitudeDegrees = (longitude-100*int(longitude/100))/60.0; longitudeDegrees += int(longitude/100); } p = strchr(p, ',')+1; if (',' != *p) { if (p[0] == 'W') longitudeDegrees *= -1.0; if (p[0] == 'W') lon = 'W'; else if (p[0] == 'E') lon = 'E'; else if (p[0] == ',') lon = 0; else return false; } p = strchr(p, ',')+1; if (',' != *p) { fixquality = atoi(p); } p = strchr(p, ',')+1; if (',' != *p) { satellites = atoi(p); } p = strchr(p, ',')+1; if (',' != *p) { HDOP = atof(p); } p = strchr(p, ',')+1; if (',' != *p) { altitude = atof(p); } p = strchr(p, ',')+1; p = strchr(p, ',')+1; if (',' != *p) { geoidheight = atof(p); } return true; } if (strstr(nmea, "$GPRMC")) { // found RMC char *p = nmea; // get time p = strchr(p, ',')+1; float timef = atof(p); uint32_t time = timef; hour = time / 10000; minute = (time % 10000) / 100; seconds = (time % 100); milliseconds = fmod(timef, 1.0) * 1000; p = strchr(p, ',')+1; // Serial.println(p); if (p[0] == 'A') fix = true; else if (p[0] == 'V') fix = false; else return false; // parse out latitude p = strchr(p, ',')+1; if (',' != *p) { strncpy(degreebuff, p, 2); p += 2; degreebuff[2] = '\0'; long degree = atol(degreebuff) * 10000000; strncpy(degreebuff, p, 2); // minutes p += 3; // skip decimal point strncpy(degreebuff + 2, p, 4); degreebuff[6] = '\0'; long minutes = 50 * atol(degreebuff) / 3; latitude_fixed = degree + minutes; latitude = degree / 100000 + minutes * 0.000006F; latitudeDegrees = (latitude-100*int(latitude/100))/60.0; latitudeDegrees += int(latitude/100); } p = strchr(p, ',')+1; if (',' != *p) { if (p[0] == 'S') latitudeDegrees *= -1.0; if (p[0] == 'N') lat = 'N'; else if (p[0] == 'S') lat = 'S'; else if (p[0] == ',') lat = 0; else return false; } // parse out longitude p = strchr(p, ',')+1; if (',' != *p) { strncpy(degreebuff, p, 3); p += 3; degreebuff[3] = '\0'; degree = atol(degreebuff) * 10000000; strncpy(degreebuff, p, 2); // minutes p += 3; // skip decimal point strncpy(degreebuff + 2, p, 4); degreebuff[6] = '\0'; minutes = 50 * atol(degreebuff) / 3; longitude_fixed = degree + minutes; longitude = degree / 100000 + minutes * 0.000006F; longitudeDegrees = (longitude-100*int(longitude/100))/60.0; longitudeDegrees += int(longitude/100); } p = strchr(p, ',')+1; if (',' != *p) { if (p[0] == 'W') longitudeDegrees *= -1.0; if (p[0] == 'W') lon = 'W'; else if (p[0] == 'E') lon = 'E'; else if (p[0] == ',') lon = 0; else return false; } // speed p = strchr(p, ',')+1; if (',' != *p) { speed = atof(p); } // angle p = strchr(p, ',')+1; if (',' != *p) { angle = atof(p); } p = strchr(p, ',')+1; if (',' != *p) { uint32_t fulldate = atof(p); day = fulldate / 10000; month = (fulldate % 10000) / 100; year = (fulldate % 100); } // we dont parse the remaining, yet! return true; } return false; } /**************************************************************************/ /*! @brief Read one character from the GPS device @return The character that we received, or 0 if nothing was available */ /**************************************************************************/ char Adafruit_GPS::read(void) { char c = 0; if (paused) return c; #if (defined(__AVR__) || defined(ESP8266)) && defined(USE_SW_SERIAL) if(gpsSwSerial) { if(!gpsSwSerial->available()) return c; c = gpsSwSerial->read(); } else #endif { if(!gpsHwSerial->available()) return c; c = gpsHwSerial->read(); } //Serial.print(c); // if (c == '$') { //please don't eat the dollar sign - rdl 9/15/14 // currentline[lineidx] = 0; // lineidx = 0; // } if (c == '\n') { currentline[lineidx] = 0; if (currentline == line1) { currentline = line2; lastline = line1; } else { currentline = line1; lastline = line2; } //Serial.println("----"); //Serial.println((char *)lastline); //Serial.println("----"); lineidx = 0; recvdflag = true; } currentline[lineidx++] = c; if (lineidx >= MAXLINELENGTH) lineidx = MAXLINELENGTH-1; return c; } /**************************************************************************/ /*! @brief Constructor when using SoftwareSerial @param ser Pointer to SoftwareSerial device */ /**************************************************************************/ #if (defined(__AVR__) || defined(ESP8266)) && defined(USE_SW_SERIAL) Adafruit_GPS::Adafruit_GPS(SoftwareSerial *ser) { common_init(); // Set everything to common state, then... gpsSwSerial = ser; // ...override gpsSwSerial with value passed. } #endif /**************************************************************************/ /*! @brief Constructor when using HardwareSerial @param ser Pointer to a HardwareSerial object */ /**************************************************************************/ Adafruit_GPS::Adafruit_GPS(HardwareSerial *ser) { common_init(); // Set everything to common state, then... gpsHwSerial = ser; // ...override gpsHwSerial with value passed. } /**************************************************************************/ /*! @brief Initialization code used by all constructor types */ /**************************************************************************/ void Adafruit_GPS::common_init(void) { #if (defined(__AVR__) || defined(ESP8266)) && defined(USE_SW_SERIAL) gpsSwSerial = NULL; // Set both to NULL, then override correct #endif gpsHwSerial = NULL; // port pointer in corresponding constructor recvdflag = false; paused = false; lineidx = 0; currentline = line1; lastline = line2; hour = minute = seconds = year = month = day = fixquality = satellites = 0; // uint8_t lat = lon = mag = 0; // char fix = false; // boolean milliseconds = 0; // uint16_t latitude = longitude = geoidheight = altitude = speed = angle = magvariation = HDOP = 0.0; // float } /**************************************************************************/ /*! @brief Start the HW or SW serial port @param baud Baud rate */ /**************************************************************************/ void Adafruit_GPS::begin(uint32_t baud) { #if (defined(__AVR__) || defined(ESP8266)) && defined(USE_SW_SERIAL) if(gpsSwSerial) gpsSwSerial->begin(baud); else #endif gpsHwSerial->begin(baud); delay(10); } /**************************************************************************/ /*! @brief Send a command to the GPS device @param str Pointer to a string holding the command to send */ /**************************************************************************/ void Adafruit_GPS::sendCommand(const char *str) { #if (defined(__AVR__) || defined(ESP8266)) && defined(USE_SW_SERIAL) if(gpsSwSerial) gpsSwSerial->println(str); else #endif gpsHwSerial->println(str); } /**************************************************************************/ /*! @brief Check to see if a new NMEA line has been received @return True if received, false if not */ /**************************************************************************/ boolean Adafruit_GPS::newNMEAreceived(void) { return recvdflag; } /**************************************************************************/ /*! @brief Pause/unpause receiving new data @param p True = pause, false = unpause */ /**************************************************************************/ void Adafruit_GPS::pause(boolean p) { paused = p; } /**************************************************************************/ /*! @brief Returns the last NMEA line received and unsets the received flag @return Pointer to the last line string */ /**************************************************************************/ char *Adafruit_GPS::lastNMEA(void) { recvdflag = false; return (char *)lastline; } /**************************************************************************/ /*! @brief Parse a hex character and return the appropriate decimal value @param c Hex character, e.g. '0' or 'B' @return Integer value of the hex character. Returns 0 if c is not a proper character */ /**************************************************************************/ // read a Hex value and return the decimal equivalent uint8_t Adafruit_GPS::parseHex(char c) { if (c < '0') return 0; if (c <= '9') return c - '0'; if (c < 'A') return 0; if (c <= 'F') return (c - 'A')+10; // if (c > 'F') return 0; } /**************************************************************************/ /*! @brief Wait for a specified sentence from the device @param wait4me Pointer to a string holding the desired response @param max How long to wait, default is MAXWAITSENTENCE @return True if we got what we wanted, false otherwise */ /**************************************************************************/ boolean Adafruit_GPS::waitForSentence(const char *wait4me, uint8_t max) { char str[20]; uint8_t i=0; while (i < max) { read(); if (newNMEAreceived()) { char *nmea = lastNMEA(); strncpy(str, nmea, 20); str[19] = 0; i++; if (strstr(str, wait4me)) return true; } } return false; } /**************************************************************************/ /*! @brief Start the LOCUS logger @return True on success, false if it failed */ /**************************************************************************/ boolean Adafruit_GPS::LOCUS_StartLogger(void) { sendCommand(PMTK_LOCUS_STARTLOG); recvdflag = false; return waitForSentence(PMTK_LOCUS_STARTSTOPACK); } /**************************************************************************/ /*! @brief Stop the LOCUS logger @return True on success, false if it failed */ /**************************************************************************/ boolean Adafruit_GPS::LOCUS_StopLogger(void) { sendCommand(PMTK_LOCUS_STOPLOG); recvdflag = false; return waitForSentence(PMTK_LOCUS_STARTSTOPACK); } /**************************************************************************/ /*! @brief Read the logger status @return True if we read the data, false if there was no response */ /**************************************************************************/ boolean Adafruit_GPS::LOCUS_ReadStatus(void) { sendCommand(PMTK_LOCUS_QUERY_STATUS); if (! waitForSentence("$PMTKLOG")) return false; char *response = lastNMEA(); uint16_t parsed[10]; uint8_t i; for (i=0; i<10; i++) parsed[i] = -1; response = strchr(response, ','); for (i=0; i<10; i++) { if (!response || (response[0] == 0) || (response[0] == '*')) break; response++; parsed[i]=0; while ((response[0] != ',') && (response[0] != '*') && (response[0] != 0)) { parsed[i] *= 10; char c = response[0]; if (isDigit(c)) parsed[i] += c - '0'; else parsed[i] = c; response++; } } LOCUS_serial = parsed[0]; LOCUS_type = parsed[1]; if (isAlpha(parsed[2])) { parsed[2] = parsed[2] - 'a' + 10; } LOCUS_mode = parsed[2]; LOCUS_config = parsed[3]; LOCUS_interval = parsed[4]; LOCUS_distance = parsed[5]; LOCUS_speed = parsed[6]; LOCUS_status = !parsed[7]; LOCUS_records = parsed[8]; LOCUS_percent = parsed[9]; return true; } /**************************************************************************/ /*! @brief Standby Mode Switches @return False if already in standby, true if it entered standby */ /**************************************************************************/ boolean Adafruit_GPS::standby(void) { if (inStandbyMode) { return false; // Returns false if already in standby mode, so that you do not wake it up by sending commands to GPS } else { inStandbyMode = true; sendCommand(PMTK_STANDBY); //return waitForSentence(PMTK_STANDBY_SUCCESS); // don't seem to be fast enough to catch the message, or something else just is not working return true; } } /**************************************************************************/ /*! @brief Wake the sensor up @return True if woken up, false if not in standby or failed to wake */ /**************************************************************************/ boolean Adafruit_GPS::wakeup(void) { if (inStandbyMode) { inStandbyMode = false; sendCommand(""); // send byte to wake it up return waitForSentence(PMTK_AWAKE); } else { return false; // Returns false if not in standby mode, nothing to wakeup } }
28.167752
144
0.494131
[ "object" ]
80e8370b93512f01d5bf0015ffa1557818cab09b
30,941
cpp
C++
tests/benchmark.cpp
sharm294/shoal
db7dd08a70882585fb9740a39b57b4b7a48b3081
[ "MIT" ]
1
2021-04-12T06:41:33.000Z
2021-04-12T06:41:33.000Z
tests/benchmark.cpp
UofT-HPRC/shoal
db7dd08a70882585fb9740a39b57b4b7a48b3081
[ "MIT" ]
null
null
null
tests/benchmark.cpp
UofT-HPRC/shoal
db7dd08a70882585fb9740a39b57b4b7a48b3081
[ "MIT" ]
null
null
null
// #ifndef __HLS__ // #define __HLS__ // #endif #include <cstddef> // needed to resolve ::max_align_t errors #include <cstring> #include "benchmark.hpp" #include "ap_utils.h" #ifndef __HLS__ #include <iostream> #include <fstream> // To use ifstream #endif enum instruction_t{ load, short_latency, medium_latency, long_latency, barrier_send, recv_medium, end, barrier_wait, long_fifo_latency, medium_fifo_latency, read_local, recv_time, add_label, short_throughput, medium_throughput, long_throughput, medium_fifo_throughput, long_fifo_throughput, strided_latency, strided_throughput, vector_latency, vector_throughput, load_stride, load_vector, wait_counter, busy_loop, send_pilot, recv_pilot} current_instruction; #ifndef __HLS__ auto start_timer(){ return std::chrono::high_resolution_clock::now(); } void stop_timer(shoal::kernel* kernel, gc_AMToken_t token, std::chrono::high_resolution_clock::time_point timer){ auto now = std::chrono::high_resolution_clock::now(); std::chrono::duration<double> elapsed = now - timer; auto elapsed_ns = std::chrono::duration_cast<std::chrono::nanoseconds>(elapsed).count(); word_t time = (word_t)(elapsed_ns / 6.4); // convert to 156.25 MHz (6.4ns) cycles kernel->sendMediumAM_normal(0, token, H_EMPTY, 0, NULL, 8); kernel->sendPayload(0, time, true); // assume always send to kernel 0 kernel->wait_reply(1); } #else // this function, if inlined, or placed in code, behaves badly in Verilog. In // simulation, it does do three writes but they appear as burst writes to the wrong // addresses. Doing it this way seems to work properly. Tested in HLS 2018.1 void start_timer(volatile int* axi_timer){ axi_timer[0] = 0x0; // stop timer axi_timer[1] = 0; // set load register to 0 axi_timer[0] = 0x20; // load timer with load register axi_timer[0] = 0x80; // start timer } void stop_timer(shoal::kernel* kernel, gc_AMToken_t token, volatile int* axi_timer){ #pragma HLS INLINE axi_timer[0] = 0x0; // stop timer word_t time = *(axi_timer + 0x2); // read timer count word_t dumb = *(axi_timer); if(dumb != 0xFF){ kernel->sendMediumAM_normal(0, token, H_EMPTY, 0, NULL, 8); kernel->sendPayload(0, time, true); // assume always send to kernel 0 } // axi_timer[0] = 0x0; // stop timer kernel->wait_reply(1, axi_timer); } #endif #ifndef __HLS__ void print_time(std::chrono::high_resolution_clock::time_point timer, std::string label){ auto now = std::chrono::high_resolution_clock::now(); std::chrono::duration<double> elapsed = now - timer; auto elapsed_ns = std::chrono::duration_cast<std::chrono::nanoseconds>(elapsed).count(); std::cout << label << ":" << elapsed_ns << std::endl; } #endif extern "C"{ void benchmark( short id, galapagos::interface <word_t> * in, galapagos::interface<word_t> * out, #ifdef __HLS__ volatile int * handler_ctrl, volatile int * axi_timer, #else int * instr_mem #endif #ifdef __HLS__ int * instr_mem, word_t * local_mem #endif ){ #pragma HLS INTERFACE axis port=in #pragma HLS INTERFACE axis port=out #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_stable port=id #pragma HLS INTERFACE m_axi port=handler_ctrl depth=4096 offset=0 #pragma HLS INTERFACE m_axi port=axi_timer depth=4096 offset=0 #pragma HLS INTERFACE m_axi port=instr_mem depth=4096 offset=0 #pragma HLS INTERFACE m_axi port=local_mem depth=4096 offset=0 #ifdef __HLS__ shoal::kernel kernel(id, KERNEL_NUM_TOTAL, in, out, handler_ctrl); #else shoal::kernel kernel(id, KERNEL_NUM_TOTAL, in, out); #endif kernel.init(); #ifndef __HLS__ kernel.attach(nullptr, 0, SEGMENT_SIZE); #endif galapagos::stream_packet <word_t> axis_word; int pc = 0; gc_AMhandler_t AMhandler = H_EMPTY; gc_AMargs_t AMargs = 0; word_t handler_args [16]; gc_payloadSize_t payloadSize = 0; gc_AMsrc_t src_addr = 0; gc_AMdest_t dst_addr = 0; int i; short addr; instruction_t instruction; bool loop = true; const int AMdst = 2; word_t loopCount = 1; gc_stride_t src_stride = -1; gc_strideBlockSize_t src_blk_size = -1; gc_strideBlockNum_t src_blk_num = -1; gc_stride_t dst_stride = -1; gc_strideBlockSize_t dst_blk_size = -1; gc_strideBlockNum_t dst_blk_num = -1; gc_srcVectorNum_t srcVectorCount = -1; gc_dstVectorNum_t dstVectorCount = -1; gc_vectorSize_t srcSize[16]; word_t src_addrs[16]; gc_vectorSize_t dstSize[16]; word_t dst_addrs[16]; while(loop){ instruction = (instruction_t) *(instr_mem + pc++); // pc++; switch (instruction){ case load:{ AMhandler = (gc_AMhandler_t) *(instr_mem + (pc++)); AMargs = (gc_AMargs_t) *(instr_mem + (pc++)); for(i = 0; i < AMargs; i++){ handler_args[i] = (word_t) *(instr_mem + (pc++)); } payloadSize = (gc_payloadSize_t) *(instr_mem + (pc++)); src_addr = (gc_AMsrc_t) *(instr_mem + (pc++)); dst_addr = (gc_AMdst_t) *(instr_mem + (pc++)); // pc++; break; } case load_stride:{ src_stride = (gc_stride_t) *(instr_mem + (pc++)); src_blk_size = (gc_strideBlockSize_t) *(instr_mem + (pc++)); src_blk_num = (gc_strideBlockNum_t) *(instr_mem + (pc++)); dst_stride = (gc_stride_t) *(instr_mem + (pc++)); dst_blk_size = (gc_strideBlockSize_t) *(instr_mem + (pc++)); dst_blk_num = (gc_strideBlockNum_t) *(instr_mem + (pc++)); break; } case load_vector:{ srcVectorCount = (gc_srcVectorNum_t) *(instr_mem + (pc++)); dstVectorCount = (gc_dstVectorNum_t) *(instr_mem + (pc++)); for(i = 0; i < srcVectorCount; i++){ srcSize[i] = (gc_vectorSize_t) *(instr_mem + (pc++)); } for(i = 0; i < srcVectorCount; i++){ src_addrs[i] = (word_t) *(instr_mem + (pc++)); } for(i = 0; i < dstVectorCount; i++){ dstSize[i] = (gc_vectorSize_t) *(instr_mem + (pc++)); } for(i = 0; i < dstVectorCount; i++){ dst_addrs[i] = (word_t) *(instr_mem + (pc++)); } break; } case short_latency:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; for(i = 0; i < loopCount; i++){ #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif kernel.sendShortAM_normal(AMdst, 0xff0, AMhandler, AMargs, handler_args); // { // #pragma HLS INLINE REGION // kernel.wait_reply(1); // } // kernel.wait_reply(1); #ifndef __HLS__ kernel.wait_reply(1); stop_timer(&kernel, 0xab0, timer); #else kernel.wait_reply(1, axi_timer); stop_timer(&kernel, 0xab0, axi_timer); #endif } break; } case medium_latency:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; for(i = 0; i < loopCount; i++){ #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif kernel.sendMediumAM_normal(AMdst, 0xff1, AMhandler, AMargs, handler_args, payloadSize, src_addr); // kernel.wait_reply(1); #ifndef __HLS__ kernel.wait_reply(1); stop_timer(&kernel, 0xab1, timer); #else kernel.wait_reply(1, axi_timer); stop_timer(&kernel, 0xab1, axi_timer); #endif } break; } case medium_fifo_latency:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; word_t j = 0; for(i = 0; i < loopCount; i++){ #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif kernel.sendMediumAM_normal(AMdst, 0xff2, AMhandler, AMargs, handler_args, payloadSize); for (j = 0; j < payloadSize; j+=GC_DATA_BYTES){ kernel.sendPayload(AMdst, j, j == payloadSize - ((gc_payloadSize_t)GC_DATA_BYTES)); } // kernel.wait_reply(1); #ifndef __HLS__ kernel.wait_reply(1); stop_timer(&kernel, 0xab2, timer); #else kernel.wait_reply(1, axi_timer); stop_timer(&kernel, 0xab2, axi_timer); #endif } break; } case long_latency:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; for(i = 0; i < loopCount; i++){ #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif kernel.sendLongAM_normal(AMdst, 0xff3, AMhandler, AMargs, handler_args, payloadSize, src_addr, dst_addr); // auto tmp2 = std::chrono::high_resolution_clock::now(); // std::chrono::duration<double> elapsed = tmp2 - timer; // auto elapsed_ns = std::chrono::duration_cast<std::chrono::nanoseconds>(elapsed).count(); // word_t time = (word_t)(elapsed_ns / 6.4); // convert to 156.25 MHz (6.4ns) cycles // std::cout << "loop1: " << time << std::endl; // kernel.wait_reply(1); #ifndef __HLS__ kernel.wait_reply(1); stop_timer(&kernel, 0xab3, timer); #else kernel.wait_reply(1, axi_timer); stop_timer(&kernel, 0xab3, axi_timer); #endif } break; } case long_fifo_latency:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; word_t j = 0; for(i = 0; i < loopCount; i++){ #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif kernel.sendLongAM_normal(AMdst, 0xff4, AMhandler, AMargs, handler_args, payloadSize, dst_addr); for (j = 0; j < payloadSize; j+=GC_DATA_BYTES){ kernel.sendPayload(AMdst, j, j == payloadSize - ((gc_payloadSize_t)GC_DATA_BYTES)); } // { // doesn't work: the write happens all at one address instead of three // #pragma HLS INLINE REGION // kernel.wait_reply(1); // } // kernel.wait_reply(1); #ifndef __HLS__ kernel.wait_reply(1); stop_timer(&kernel, 0xab4, timer); #else kernel.wait_reply(1, axi_timer); stop_timer(&kernel, 0xab4, axi_timer); #endif } break; } case barrier_send:{ kernel.barrier_send(0); // assume always sending to kernel 0 // std::cout << "Barrier sent from kernel " << kernel.get_id() << "\n"; break; } case barrier_wait:{ kernel.barrier_wait(); // std::cout << "Barrier wait from kernel " << kernel.get_id() << "\n"; break; } case recv_medium:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; int j = 0; for(i = 0; i < loopCount; i++){ axis_word = in->read(); // read token for (j = 0; j < payloadSize; j+=GC_DATA_BYTES){ axis_word = in->read(); } } break; } case recv_time:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; for(i = 0; i < loopCount; i++){ axis_word = in->read(); axis_word = in->read(); #ifndef __HLS__ std::cout << "timing: " << axis_word.data << "\n"; #endif } break; } case read_local:{ #ifdef __HLS__ word_t addr = (word_t) *(instr_mem + (pc++)); word_t read_value = *(local_mem + addr); *(local_mem + addr + 1) = read_value; #endif break; } case add_label:{ instruction_t label = (instruction_t) *(instr_mem + (pc++)); word_t test_meta = (word_t) *(instr_mem + (pc++)); #ifndef __HLS__ std::string label_string; switch(label){ case short_latency: label_string = "short_latency_" + std::to_string(test_meta); break; case medium_latency: label_string = "medium_latency_" + std::to_string(test_meta); break; case long_latency: label_string = "long_latency_" + std::to_string(test_meta); break; case long_fifo_latency: label_string = "long-fifo_latency_" + std::to_string(test_meta); break; case medium_fifo_latency: label_string = "medium-fifo_latency_" + std::to_string(test_meta); break; case strided_latency: label_string = "strided_latency_" + std::to_string(test_meta); break; case vector_latency: label_string = "vector_latency_" + std::to_string(test_meta); break; case short_throughput: label_string = "short_throughput_" + std::to_string(test_meta); break; case medium_throughput: label_string = "medium_throughput_" + std::to_string(test_meta); break; case long_throughput: label_string = "long_throughput_" + std::to_string(test_meta); break; case long_fifo_throughput: label_string = "long-fifo_throughput_" + std::to_string(test_meta); break; case medium_fifo_throughput: label_string = "medium-fifo_throughput_" + std::to_string(test_meta); break; case strided_throughput: label_string = "strided_throughput_" + std::to_string(test_meta); break; case vector_throughput: label_string = "vector_throughput_" + std::to_string(test_meta); break; default: label_string = "null"; break; } std::cout << "test: " << label_string << "\n"; #endif break; } case short_throughput:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendShortAM_normal(AMdst, 0xff0, AMhandler, AMargs, handler_args); // sleep(0.001); } // kernel.wait_reply(loopCount); #ifndef __HLS__ kernel.wait_reply(loopCount); stop_timer(&kernel, 0xef0, timer); #else kernel.wait_reply(loopCount, axi_timer); stop_timer(&kernel, 0xef0, axi_timer); #endif #ifndef __HLS__ timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendShortAM_normal(AMdst, 0xff0, AMhandler, AMargs, handler_args); kernel.wait_reply(1); } #ifndef __HLS__ stop_timer(&kernel, 0xef0, timer); #else stop_timer(&kernel, 0xef0, axi_timer); #endif break; } case medium_throughput:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendMediumAM_normal(AMdst, 0xff1, AMhandler, AMargs, handler_args, payloadSize, src_addr); // sleep(0.001); } // kernel.wait_reply(loopCount); #ifndef __HLS__ kernel.wait_reply(loopCount); stop_timer(&kernel, 0xef1, timer); #else kernel.wait_reply(loopCount, axi_timer); stop_timer(&kernel, 0xef1, axi_timer); #endif #ifndef __HLS__ timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendMediumAM_normal(AMdst, 0xff1, AMhandler, AMargs, handler_args, payloadSize, src_addr); kernel.wait_reply(1); } #ifndef __HLS__ stop_timer(&kernel, 0xef1, timer); #else stop_timer(&kernel, 0xef1, axi_timer); #endif break; } case medium_fifo_throughput:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; word_t j = 0; #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendMediumAM_normal(AMdst, 0xff2, AMhandler, AMargs, handler_args, payloadSize); for (j = 0; j < payloadSize; j+=GC_DATA_BYTES){ kernel.sendPayload(AMdst, j, j == payloadSize - ((gc_payloadSize_t)GC_DATA_BYTES)); } // sleep(0.001); } // kernel.wait_reply(loopCount); #ifndef __HLS__ kernel.wait_reply(loopCount); stop_timer(&kernel, 0xef2, timer); #else kernel.wait_reply(loopCount, axi_timer); stop_timer(&kernel, 0xef2, axi_timer); #endif #ifndef __HLS__ timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendMediumAM_normal(AMdst, 0xff2, AMhandler, AMargs, handler_args, payloadSize); for (j = 0; j < payloadSize; j+=GC_DATA_BYTES){ kernel.sendPayload(AMdst, j, j == payloadSize - ((gc_payloadSize_t)GC_DATA_BYTES)); } kernel.wait_reply(1); } #ifndef __HLS__ stop_timer(&kernel, 0xef2, timer); #else stop_timer(&kernel, 0xef2, axi_timer); #endif break; } case long_throughput:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ // auto timer2 = start_timer(); kernel.sendLongAM_normal(AMdst, 0xff3, AMhandler, AMargs, handler_args, payloadSize, src_addr, dst_addr); // print_time(timer2, "kernel_send_0"); // for(int z = 0; z < 10000; z++){ // __asm__ __volatile__ ("" : "+g" (z) : : ); // } // sleep(0.001); } // std::cout << "mem:" << nodedata->mem_ready_barrier_cnt << std::endl; // auto timer2 = start_timer(); // kernel.wait_reply(loopCount); #ifndef __HLS__ kernel.wait_reply(loopCount); stop_timer(&kernel, 0xef3, timer); #else kernel.wait_reply(loopCount, axi_timer); stop_timer(&kernel, 0xef3, axi_timer); #endif #ifndef __HLS__ timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ // auto timer2 = start_timer(); kernel.sendLongAM_normal(AMdst, 0xff3, AMhandler, AMargs, handler_args, payloadSize, src_addr, dst_addr); // print_time(timer2, "kernel_send_1"); // timer2 = start_timer(); kernel.wait_reply(1); // print_time(timer2, "kernel_wait_1"); } #ifndef __HLS__ stop_timer(&kernel, 0xef3, timer); #else stop_timer(&kernel, 0xef3, axi_timer); #endif break; } case long_fifo_throughput:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; word_t j = 0; #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ // auto timer2 = start_timer(); kernel.sendLongAM_normal(AMdst, 0xff4, AMhandler, AMargs, handler_args, payloadSize, dst_addr); // print_time(timer2, "kernel_send_2_0"); // timer2 = start_timer(); for (j = 0; j < payloadSize; j+=GC_DATA_BYTES){ kernel.sendPayload(AMdst, j, j == payloadSize - ((gc_payloadSize_t)GC_DATA_BYTES)); } // sleep(0.001); // print_time(timer2, "kernel_send_2_1"); } // std::cout << "mem:" << nodedata->mem_ready_barrier_cnt << std::endl; // auto timer2 = start_timer(); // kernel.wait_reply(loopCount); #ifndef __HLS__ kernel.wait_reply(loopCount); stop_timer(&kernel, 0xef4, timer); #else kernel.wait_reply(loopCount, axi_timer); stop_timer(&kernel, 0xef4, axi_timer); #endif #ifndef __HLS__ timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ // auto timer2 = start_timer(); kernel.sendLongAM_normal(AMdst, 0xff4, AMhandler, AMargs, handler_args, payloadSize, dst_addr); // print_time(timer2, "kernel_send_3_0"); // timer2 = start_timer(); for (j = 0; j < payloadSize; j+=GC_DATA_BYTES){ kernel.sendPayload(AMdst, j, j == payloadSize - ((gc_payloadSize_t)GC_DATA_BYTES)); } // print_time(timer2, "kernel_send_3_1"); // timer2 = start_timer(); kernel.wait_reply(1); // print_time(timer2, "kernel_wait_3"); } #ifndef __HLS__ stop_timer(&kernel, 0xef4, timer); #else stop_timer(&kernel, 0xef4, axi_timer); #endif break; } case strided_latency:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; for(i = 0; i < loopCount; i++){ #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif kernel.sendLongStrideAM_normal(AMdst, 0xff5, AMhandler, AMargs, handler_args, payloadSize, src_stride, src_blk_size, src_blk_num, src_addr, dst_stride, dst_blk_size, dst_blk_num, dst_addr); // kernel.wait_reply(1); #ifndef __HLS__ kernel.wait_reply(1); stop_timer(&kernel, 0xab5, timer); #else kernel.wait_reply(1, axi_timer); stop_timer(&kernel, 0xab5, axi_timer); #endif } break; } case strided_throughput:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendLongStrideAM_normal(AMdst, 0xff5, AMhandler, AMargs, handler_args, payloadSize, src_stride, src_blk_size, src_blk_num, src_addr, dst_stride, dst_blk_size, dst_blk_num, dst_addr); // sleep(0.001); } // kernel.wait_reply(loopCount); #ifndef __HLS__ kernel.wait_reply(loopCount); stop_timer(&kernel, 0xab5, timer); #else kernel.wait_reply(loopCount, axi_timer); stop_timer(&kernel, 0xab5, axi_timer); #endif #ifndef __HLS__ timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendLongStrideAM_normal(AMdst, 0xff5, AMhandler, AMargs, handler_args, payloadSize, src_stride, src_blk_size, src_blk_num, src_addr, dst_stride, dst_blk_size, dst_blk_num, dst_addr); kernel.wait_reply(1); } #ifndef __HLS__ stop_timer(&kernel, 0xab5, timer); #else stop_timer(&kernel, 0xab5, axi_timer); #endif break; } case vector_latency:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; for(i = 0; i < loopCount; i++){ #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif kernel.sendLongVectorAM_normal(AMdst, 0xff6, AMhandler, AMargs, handler_args, payloadSize, srcVectorCount, dstVectorCount, srcSize, dstSize, src_addrs, dst_addrs); // kernel.wait_reply(1); #ifndef __HLS__ kernel.wait_reply(1); stop_timer(&kernel, 0xab6, timer); #else kernel.wait_reply(1, axi_timer); stop_timer(&kernel, 0xab6, axi_timer); #endif } break; } case vector_throughput:{ loopCount = (word_t) *(instr_mem + (pc++)); int i; #ifndef __HLS__ auto timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendLongVectorAM_normal(AMdst, 0xff6, AMhandler, AMargs, handler_args, payloadSize, srcVectorCount, dstVectorCount, srcSize, dstSize, src_addrs, dst_addrs); // sleep(0.001); } // kernel.wait_reply(loopCount); #ifndef __HLS__ kernel.wait_reply(loopCount); stop_timer(&kernel, 0xab6, timer); #else kernel.wait_reply(loopCount, axi_timer); stop_timer(&kernel, 0xab6, axi_timer); #endif #ifndef __HLS__ timer = start_timer(); #else start_timer(axi_timer); #endif for(i = 0; i < loopCount; i++){ kernel.sendLongVectorAM_normal(AMdst, 0xff6, AMhandler, AMargs, handler_args, payloadSize, srcVectorCount, dstVectorCount, srcSize, dstSize, src_addrs, dst_addrs); kernel.wait_reply(1); } #ifndef __HLS__ stop_timer(&kernel, 0xab6, timer); #else stop_timer(&kernel, 0xab6, axi_timer); #endif break; } case wait_counter:{ word_t value = (word_t) *(instr_mem + (pc++)); kernel.wait_counter(value); } case busy_loop:{ loopCount = (word_t) *(instr_mem + (pc++)); int i = 0; int value = 0; while(i < loopCount && value != 1){ #ifdef __HLS__ value = (axi_timer[0]) & 0xFFFFFFFF; #endif i += 1; } break; } case send_pilot:{ gc_AMdst_t dest = (word_t) *(instr_mem + (pc++)); word_t j = 0; kernel.sendMediumAM_normal(dest, 0xbad, AMhandler, AMargs, handler_args, payloadSize); for (j = 0; j < payloadSize; j+=GC_DATA_BYTES){ kernel.sendPayload(AMdst, j, j == payloadSize - ((gc_payloadSize_t)GC_DATA_BYTES)); } kernel.wait_reply(1); #ifndef __HLS__ sleep(1); #endif break; } case recv_pilot:{ axis_word = in->read(); // read token axis_word = in->read(); #ifndef __HLS__ sleep(1); #endif break; } default: loop = false; break; } // switch } // while kernel.end(); #ifdef __HLS__ while(1){} #endif } #ifndef __HLS__ void kern0( short id, galapagos::interface <word_t> * in, #ifdef __HLS__ galapagos::interface<word_t> * out, int * handler_ctrl #else galapagos::interface<word_t> * out #endif ){ int numbers[1024]; // std::string str = "/home/savi/Documents/varun/repos/shoal"; std::string str = "."; // std::string str; // str.append(shoal_path); str.append("/tests/build/benchmark_0_sw.mem"); std::ifstream inputFile(str.c_str()); // Input file stream object // Check if exists and then open the file. if (inputFile.good()) { // Push items into a vector int current_number = 0; std::string first_address; inputFile >> first_address; int i = 0; while (inputFile >> current_number){ numbers[i] = current_number; i++; } // Close the file. inputFile.close(); benchmark(id, in, out, &numbers[0]); std::cout << std::endl; } else { std::cout << "Error!"; } } #if(KERN_BUILD == -1 || KERN_BUILD == 1) void kern1( short id, galapagos::interface <word_t> * in, #ifdef __HLS__ galapagos::interface<word_t> * out, int * handler_ctrl #else galapagos::interface<word_t> * out #endif ){ int numbers[1024]; // std::string str = "/home/savi/Documents/varun/repos/shoal"; std::string str = "."; // std::string str; // str.append(shoal_path); str.append("/tests/build/benchmark_1_sw.mem"); std::ifstream inputFile(str.c_str()); // Input file stream object // Check if exists and then open the file. if (inputFile.good()) { // Push items into a vector int current_number = 0; std::string first_address; inputFile >> first_address; int i = 0; while (inputFile >> current_number){ numbers[i] = current_number; i++; } // Close the file. inputFile.close(); benchmark(id, in, out, &numbers[0]); std::cout << std::endl; } else { std::cout << "Error!"; } } #endif #if(KERN_BUILD == -1 || KERN_BUILD == 2) void kern2( short id, galapagos::interface <word_t> * in, #ifdef __HLS__ galapagos::interface<word_t> * out, int * handler_ctrl #else galapagos::interface<word_t> * out #endif ){ int numbers[1024]; // std::string str = "/home/savi/Documents/varun/repos/shoal"; std::string str = "."; // std::string str; // str.append(shoal_path); str.append("/tests/build/benchmark_2_sw.mem"); std::ifstream inputFile(str.c_str()); // Input file stream object // Check if exists and then open the file. if (inputFile.good()) { // Push items into a vector int current_number = 0; std::string first_address; inputFile >> first_address; int i = 0; while (inputFile >> current_number){ numbers[i] = current_number; i++; } // Close the file. inputFile.close(); benchmark(id, in, out, &numbers[0]); std::cout << std::endl; } else { std::cout << "Error!"; } } #endif PGAS_METHOD(kern0, KERN0_ID) #if(KERN_BUILD == -1 || KERN_BUILD == 1) PGAS_METHOD(kern1, KERN1_ID) #endif #if(KERN_BUILD == -1 || KERN_BUILD == 2) PGAS_METHOD(kern2, KERN2_ID) #endif #endif }
32.811241
134
0.557771
[ "object", "vector" ]
80ea28d3709fc50c5675eba773f5e3498e12afc5
8,114
cxx
C++
Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx
HongdaZ/ITK
f5d004fa3607b8e11edc30f1ba299df35af8aff8
[ "Apache-2.0" ]
1
2021-01-10T14:19:08.000Z
2021-01-10T14:19:08.000Z
Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx
HongdaZ/ITK
f5d004fa3607b8e11edc30f1ba299df35af8aff8
[ "Apache-2.0" ]
1
2017-03-19T12:56:50.000Z
2018-10-24T10:40:21.000Z
Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx
HongdaZ/ITK
f5d004fa3607b8e11edc30f1ba299df35af8aff8
[ "Apache-2.0" ]
1
2020-07-24T22:58:19.000Z
2020-07-24T22:58:19.000Z
/*========================================================================= * * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #include "itkVersorTransformOptimizer.h" #include "itkVersorTransform.h" /** * The objectif function is the scalar product: * * f( V ) = < A, V(B) > * * where: * * V is a Versor representing a rotation * A is a vector * B is another vector * * the vector A = [ 0 0 1 ] * the vector B = [ 0 1 0 ] * * the Versor solution should be: V = [ k1 0 0 k2 ] * * k1 = sin( 45 degrees ) * k2 = cos( 45 degrees ) * * \class versorCostFunction */ class versorCostFunction : public itk::SingleValuedCostFunction { public: using Self = versorCostFunction; using Superclass = itk::SingleValuedCostFunction; using Pointer = itk::SmartPointer<Self>; using ConstPointer = itk::SmartPointer<const Self>; using TransformType = itk::VersorTransform<double>; itkNewMacro(Self); itkTypeMacro(versorCostFunction, SingleValuedCostFunction); enum { SpaceDimension = 3 }; using ParametersType = Superclass::ParametersType; using DerivativeType = Superclass::DerivativeType; using VersorType = itk::Versor<double>; using AxisType = VersorType::VectorType; using VectorType = itk::Vector<double, SpaceDimension>; using MeasureType = double; versorCostFunction() { m_Transform = TransformType::New(); } MeasureType GetValue(const ParametersType & parameters) const override { std::cout << "GetValue( " << parameters << " ) = "; VectorType A; VectorType B; A[0] = 0; A[1] = 0; A[2] = 1; B[0] = 0; B[1] = 1; B[2] = 0; VectorType rightPart; for (unsigned int i = 0; i < 3; i++) { rightPart[i] = parameters[i]; } VersorType versor; versor.Set(rightPart); m_Transform->SetRotation(versor); const VectorType C = m_Transform->TransformVector(B); MeasureType measure = A * C; std::cout << measure << std::endl; return measure; } void GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const override { VectorType rightPart; for (unsigned int i = 0; i < 3; i++) { rightPart[i] = parameters[i]; } VersorType currentVersor; currentVersor.Set(rightPart); const MeasureType baseValue = this->GetValue(parameters); VersorType versorX; VersorType versorY; VersorType versorZ; constexpr double deltaAngle = 0.00175; // in radians = about 0.1 degree versorX.SetRotationAroundX(deltaAngle); versorY.SetRotationAroundY(deltaAngle); versorZ.SetRotationAroundZ(deltaAngle); VersorType plusdDeltaX = currentVersor * versorX; VersorType plusdDeltaY = currentVersor * versorY; VersorType plusdDeltaZ = currentVersor * versorZ; ParametersType parametersPlustDeltaX(SpaceDimension); ParametersType parametersPlustDeltaY(SpaceDimension); ParametersType parametersPlustDeltaZ(SpaceDimension); parametersPlustDeltaX[0] = plusdDeltaX.GetX(); parametersPlustDeltaX[1] = plusdDeltaX.GetY(); parametersPlustDeltaX[2] = plusdDeltaX.GetZ(); parametersPlustDeltaY[0] = plusdDeltaY.GetX(); parametersPlustDeltaY[1] = plusdDeltaY.GetY(); parametersPlustDeltaY[2] = plusdDeltaY.GetZ(); parametersPlustDeltaZ[0] = plusdDeltaZ.GetX(); parametersPlustDeltaZ[1] = plusdDeltaZ.GetY(); parametersPlustDeltaZ[2] = plusdDeltaZ.GetZ(); const MeasureType turnXValue = this->GetValue(parametersPlustDeltaX); const MeasureType turnYValue = this->GetValue(parametersPlustDeltaY); const MeasureType turnZValue = this->GetValue(parametersPlustDeltaZ); derivative = DerivativeType(SpaceDimension); derivative[0] = (turnXValue - baseValue) / deltaAngle; derivative[1] = (turnYValue - baseValue) / deltaAngle; derivative[2] = (turnZValue - baseValue) / deltaAngle; } unsigned int GetNumberOfParameters() const override { return SpaceDimension; } private: mutable TransformType::Pointer m_Transform; }; int itkVersorTransformOptimizerTest(int, char *[]) { std::cout << "VersorTransform Optimizer Test "; std::cout << std::endl << std::endl; using OptimizerType = itk::VersorTransformOptimizer; using ScalesType = OptimizerType::ScalesType; // Declaration of a itkOptimizer OptimizerType::Pointer itkOptimizer = OptimizerType::New(); // Declaration of the CostFunction adaptor versorCostFunction::Pointer costFunction = versorCostFunction::New(); itkOptimizer->SetCostFunction(costFunction); using ParametersType = versorCostFunction::ParametersType; using VersorType = OptimizerType::VersorType; // We start with a null rotation VersorType::VectorType axis; axis[0] = 1.0f; axis[1] = 0.0f; axis[2] = 0.0f; VersorType::ValueType angle = 0.0f; VersorType initialRotation; initialRotation.Set(axis, angle); const unsigned int spaceDimensions = costFunction->GetNumberOfParameters(); ParametersType initialPosition(spaceDimensions); initialPosition[0] = initialRotation.GetX(); initialPosition[1] = initialRotation.GetY(); initialPosition[2] = initialRotation.GetZ(); ScalesType parametersScale(spaceDimensions); parametersScale[0] = 1.0; parametersScale[1] = 1.0; parametersScale[2] = 1.0; itkOptimizer->MaximizeOn(); itkOptimizer->SetScales(parametersScale); itkOptimizer->SetGradientMagnitudeTolerance(1e-15); itkOptimizer->SetMaximumStepLength(0.1745); // About 10 deegres itkOptimizer->SetMinimumStepLength(1e-9); itkOptimizer->SetNumberOfIterations(10); itkOptimizer->SetInitialPosition(initialPosition); try { itkOptimizer->StartOptimization(); } catch (const itk::ExceptionObject & e) { std::cout << "Exception thrown ! " << std::endl; std::cout << "An error occurred during Optimization" << std::endl; std::cout << "Location = " << e.GetLocation() << std::endl; std::cout << "Description = " << e.GetDescription() << std::endl; return EXIT_FAILURE; } ParametersType finalPosition(spaceDimensions); finalPosition = itkOptimizer->GetCurrentPosition(); VersorType finalRotation; VersorType::VectorType finalRightPart; for (unsigned int i = 0; i < spaceDimensions; i++) { finalRightPart[i] = finalPosition[i]; } finalRotation.Set(finalRightPart); std::cout << "Solution = (" << finalRotation << ")" << std::endl; // // check results to see if it is within range // bool pass = true; // True versor VersorType::VectorType trueAxis; VersorType::ValueType trueAngle; trueAxis[0] = 1.0f; trueAxis[1] = 0.0f; trueAxis[2] = 0.0f; trueAngle = 2.0 * std::atan(1.0f); VersorType trueRotation; trueRotation.Set(trueAxis, trueAngle); ParametersType trueParameters(spaceDimensions); trueParameters[0] = trueRotation.GetX(); trueParameters[1] = trueRotation.GetY(); trueParameters[2] = trueRotation.GetZ(); std::cout << "True Parameters = " << trueParameters << std::endl; VersorType ratio = finalRotation * trueRotation.GetReciprocal(); const VersorType::ValueType cosHalfAngle = ratio.GetW(); const VersorType::ValueType cosHalfAngleSquare = cosHalfAngle * cosHalfAngle; if (cosHalfAngleSquare < 0.95) { pass = false; } if (!pass) { std::cout << "Test failed." << std::endl; return EXIT_FAILURE; } std::cout << "Test passed." << std::endl; return EXIT_SUCCESS; }
26.956811
94
0.681292
[ "vector" ]
80edf3f10b0691f0eb471938cf968f761fc414ea
16,472
cpp
C++
src/Parser/source/expression_tree_parser.cpp
AitzazImtiaz/ubiquit
3e7602d4e01a102e6036b7b9cd076893ca242bcb
[ "MIT" ]
2
2021-06-27T07:29:09.000Z
2022-03-09T12:33:48.000Z
src/Parser/source/expression_tree_parser.cpp
AitzazImtiaz/ubiquit
3e7602d4e01a102e6036b7b9cd076893ca242bcb
[ "MIT" ]
10
2021-06-26T13:43:34.000Z
2022-03-09T12:34:55.000Z
src/Parser/source/expression_tree_parser.cpp
AitzazImtiaz/ubiquit
3e7602d4e01a102e6036b7b9cd076893ca242bcb
[ "MIT" ]
3
2021-06-26T13:34:18.000Z
2022-03-09T11:40:42.000Z
#include "expression_tree_parser.hpp" #include "expression_tree.hpp" #include "tokenizer.hpp" #include "errors.hpp" #include <stack> namespace ubiquit { namespace { enum struct operator_precedence { postfix, prefix, multiplication, addition, shift, comparison, equality, bitwise_and, bitwise_xor, bitwise_or, logical_and, logical_or, assignment, comma }; enum struct operator_associativity { left_to_right, right_to_left }; struct operator_info { node_operation operation; operator_precedence precedence; operator_associativity associativity; int number_of_operands; size_t line_number; size_t char_index; operator_info(node_operation operation, size_t line_number, size_t char_index) : operation(operation), line_number(line_number), char_index(char_index) { switch (operation) { case node_operation::param: // This will never happen. Used only for the node creation. case node_operation::postinc: case node_operation::postdec: case node_operation::index: case node_operation::call: precedence = operator_precedence::postfix; break; case node_operation::preinc: case node_operation::predec: case node_operation::positive: case node_operation::negative: case node_operation::bnot: case node_operation::lnot: precedence = operator_precedence::prefix; break; case node_operation::mul: case node_operation::div: case node_operation::idiv: case node_operation::mod: precedence = operator_precedence::multiplication; break; case node_operation::add: case node_operation::sub: case node_operation::concat: precedence = operator_precedence::addition; break; case node_operation::bsl: case node_operation::bsr: precedence = operator_precedence::shift; break; case node_operation::lt: case node_operation::gt: case node_operation::le: case node_operation::ge: precedence = operator_precedence::comparison; break; case node_operation::eq: case node_operation::ne: precedence = operator_precedence::equality; break; case node_operation::band: precedence = operator_precedence::bitwise_and; break; case node_operation::bxor: precedence = operator_precedence::bitwise_xor; break; case node_operation::bor: precedence = operator_precedence::bitwise_or; break; case node_operation::land: precedence = operator_precedence::logical_and; break; case node_operation::lor: precedence = operator_precedence::logical_or; break; case node_operation::assign: case node_operation::add_assign: case node_operation::sub_assign: case node_operation::mul_assign: case node_operation::div_assign: case node_operation::idiv_assign: case node_operation::mod_assign: case node_operation::band_assign: case node_operation::bor_assign: case node_operation::bxor_assign: case node_operation::bsl_assign: case node_operation::bsr_assign: case node_operation::concat_assign: case node_operation::ternary: precedence = operator_precedence::assignment; break; case node_operation::comma: precedence = operator_precedence::comma; break; } switch (precedence) { case operator_precedence::prefix: case operator_precedence::assignment: associativity = operator_associativity::right_to_left; break; default: associativity = operator_associativity::left_to_right; break; } switch (operation) { case node_operation::postinc: case node_operation::postdec: case node_operation::preinc: case node_operation::predec: case node_operation::positive: case node_operation::negative: case node_operation::bnot: case node_operation::lnot: case node_operation::call: //at least one number_of_operands = 1; break; case node_operation::ternary: number_of_operands = 3; break; default: number_of_operands = 2; break; } } }; operator_info get_operator_info(reserved_token token, bool prefix, size_t line_number, size_t char_index) { switch(token) { case reserved_token::inc: return prefix ? operator_info(node_operation::preinc, line_number, char_index) : operator_info(node_operation::postinc, line_number, char_index); case reserved_token::dec: return prefix ? operator_info(node_operation::predec, line_number, char_index) : operator_info(node_operation::postdec, line_number, char_index); case reserved_token::add: return prefix ? operator_info(node_operation::positive, line_number, char_index) : operator_info(node_operation::add, line_number, char_index); case reserved_token::sub: return prefix ? operator_info(node_operation::negative, line_number, char_index) : operator_info(node_operation::sub, line_number, char_index); case reserved_token::concat: return operator_info(node_operation::concat, line_number, char_index); case reserved_token::mul: return operator_info(node_operation::mul, line_number, char_index); case reserved_token::div: return operator_info(node_operation::div, line_number, char_index); case reserved_token::idiv: return operator_info(node_operation::idiv, line_number, char_index); case reserved_token::mod: return operator_info(node_operation::mod, line_number, char_index); case reserved_token::bitwise_not: return operator_info(node_operation::bnot, line_number, char_index); case reserved_token::bitwise_and: return operator_info(node_operation::band, line_number, char_index); case reserved_token::bitwise_or: return operator_info(node_operation::bor, line_number, char_index); case reserved_token::bitwise_xor: return operator_info(node_operation::bxor, line_number, char_index); case reserved_token::shiftl: return operator_info(node_operation::bsl, line_number, char_index); case reserved_token::shiftr: return operator_info(node_operation::bsr, line_number, char_index); case reserved_token::assign: return operator_info(node_operation::assign, line_number, char_index); case reserved_token::add_assign: return operator_info(node_operation::add_assign, line_number, char_index); case reserved_token::sub_assign: return operator_info(node_operation::sub_assign, line_number, char_index); case reserved_token::concat_assign: return operator_info(node_operation::concat_assign, line_number, char_index); case reserved_token::mul_assign: return operator_info(node_operation::mod_assign, line_number, char_index); case reserved_token::div_assign: return operator_info(node_operation::div_assign, line_number, char_index); case reserved_token::idiv_assign: return operator_info(node_operation::idiv_assign, line_number, char_index); case reserved_token::mod_assign: return operator_info(node_operation::mod_assign, line_number, char_index); case reserved_token::and_assign: return operator_info(node_operation::band_assign, line_number, char_index); case reserved_token::or_assign: return operator_info(node_operation::bor_assign, line_number, char_index); case reserved_token::xor_assign: return operator_info(node_operation::bxor_assign, line_number, char_index); case reserved_token::shiftl_assign: return operator_info(node_operation::bsl_assign, line_number, char_index); case reserved_token::shiftr_assign: return operator_info(node_operation::bsr_assign, line_number, char_index); case reserved_token::logical_not: return operator_info(node_operation::lnot, line_number, char_index); case reserved_token::logical_and: return operator_info(node_operation::land, line_number, char_index); case reserved_token::logical_or: return operator_info(node_operation::lor, line_number, char_index); case reserved_token::eq: return operator_info(node_operation::eq, line_number, char_index); case reserved_token::ne: return operator_info(node_operation::ne, line_number, char_index); case reserved_token::lt: return operator_info(node_operation::lt, line_number, char_index); case reserved_token::gt: return operator_info(node_operation::gt, line_number, char_index); case reserved_token::le: return operator_info(node_operation::le, line_number, char_index); case reserved_token::ge: return operator_info(node_operation::ge, line_number, char_index); case reserved_token::question: return operator_info(node_operation::ternary, line_number, char_index); case reserved_token::comma: return operator_info(node_operation::comma, line_number, char_index); case reserved_token::open_round: return operator_info(node_operation::call, line_number, char_index); case reserved_token::open_square: return operator_info(node_operation::index, line_number, char_index); default: throw unexpected_syntax_error(std::to_string(token), line_number, char_index); } } bool is_end_of_expression(const token& t, bool allow_comma) { if (t.is_eof()) { return true; } if (t.is_reserved_token()) { switch (t.get_reserved_token()) { case reserved_token::semicolon: case reserved_token::close_round: case reserved_token::close_square: case reserved_token::colon: return true; case reserved_token::comma: return !allow_comma; default: return false; } } return false; } bool is_evaluated_before(const operator_info& l, const operator_info& r) { return l.associativity == operator_associativity::left_to_right ? l.precedence <= r.precedence : l.precedence < r.precedence; } void pop_one_operator( std::stack<operator_info>& operator_stack, std::stack<node_ptr>& operand_stack, compiler_context& context, size_t line_number, size_t char_index ) { if (operand_stack.size() < operator_stack.top().number_of_operands) { throw compiler_error("Failed to parse an expression", line_number, char_index); } std::vector<node_ptr> operands; operands.resize(operator_stack.top().number_of_operands); if (operator_stack.top().precedence != operator_precedence::prefix) { operator_stack.top().line_number = operand_stack.top()->get_line_number(); operator_stack.top().char_index = operand_stack.top()->get_char_index(); } for (int i = operator_stack.top().number_of_operands - 1; i >= 0; --i) { operands[i] = std::move(operand_stack.top()); operand_stack.pop(); } operand_stack.push(std::make_unique<node>( context, operator_stack.top().operation, std::move(operands), operator_stack.top().line_number, operator_stack.top().char_index) ); operator_stack.pop(); } node_ptr parse_expression_tree_impl(compiler_context& context, tokens_iterator& it, bool allow_comma, bool allow_empty) { std::stack<node_ptr> operand_stack; std::stack<operator_info> operator_stack; bool expected_operand = true; for (; !is_end_of_expression(*it, allow_comma); ++it) { if (it->is_reserved_token()) { operator_info oi = get_operator_info( it->get_reserved_token(), expected_operand, it->get_line_number(), it->get_char_index() ); if (oi.operation == node_operation::call && expected_operand) { //open round bracket is misinterpreted as a function call ++it; operand_stack.push(parse_expression_tree_impl(context, it, true, false)); if (it->has_value(reserved_token::close_round)) { expected_operand = false; continue; } else { throw syntax_error("Expected closing ')'", it->get_line_number(), it->get_char_index()); } } if ((oi.precedence == operator_precedence::prefix) != expected_operand) { throw unexpected_syntax_error(std::to_string(*it), it->get_line_number(), it->get_char_index()); } if (!operator_stack.empty() && is_evaluated_before(operator_stack.top(), oi)) { pop_one_operator(operator_stack, operand_stack, context, it->get_line_number(), it->get_char_index()); } switch (oi.operation) { case node_operation::call: ++it; if (!it->has_value(reserved_token::close_round)) { while (true) { bool remove_lvalue = !it->has_value(reserved_token::bitwise_and); if (!remove_lvalue) { ++it; } node_ptr argument = parse_expression_tree_impl(context, it, false, false); if (remove_lvalue) { size_t line_number = argument->get_line_number(); size_t char_index = argument->get_char_index(); std::vector<node_ptr> argument_vector; argument_vector.push_back(std::move(argument)); argument = std::make_unique<node>( context, node_operation::param, std::move(argument_vector), line_number, char_index ); } else if (!argument->is_lvalue()) { throw wrong_type_error( std::to_string(argument->get_type_id()), std::to_string(argument->get_type_id()), true, argument->get_line_number(), argument->get_char_index() ); } operand_stack.push(std::move(argument)); ++oi.number_of_operands; if (it->has_value(reserved_token::close_round)) { break; } else if (it->has_value(reserved_token::comma)) { ++it; } else { throw syntax_error("Expected ',', or closing ')'", it->get_line_number(), it->get_char_index()); } } } break; case node_operation::index: ++it; operand_stack.push(parse_expression_tree_impl(context, it, true, false)); if (!it->has_value(reserved_token::close_square)) { throw syntax_error("Expected closing ]'", it->get_line_number(), it->get_char_index()); } break; case node_operation::ternary: ++it; operand_stack.push(parse_expression_tree_impl(context, it, true, false)); if (!it->has_value(reserved_token::colon)) { throw syntax_error("Expected ':'", it->get_line_number(), it->get_char_index()); } break; default: break; } operator_stack.push(oi); expected_operand = (oi.precedence != operator_precedence::postfix); } else { if (!expected_operand) { throw unexpected_syntax_error(std::to_string(*it), it->get_line_number(), it->get_char_index()); } if (it->is_number()) { operand_stack.push(std::make_unique<node>( context, it->get_number(), std::vector<node_ptr>(), it->get_line_number(), it->get_char_index()) ); } else if (it->is_string()) { operand_stack.push(std::make_unique<node>( context, it->get_string(), std::vector<node_ptr>(), it->get_line_number(), it->get_char_index()) ); } else { operand_stack.push(std::make_unique<node>( context, it->get_identifier(), std::vector<node_ptr>(), it->get_line_number(), it->get_char_index()) ); } expected_operand = false; } } if (expected_operand) { if (allow_empty && operand_stack.empty() && operator_stack.empty()) { return node_ptr(); } else { throw syntax_error("Operand expected", it->get_line_number(), it->get_char_index()); } } while(!operator_stack.empty()) { pop_one_operator(operator_stack, operand_stack, context, it->get_line_number(), it->get_char_index()); } if (operand_stack.size() != 1 || !operator_stack.empty()) { throw compiler_error("Failed to parse an expression", it->get_line_number(), it->get_char_index()); } return std::move(operand_stack.top()); } } node_ptr parse_expression_tree( compiler_context& context, tokens_iterator& it, type_handle type_id, bool lvalue, bool allow_comma, bool allow_empty ) { node_ptr ret = parse_expression_tree_impl(context, it, allow_comma, allow_empty); ret->check_conversion(type_id, lvalue); return ret; } }
36.767857
132
0.690687
[ "vector" ]
80ee46814f8ac2e36146934eaeb2f18d9fdd95a6
1,234
cpp
C++
leetcode-cpp/SpecialPositionsinaBinaryMatrix_1582.cpp
emacslisp/cpp
8230f81117d6f64adaa1696b0943cdb47505335a
[ "Apache-2.0" ]
null
null
null
leetcode-cpp/SpecialPositionsinaBinaryMatrix_1582.cpp
emacslisp/cpp
8230f81117d6f64adaa1696b0943cdb47505335a
[ "Apache-2.0" ]
null
null
null
leetcode-cpp/SpecialPositionsinaBinaryMatrix_1582.cpp
emacslisp/cpp
8230f81117d6f64adaa1696b0943cdb47505335a
[ "Apache-2.0" ]
null
null
null
#include <vector> #include <iostream> #include <climits> #include <algorithm> #include <queue> #include <stack> #include <map> #define Max(a, b) a > b ? a : b #define Min(a, b) a < b ? a : b using namespace std; class Solution { public: int numSpecial(vector<vector<int>>& mat) { vector<int> r; vector<int> c; for(int i=0;i<mat.size();i++) { int sum = 0; for(int j=0;j<mat[0].size();j++) { sum += mat[i][j]; } r.push_back(sum); } for(int i=0;i<mat[0].size();i++) { int sum = 0; for(int j=0;j<mat.size();j++) { sum += mat[j][i]; } c.push_back(sum); } int counter = 0; for(int i=0;i<mat.size();i++) { for(int j=0;j<mat[0].size();j++) { if(mat[i][j] == 1 && r[i] == 1 && c[j] == 1) { counter++; } } } return counter; } }; int main() { Solution s; vector<vector<int>> c {{0,0,0,0,0}, {1,0,0,0,0}, {0,1,0,0,0}, {0,0,1,0,0}, {0,0,0,1,1}}; string str = "codeleet"; int result = s.numSpecial(c); cout<<result<<endl; }
20.229508
62
0.424635
[ "vector" ]
80f04b34e738d73556a948368538051c9d47f46a
4,205
hpp
C++
deprecated-code/Ajisai/Math/Bounds.hpp
siyuanpan/ajisai_render
203d79235bf698c1a4a747be291c0f3050b213da
[ "MIT" ]
null
null
null
deprecated-code/Ajisai/Math/Bounds.hpp
siyuanpan/ajisai_render
203d79235bf698c1a4a747be291c0f3050b213da
[ "MIT" ]
null
null
null
deprecated-code/Ajisai/Math/Bounds.hpp
siyuanpan/ajisai_render
203d79235bf698c1a4a747be291c0f3050b213da
[ "MIT" ]
null
null
null
#ifndef AJISAI_MATH_BOUNDS_H_ #define AJISAI_MATH_BOUNDS_H_ /* Copyright 2021 Siyuan Pan <pansiyuan.cs@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <ostream> #include <type_traits> #include <Ajisai/Math/Functions.h> #include "Ajisai/Math/Vector3.h" namespace Ajisai::Math { namespace { template <class, std::size_t> struct BoundsTraits; template <class T> struct BoundsTraits<T, 1> { typedef T Type; constexpr static Type from(const Vector<T, 1>& value) { return value[0]; } }; template <class T> struct BoundsTraits<T, 2> { typedef Vector2<T> Type; constexpr static Type from(const Vector<T, 2>& value) { return value; } }; template <class T> struct BoundsTraits<T, 3> { typedef Vector3<T> Type; constexpr static Type from(const Vector<T, 3>& value) { return value; } }; } // namespace template <class T, std::size_t dimensions> class Bounds { public: typedef typename BoundsTraits<T, dimensions>::Type VectorType; // constexpr Bounds() noexcept: Bounds<T, size>{typename std::conditional<size // == 1, >::type{}} {} constexpr Bounds() noexcept {} constexpr Bounds(const VectorType& min, const VectorType& max) noexcept : _min{min}, _max{max} {} constexpr Bounds(const VectorType& min) noexcept : Bounds{min, min} {} // constexpr Bounds(const Vector<T, dimensions>& min, // const Vector<T, dimensions>& max) noexcept // : _min{min}, _max{max} {} Bounds(const std::pair<Vector<T, dimensions>, Vector<T, dimensions>>& minmax) noexcept : _min{minmax.first}, _max{minmax.second} {} constexpr Bounds(const Bounds<T, dimensions>&) noexcept = default; VectorType& min() { return _min; } constexpr const VectorType min() const { return _min; } VectorType& max() { return _max; } constexpr const VectorType max() const { return _max; } VectorType size() const { return _max - _min; } VectorType center() const { return (_max + _min) / T(2); } template <std::size_t dim = dimensions, class = typename std::enable_if<dim == 3>::type> T area() const { auto d = size(); return T(2) * (d.x() * d.y() + d.x() * d.z() + d.y() * d.z()); } private: // constexpr explicit Bounds() VectorType _min, _max; }; template <class T, std::size_t dim> inline Bounds<T, dim> join(const Bounds<T, dim>& a, const Bounds<T, dim>& b) { if (a.min() == a.max()) return b; if (b.min() == b.max()) return a; return {Math::min(a.min(), b.min()), Math::max(a.max(), b.max())}; } template <class T, std::size_t dim> inline bool intersects(const Bounds<T, dim>& a, const Bounds<T, dim>& b) { return (a.max() > b.min()).all() && (a.min() < b.max()).all(); } template <class T, std::size_t dim> inline Bounds<T, dim> intersect(const Bounds<T, dim>& a, const Bounds<T, dim>& b) { if (!intersects(a, b)) return {}; return {Math::max(a.min(), b.min()), Math::min(a.max(), b.max())}; } } // namespace Ajisai::Math template <class T, std::size_t dim> std::ostream& operator<<(std::ostream& ostream, const Ajisai::Math::Bounds<T, dim>& value) { return ostream << "Bounds(" << value.min() << "," << value.max() << ")"; } #endif
32.596899
80
0.674435
[ "vector" ]
80f072dfc88c73faaf55d2439ccc36e3a9259bc9
560
cpp
C++
LeetCode/Solutions/LC0416.cpp
Mohammed-Shoaib/HackerRank-Problems
ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b
[ "MIT" ]
54
2019-05-13T12:13:09.000Z
2022-02-27T02:59:00.000Z
LeetCode/Solutions/LC0416.cpp
Mohammed-Shoaib/HackerRank-Problems
ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b
[ "MIT" ]
2
2020-10-02T07:16:43.000Z
2020-10-19T04:36:19.000Z
LeetCode/Solutions/LC0416.cpp
Mohammed-Shoaib/HackerRank-Problems
ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b
[ "MIT" ]
20
2020-05-26T09:48:13.000Z
2022-03-18T15:18:27.000Z
/* Problem Statement: https://leetcode.com/problems/partition-equal-subset-sum/ Time: O(n • sum) Space: O(sum) Author: Mohammed Shoaib, github.com/Mohammed-Shoaib */ class Solution { public: bool canPartition(vector<int>& nums) { int n, sum; n = nums.size(); sum = accumulate(nums.begin(), nums.end(), 0); vector<bool> dp(sum + 1); // base cases if (sum & 1) return false; dp[0] = true; // dynamic programming for (int& x: nums) for (int i = sum; i >= 0; i--) if (dp[i]) dp[i + x] = true; return dp[sum / 2]; } };
19.310345
76
0.596429
[ "vector" ]
80f6eda3ec9166170cfda0bc3a1f4e87ccf771b3
8,328
cpp
C++
python/bindings/PyCamera.cpp
imrisaac/jetson-utils
0f174e0ccb6cc793efc684e4eae84bbd23907cbc
[ "MIT" ]
372
2018-02-01T17:48:42.000Z
2022-03-30T08:26:10.000Z
python/bindings/PyCamera.cpp
imrisaac/jetson-utils
0f174e0ccb6cc793efc684e4eae84bbd23907cbc
[ "MIT" ]
102
2018-08-19T18:26:05.000Z
2022-03-31T18:18:03.000Z
python/bindings/PyCamera.cpp
imrisaac/jetson-utils
0f174e0ccb6cc793efc684e4eae84bbd23907cbc
[ "MIT" ]
198
2018-02-13T02:19:00.000Z
2022-03-26T00:11:59.000Z
/* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #include "PyCamera.h" #include "PyCUDA.h" #include "gstCamera.h" #include "logging.h" // PyCamera container typedef struct { PyObject_HEAD gstCamera* camera; } PyCamera_Object; // New static PyObject* PyCamera_New( PyTypeObject *type, PyObject *args, PyObject *kwds ) { LogDebug(LOG_PY_UTILS "PyCamera_New()\n"); // allocate a new container PyCamera_Object* self = (PyCamera_Object*)type->tp_alloc(type, 0); if( !self ) { PyErr_SetString(PyExc_MemoryError, LOG_PY_UTILS "gstCamera tp_alloc() failed to allocate a new object"); LogError(LOG_PY_UTILS "gstCamera tp_alloc() failed to allocate a new object\n"); return NULL; } self->camera = NULL; return (PyObject*)self; } // Init static int PyCamera_Init( PyCamera_Object* self, PyObject *args, PyObject *kwds ) { LogDebug(LOG_PY_UTILS "PyCamera_Init()\n"); // parse arguments int camera_width = gstCamera::DefaultWidth; int camera_height = gstCamera::DefaultHeight; const char* device = NULL; static char* kwlist[] = {"width", "height", "camera", NULL}; if( !PyArg_ParseTupleAndKeywords(args, kwds, "|iis", kwlist, &camera_width, &camera_height, &device)) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "gstCamera.__init()__ failed to parse args tuple"); LogError(LOG_PY_UTILS "gstCamera.__init()__ failed to parse args tuple\n"); return -1; } if( camera_width <= 0 ) camera_width = gstCamera::DefaultWidth; if( camera_height <= 0 ) camera_height = gstCamera::DefaultHeight; /*if( camera_width <= 0 || camera_height <= 0 ) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "gstCamera.__init__() requested dimensions are out of bounds"); return NULL; }*/ // create the camera object gstCamera* camera = gstCamera::Create(camera_width, camera_height, device); if( !camera ) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "failed to create gstCamera device"); return -1; } self->camera = camera; return 0; } // Deallocate static void PyCamera_Dealloc( PyCamera_Object* self ) { LogDebug(LOG_PY_UTILS "PyCamera_Dealloc()\n"); // free the network if( self->camera != NULL ) { delete self->camera; self->camera = NULL; } // free the container Py_TYPE(self)->tp_free((PyObject*)self); } // Open static PyObject* PyCamera_Open( PyCamera_Object* self ) { if( !self || !self->camera ) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "gstCamera invalid object instance"); return NULL; } if( !self->camera->Open() ) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "failed to open gstCamera device for streaming"); return NULL; } Py_RETURN_NONE; } // Close static PyObject* PyCamera_Close( PyCamera_Object* self ) { if( !self || !self->camera ) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "gstCamera invalid object instance"); return NULL; } self->camera->Close(); Py_RETURN_NONE; } // CaptureRGBA static PyObject* PyCamera_CaptureRGBA( PyCamera_Object* self, PyObject* args, PyObject* kwds ) { if( !self || !self->camera ) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "gstCamera invalid object instance"); return NULL; } // parse arguments int pyTimeout = -1; int pyZeroCopy = 0; static char* kwlist[] = {"timeout", "zeroCopy", NULL}; if( !PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwlist, &pyTimeout, &pyZeroCopy)) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "gstCamera.CaptureRGBA() failed to parse args tuple"); return NULL; } // convert signed timeout to unsigned long uint64_t timeout = UINT64_MAX; if( pyTimeout >= 0 ) timeout = pyTimeout; // convert int zeroCopy to boolean const bool zeroCopy = pyZeroCopy <= 0 ? false : true; // capture RGBA float* ptr = NULL; if( !self->camera->CaptureRGBA(&ptr, timeout, zeroCopy) ) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "gstCamera failed to CaptureRGBA()"); return NULL; } // register memory capsule (gstCamera will free the underlying memory when camera is deleted) PyObject* capsule = PyCUDA_RegisterImage(ptr, self->camera->GetWidth(), self->camera->GetHeight(), IMAGE_RGBA32F, zeroCopy, false); if( !capsule ) return NULL; // create dimension objects PyObject* pyWidth = PYLONG_FROM_LONG(self->camera->GetWidth()); PyObject* pyHeight = PYLONG_FROM_LONG(self->camera->GetHeight()); // return tuple PyObject* tuple = PyTuple_Pack(3, capsule, pyWidth, pyHeight); Py_DECREF(capsule); Py_DECREF(pyWidth); Py_DECREF(pyHeight); return tuple; } // GetWidth() static PyObject* PyCamera_GetWidth( PyCamera_Object* self ) { if( !self || !self->camera ) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "gstCamera invalid object instance"); return NULL; } return PYLONG_FROM_UNSIGNED_LONG(self->camera->GetWidth()); } // GetHeight() static PyObject* PyCamera_GetHeight( PyCamera_Object* self ) { if( !self || !self->camera ) { PyErr_SetString(PyExc_Exception, LOG_PY_UTILS "gstCamera invalid object instance"); return NULL; } return PYLONG_FROM_UNSIGNED_LONG(self->camera->GetHeight()); } //------------------------------------------------------------------------------- static PyTypeObject pyCamera_Type = { PyVarObject_HEAD_INIT(NULL, 0) }; static PyMethodDef pyCamera_Methods[] = { { "Open", (PyCFunction)PyCamera_Open, METH_NOARGS, "Open the camera for streaming frames"}, { "Close", (PyCFunction)PyCamera_Close, METH_NOARGS, "Stop streaming camera frames"}, { "CaptureRGBA", (PyCFunction)PyCamera_CaptureRGBA, METH_VARARGS|METH_KEYWORDS, "Capture a camera frame and convert it to float4 RGBA"}, { "GetWidth", (PyCFunction)PyCamera_GetWidth, METH_NOARGS, "Return the width of the camera (in pixels)"}, { "GetHeight", (PyCFunction)PyCamera_GetHeight, METH_NOARGS, "Return the height of the camera (in pixels)"}, {NULL} /* Sentinel */ }; // Register types bool PyCamera_RegisterTypes( PyObject* module ) { if( !module ) return false; pyCamera_Type.tp_name = PY_UTILS_MODULE_NAME ".gstCamera"; pyCamera_Type.tp_basicsize = sizeof(PyCamera_Object); pyCamera_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; pyCamera_Type.tp_methods = pyCamera_Methods; pyCamera_Type.tp_new = PyCamera_New; pyCamera_Type.tp_init = (initproc)PyCamera_Init; pyCamera_Type.tp_dealloc = (destructor)PyCamera_Dealloc; pyCamera_Type.tp_doc = "MIPI CSI or USB camera using GStreamer"; if( PyType_Ready(&pyCamera_Type) < 0 ) { LogError(LOG_PY_UTILS "gstCamera PyType_Ready() failed\n"); return false; } Py_INCREF(&pyCamera_Type); if( PyModule_AddObject(module, "gstCamera", (PyObject*)&pyCamera_Type) < 0 ) { LogError(LOG_PY_UTILS "gstCamera PyModule_AddObject('gstCamera') failed\n"); return false; } return true; } static PyMethodDef pyCamera_Functions[] = { {NULL} /* Sentinel */ }; // Register functions PyMethodDef* PyCamera_RegisterFunctions() { return pyCamera_Functions; }
27.852843
138
0.697406
[ "object" ]
80fbbf6dfa453ff6e331b31bce12496ddcb5966f
2,951
cc
C++
tensorflow/compiler/mlir/tensorflow/transforms/mark_initialized_variables_test_pass.cc
rthadur/tensorflow
c7add40440d653257973809893cde564e5e6061b
[ "Apache-2.0" ]
null
null
null
tensorflow/compiler/mlir/tensorflow/transforms/mark_initialized_variables_test_pass.cc
rthadur/tensorflow
c7add40440d653257973809893cde564e5e6061b
[ "Apache-2.0" ]
null
null
null
tensorflow/compiler/mlir/tensorflow/transforms/mark_initialized_variables_test_pass.cc
rthadur/tensorflow
c7add40440d653257973809893cde564e5e6061b
[ "Apache-2.0" ]
null
null
null
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #include "mlir/Pass/Pass.h" // from @llvm-project #include "mlir/Pass/PassManager.h" // from @llvm-project #include "mlir/Support/LLVM.h" // from @llvm-project #include "tensorflow/compiler/mlir/tensorflow/transforms/mark_initialized_variables.h" #include "tensorflow/compiler/mlir/tensorflow/utils/fake_session.h" namespace mlir { namespace { // This pass is only available in the tf-opt binary for testing. class MarkInitializedVariablesTestPass : public PassWrapper<MarkInitializedVariablesTestPass, OperationPass<FuncOp>> { public: MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(MarkInitializedVariablesTestPass) StringRef getArgument() const final { return "tf-saved-model-mark-initialized-variables-test"; } StringRef getDescription() const final { return "Mark variables as initialized or not."; } void runOnOperation() override { TF::test_util::FakeSession session; if (failed(mlir::tf_saved_model::MarkInitializedVariablesInFunction( getOperation(), &session))) return signalPassFailure(); } }; // This pass is only available in the tf-opt binary for testing. class MarkInitializedVariablesInvalidSessionTestPass : public PassWrapper<MarkInitializedVariablesInvalidSessionTestPass, OperationPass<FuncOp>> { public: MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID( MarkInitializedVariablesInvalidSessionTestPass) StringRef getArgument() const final { return "tf-saved-model-mark-initialized-variables-invalid-session-test"; } StringRef getDescription() const final { return "Mark variables as initialized or not, but with invalid session."; } void runOnOperation() override { // Pass an invalid session argument, which is a nullptr. if (failed(mlir::tf_saved_model::MarkInitializedVariablesInFunction( getOperation(), /*session=*/nullptr))) return signalPassFailure(); } }; } // namespace namespace tf_saved_model { static PassRegistration<MarkInitializedVariablesTestPass> mark_initialized_variables_test_pass; static PassRegistration<MarkInitializedVariablesInvalidSessionTestPass> mark_initialized_variables_invalid_session_test_pass; } // namespace tf_saved_model } // namespace mlir
35.130952
86
0.742121
[ "model" ]
80fde191bd3c1d336772fa8b8524455c957dcbcc
33,586
cpp
C++
unittests/VMRuntime/ObjectModelTest.cpp
amiralies/hermes
f041ad442650d77f4e5efc4577c8b42039c44989
[ "MIT" ]
null
null
null
unittests/VMRuntime/ObjectModelTest.cpp
amiralies/hermes
f041ad442650d77f4e5efc4577c8b42039c44989
[ "MIT" ]
null
null
null
unittests/VMRuntime/ObjectModelTest.cpp
amiralies/hermes
f041ad442650d77f4e5efc4577c8b42039c44989
[ "MIT" ]
null
null
null
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "TestHelpers.h" #include "hermes/BCGen/HBC/BytecodeGenerator.h" #include "hermes/VM/JSDate.h" using namespace hermes::hbc; using namespace hermes::vm; namespace { /// Assert that obj.prop has flag set to val. #define EXPECT_PROPERTY_FLAG(val, obj, prop, flag) \ { \ NamedPropertyDescriptor desc; \ ASSERT_TRUE( \ JSObject::getNamedDescriptor(obj, runtime, prop, desc) != nullptr); \ EXPECT_##val(desc.flags.flag); \ } static inline Handle<Callable> makeSimpleJSFunction( Runtime *runtime, RuntimeModule *runtimeModule) { CodeBlock *codeBlock; if (runtimeModule->getBytecode()) { codeBlock = runtimeModule->getCodeBlockMayAllocate(0); } else { BytecodeModuleGenerator BMG; auto BFG = BytecodeFunctionGenerator::create(BMG, 1); BFG->emitLoadConstDoubleDirect(0, 10.0); BFG->emitRet(0); codeBlock = createCodeBlock(runtimeModule, runtime, BFG.get()); } return runtime->makeHandle<JSFunction>(*JSFunction::create( runtime, runtimeModule->getDomain(runtime), Handle<JSObject>(runtime), Handle<Environment>(runtime), codeBlock)); } static inline Handle<PropertyAccessor> createPropertyAccessor( Runtime *runtime, RuntimeModule *runtimeModule) { return runtime->makeHandle<PropertyAccessor>(*PropertyAccessor::create( runtime, makeSimpleJSFunction(runtime, runtimeModule), makeSimpleJSFunction(runtime, runtimeModule))); } using ObjectModelTest = RuntimeTestFixture; TEST_F(ObjectModelTest, SmokeTest) { CallResult<bool> cr{false}; auto prop1ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop1")); auto prop2ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop2")); Handle<JSObject> nullObj(runtime, nullptr); auto obj1 = toHandle(runtime, JSObject::create(runtime, nullObj)); // Try to get a property which hasn't been defined and expect undefined. EXPECT_CALLRESULT_UNDEFINED(JSObject::getNamed_RJS(obj1, runtime, *prop1ID)); // Put obj1.prop1 = 3.14 . cr = JSObject::putNamed_RJS( obj1, runtime, *prop1ID, runtime->makeHandle(HermesValue::encodeDoubleValue(3.14))); ASSERT_TRUE(*cr); // Get obj1.prop1. EXPECT_CALLRESULT_DOUBLE( 3.14, JSObject::getNamed_RJS(obj1, runtime, *prop1ID)); // Get obj1.prop2. EXPECT_CALLRESULT_UNDEFINED(JSObject::getNamed_RJS(obj1, runtime, *prop2ID)); // Set obj1.prop2 = true. cr = JSObject::putNamed_RJS( obj1, runtime, *prop2ID, runtime->makeHandle(HermesValue::encodeBoolValue(true))); ASSERT_TRUE(*cr); // Get obj1.prop1. EXPECT_CALLRESULT_DOUBLE( 3.14, JSObject::getNamed_RJS(obj1, runtime, *prop1ID)); // Get obj1.prop2. EXPECT_CALLRESULT_BOOL(TRUE, JSObject::getNamed_RJS(obj1, runtime, *prop2ID)); } /// Non-exhaustive test of prototype functionality. TEST_F(ObjectModelTest, SimplePrototypeTest) { auto prop1ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop1")); auto prop2ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop2")); // Create and populate a prototype object. Handle<JSObject> nullObj(runtime, nullptr); auto prototypeObj = toHandle(runtime, JSObject::create(runtime, nullObj)); // prototypeObj.prop1 = 10; ASSERT_TRUE(*JSObject::putNamed_RJS( prototypeObj, runtime, *prop1ID, runtime->makeHandle(HermesValue::encodeDoubleValue(10.0)))); // prototypeObj.prop2 = 20; ASSERT_TRUE(*JSObject::putNamed_RJS( prototypeObj, runtime, *prop2ID, runtime->makeHandle(HermesValue::encodeDoubleValue(20.0)))); // Create a child object. auto obj = toHandle(runtime, JSObject::create(runtime, prototypeObj)); // Read the inherited properties. EXPECT_CALLRESULT_DOUBLE( 10.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); EXPECT_CALLRESULT_DOUBLE( 20.0, JSObject::getNamed_RJS(obj, runtime, *prop2ID)); // obj.prop1 = 100; ASSERT_TRUE(*JSObject::putNamed_RJS( obj, runtime, *prop1ID, runtime->makeHandle(HermesValue::encodeDoubleValue(100.0)))); // Check the inherited property for the right value. EXPECT_CALLRESULT_DOUBLE( 100.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); // But make sure the prototype value didn't change. EXPECT_CALLRESULT_DOUBLE( 10.0, JSObject::getNamed_RJS(prototypeObj, runtime, *prop1ID)); } TEST_F(ObjectModelTest, DefineOwnPropertyTest) { GCScope gcScope{runtime, "ObjectModelTest.DefineOwnPropertyTest", 200}; auto *runtimeModule = RuntimeModule::createUninitialized(runtime, domain); CallResult<bool> cr{false}; auto prop1ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop1")); auto prop2ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop2")); Handle<JSObject> nullObj(runtime, nullptr); { // Empty flags. auto obj = toHandle(runtime, JSObject::create(runtime, nullObj)); DefinePropertyFlags dpf{}; ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, Runtime::getUndefinedValue())); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, writable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, enumerable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, configurable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, accessor); } { // Writable property, prevent extensions. auto obj = toHandle(runtime, JSObject::create(runtime, nullObj)); DefinePropertyFlags dpf{}; dpf.setValue = 1; dpf.setWritable = 1; dpf.writable = 1; ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, runtime->makeHandle(HermesValue::encodeDoubleValue(10.0)))); EXPECT_PROPERTY_FLAG(TRUE, obj, *prop1ID, writable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, enumerable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, configurable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, accessor); JSObject::preventExtensions(obj.get()); ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, runtime->makeHandle(HermesValue::encodeDoubleValue(20.0)))); ASSERT_FALSE(*JSObject::defineOwnProperty( obj, runtime, *prop2ID, dpf, runtime->makeHandle(HermesValue::encodeDoubleValue(20.0)))); EXPECT_CALLRESULT_DOUBLE( 20.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); EXPECT_CALLRESULT_UNDEFINED(JSObject::getNamed_RJS(obj, runtime, *prop2ID)); } { // Configurable property, change writable. auto obj = toHandle(runtime, JSObject::create(runtime, nullObj)); DefinePropertyFlags dpf{}; dpf.setValue = 1; dpf.setWritable = 1; dpf.writable = 1; dpf.setConfigurable = 1; dpf.configurable = 1; ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, runtime->makeHandle(HermesValue::encodeDoubleValue(10.0)))); ASSERT_TRUE(*JSObject::putNamed_RJS( obj, runtime, *prop1ID, runtime->makeHandle(HermesValue::encodeDoubleValue(11.0)))); EXPECT_CALLRESULT_DOUBLE( 11.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); dpf.setWritable = 1; dpf.writable = 0; ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, runtime->makeHandle(HermesValue::encodeDoubleValue(20.0)))); ASSERT_FALSE(*JSObject::putNamed_RJS( obj, runtime, *prop1ID, runtime->makeHandle(HermesValue::encodeDoubleValue(31.0)))); } { // Accessor property auto obj = toHandle(runtime, JSObject::create(runtime, nullObj)); DefinePropertyFlags dpf{}; dpf.setGetter = 1; dpf.setSetter = 1; dpf.setConfigurable = 1; dpf.configurable = 1; auto accessor = createPropertyAccessor(runtime, runtimeModule); ASSERT_TRUE( *JSObject::defineOwnProperty(obj, runtime, *prop1ID, dpf, accessor)); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, writable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, enumerable); EXPECT_PROPERTY_FLAG(TRUE, obj, *prop1ID, configurable); EXPECT_PROPERTY_FLAG(TRUE, obj, *prop1ID, accessor); auto accessor2 = createPropertyAccessor(runtime, runtimeModule); ASSERT_TRUE( *JSObject::defineOwnProperty(obj, runtime, *prop1ID, dpf, accessor2)); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, writable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, enumerable); EXPECT_PROPERTY_FLAG(TRUE, obj, *prop1ID, configurable); EXPECT_PROPERTY_FLAG(TRUE, obj, *prop1ID, accessor); } { // Non-configurable property. auto obj = toHandle(runtime, JSObject::create(runtime, nullObj)); DefinePropertyFlags dpf{}; dpf.setValue = 1; dpf.setConfigurable = 1; dpf.configurable = 0; dpf.setWritable = 1; dpf.writable = 1; dpf.setEnumerable = 1; dpf.enumerable = 1; ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, runtime->makeHandle(HermesValue::encodeDoubleValue(10.0)))); EXPECT_CALLRESULT_DOUBLE( 10.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); EXPECT_PROPERTY_FLAG(TRUE, obj, *prop1ID, writable); EXPECT_PROPERTY_FLAG(TRUE, obj, *prop1ID, enumerable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, configurable); dpf.writable = 0; ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, runtime->makeHandle(HermesValue::encodeDoubleValue(20.0)))); EXPECT_CALLRESULT_DOUBLE( 20.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, writable); EXPECT_PROPERTY_FLAG(TRUE, obj, *prop1ID, enumerable); EXPECT_PROPERTY_FLAG(FALSE, obj, *prop1ID, configurable); dpf.writable = 1; dpf.enumerable = 0; ASSERT_FALSE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, runtime->makeHandle(HermesValue::encodeDoubleValue(20.0)))); EXPECT_CALLRESULT_DOUBLE( 20.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); dpf.enumerable = 1; dpf.configurable = 1; ASSERT_FALSE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, runtime->makeHandle(HermesValue::encodeDoubleValue(40.0)))); EXPECT_CALLRESULT_DOUBLE( 20.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); dpf.clear(); dpf.setGetter = 1; dpf.setSetter = 1; auto accessor = createPropertyAccessor(runtime, runtimeModule); ASSERT_FALSE( *JSObject::defineOwnProperty(obj, runtime, *prop1ID, dpf, accessor)); // Change writable to true of non-configurable property. dpf.clear(); dpf.setWritable = 1; dpf.writable = 1; ASSERT_FALSE(*JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpf, Runtime::getUndefinedValue())); } } /// Non-exhaustive test of read-only property. TEST_F(ObjectModelTest, SimpleReadOnlyTest) { CallResult<bool> cr(false); auto prop1ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop1")); auto prop2ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop2")); Handle<JSObject> nullObj(runtime, nullptr); auto obj = toHandle(runtime, JSObject::create(runtime, nullObj)); // Define a read-only property. DefinePropertyFlags dpFlags1{}; dpFlags1.setValue = 1; dpFlags1.setWritable = 1; dpFlags1.writable = 0; cr = JSObject::defineOwnProperty( obj, runtime, *prop1ID, dpFlags1, runtime->makeHandle(HermesValue::encodeDoubleValue(10.0))); ASSERT_TRUE(*cr); // Double-check the value of obj.prop1. EXPECT_CALLRESULT_DOUBLE( 10.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); // Try to modify it with doThrow=false; cr = JSObject::putNamed_RJS( obj, runtime, *prop1ID, runtime->makeHandle(HermesValue::encodeDoubleValue(11.0))); ASSERT_EQ(ExecutionStatus::RETURNED, cr.getStatus()); ASSERT_FALSE(cr.getValue()); // Double-check the value of obj.prop1. EXPECT_CALLRESULT_DOUBLE( 10.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); // TODO: enable this when Runtime::raiseTypeError() is implemented. /* // Try to modify it with doThrow=true. cr = Object::putNamed_RJS(obj, runtime, prop1ID, HermesValue::encodeDoubleValue(11.0), true); ASSERT_EQ(ExecutionStatus::EXCEPTION, cr.getStatus()); // Double-check the value of obj.prop1. ASSERT_EQ(ExecutionStatus::RETURNED, Object::getNamed_RJS(obj, runtime, prop1ID)); ASSERT_EQ(10.0, runtime->getReturnedValue().getDouble());*/ // Define an ordinary property and then change it to read-only. // obj.prop2 = 20; ASSERT_TRUE(*JSObject::putNamed_RJS( obj, runtime, *prop2ID, runtime->makeHandle(HermesValue::encodeDoubleValue(20.0)))); // Make prop2 read-only. DefinePropertyFlags dpFlags2{}; dpFlags2.setWritable = 1; dpFlags2.writable = 0; cr = JSObject::defineOwnProperty( obj, runtime, *prop2ID, dpFlags2, runtime->makeHandle(HermesValue::encodeUndefinedValue())); ASSERT_TRUE(*cr); // Double-check the value of obj.prop2. EXPECT_CALLRESULT_DOUBLE( 20.0, JSObject::getNamed_RJS(obj, runtime, *prop2ID)); // Try to modify it with doThrow=false; cr = JSObject::putNamed_RJS( obj, runtime, *prop2ID, runtime->makeHandle(HermesValue::encodeDoubleValue(21.0))); ASSERT_EQ(ExecutionStatus::RETURNED, cr.getStatus()); ASSERT_FALSE(cr.getValue()); // Double-check the value of obj.prop2. EXPECT_CALLRESULT_DOUBLE( 20.0, JSObject::getNamed_RJS(obj, runtime, *prop2ID)); } TEST_F(ObjectModelTest, SimpleDeleteTest) { NamedPropertyDescriptor desc; auto prop1ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop1")); auto prop2ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop2")); auto prop3ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop3")); auto prop4ID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop4")); Handle<JSObject> nullObj(runtime, nullptr); auto obj = toHandle(runtime, JSObject::create(runtime, nullObj)); // Attempt to delete a nonexistent property. ASSERT_TRUE(*JSObject::deleteNamed(obj, runtime, *prop1ID)); // ob1.prop1 = 10.0; ASSERT_TRUE(*JSObject::putNamed_RJS( obj, runtime, *prop1ID, runtime->makeHandle(HermesValue::encodeDoubleValue(10.0)))); // Validate the property slot. ASSERT_TRUE(JSObject::getOwnNamedDescriptor(obj, runtime, *prop1ID, desc)); ASSERT_EQ(0u, desc.slot); // Attempt to delete a nonexistent property. ASSERT_TRUE(*JSObject::deleteNamed(obj, runtime, *prop2ID)); // Make sure obj.prop1 is still there. EXPECT_CALLRESULT_DOUBLE( 10.0, JSObject::getNamed_RJS(obj, runtime, *prop1ID)); // obj.prop2 = 20.0; ASSERT_TRUE(*JSObject::putNamed_RJS( obj, runtime, *prop2ID, runtime->makeHandle(HermesValue::encodeDoubleValue(20.0)))); ASSERT_TRUE(JSObject::getOwnNamedDescriptor(obj, runtime, *prop2ID, desc)); ASSERT_EQ(1u, desc.slot); // Delete obj.prop1. ASSERT_TRUE(*JSObject::deleteNamed(obj, runtime, *prop1ID)); // Make sure it is deleted. ASSERT_EQ( nullptr, JSObject::getNamedDescriptor(obj, runtime, *prop1ID, desc)); EXPECT_CALLRESULT_UNDEFINED(JSObject::getNamed_RJS(obj, runtime, *prop1ID)); // Make sure obj.prop2 is still there. EXPECT_CALLRESULT_DOUBLE( 20.0, JSObject::getNamed_RJS(obj, runtime, *prop2ID)); ASSERT_TRUE(JSObject::getOwnNamedDescriptor(obj, runtime, *prop2ID, desc)); ASSERT_EQ(1u, desc.slot); // obj.prop3 = 30.0; ASSERT_TRUE(*JSObject::putNamed_RJS( obj, runtime, *prop3ID, runtime->makeHandle(HermesValue::encodeDoubleValue(30.0)))); ASSERT_TRUE(JSObject::getOwnNamedDescriptor(obj, runtime, *prop3ID, desc)); ASSERT_EQ(0u, desc.slot); // Delete obj.prop2. ASSERT_TRUE(*JSObject::deleteNamed(obj, runtime, *prop2ID)); // Make sure it is deleted. ASSERT_EQ( nullptr, JSObject::getNamedDescriptor(obj, runtime, *prop2ID, desc)); EXPECT_CALLRESULT_UNDEFINED(JSObject::getNamed_RJS(obj, runtime, *prop2ID)); // obj.prop4 = 40.0; ASSERT_TRUE(*JSObject::putNamed_RJS( obj, runtime, *prop4ID, runtime->makeHandle(HermesValue::encodeDoubleValue(40.0)))); ASSERT_TRUE(JSObject::getOwnNamedDescriptor(obj, runtime, *prop4ID, desc)); ASSERT_EQ(1u, desc.slot); } TEST_F(ObjectModelTest, EnvironmentSmokeTest) { auto nullParent = runtime->makeHandle<Environment>(nullptr); auto parentEnv = runtime->makeHandle<Environment>( *Environment::create(runtime, nullParent, 2)); ASSERT_EQ(nullptr, parentEnv->getParentEnvironment(runtime)); ASSERT_TRUE(parentEnv->slot(0).isUndefined()); ASSERT_TRUE(parentEnv->slot(1).isUndefined()); parentEnv->slot(0).setNonPtr(HermesValue::encodeBoolValue(true)); ASSERT_TRUE(parentEnv->slot(0).getBool()); // Create a child environment. auto env = runtime->makeHandle<Environment>( *Environment::create(runtime, parentEnv, 2)); ASSERT_EQ(parentEnv.get(), env->getParentEnvironment(runtime)); ASSERT_TRUE(env->slot(0).isUndefined()); ASSERT_TRUE(env->slot(1).isUndefined()); } TEST_F(ObjectModelTest, NativeConstructorTest) { auto dateCons = toHandle( runtime, NativeConstructor::create( runtime, Runtime::makeNullHandle<JSObject>(), nullptr, nullptr, 0, JSDate::create, CellKind::FunctionKind)); auto crtRes = dateCons->newObject( dateCons, runtime, Runtime::makeNullHandle<JSObject>()); ASSERT_EQ(ExecutionStatus::RETURNED, crtRes.getStatus()); ASSERT_TRUE(dyn_vmcast<JSDate>(*crtRes)); } /// Test "computed" methods on a non-array object. TEST_F(ObjectModelTest, NonArrayComputedTest) { GCScope gcScope{runtime, "ObjectModelTest.NonArrayComputedTest", 128}; auto prop1Name = StringPrimitive::createNoThrow(runtime, "prop1"); auto prop1ID = *runtime->getIdentifierTable().getSymbolHandleFromPrimitive( runtime, prop1Name); auto prop2Name = StringPrimitive::createNoThrow(runtime, "prop2"); auto index5 = runtime->makeHandle(HermesValue::encodeDoubleValue(5)); auto index6 = runtime->makeHandle(HermesValue::encodeDoubleValue(6)); auto value10 = runtime->makeHandle(HermesValue::encodeDoubleValue(10)); auto value11 = runtime->makeHandle(HermesValue::encodeDoubleValue(11)); auto value12 = runtime->makeHandle(HermesValue::encodeDoubleValue(12)); Handle<JSObject> nullObj(runtime, nullptr); auto obj1 = toHandle(runtime, JSObject::create(runtime, nullObj)); DefinePropertyFlags dpf{}; dpf.setEnumerable = 1; dpf.enumerable = 1; dpf.setWritable = 1; dpf.writable = 1; dpf.setConfigurable = 1; dpf.configurable = 1; dpf.setValue = 1; // Define two computed properties "5" and "prop1". ASSERT_TRUE( *JSObject::defineOwnComputed(obj1, runtime, index5, dpf, value10)); ASSERT_TRUE( *JSObject::defineOwnComputed(obj1, runtime, prop1Name, dpf, value11)); // Make sure we can obtain "prop1" as a named property. NamedPropertyDescriptor ndesc; ASSERT_TRUE(JSObject::getNamedDescriptor(obj1, runtime, *prop1ID, ndesc)); // Get the two properties computed descriptors and the values using the // descriptors. ComputedPropertyDescriptor cdesc; MutableHandle<JSObject> propObjHandle{runtime}; JSObject::getComputedPrimitiveDescriptor( obj1, runtime, index5, propObjHandle, cdesc); ASSERT_TRUE(propObjHandle); ASSERT_FALSE(cdesc.flags.indexed); ASSERT_EQ( value10.get(), JSObject::getComputedSlotValue(obj1.get(), runtime, cdesc)); JSObject::getComputedPrimitiveDescriptor( obj1, runtime, prop1Name, propObjHandle, cdesc); ASSERT_TRUE(propObjHandle); ASSERT_FALSE(cdesc.flags.indexed); ASSERT_EQ( value11.get(), JSObject::getComputedSlotValue(obj1.get(), runtime, cdesc)); // Use getComputed() to obtain the values. EXPECT_CALLRESULT_VALUE( value10.get(), JSObject::getComputed_RJS(obj1, runtime, index5)); EXPECT_CALLRESULT_VALUE( value11.get(), JSObject::getComputed_RJS(obj1, runtime, prop1Name)); // Use getComputed() to obtain a missing property. EXPECT_CALLRESULT_VALUE( HermesValue::encodeUndefinedValue(), JSObject::getComputed_RJS(obj1, runtime, index6)); // Use putComputed() to update a value. ASSERT_TRUE(*JSObject::putComputed_RJS(obj1, runtime, index5, value12)); EXPECT_CALLRESULT_VALUE( value12.get(), JSObject::getComputed_RJS(obj1, runtime, index5)); // Try to get missing properties. JSObject::getComputedPrimitiveDescriptor( obj1, runtime, index6, propObjHandle, cdesc); ASSERT_FALSE(propObjHandle); JSObject::getComputedPrimitiveDescriptor( obj1, runtime, prop2Name, propObjHandle, cdesc); ASSERT_FALSE(propObjHandle); // Delete a missing property. ASSERT_TRUE(*JSObject::deleteComputed(obj1, runtime, index6)); ASSERT_TRUE(*JSObject::deleteComputed(obj1, runtime, prop2Name)); // Delete existing properties. ASSERT_TRUE(*JSObject::deleteComputed(obj1, runtime, index5)); JSObject::getComputedPrimitiveDescriptor( obj1, runtime, index5, propObjHandle, cdesc); ASSERT_FALSE(propObjHandle); ASSERT_TRUE(*JSObject::deleteComputed(obj1, runtime, prop1Name)); JSObject::getComputedPrimitiveDescriptor( obj1, runtime, prop1Name, propObjHandle, cdesc); ASSERT_FALSE(propObjHandle); } /// Test putNamedOrIndexed / getNamedOrIndexed. TEST_F(ObjectModelTest, NamedOrIndexed) { GCScope gcScope{runtime, "ObjectModelTest.NamedOrIndexed", 128}; CallResult<bool> cr{false}; auto nonIndexID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop1")); auto indexID1 = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"2")); auto indexID2 = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"100000000")); Handle<JSObject> nullObj(runtime, nullptr); auto nonIndexObj = toHandle(runtime, JSObject::create(runtime, nullObj)); auto indexObjRes = JSArray::create(runtime, 10, 0); ASSERT_EQ(indexObjRes.getStatus(), ExecutionStatus::RETURNED); auto indexObj = toHandle(runtime, std::move(*indexObjRes)); auto value1 = runtime->makeHandle(HermesValue::encodeDoubleValue(101)); auto value2 = runtime->makeHandle(HermesValue::encodeDoubleValue(102)); auto value3 = runtime->makeHandle(HermesValue::encodeDoubleValue(103)); // Initially nobody should have these properties. EXPECT_CALLRESULT_UNDEFINED( JSObject::getNamedOrIndexed(nonIndexObj, runtime, *nonIndexID)); EXPECT_CALLRESULT_UNDEFINED( JSObject::getNamedOrIndexed(nonIndexObj, runtime, *indexID1)); EXPECT_CALLRESULT_UNDEFINED( JSObject::getNamedOrIndexed(nonIndexObj, runtime, *indexID2)); EXPECT_CALLRESULT_UNDEFINED( JSObject::getNamedOrIndexed(indexObj, runtime, *nonIndexID)); EXPECT_CALLRESULT_UNDEFINED( JSObject::getNamedOrIndexed(indexObj, runtime, *indexID1)); EXPECT_CALLRESULT_UNDEFINED( JSObject::getNamedOrIndexed(indexObj, runtime, *indexID2)); // Set some properties. cr = JSObject::putNamedOrIndexed(indexObj, runtime, *nonIndexID, value1); ASSERT_TRUE(*cr); cr = JSObject::putNamedOrIndexed(indexObj, runtime, *indexID1, value2); ASSERT_TRUE(*cr); cr = JSObject::putNamedOrIndexed(indexObj, runtime, *indexID2, value3); ASSERT_TRUE(*cr); cr = JSObject::putNamedOrIndexed(nonIndexObj, runtime, *nonIndexID, value1); ASSERT_TRUE(*cr); cr = JSObject::putNamedOrIndexed(nonIndexObj, runtime, *indexID1, value2); ASSERT_TRUE(*cr); cr = JSObject::putNamedOrIndexed(nonIndexObj, runtime, *indexID2, value3); ASSERT_TRUE(*cr); // We expect both to be available via getNamedOrIndexed. EXPECT_CALLRESULT_DOUBLE( 101, JSObject::getNamedOrIndexed(indexObj, runtime, *nonIndexID)); EXPECT_CALLRESULT_DOUBLE( 102, JSObject::getNamedOrIndexed(indexObj, runtime, *indexID1)); EXPECT_CALLRESULT_DOUBLE( 103, JSObject::getNamedOrIndexed(indexObj, runtime, *indexID2)); EXPECT_CALLRESULT_DOUBLE( 101, JSObject::getNamedOrIndexed(nonIndexObj, runtime, *nonIndexID)); EXPECT_CALLRESULT_DOUBLE( 102, JSObject::getNamedOrIndexed(nonIndexObj, runtime, *indexID1)); EXPECT_CALLRESULT_DOUBLE( 103, JSObject::getNamedOrIndexed(nonIndexObj, runtime, *indexID2)); // We expect getNamed to access the non-index property in both objects, and // the index properties in the non-indexed object. EXPECT_CALLRESULT_DOUBLE( 101, JSObject::getNamed_RJS(indexObj, runtime, *nonIndexID)); EXPECT_CALLRESULT_DOUBLE( 101, JSObject::getNamed_RJS(nonIndexObj, runtime, *nonIndexID)); EXPECT_CALLRESULT_DOUBLE( 102, JSObject::getNamed_RJS(nonIndexObj, runtime, *indexID1)); EXPECT_CALLRESULT_DOUBLE( 103, JSObject::getNamed_RJS(nonIndexObj, runtime, *indexID2)); // Create non-symbol versions of these symbols and then test with // getComputed(). auto nonIndexIDString = runtime->makeHandle(HermesValue::encodeStringValue( runtime->getIdentifierTable().getStringPrim(runtime, *nonIndexID))); auto indexId1Num = runtime->makeHandle(HermesValue::encodeNumberValue(2)); auto indexId2Num = runtime->makeHandle(HermesValue::encodeNumberValue(100000000)); EXPECT_CALLRESULT_DOUBLE( 101, JSObject::getComputed_RJS(indexObj, runtime, nonIndexIDString)); EXPECT_CALLRESULT_DOUBLE( 102, JSObject::getComputed_RJS(indexObj, runtime, indexId1Num)); EXPECT_CALLRESULT_DOUBLE( 103, JSObject::getComputed_RJS(indexObj, runtime, indexId2Num)); EXPECT_CALLRESULT_DOUBLE( 101, JSObject::getComputed_RJS(nonIndexObj, runtime, nonIndexIDString)); EXPECT_CALLRESULT_DOUBLE( 102, JSObject::getComputed_RJS(nonIndexObj, runtime, indexId1Num)); } /// Test hasNamed / hasNamedOrIndexed / hasComputed. TEST_F(ObjectModelTest, HasProperty) { GCScope gcScope{runtime, "ObjectModelTest.HasProperty", 256}; auto nonIndexID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"prop1")); auto nonIndexIDString = runtime->makeHandle(HermesValue::encodeStringValue( runtime->getIdentifierTable().getStringPrim(runtime, *nonIndexID))); auto indexID = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"5")); auto indexIDNum = runtime->makeHandle(HermesValue::encodeNumberValue(5)); auto indexID2 = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"10")); auto indexID2Num = runtime->makeHandle(HermesValue::encodeNumberValue(10)); auto self = toHandle(runtime, std::move(*JSArray::create(runtime, 0, 0))); ASSERT_FALSE(*JSObject::hasComputed(self, runtime, nonIndexIDString)); ASSERT_FALSE(*JSObject::hasComputed(self, runtime, indexIDNum)); ASSERT_FALSE(*JSObject::hasComputed(self, runtime, indexID2Num)); ASSERT_FALSE(JSObject::hasNamedOrIndexed(self, runtime, *nonIndexID)); ASSERT_FALSE(JSObject::hasNamedOrIndexed(self, runtime, *indexID)); ASSERT_FALSE(JSObject::hasNamedOrIndexed(self, runtime, *indexID2)); ASSERT_FALSE(JSObject::hasNamed(self, runtime, *nonIndexID)); ASSERT_TRUE(*JSObject::putNamedOrIndexed(self, runtime, *nonIndexID, self)); ASSERT_TRUE(*JSObject::hasComputed(self, runtime, nonIndexIDString)); ASSERT_FALSE(*JSObject::hasComputed(self, runtime, indexIDNum)); ASSERT_FALSE(*JSObject::hasComputed(self, runtime, indexID2Num)); ASSERT_TRUE(JSObject::hasNamedOrIndexed(self, runtime, *nonIndexID)); ASSERT_FALSE(JSObject::hasNamedOrIndexed(self, runtime, *indexID)); ASSERT_FALSE(JSObject::hasNamedOrIndexed(self, runtime, *indexID2)); ASSERT_TRUE(JSObject::hasNamed(self, runtime, *nonIndexID)); ASSERT_TRUE(*JSObject::putNamedOrIndexed(self, runtime, *indexID, self)); ASSERT_TRUE(*JSObject::hasComputed(self, runtime, nonIndexIDString)); ASSERT_TRUE(*JSObject::hasComputed(self, runtime, indexIDNum)); ASSERT_FALSE(*JSObject::hasComputed(self, runtime, indexID2Num)); ASSERT_TRUE(JSObject::hasNamedOrIndexed(self, runtime, *nonIndexID)); ASSERT_TRUE(JSObject::hasNamedOrIndexed(self, runtime, *indexID)); ASSERT_FALSE(JSObject::hasNamedOrIndexed(self, runtime, *indexID2)); ASSERT_TRUE(JSObject::hasNamed(self, runtime, *nonIndexID)); DefinePropertyFlags dpf{}; ASSERT_TRUE(*JSObject::defineOwnProperty( self, runtime, *indexID2, dpf, Runtime::getUndefinedValue())); ASSERT_TRUE(*JSObject::hasComputed(self, runtime, nonIndexIDString)); ASSERT_TRUE(*JSObject::hasComputed(self, runtime, indexIDNum)); ASSERT_TRUE(*JSObject::hasComputed(self, runtime, indexID2Num)); ASSERT_TRUE(JSObject::hasNamedOrIndexed(self, runtime, *nonIndexID)); ASSERT_TRUE(JSObject::hasNamedOrIndexed(self, runtime, *indexID)); ASSERT_TRUE(JSObject::hasNamedOrIndexed(self, runtime, *indexID2)); ASSERT_TRUE(JSObject::hasNamed(self, runtime, *nonIndexID)); } TEST_F(ObjectModelTest, UpdatePropertyFlagsWithoutTransitionsTest) { GCScope gcScope{ runtime, "ObjectModelTest.UpdatePropertyFlagsWithoutTransitionsTest", 48}; auto aHnd = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"a")); auto bHnd = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"b")); auto cHnd = *runtime->getIdentifierTable().getSymbolHandle( runtime, createUTF16Ref(u"c")); Handle<JSObject> nullObj(runtime, nullptr); auto obj = toHandle(runtime, JSObject::create(runtime, nullObj)); ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *aHnd, DefinePropertyFlags::getDefaultNewPropertyFlags(), Runtime::getUndefinedValue())); ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *bHnd, DefinePropertyFlags::getDefaultNewPropertyFlags(), Runtime::getUndefinedValue())); ASSERT_TRUE(*JSObject::defineOwnProperty( obj, runtime, *cHnd, DefinePropertyFlags::getDefaultNewPropertyFlags(), Runtime::getUndefinedValue())); // Only freeze obj.a and obj.c. std::vector<SymbolID> propsToFreeze; propsToFreeze.push_back(*aHnd); propsToFreeze.push_back(*cHnd); PropertyFlags clearFlags; clearFlags.writable = 1; clearFlags.configurable = 1; PropertyFlags setFlags; JSObject::updatePropertyFlagsWithoutTransitions( obj, runtime, clearFlags, setFlags, llvm::ArrayRef<SymbolID>(propsToFreeze)); // check each property descriptor. EXPECT_PROPERTY_FLAG(FALSE, obj, *aHnd, writable); EXPECT_PROPERTY_FLAG(FALSE, obj, *aHnd, configurable); EXPECT_PROPERTY_FLAG(TRUE, obj, *bHnd, writable); EXPECT_PROPERTY_FLAG(TRUE, obj, *bHnd, configurable); EXPECT_PROPERTY_FLAG(FALSE, obj, *cHnd, writable); EXPECT_PROPERTY_FLAG(FALSE, obj, *cHnd, configurable); // Freeze all properties. JSObject::updatePropertyFlagsWithoutTransitions( obj, runtime, clearFlags, setFlags, llvm::None); // check each property descriptor. EXPECT_PROPERTY_FLAG(FALSE, obj, *aHnd, writable); EXPECT_PROPERTY_FLAG(FALSE, obj, *aHnd, configurable); EXPECT_PROPERTY_FLAG(FALSE, obj, *bHnd, writable); EXPECT_PROPERTY_FLAG(FALSE, obj, *bHnd, configurable); EXPECT_PROPERTY_FLAG(FALSE, obj, *cHnd, writable); EXPECT_PROPERTY_FLAG(FALSE, obj, *cHnd, configurable); } #ifdef HERMESVM_GC_NONCONTIG_GENERATIONAL struct ObjectModelLargeHeapTest : public RuntimeTestFixtureBase { ObjectModelLargeHeapTest() : RuntimeTestFixtureBase( RuntimeConfig::Builder() .withGCConfig(GCConfig::Builder(kTestGCConfigBuilder) .withInitHeapSize(1 << 20) .withMaxHeapSize(1 << 26) .build()) .build()) {} }; // This test will OOM before it throws on non-NC GCs. TEST_F(ObjectModelLargeHeapTest, LargeObjectThrowsRangeError) { Handle<JSObject> obj = toHandle(runtime, JSObject::create(runtime)); MutableHandle<> i{runtime, HermesValue::encodeNumberValue(0)}; while (true) { GCScopeMarkerRAII marker{gcScope}; CallResult<bool> res = JSObject::putComputed_RJS(obj, runtime, i, i); if (res == ExecutionStatus::EXCEPTION) { // Check that RangeError was thrown. auto *err = vmcast<JSObject>(runtime->getThrownValue()); EXPECT_EQ( err->getParent(runtime), vmcast<JSObject>(runtime->RangeErrorPrototype)); return; } i = HermesValue::encodeNumberValue(i->getNumber() + 1); } FAIL() << "Didn't throw"; } #endif } // namespace
36.506522
80
0.707735
[ "object", "vector" ]
44029cb97eb3985bb07ed8e69be41fc6d4943746
2,678
cpp
C++
libs/api_common/api_common.cpp
Mu-L/ebpf-for-windows
18456999b7e8ef04357299e13c29eadf3cb9043a
[ "MIT" ]
1
2021-07-16T05:09:57.000Z
2021-07-16T05:09:57.000Z
libs/api_common/api_common.cpp
maojun1998/ebpf-for-windows
266578ee633d1d0f3fa70a08af7f7bada10b47de
[ "MIT" ]
null
null
null
libs/api_common/api_common.cpp
maojun1998/ebpf-for-windows
266578ee633d1d0f3fa70a08af7f7bada10b47de
[ "MIT" ]
null
null
null
// Copyright (c) Microsoft Corporation // SPDX-License-Identifier: MIT #include <stdint.h> #include <string> #include <vector> #include <Windows.h> #include "api_common.hpp" #include "ebpf_protocol.h" #include "ebpf_result.h" #include "device_helper.hpp" #include "ebpf_verifier_wrapper.hpp" thread_local static const ebpf_program_type_t* _global_program_type = nullptr; thread_local static const ebpf_attach_type_t* _global_attach_type = nullptr; const char* allocate_string(const std::string& string, uint32_t* length) noexcept { char* new_string; size_t string_length = string.size() + 1; new_string = (char*)malloc(string_length); if (new_string != nullptr) { strcpy_s(new_string, string_length, string.c_str()); if (length != nullptr) { *length = (uint32_t)string_length; } } return new_string; } std::vector<uint8_t> convert_ebpf_program_to_bytes(const std::vector<ebpf_inst>& instructions) { return {reinterpret_cast<const uint8_t*>(instructions.data()), reinterpret_cast<const uint8_t*>(instructions.data()) + instructions.size() * sizeof(ebpf_inst)}; } int get_file_size(const char* filename, size_t* byte_code_size) noexcept { int result = 0; *byte_code_size = NULL; struct stat st = {0}; result = stat(filename, &st); if (!result) { std::cout << "file size " << st.st_size << std::endl; *byte_code_size = st.st_size; } return result; } ebpf_result_t query_map_definition( ebpf_handle_t handle, uint32_t* size, uint32_t* type, uint32_t* key_size, uint32_t* value_size, uint32_t* max_entries) noexcept { _ebpf_operation_query_map_definition_request request{ sizeof(request), ebpf_operation_id_t::EBPF_OPERATION_QUERY_MAP_DEFINITION, reinterpret_cast<uint64_t>(handle)}; _ebpf_operation_query_map_definition_reply reply; uint32_t result = invoke_ioctl(request, reply); if (result == ERROR_SUCCESS) { *size = reply.map_definition.size; *type = reply.map_definition.type; *key_size = reply.map_definition.key_size; *value_size = reply.map_definition.value_size; *max_entries = reply.map_definition.max_entries; } return windows_error_to_ebpf_result(result); } void set_global_program_and_attach_type(const ebpf_program_type_t* program_type, const ebpf_attach_type_t* attach_type) { _global_program_type = program_type; _global_attach_type = attach_type; } const ebpf_program_type_t* get_global_program_type() { return _global_program_type; } const ebpf_attach_type_t* get_global_attach_type() { return _global_attach_type; }
26.78
119
0.722554
[ "vector" ]
440357c1477f2d23a5d12c89f5bc8af6924244fb
5,231
cpp
C++
src/Menus/GameOverMenu.cpp
MatheusBurda/Desert
42b0cdcc32bebce01ae45b249ad3ef53bfeebdbc
[ "MIT" ]
null
null
null
src/Menus/GameOverMenu.cpp
MatheusBurda/Desert
42b0cdcc32bebce01ae45b249ad3ef53bfeebdbc
[ "MIT" ]
null
null
null
src/Menus/GameOverMenu.cpp
MatheusBurda/Desert
42b0cdcc32bebce01ae45b249ad3ef53bfeebdbc
[ "MIT" ]
null
null
null
#include "Menus/GameOverMenu.h" #define BACKGROUND_PATH "./assets/Backgrounds/MenuBackground.png" #define LEADERBOARD_PATH "./saves/Leaderboard.txt" #include <fstream> #include <map> namespace Menus { GameOverMenu::GameOverMenu(States::StateMachine* pSM, States::Level* plvl) : Menu(), State(pSM, States::stateID::gameOver), title(Math::CoordF(0, 0), "GAME OVER"), points(), name(Math::CoordF(0, 0), ""), nameLabel(Math::CoordF(0, 0), "Name:"), input(), pointsToIncrement(0), plvl(plvl) { Managers::Graphics* GM = Managers::Graphics::getInstance(); GraphicalElements::Button* bt = NULL; bt = new GraphicalElements::Button(Math::CoordF(GM->getWindowSize().x / 2.0f - 200, GM->getWindowSize().y - 100), "PLAY AGAIN"); bt->select(true); vectorOfButtons.push_back(bt); bt = new GraphicalElements::Button(Math::CoordF(GM->getWindowSize().x / 2.0f + 200, GM->getWindowSize().y - 100), "MAIN MENU"); vectorOfButtons.push_back(bt); selected = 0; max = 1; title.setPosition(Math::CoordF(GM->getWindowSize().x / 2.0f, GM->getWindowSize().y / 2 - 200)); title.setFontSize(100); title.setTextAlignment(GraphicalElements::TextAlignment::center); title.setTextColor(77.6, 68.2, 44.3); points.setPosition(Math::CoordF(GM->getWindowSize().x / 2.0f - 100, GM->getWindowSize().y / 2)); points.setFontSize(40); points.setTextColor(77.6, 68.2, 44.3); points.setTextAlignment(GraphicalElements::TextAlignment::center); nameLabel.setPosition(Math::CoordF(GM->getWindowSize().x / 2.0f - 200, GM->getWindowSize().y / 2 + 100)); nameLabel.setFontSize(40); nameLabel.setTextColor(77.6, 68.2, 44.3); nameLabel.setTextAlignment(GraphicalElements::TextAlignment::center); name.setPosition(Math::CoordF(GM->getWindowSize().x / 2.0f + nameLabel.getSize().x - 200, GM->getWindowSize().y / 2 + 100 - nameLabel.getSize().y)); name.setFontSize(40); name.setTextColor(77.6, 68.2, 44.3); name.setTextAlignment(GraphicalElements::TextAlignment::center); } GameOverMenu::~GameOverMenu() { } void GameOverMenu::update(float dt) { name.setTextInfo(input.getString()); if (pointsToIncrement < plvl->getPlayerPoints()) pointsToIncrement += 10; points.setTextInfo("Points: " + std::to_string(plvl->getPlayerPoints())); } /* Menu operation to render all it's objects. */ void GameOverMenu::render() { updateView(); back.render(); for (it = vectorOfButtons.begin(); it != vectorOfButtons.end(); ++it) (*it)->render(); title.render(); points.render(); name.render(); nameLabel.render(); } void GameOverMenu::exec() { if (active) { active = false; switch (selected) { case 0: changeState(States::stateID::playing); break; case 1: changeState(States::stateID::mainMenu); break; default: break; } writeToLeaderboardFile(); } } void GameOverMenu::resetState() { for (it = vectorOfButtons.begin(); it != vectorOfButtons.end(); ++it) (*it)->select(false); selected = 0; vectorOfButtons[selected]->select(true); active = true; input.reset(); } void GameOverMenu::writeToLeaderboardFile() { unsigned int playerPoints = plvl->getPlayerPoints(); /* ================================= Reading File ================================= */ std::ifstream readFile; readFile.open(LEADERBOARD_PATH, std::ios::in); std::multimap<int, std::string> pointsAndNamesMap; if (readFile) { unsigned int points; std::string name; std::string pointsString; for (int i = 0; i < 10; i++) { std::getline(readFile, pointsString); std::getline(readFile, name); if (pointsString.length() > 0) pointsAndNamesMap.insert(std::pair<int, std::string>(std::stoi(pointsString), name)); } readFile.close(); } /* ================================= Writing File ================================= */ if (playerPoints != 0 && input.getString().length() > 1) pointsAndNamesMap.insert(std::pair<int, std::string>(playerPoints, input.getString())); std::ofstream writeFile; writeFile.open(LEADERBOARD_PATH, std::ios::out | std::ios::trunc); if (!writeFile) { std::cout << "ERROR writing to file on GameOverMenu" << std::endl; exit(1); } while (pointsAndNamesMap.size() > 10) pointsAndNamesMap.erase(pointsAndNamesMap.begin()); for (auto itr = pointsAndNamesMap.rbegin(); itr != pointsAndNamesMap.rend(); ++itr) { writeFile << (*itr).first << std::endl; writeFile << (*itr).second << std::endl; } writeFile.close(); } }
33.318471
156
0.562608
[ "render" ]
440d2de42f017961a4cfbad16617567e5663ec8d
1,739
cpp
C++
dice_rng.cpp
jsrankin-com/DiceRNG
8849c8ea5187d913cc2ac8ca84beb856d5a43b03
[ "MIT" ]
null
null
null
dice_rng.cpp
jsrankin-com/DiceRNG
8849c8ea5187d913cc2ac8ca84beb856d5a43b03
[ "MIT" ]
null
null
null
dice_rng.cpp
jsrankin-com/DiceRNG
8849c8ea5187d913cc2ac8ca84beb856d5a43b03
[ "MIT" ]
null
null
null
// ************************EIGHTY CHARACTER CODING AREA*************************// LANDSCAPE COMMENT SECTION LENGTH /* _______. dice_rng.cpp ______ | . . |\ dice_rng.h / /\ | . |.\ Creates an object that acts as a cubical / ' / \ | . . |.'| 6-sided die. The die can be rolled by either /_____/. . \ |_______|.'| calling the public roll function or the \ . . \ / \ ' . \'| overloaded parentheses. If a number is supplied \ . . \ / \____'__\| it will roll the die that many times and return \_____\/ the results as a vector of integers. */ #include "dice_rng.h" #include <iostream> DiceRNG::DiceRNG() { //Seed with random device generator = std::mt19937(device()); distribution = std::uniform_int_distribution<int>(1, 6); } int DiceRNG::operator()() { return DiceRNG::Roll(); } std::vector<int> DiceRNG::operator()(int n) { return DiceRNG::Roll(n); } //Returns one roll as an int int DiceRNG::Roll() { return distribution(generator); } //Returns a vector of rolls as ints std::vector<int> DiceRNG::Roll(int n) { std::vector<int> ret; try { //Try to reserve the memory if (n < ret.max_size() && n > 0) ret.reserve(n); for (; 0 < n; --n) ret.emplace_back(distribution(generator)); } catch (const std::bad_alloc& ba) { std::cerr << "Bad allocation: " << ba.what() << '\n'; } catch (const std::length_error& le) { std::cerr << "Length error: " << le.what() << '\n'; } return ret; } /* References: https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution https://www.cplusplus.com/reference/vector/vector/reserve/ Art by valkyrie https://www.asciiart.eu/miscellaneous/dice Author: Jeffrey S. Rankin http://jsrankin.com admin@jsrankin.com */
22.294872
115
0.627372
[ "object", "vector" ]
440f9966b3c60d0e08620877af980f480f9d4039
6,369
cpp
C++
engine/runtime/rendering/generator/convex_polygon_mesh.cpp
ValtoForks/EtherealEngine
ab769803dcd71a61c2805afd259959b62fcdc1ff
[ "BSD-2-Clause" ]
791
2016-11-04T14:13:41.000Z
2022-03-20T20:47:31.000Z
engine/runtime/rendering/generator/convex_polygon_mesh.cpp
ValtoForks/EtherealEngine
ab769803dcd71a61c2805afd259959b62fcdc1ff
[ "BSD-2-Clause" ]
28
2016-12-01T05:59:30.000Z
2021-03-20T09:49:26.000Z
engine/runtime/rendering/generator/convex_polygon_mesh.cpp
ValtoForks/EtherealEngine
ab769803dcd71a61c2805afd259959b62fcdc1ff
[ "BSD-2-Clause" ]
151
2016-12-21T09:44:43.000Z
2022-03-31T13:42:18.000Z
#include "convex_polygon_mesh.hpp" #include "circle_shape.hpp" #include "iterator.hpp" using namespace generator; convex_polygon_mesh_t::triangles_t::triangles_t(const convex_polygon_mesh_t& mesh) noexcept : mesh_{&mesh} , odd_{false} , segment_index_{0} , side_index_{0} , ring_index_{0} { } bool convex_polygon_mesh_t::triangles_t::done() const noexcept { return mesh_->segments_ == 0 || mesh_->vertices_.size() < 3 || ring_index_ == mesh_->rings_; } triangle_t convex_polygon_mesh_t::triangles_t::generate() const { if(done()) throw std::runtime_error("Done!"); triangle_t triangle{}; const int verticesPerRing = mesh_->segments_ * int(mesh_->vertices_.size()); const int delta = ring_index_ * verticesPerRing + 1; const int n1 = side_index_ * mesh_->segments_ + segment_index_; const int n2 = (n1 + 1) % verticesPerRing; if(ring_index_ == mesh_->rings_ - 1) { triangle.vertices[0] = 0; triangle.vertices[1] = n1 + delta; triangle.vertices[2] = n2 + delta; } else { if(!odd_) { triangle.vertices[0] = n1 + delta; triangle.vertices[1] = n2 + delta; triangle.vertices[2] = n1 + verticesPerRing + delta; } else { triangle.vertices[0] = n2 + delta; triangle.vertices[1] = n2 + verticesPerRing + delta; triangle.vertices[2] = n1 + verticesPerRing + delta; } } return triangle; } void convex_polygon_mesh_t::triangles_t::next() { if(done()) throw std::runtime_error("Done!"); if(ring_index_ == mesh_->rings_ - 1) { ++segment_index_; if(segment_index_ == mesh_->segments_) { segment_index_ = 0; ++side_index_; if(side_index_ == static_cast<int>(mesh_->vertices_.size())) { ++ring_index_; } } } else { odd_ = !odd_; if(!odd_) { ++segment_index_; if(segment_index_ == mesh_->segments_) { segment_index_ = 0; ++side_index_; if(side_index_ == static_cast<int>(mesh_->vertices_.size())) { side_index_ = 0; odd_ = false; ++ring_index_; } } } } } convex_polygon_mesh_t::vertices_t::vertices_t(const convex_polygon_mesh_t& mesh) noexcept : mesh_{&mesh} , center_done_{false} , segment_index_{0} , side_index_{0} , ring_index_{0} { } bool convex_polygon_mesh_t::vertices_t::done() const noexcept { return mesh_->segments_ == 0 || mesh_->rings_ == 0 || mesh_->vertices_.size() < 3 || ring_index_ == mesh_->rings_; } mesh_vertex_t convex_polygon_mesh_t::vertices_t::generate() const { if(done()) throw std::runtime_error("Done!"); mesh_vertex_t vertex{}; if(center_done_) { const double ringDelta = static_cast<double>(ring_index_) / mesh_->rings_; const double segmentDelta = static_cast<double>(segment_index_) / mesh_->segments_; const int nextSide = (side_index_ + 1) % mesh_->vertices_.size(); const gml::dvec3 a = gml::mix(mesh_->vertices_.at(side_index_), mesh_->center_, ringDelta); const gml::dvec3 b = gml::mix(mesh_->vertices_.at(nextSide), mesh_->center_, ringDelta); vertex.position = gml::mix(a, b, segmentDelta); } else { vertex.position = mesh_->center_; } vertex.normal = mesh_->normal_; const gml::dvec3 delta = vertex.position - mesh_->center_; vertex.tex_coord[0] = gml::dot(mesh_->tangent_, delta); vertex.tex_coord[1] = gml::dot(mesh_->bitangent_, delta); vertex.tex_coord -= mesh_->tex_delta_; return vertex; } void convex_polygon_mesh_t::vertices_t::next() { if(done()) throw std::runtime_error("Done!"); if(!center_done_) { center_done_ = true; } else { ++segment_index_; if(segment_index_ == mesh_->segments_) { segment_index_ = 0; ++side_index_; if(side_index_ == static_cast<int>(mesh_->vertices_.size())) { side_index_ = 0; ++ring_index_; } } } } namespace { std::vector<gml::dvec3> makevertices_t(double radius, int sides) noexcept { std::vector<gml::dvec3> result{}; circle_shape_t circle{radius, sides}; for(const auto& v : circle.vertices()) { result.push_back(gml::dvec3{v.position[0], v.position[1], 0.0}); } result.pop_back(); // The last one is a dublicate with the first one return result; } std::vector<gml::dvec3> convertvertices_t(const std::vector<gml::dvec2>& vertices) noexcept { std::vector<gml::dvec3> result(vertices.size()); for(std::size_t i = 0; i < vertices.size(); ++i) { result.at(i) = gml::dvec3{vertices.at(i)[0], vertices.at(i)[1], 0.0}; } return result; } gml::dvec3 calcCenter(const std::vector<gml::dvec3>& vertices) noexcept { gml::dvec3 result{}; for(const auto& v : vertices) { result += v; } return result / static_cast<double>(vertices.size()); } gml::dvec3 calcNormal(const gml::dvec3& center, const std::vector<gml::dvec3>& vertices) { gml::dvec3 normal{}; for(int i = 0; i < static_cast<int>(vertices.size()); ++i) { normal += gml::normal(center, vertices[i], vertices[(i + 1) % vertices.size()]); } return gml::normalize(normal); } } convex_polygon_mesh_t::convex_polygon_mesh_t(double radius, int sides, int segments, int rings) noexcept : convex_polygon_mesh_t{makevertices_t(radius, sides), segments, rings} { } convex_polygon_mesh_t::convex_polygon_mesh_t(const std::vector<gml::dvec2>& vertices, int segments, int rings) noexcept : convex_polygon_mesh_t{convertvertices_t(vertices), segments, rings} { } convex_polygon_mesh_t::convex_polygon_mesh_t(std::vector<gml::dvec3> vertices, int segments, int rings) noexcept : vertices_{std::move(vertices)} , segments_{segments} , rings_{rings} , center_{calcCenter(vertices_)} , normal_{calcNormal(center_, vertices_)} , tangent_{} , bitangent_{} , tex_delta_{} { if(vertices_.size() > 0) { tangent_ = gml::normalize(vertices_.at(0) - center_); bitangent_ = gml::cross(normal_, tangent_); gml::dvec2 texMax{}; for(const gml::dvec3& vertex : vertices_) { gml::dvec3 delta = vertex - center_; gml::dvec2 uv{gml::dot(tangent_, delta), gml::dot(bitangent_, delta)}; tex_delta_ = gml::min(tex_delta_, uv); texMax = gml::max(texMax, uv); } gml::dvec2 size = texMax - tex_delta_; tangent_ /= size[0]; bitangent_ /= size[1]; tex_delta_ /= size; } } convex_polygon_mesh_t::triangles_t convex_polygon_mesh_t::triangles() const noexcept { return triangles_t{*this}; } convex_polygon_mesh_t::vertices_t convex_polygon_mesh_t::vertices() const noexcept { return vertices_t{*this}; }
21.301003
104
0.682682
[ "mesh", "vector" ]
44100230bf8f15d9898e497a68f0dddbe9fba675
12,307
cpp
C++
clients/tests/multithread_test.cpp
alexshuang/rocFFT
48d3d7daead41463efcec80f988408be812ecaf7
[ "MIT" ]
null
null
null
clients/tests/multithread_test.cpp
alexshuang/rocFFT
48d3d7daead41463efcec80f988408be812ecaf7
[ "MIT" ]
null
null
null
clients/tests/multithread_test.cpp
alexshuang/rocFFT
48d3d7daead41463efcec80f988408be812ecaf7
[ "MIT" ]
null
null
null
// Copyright (c) 2020 - present Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #include "../client_utils.h" #include "accuracy_test.h" #include "gpubuf.h" #include "rocfft.h" #include "rocfft_against_fftw.h" #include <gtest/gtest.h> #include <hip/hip_runtime.h> #include <memory> #include <random> #include <thread> #include <vector> // normalize results of an inverse transform, so it can be directly // compared to the original data before the forward transform __global__ void normalize_inverse_results(float2* array, float N) { const int idx = blockIdx.x * blockDim.x + threadIdx.x; array[idx].x /= N; array[idx].y /= N; } // Run a transform of specified dimensions, size N on each dimension. // Data is randomly generated based on the seed value, and we do a // forward + inverse transform and compare against what we started // with. struct Test_Transform { // real constructor sets all the data up and creates the plans Test_Transform(size_t _N, size_t _dim, uint32_t _seed) : N(_N) , dim(_dim) , seed(_seed) { // compute total data size size_t datasize = 1; for(size_t i = 0; i < dim; ++i) { datasize *= N; } size_t Nbytes = datasize * sizeof(float2); // Create HIP device buffers if(device_mem_in.alloc(Nbytes) != hipSuccess) throw std::bad_alloc(); if(device_mem_out.alloc(Nbytes) != hipSuccess) throw std::bad_alloc(); // Initialize data std::minstd_rand gen(seed); std::uniform_real_distribution<float> dist(-1.0f, 1.0f); host_mem_in.resize(datasize); host_mem_out.resize(datasize); for(size_t i = 0; i < datasize; i++) { host_mem_in[i].x = dist(gen); host_mem_in[i].y = dist(gen); } // Copy data to device EXPECT_EQ( hipMemcpy(device_mem_in.data(), host_mem_in.data(), Nbytes, hipMemcpyHostToDevice), hipSuccess); } Test_Transform(const Test_Transform&) = delete; void operator=(const Test_Transform&) = delete; Test_Transform(Test_Transform&& other) : device_mem_in(std::move(other.device_mem_in)) , device_mem_out(std::move(other.device_mem_out)) { this->stream = other.stream; other.stream = nullptr; this->work_buffer = other.work_buffer; other.work_buffer = nullptr; this->host_mem_in.swap(other.host_mem_in); this->host_mem_out.swap(other.host_mem_out); } void run_transform() { // Create rocFFT plans (forward + inverse) std::vector<size_t> lengths(dim, N); EXPECT_EQ(rocfft_plan_create(&plan, rocfft_placement_notinplace, rocfft_transform_type_complex_forward, rocfft_precision_single, dim, lengths.data(), 1, nullptr), rocfft_status_success); EXPECT_EQ(rocfft_plan_create(&plan_inv, rocfft_placement_inplace, rocfft_transform_type_complex_inverse, rocfft_precision_single, dim, lengths.data(), 1, nullptr), rocfft_status_success); // allocate work buffer if necessary EXPECT_EQ(rocfft_plan_get_work_buffer_size(plan, &work_buffer_size), rocfft_status_success); // NOTE: assuming that same-sized work buffer is ok for both // forward and inverse transforms if(work_buffer_size) { EXPECT_EQ(hipMalloc(&work_buffer, work_buffer_size), hipSuccess); } EXPECT_EQ(hipStreamCreate(&stream), hipSuccess); rocfft_execution_info info; EXPECT_EQ(rocfft_execution_info_create(&info), rocfft_status_success); EXPECT_EQ(rocfft_execution_info_set_stream(info, stream), rocfft_status_success); EXPECT_EQ(rocfft_execution_info_set_work_buffer(info, work_buffer, work_buffer_size), rocfft_status_success); // Execute forward plan out-of-place void* in_ptr = device_mem_in.data(); void* out_ptr = device_mem_out.data(); EXPECT_EQ(rocfft_execute(plan, &in_ptr, &out_ptr, info), rocfft_status_success); // Execute inverse plan in-place EXPECT_EQ(rocfft_execute(plan_inv, &out_ptr, nullptr, info), rocfft_status_success); EXPECT_EQ(rocfft_execution_info_destroy(info), rocfft_status_success); // Apply normalization so the values really are comparable hipLaunchKernelGGL(normalize_inverse_results, host_mem_out.size(), 1, 0, // sharedMemBytes stream, // stream static_cast<float2*>(device_mem_out.data()), static_cast<float>(host_mem_out.size())); ran_transform = true; } void do_cleanup() { // complain loudly if we set up for a transform but did not // actually run it if(plan && !ran_transform) ADD_FAILURE(); // wait for execution to finish if(stream) { EXPECT_EQ(hipStreamSynchronize(stream), hipSuccess); EXPECT_EQ(hipStreamDestroy(stream), hipSuccess); stream = nullptr; } EXPECT_EQ(hipFree(work_buffer), hipSuccess); work_buffer = nullptr; EXPECT_EQ(rocfft_plan_destroy(plan), rocfft_status_success); plan = nullptr; EXPECT_EQ(rocfft_plan_destroy(plan_inv), rocfft_status_success); plan_inv = nullptr; // Copy result back to host if(device_mem_out.data() && !host_mem_out.empty()) { EXPECT_EQ(hipMemcpy(host_mem_out.data(), device_mem_out.data(), host_mem_out.size() * sizeof(float2), hipMemcpyDeviceToHost), hipSuccess); // Compare data we got to the original. // We're running 2 transforms (forward+inverse), so we // should tolerate 2x the error of a single transform. std::vector<std::pair<size_t, size_t>> linf_failures; const double MAX_TRANSFORM_ERROR = 2 * type_epsilon<float>(); auto norm = norm_complex(reinterpret_cast<const std::complex<float>*>(host_mem_in.data()), host_mem_in.size(), 1, 1, host_mem_in.size()); auto diff = distance_1to1_complex( reinterpret_cast<const std::complex<float>*>(host_mem_in.data()), reinterpret_cast<const std::complex<float>*>(host_mem_out.data()), // data is all contiguous, we can treat it as 1d host_mem_in.size(), 1, 1, host_mem_in.size(), 1, host_mem_out.size(), linf_failures, MAX_TRANSFORM_ERROR); EXPECT_LT(diff.l_2 / norm.l_2, sqrt(log2(host_mem_in.size())) * MAX_TRANSFORM_ERROR); EXPECT_LT(diff.l_inf / norm.l_inf, log2(host_mem_in.size()) * MAX_TRANSFORM_ERROR); // Free buffers host_mem_in.clear(); host_mem_out.clear(); } } ~Test_Transform() { do_cleanup(); } size_t N = 0; size_t dim = 0; uint32_t seed = 0; hipStream_t stream = nullptr; rocfft_plan plan = nullptr; rocfft_plan plan_inv = nullptr; size_t work_buffer_size = 0; void* work_buffer = nullptr; gpubuf device_mem_in; gpubuf device_mem_out; std::vector<float2> host_mem_in; std::vector<float2> host_mem_out; // ensure that we don't forget to actually run the transform bool ran_transform = false; }; // run concurrent transforms, one per thread, size N on each dimension static void multithread_transform(size_t N, size_t dim, size_t num_threads) { std::vector<std::thread> threads; threads.reserve(num_threads); for(size_t j = 0; j < num_threads; ++j) { threads.emplace_back([=]() { try { Test_Transform t(N, dim, j); t.run_transform(); } catch(std::bad_alloc& e) { ADD_FAILURE() << "memory allocation failure"; } }); } for(auto& t : threads) t.join(); } // for multi-stream tests, set up a bunch of streams, then execute // all of those transforms from a single thread. afterwards, // wait/verify/cleanup in parallel to save wall time during the test. static void multistream_transform(size_t N, size_t dim, size_t num_streams) { std::vector<std::unique_ptr<Test_Transform>> transforms; transforms.resize(num_streams); std::vector<std::thread> threads; threads.reserve(num_streams); // get all data ready in parallel for(size_t i = 0; i < num_streams; ++i) threads.emplace_back([=, &transforms]() { try { transforms[i] = std::make_unique<Test_Transform>(N, dim, i); } catch(std::bad_alloc&) { ADD_FAILURE() << "memory allocation failure"; } }); for(auto& t : threads) t.join(); threads.clear(); // now start the actual transforms serially, but in separate // streams for(auto& t : transforms) { if(!t) // must have failed to allocate memory, abort the test return; t->run_transform(); } // clean up for(size_t i = 0; i < transforms.size(); ++i) threads.emplace_back([=, &transforms]() { transforms[i]->do_cleanup(); }); for(auto& t : threads) t.join(); } // pick arbitrary sizes here to get some parallelism while still // fitting into e.g. 8 GB of GPU memory TEST(rocfft_UnitTest, simple_multithread_1D) { multithread_transform(1048576, 1, 64); } TEST(rocfft_UnitTest, simple_multithread_2D) { multithread_transform(1024, 2, 64); } TEST(rocfft_UnitTest, simple_multithread_3D) { multithread_transform(128, 3, 40); } TEST(rocfft_UnitTest, simple_multistream_1D) { multistream_transform(1048576, 1, 32); } TEST(rocfft_UnitTest, simple_multistream_2D) { multistream_transform(1024, 2, 32); } TEST(rocfft_UnitTest, simple_multistream_3D) { multistream_transform(128, 3, 32); }
35.880466
100
0.583408
[ "vector", "transform" ]
4418cc2364e3126202a1915ff4e8d7bec2aec467
2,452
cpp
C++
Marlin/src/HAL/HAL_LPC1768/watchdog.cpp
s3abrz/s3abrz_FLSUN-Kossel-Mini-skr-v1.3
dddee88d748162ed48fd9dd5351ce8953746325f
[ "MIT" ]
1
2019-07-25T16:09:15.000Z
2019-07-25T16:09:15.000Z
Marlin/src/HAL/HAL_LPC1768/watchdog.cpp
s3abrz/s3abrz_FLSUN-Kossel-Mini-skr-v1.3
dddee88d748162ed48fd9dd5351ce8953746325f
[ "MIT" ]
null
null
null
Marlin/src/HAL/HAL_LPC1768/watchdog.cpp
s3abrz/s3abrz_FLSUN-Kossel-Mini-skr-v1.3
dddee88d748162ed48fd9dd5351ce8953746325f
[ "MIT" ]
null
null
null
/** * Marlin 3D Printer Firmware * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #ifdef TARGET_LPC1768 #include "../../inc/MarlinConfig.h" #if ENABLED(USE_WATCHDOG) #include "lpc17xx_wdt.h" #include "watchdog.h" void watchdog_init(void) { #if ENABLED(WATCHDOG_RESET_MANUAL) // We enable the watchdog timer, but only for the interrupt. // Configure WDT to only trigger an interrupt // Disable WDT interrupt (just in case, to avoid triggering it!) NVIC_DisableIRQ(WDT_IRQn); // We NEED memory barriers to ensure Interrupts are actually disabled! // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the ) __DSB(); __ISB(); // Configure WDT to only trigger an interrupt // Initialize WDT with the given parameters WDT_Init(WDT_CLKSRC_IRC, WDT_MODE_INT_ONLY); // Configure and enable WDT interrupt. NVIC_ClearPendingIRQ(WDT_IRQn); NVIC_SetPriority(WDT_IRQn, 0); // Use highest priority, so we detect all kinds of lockups NVIC_EnableIRQ(WDT_IRQn); #else WDT_Init(WDT_CLKSRC_IRC, WDT_MODE_RESET); #endif WDT_Start(WDT_TIMEOUT); } void HAL_clear_reset_source(void) { WDT_ClrTimeOutFlag(); } uint8_t HAL_get_reset_source(void) { if (TEST(WDT_ReadTimeOutFlag(), 0)) return RST_WATCHDOG; return RST_POWER_ON; } void watchdog_reset() { WDT_Feed(); #if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED) TOGGLE(LED_PIN); // heartbeat indicator #endif } #else void watchdog_init(void) {} void watchdog_reset(void) {} void HAL_clear_reset_source(void) {} uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; } #endif // USE_WATCHDOG #endif // TARGET_LPC1768
28.847059
93
0.730832
[ "3d" ]
4418d7eaab60a7d97a3ceea06d39d495cd8ab1b0
46,431
cpp
C++
src/pyglue/PyConfig.cpp
mjmvisser/OpenColorIO
a557a85454ee1ffa8cb66f8a96238e079c452f08
[ "BSD-3-Clause" ]
4
2015-02-25T21:54:11.000Z
2020-12-22T13:58:27.000Z
src/pyglue/PyConfig.cpp
dictoon/OpenColorIO
64adcad300adfd166280d2e7b1fb5c3ce7dca482
[ "BSD-3-Clause" ]
null
null
null
src/pyglue/PyConfig.cpp
dictoon/OpenColorIO
64adcad300adfd166280d2e7b1fb5c3ce7dca482
[ "BSD-3-Clause" ]
null
null
null
/* Copyright (c) 2003-2010 Sony Pictures Imageworks Inc., et al. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Sony Pictures Imageworks nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <Python.h> #include <sstream> #include <OpenColorIO/OpenColorIO.h> #include "PyUtil.h" #include "PyDoc.h" OCIO_NAMESPACE_ENTER { PyObject * BuildConstPyConfig(ConstConfigRcPtr config) { return BuildConstPyOCIO<PyOCIO_Config, ConfigRcPtr, ConstConfigRcPtr>(config, PyOCIO_ConfigType); } PyObject * BuildEditablePyConfig(ConfigRcPtr config) { return BuildEditablePyOCIO<PyOCIO_Config, ConfigRcPtr, ConstConfigRcPtr>(config, PyOCIO_ConfigType); } bool IsPyConfig(PyObject * pyobject) { return IsPyOCIOType(pyobject, PyOCIO_ConfigType); } bool IsPyConfigEditable(PyObject * pyobject) { return IsPyEditable<PyOCIO_Config>(pyobject, PyOCIO_ConfigType); } ConstConfigRcPtr GetConstConfig(PyObject * pyobject, bool allowCast) { return GetConstPyOCIO<PyOCIO_Config, ConstConfigRcPtr>(pyobject, PyOCIO_ConfigType, allowCast); } ConfigRcPtr GetEditableConfig(PyObject * pyobject) { return GetEditablePyOCIO<PyOCIO_Config, ConfigRcPtr>(pyobject, PyOCIO_ConfigType); } namespace { /////////////////////////////////////////////////////////////////////// /// PyObject * PyOCIO_Config_CreateFromEnv(PyObject * cls); PyObject * PyOCIO_Config_CreateFromFile(PyObject * cls, PyObject * args); PyObject * PyOCIO_Config_CreateFromStream(PyObject * cls, PyObject * args); int PyOCIO_Config_init(PyOCIO_Config * self, PyObject * args, PyObject * kwds); void PyOCIO_Config_delete(PyOCIO_Config * self, PyObject * args); PyObject * PyOCIO_Config_isEditable(PyObject * self); PyObject * PyOCIO_Config_createEditableCopy(PyObject * self); PyObject * PyOCIO_Config_sanityCheck(PyObject * self); PyObject * PyOCIO_Config_getDescription(PyObject * self); PyObject * PyOCIO_Config_setDescription(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_serialize(PyObject * self); PyObject * PyOCIO_Config_getCacheID(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getCurrentContext(PyObject * self); PyObject * PyOCIO_Config_addEnvironmentVar(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getNumEnvironmentVars(PyObject * self); PyObject * PyOCIO_Config_getEnvironmentVarNameByIndex(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getEnvironmentVarDefault(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getEnvironmentVarDefaults(PyObject * self); PyObject * PyOCIO_Config_clearEnvironmentVars(PyObject * self); PyObject * PyOCIO_Config_getSearchPath(PyObject * self); PyObject * PyOCIO_Config_setSearchPath(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getWorkingDir(PyObject * self); PyObject * PyOCIO_Config_setWorkingDir(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getNumColorSpaces(PyObject * self); PyObject * PyOCIO_Config_getColorSpaceNameByIndex(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getColorSpaces(PyObject * self); // py interface only PyObject * PyOCIO_Config_getColorSpace(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getIndexForColorSpace(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_addColorSpace(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_clearColorSpaces(PyObject * self); PyObject * PyOCIO_Config_parseColorSpaceFromString(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_isStrictParsingEnabled(PyObject * self); PyObject * PyOCIO_Config_setStrictParsingEnabled(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_setRole(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getNumRoles(PyObject * self); PyObject * PyOCIO_Config_hasRole(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getRoleName(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getDefaultDisplay(PyObject * self); PyObject * PyOCIO_Config_getNumDisplays(PyObject * self); PyObject * PyOCIO_Config_getDisplay(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getDisplays(PyObject * self); PyObject * PyOCIO_Config_getDefaultView(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getNumViews(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getView(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getViews(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getDisplayColorSpaceName(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getDisplayLooks(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_addDisplay(PyObject * self, PyObject * args, PyObject * kwargs); PyObject * PyOCIO_Config_clearDisplays(PyObject * self); PyObject * PyOCIO_Config_setActiveDisplays(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getActiveDisplays(PyObject * self); PyObject * PyOCIO_Config_setActiveViews(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getActiveViews(PyObject * self); PyObject * PyOCIO_Config_getDefaultLumaCoefs(PyObject * self); PyObject * PyOCIO_Config_setDefaultLumaCoefs(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getLook( PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getNumLooks(PyObject * self); PyObject * PyOCIO_Config_getLookNameByIndex(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_getLooks(PyObject * self); PyObject * PyOCIO_Config_addLook(PyObject * self, PyObject * args); PyObject * PyOCIO_Config_clearLooks(PyObject * self); PyObject * PyOCIO_Config_getProcessor(PyObject * self, PyObject * args, PyObject * kwargs); /////////////////////////////////////////////////////////////////////// /// PyMethodDef PyOCIO_Config_methods[] = { { "CreateFromEnv", (PyCFunction) PyOCIO_Config_CreateFromEnv, METH_NOARGS | METH_CLASS, CONFIG_CREATEFROMENV__DOC__ }, { "CreateFromFile", PyOCIO_Config_CreateFromFile, METH_VARARGS | METH_CLASS, CONFIG_CREATEFROMFILE__DOC__ }, { "CreateFromStream", PyOCIO_Config_CreateFromStream, METH_VARARGS | METH_CLASS, CONFIG_CREATEFROMSTREAM__DOC__ }, { "isEditable", (PyCFunction) PyOCIO_Config_isEditable, METH_NOARGS, CONFIG_ISEDITABLE__DOC__ }, { "createEditableCopy", (PyCFunction) PyOCIO_Config_createEditableCopy, METH_NOARGS, CONFIG_CREATEEDITABLECOPY__DOC__ }, { "sanityCheck", (PyCFunction) PyOCIO_Config_sanityCheck, METH_NOARGS, CONFIG_SANITYCHECK__DOC__ }, { "getDescription", (PyCFunction) PyOCIO_Config_getDescription, METH_NOARGS, CONFIG_GETDESCRIPTION__DOC__ }, { "setDescription", PyOCIO_Config_setDescription, METH_VARARGS, CONFIG_SETDESCRIPTION__DOC__ }, { "serialize", (PyCFunction) PyOCIO_Config_serialize, METH_NOARGS, CONFIG_SERIALIZE__DOC__ }, { "getCacheID", PyOCIO_Config_getCacheID, METH_VARARGS, CONFIG_GETCACHEID__DOC__ }, { "getCurrentContext", (PyCFunction) PyOCIO_Config_getCurrentContext, METH_NOARGS, CONFIG_GETCURRENTCONTEXT__DOC__ }, { "addEnvironmentVar", PyOCIO_Config_addEnvironmentVar, METH_VARARGS, CONFIG_ADDENVIRONMENTVAR__DOC__ }, { "getNumEnvironmentVars", (PyCFunction)PyOCIO_Config_getNumEnvironmentVars, METH_NOARGS, CONFIG_GETNUMENVIRONMENTVARS__DOC__ }, { "getEnvironmentVarNameByIndex", PyOCIO_Config_getEnvironmentVarNameByIndex, METH_VARARGS, CONFIG_GETENVIRONMENTVARNAMEBYINDEX__DOC__ }, { "getEnvironmentVarDefault", PyOCIO_Config_getEnvironmentVarDefault, METH_VARARGS, CONFIG_GETENVIRONMENTVARDEFAULT__DOC__ }, { "getEnvironmentVarDefaults", (PyCFunction)PyOCIO_Config_getEnvironmentVarDefaults, METH_NOARGS, CONFIG_GETENVIRONMENTVARDEFAULTS__DOC__ }, { "clearEnvironmentVars", (PyCFunction)PyOCIO_Config_clearEnvironmentVars, METH_NOARGS, CONFIG_CLEARENVIRONMENTVARS__DOC__ }, { "getSearchPath", (PyCFunction) PyOCIO_Config_getSearchPath, METH_NOARGS, CONFIG_GETSEARCHPATH__DOC__ }, { "setSearchPath", PyOCIO_Config_setSearchPath, METH_VARARGS, CONFIG_SETSEARCHPATH__DOC__ }, { "getWorkingDir", (PyCFunction) PyOCIO_Config_getWorkingDir, METH_NOARGS, CONFIG_GETWORKINGDIR__DOC__ }, { "setWorkingDir", PyOCIO_Config_setWorkingDir, METH_VARARGS, CONFIG_SETWORKINGDIR__DOC__ }, { "getNumColorSpaces", (PyCFunction) PyOCIO_Config_getNumColorSpaces, METH_VARARGS, CONFIG_GETNUMCOLORSPACES__DOC__ }, { "getColorSpaceNameByIndex", PyOCIO_Config_getColorSpaceNameByIndex, METH_VARARGS, CONFIG_GETCOLORSPACENAMEBYINDEX__DOC__ }, { "getColorSpaces", (PyCFunction) PyOCIO_Config_getColorSpaces, METH_NOARGS, CONFIG_GETCOLORSPACES__DOC__ }, { "getColorSpace", PyOCIO_Config_getColorSpace, METH_VARARGS, CONFIG_GETCOLORSPACE__DOC__ }, { "getIndexForColorSpace", PyOCIO_Config_getIndexForColorSpace, METH_VARARGS, CONFIG_GETINDEXFORCOLORSPACE__DOC__ }, { "addColorSpace", PyOCIO_Config_addColorSpace, METH_VARARGS, CONFIG_ADDCOLORSPACE__DOC__ }, { "clearColorSpaces", (PyCFunction) PyOCIO_Config_clearColorSpaces, METH_NOARGS, CONFIG_CLEARCOLORSPACES__DOC__ }, { "parseColorSpaceFromString", PyOCIO_Config_parseColorSpaceFromString, METH_VARARGS, CONFIG_PARSECOLORSPACEFROMSTRING__DOC__ }, { "isStrictParsingEnabled", (PyCFunction) PyOCIO_Config_isStrictParsingEnabled, METH_NOARGS, CONFIG_ISSTRICTPARSINGENABLED__DOC__ }, { "setStrictParsingEnabled", PyOCIO_Config_setStrictParsingEnabled, METH_VARARGS, CONFIG_SETSTRICTPARSINGENABLED__DOC__ }, { "setRole", PyOCIO_Config_setRole, METH_VARARGS, CONFIG_SETROLE__DOC__ }, { "getNumRoles", (PyCFunction) PyOCIO_Config_getNumRoles, METH_NOARGS, CONFIG_GETNUMROLES__DOC__ }, { "hasRole", PyOCIO_Config_hasRole, METH_VARARGS, CONFIG_HASROLE__DOC__ }, { "getRoleName", PyOCIO_Config_getRoleName, METH_VARARGS, CONFIG_GETROLENAME__DOC__ }, { "getDefaultDisplay", (PyCFunction) PyOCIO_Config_getDefaultDisplay, METH_NOARGS, CONFIG_GETDEFAULTDISPLAY__DOC__ }, { "getNumDisplays", (PyCFunction) PyOCIO_Config_getNumDisplays, METH_NOARGS, CONFIG_GETNUMDISPLAYS__DOC__ }, { "getDisplay", PyOCIO_Config_getDisplay, METH_VARARGS, CONFIG_GETDISPLAY__DOC__ }, { "getDisplays", (PyCFunction) PyOCIO_Config_getDisplays, METH_NOARGS, CONFIG_GETDISPLAYS__DOC__ }, { "getDefaultView", PyOCIO_Config_getDefaultView, METH_VARARGS, CONFIG_GETDEFAULTVIEW__DOC__ }, { "getNumViews", PyOCIO_Config_getNumViews, METH_VARARGS, CONFIG_GETNUMVIEWS__DOC__ }, { "getView", PyOCIO_Config_getView, METH_VARARGS, CONFIG_GETVIEW__DOC__ }, { "getViews", PyOCIO_Config_getViews, METH_VARARGS, CONFIG_GETVIEWS__DOC__ }, { "getDisplayColorSpaceName", PyOCIO_Config_getDisplayColorSpaceName, METH_VARARGS, CONFIG_GETDISPLAYCOLORSPACENAME__DOC__ }, { "getDisplayLooks", PyOCIO_Config_getDisplayLooks, METH_VARARGS, CONFIG_GETDISPLAYLOOKS__DOC__ }, { "addDisplay", (PyCFunction) PyOCIO_Config_addDisplay, METH_VARARGS|METH_KEYWORDS, CONFIG_ADDDISPLAY__DOC__ }, { "clearDisplays", (PyCFunction) PyOCIO_Config_clearDisplays, METH_NOARGS, CONFIG_CLEARDISPLAYS__DOC__ }, { "setActiveDisplays", PyOCIO_Config_setActiveDisplays, METH_VARARGS, CONFIG_SETACTIVEDISPLAYS__DOC__ }, { "getActiveDisplays", (PyCFunction) PyOCIO_Config_getActiveDisplays, METH_NOARGS, CONFIG_GETACTIVEDISPLAYS__DOC__ }, { "setActiveViews", PyOCIO_Config_setActiveViews, METH_VARARGS, CONFIG_SETACTIVEVIEWS__DOC__ }, { "getActiveViews", (PyCFunction) PyOCIO_Config_getActiveViews, METH_NOARGS, CONFIG_GETACTIVEVIEWS__DOC__ }, { "getDefaultLumaCoefs", (PyCFunction) PyOCIO_Config_getDefaultLumaCoefs, METH_NOARGS, CONFIG_GETDEFAULTLUMACOEFS__DOC__ }, { "setDefaultLumaCoefs", PyOCIO_Config_setDefaultLumaCoefs, METH_VARARGS, CONFIG_SETDEFAULTLUMACOEFS__DOC__ }, { "getLook", PyOCIO_Config_getLook, METH_VARARGS, CONFIG_GETLOOK__DOC__ }, { "getNumLooks", (PyCFunction) PyOCIO_Config_getNumLooks, METH_NOARGS, CONFIG_GETNUMLOOKS__DOC__ }, { "getLookNameByIndex", PyOCIO_Config_getLookNameByIndex, METH_VARARGS, CONFIG_GETLOOKNAMEBYINDEX__DOC__ }, { "getLooks", (PyCFunction) PyOCIO_Config_getLooks, METH_NOARGS, CONFIG_GETLOOKS__DOC__ }, { "addLook", PyOCIO_Config_addLook, METH_VARARGS, CONFIG_ADDLOOK__DOC__ }, { "clearLook", // THIS SHOULD BE REMOVED IN THE NEXT BINARY INCOMPATIBLE VERSION (PyCFunction) PyOCIO_Config_clearLooks, METH_NOARGS, CONFIG_CLEARLOOKS__DOC__ }, { "clearLooks", (PyCFunction) PyOCIO_Config_clearLooks, METH_NOARGS, CONFIG_CLEARLOOKS__DOC__ }, { "getProcessor", (PyCFunction) PyOCIO_Config_getProcessor, METH_VARARGS|METH_KEYWORDS, CONFIG_GETPROCESSOR__DOC__ }, { NULL, NULL, 0, NULL } }; } /////////////////////////////////////////////////////////////////////////// /// PyTypeObject PyOCIO_ConfigType = { PyVarObject_HEAD_INIT(NULL, 0) //obsize "OCIO.Config", //tp_name sizeof(PyOCIO_Config), //tp_basicsize 0, //tp_itemsize (destructor)PyOCIO_Config_delete, //tp_dealloc 0, //tp_print 0, //tp_getattr 0, //tp_setattr 0, //tp_compare 0, //tp_repr 0, //tp_as_number 0, //tp_as_sequence 0, //tp_as_mapping 0, //tp_hash 0, //tp_call 0, //tp_str 0, //tp_getattro 0, //tp_setattro 0, //tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, //tp_flags CONFIG__DOC__, //tp_doc 0, //tp_traverse 0, //tp_clear 0, //tp_richcompare 0, //tp_weaklistoffset 0, //tp_iter 0, //tp_iternext PyOCIO_Config_methods, //tp_methods 0, //tp_members 0, //tp_getset 0, //tp_base 0, //tp_dict 0, //tp_descr_get 0, //tp_descr_set 0, //tp_dictoffset (initproc) PyOCIO_Config_init, //tp_init 0, //tp_alloc 0, //tp_new 0, //tp_free 0, //tp_is_gc }; namespace { /////////////////////////////////////////////////////////////////////// /// PyObject * PyOCIO_Config_CreateFromEnv(PyObject * /*self*/) { OCIO_PYTRY_ENTER() return BuildConstPyConfig(Config::CreateFromEnv()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_CreateFromFile(PyObject * /*self*/, PyObject * args) { OCIO_PYTRY_ENTER() char* filename = 0; if (!PyArg_ParseTuple(args,"s:CreateFromFile", &filename)) return NULL; return BuildConstPyConfig(Config::CreateFromFile(filename)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_CreateFromStream(PyObject * /*self*/, PyObject * args) { OCIO_PYTRY_ENTER() char* stream = 0; if (!PyArg_ParseTuple(args,"s:CreateFromStream", &stream)) return NULL; std::istringstream is; is.str(stream); return BuildConstPyConfig(Config::CreateFromStream(is)); OCIO_PYTRY_EXIT(NULL) } int PyOCIO_Config_init(PyOCIO_Config *self, PyObject * /*args*/, PyObject * /*kwds*/) { OCIO_PYTRY_ENTER() return BuildPyObject<PyOCIO_Config, ConstConfigRcPtr, ConfigRcPtr>(self, Config::Create()); OCIO_PYTRY_EXIT(-1) } void PyOCIO_Config_delete(PyOCIO_Config *self, PyObject * /*args*/) { DeletePyObject<PyOCIO_Config>(self); } PyObject * PyOCIO_Config_isEditable(PyObject * self) { return PyBool_FromLong(IsPyConfigEditable(self)); } PyObject * PyOCIO_Config_createEditableCopy(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); ConfigRcPtr copy = config->createEditableCopy(); return BuildEditablePyConfig(copy); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_sanityCheck(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); config->sanityCheck(); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getDescription(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getDescription()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_setDescription(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* desc = 0; if (!PyArg_ParseTuple(args, "s:setDescription", &desc)) return NULL; ConfigRcPtr config = GetEditableConfig(self); config->setDescription(desc); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_serialize(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); std::ostringstream os; config->serialize(os); return PyString_FromString(os.str().c_str()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getCacheID(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() PyObject* pycontext = NULL; if (!PyArg_ParseTuple(args, "|O:getCacheID", &pycontext)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); ConstContextRcPtr context; if(pycontext != NULL) context = GetConstContext(pycontext, true); else context = config->getCurrentContext(); return PyString_FromString(config->getCacheID(context)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getCurrentContext(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return BuildConstPyContext(config->getCurrentContext()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_addEnvironmentVar(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* name = 0; char* value = 0; if (!PyArg_ParseTuple(args, "ss:addEnvironmentVar", &name, &value)) return NULL; ConfigRcPtr config = GetEditableConfig(self); config->addEnvironmentVar(name, value); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getNumEnvironmentVars(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyInt_FromLong(config->getNumEnvironmentVars()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getEnvironmentVarNameByIndex(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() int index = 0; if (!PyArg_ParseTuple(args,"i:getEnvironmentVarNameByIndex", &index)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getEnvironmentVarNameByIndex(index)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getEnvironmentVarDefault(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* name = 0; if (!PyArg_ParseTuple(args, "s:getEnvironmentVarDefault", &name)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getEnvironmentVarDefault(name)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getEnvironmentVarDefaults(PyObject * self) { OCIO_PYTRY_ENTER() std::map<std::string, std::string> data; ConstConfigRcPtr config = GetConstConfig(self, true); for(int i = 0; i < config->getNumEnvironmentVars(); ++i) { const char* name = config->getEnvironmentVarNameByIndex(i); const char* value = config->getEnvironmentVarDefault(name); data.insert(std::pair<std::string, std::string>(name, value)); } return CreatePyDictFromStringMap(data); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_clearEnvironmentVars(PyObject * self) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); config->clearEnvironmentVars(); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getSearchPath(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getSearchPath()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_setSearchPath(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* path = 0; if (!PyArg_ParseTuple(args, "s:setSearchPath", &path)) return NULL; ConfigRcPtr config = GetEditableConfig(self); config->setSearchPath(path); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getWorkingDir(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getWorkingDir()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_setWorkingDir(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* path = 0; if (!PyArg_ParseTuple(args, "s:setWorkingDir", &path)) return NULL; ConfigRcPtr config = GetEditableConfig(self); config->setWorkingDir(path); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getNumColorSpaces(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyInt_FromLong(config->getNumColorSpaces()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getColorSpaceNameByIndex(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() int index = 0; if (!PyArg_ParseTuple(args,"i:getColorSpaceNameByIndex", &index)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getColorSpaceNameByIndex(index)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getColorSpaces(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); int numColorSpaces = config->getNumColorSpaces(); PyObject* tuple = PyTuple_New(numColorSpaces); for(int i = 0; i < numColorSpaces; ++i) { const char* name = config->getColorSpaceNameByIndex(i); ConstColorSpaceRcPtr cs = config->getColorSpace(name); PyObject* pycs = BuildConstPyColorSpace(cs); PyTuple_SetItem(tuple, i, pycs); } return tuple; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getColorSpace(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* name = 0; if (!PyArg_ParseTuple(args,"s:getColorSpace", &name)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return BuildConstPyColorSpace(config->getColorSpace(name)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getIndexForColorSpace(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* name = 0; if (!PyArg_ParseTuple(args,"s:getIndexForColorSpace", &name)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyInt_FromLong(config->getIndexForColorSpace(name)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_addColorSpace(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); PyObject* pyColorSpace = 0; if (!PyArg_ParseTuple(args, "O:addColorSpace", &pyColorSpace)) return NULL; config->addColorSpace(GetConstColorSpace(pyColorSpace, true)); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_clearColorSpaces(PyObject * self) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); config->clearColorSpaces(); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_parseColorSpaceFromString(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); char* str = 0; if (!PyArg_ParseTuple(args, "s:parseColorSpaceFromString", &str)) return NULL; const char* cs = config->parseColorSpaceFromString(str); if(cs) return PyString_FromString(cs); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_isStrictParsingEnabled(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyBool_FromLong(config->isStrictParsingEnabled()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_setStrictParsingEnabled(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() bool enabled = false; if (!PyArg_ParseTuple(args, "O&:setStrictParsingEnabled", ConvertPyObjectToBool, &enabled)) return NULL; ConfigRcPtr config = GetEditableConfig(self); config->setStrictParsingEnabled(enabled); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_setRole(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); char* role = 0; char* csname = 0; if (!PyArg_ParseTuple(args, "ss:setRole", &role, &csname)) return NULL; config->setRole(role, csname); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getNumRoles(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyInt_FromLong(config->getNumRoles()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_hasRole(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* str = 0; if (!PyArg_ParseTuple(args, "s:hasRole", &str)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyBool_FromLong(config->hasRole(str)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getRoleName(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() int index = 0; if (!PyArg_ParseTuple(args,"i:getRoleName", &index)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getRoleName(index)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getDefaultDisplay(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getDefaultDisplay()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getNumDisplays(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyInt_FromLong(config->getNumDisplays()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getDisplay(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() int index = 0; if (!PyArg_ParseTuple(args,"i:getDisplay", &index)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getDisplay(index)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getDisplays(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); std::vector<std::string> data; int numDevices = config->getNumDisplays(); for(int i = 0; i < numDevices; ++i) data.push_back(config->getDisplay(i)); return CreatePyListFromStringVector(data); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getDefaultView(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* display = 0; if (!PyArg_ParseTuple(args, "s:getDefaultView", &display)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getDefaultView(display)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getNumViews(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* display = 0; if (!PyArg_ParseTuple(args, "s:getNumViews", &display)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyInt_FromLong(config->getNumViews(display)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getView(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* display = 0; int index = 0; if (!PyArg_ParseTuple(args, "si:getNumViews", &display, &index)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getView(display, index)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getViews(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* display = 0; if (!PyArg_ParseTuple(args, "s:getViews", &display)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); std::vector<std::string> data; int num = config->getNumViews(display); for(int i=0; i < num; ++i) data.push_back(config->getView(display, i)); return CreatePyListFromStringVector(data); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getDisplayColorSpaceName(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* display = 0; char* view = 0; if (!PyArg_ParseTuple(args, "ss:getDisplayColorSpaceName", &display, &view)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getDisplayColorSpaceName(display, view)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getDisplayLooks(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() char* display = 0; char* view = 0; if (!PyArg_ParseTuple(args, "ss:getDisplayLooks", &display, &view)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getDisplayLooks(display, view)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_addDisplay(PyObject * self, PyObject * args, PyObject * kwargs) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); char* display = 0; char* view = 0; char* colorSpaceName = 0; char* looks = 0; const char * kwlist[] = { "display", "view", "colorSpaceName", "looks", NULL }; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sss|s", const_cast<char**>(kwlist), &display, &view, &colorSpaceName, &looks)) return 0; std::string lookStr; if(looks) lookStr = looks; config->addDisplay(display, view, colorSpaceName, lookStr.c_str()); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_clearDisplays(PyObject * self) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); config->clearDisplays(); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_setActiveDisplays(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); char* displays = 0; if (!PyArg_ParseTuple(args, "s:setActiveDisplays", &displays)) return NULL; config->setActiveDisplays(displays); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getActiveDisplays(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getActiveDisplays()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_setActiveViews(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); char* views = 0; if (!PyArg_ParseTuple(args, "s:setActiveViews", &views)) return NULL; config->setActiveViews(views); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getActiveViews(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getActiveViews()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_setDefaultLumaCoefs(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); PyObject* pyCoef = 0; if (!PyArg_ParseTuple(args, "O:setDefaultLumaCoefs", &pyCoef)) return 0; std::vector<float> coef; if(!FillFloatVectorFromPySequence(pyCoef, coef) || (coef.size() != 3)) { PyErr_SetString(PyExc_TypeError, "First argument must be a float array, size 3"); return 0; } config->setDefaultLumaCoefs(&coef[0]); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getDefaultLumaCoefs(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); std::vector<float> coef(3); config->getDefaultLumaCoefs(&coef[0]); return CreatePyListFromFloatVector(coef); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getLook(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); char* str = 0; if (!PyArg_ParseTuple(args, "s:getLook", &str)) return NULL; return BuildConstPyLook(config->getLook(str)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getNumLooks(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); return PyInt_FromLong(config->getNumLooks()); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getLookNameByIndex(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() int index = 0; if (!PyArg_ParseTuple(args,"i:getLookNameByIndex", &index)) return NULL; ConstConfigRcPtr config = GetConstConfig(self, true); return PyString_FromString(config->getLookNameByIndex(index)); OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getLooks(PyObject * self) { OCIO_PYTRY_ENTER() ConstConfigRcPtr config = GetConstConfig(self, true); int num = config->getNumLooks(); PyObject* tuple = PyTuple_New(num); for(int i = 0; i < num; ++i) { const char* name = config->getLookNameByIndex(i); ConstLookRcPtr look = config->getLook(name); PyObject* pylook = BuildConstPyLook(look); PyTuple_SetItem(tuple, i, pylook); } return tuple; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_addLook(PyObject * self, PyObject * args) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); PyObject * pyLook = 0; if (!PyArg_ParseTuple(args, "O:addLook", &pyLook)) return NULL; config->addLook(GetConstLook(pyLook, true)); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_clearLooks(PyObject * self) { OCIO_PYTRY_ENTER() ConfigRcPtr config = GetEditableConfig(self); config->clearLooks(); Py_RETURN_NONE; OCIO_PYTRY_EXIT(NULL) } PyObject * PyOCIO_Config_getProcessor(PyObject * self, PyObject * args, PyObject * kwargs) { OCIO_PYTRY_ENTER() // We want this call to be as flexible as possible. // arg1 will either be a PyTransform // or arg1, arg2 will be {str, ColorSpace} PyObject* arg1 = Py_None; PyObject* arg2 = Py_None; const char* direction = 0; PyObject* pycontext = Py_None; const char* kwlist[] = { "arg1", "arg2", "direction", "context", NULL }; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OsO", const_cast<char**>(kwlist), &arg1, &arg2, &direction, &pycontext)) return 0; ConstConfigRcPtr config = GetConstConfig(self, true); // Parse the direction string TransformDirection dir = TRANSFORM_DIR_FORWARD; if(direction) dir = TransformDirectionFromString(direction); // Parse the context ConstContextRcPtr context; if(pycontext != Py_None) context = GetConstContext(pycontext, true); if(!context) context = config->getCurrentContext(); if(IsPyTransform(arg1)) { ConstTransformRcPtr transform = GetConstTransform(arg1, true); return BuildConstPyProcessor(config->getProcessor(context, transform, dir)); } // Any two (Colorspaces, colorspace name, roles) ConstColorSpaceRcPtr cs1; if(IsPyColorSpace(arg1)) cs1 = GetConstColorSpace(arg1, true); else if(PyString_Check(arg1)) cs1 = config->getColorSpace(PyString_AsString(arg1)); if(!cs1) { PyErr_SetString(PyExc_ValueError, "Could not parse first arg. Allowed types include ColorSpace, ColorSpace name, Role."); return NULL; } ConstColorSpaceRcPtr cs2; if(IsPyColorSpace(arg2)) cs2 = GetConstColorSpace(arg2, true); else if(PyString_Check(arg2)) cs2 = config->getColorSpace(PyString_AsString(arg2)); if(!cs2) { PyErr_SetString(PyExc_ValueError, "Could not parse second arg. Allowed types include ColorSpace, ColorSpace name, Role."); return NULL; } return BuildConstPyProcessor(config->getProcessor(context, cs1, cs2)); OCIO_PYTRY_EXIT(NULL) } } } OCIO_NAMESPACE_EXIT
44.431579
121
0.588335
[ "vector", "transform" ]
441ccd98a0710cde0ac9dfd87534bfe081e74189
5,248
cpp
C++
qubus/src/object_factory.cpp
qubusproject/Qubus
0feb8d6df00459c5af402545dbe7c82ee3ec4b7c
[ "BSL-1.0" ]
null
null
null
qubus/src/object_factory.cpp
qubusproject/Qubus
0feb8d6df00459c5af402545dbe7c82ee3ec4b7c
[ "BSL-1.0" ]
null
null
null
qubus/src/object_factory.cpp
qubusproject/Qubus
0feb8d6df00459c5af402545dbe7c82ee3ec4b7c
[ "BSL-1.0" ]
null
null
null
#include <qubus/object_factory.hpp> #include <qubus/util/integers.hpp> #include <utility> using server_type = hpx::components::component<qubus::object_factory_server>; HPX_REGISTER_COMPONENT(server_type, qubus_object_factory_server); using create_scalar_action = qubus::object_factory_server::create_scalar_action; HPX_REGISTER_ACTION(create_scalar_action, qubus_object_factory_create_scalar_action); using create_array_action = qubus::object_factory_server::create_array_action; HPX_REGISTER_ACTION(create_array_action, qubus_object_factory_create_array_action); using create_sparse_tensor_action = qubus::object_factory_server::create_sparse_tensor_action; HPX_REGISTER_ACTION(create_sparse_tensor_action, qubus_object_factory_create_sparse_tensor_action); namespace qubus { object_factory_server::object_factory_server(abi_info abi_, std::vector<local_runtime_reference> local_runtimes_) : abi_(std::move(abi_)) { for (const auto& runtime : local_runtimes_) { local_factories_.push_back(runtime.get_local_object_factory()); } } hpx::future<hpx::id_type> object_factory_server::create_scalar(type data_type) { static long int next_factory = 0; auto obj = local_factories_.at(next_factory).create_scalar(std::move(data_type)); next_factory = (next_factory + 1) % hpx::get_num_localities(hpx::launch::sync); return hpx::make_ready_future(obj.get()); } hpx::future<hpx::id_type> object_factory_server::create_array(type value_type, std::vector<util::index_t> shape) { static long int next_factory = 0; auto obj = local_factories_.at(next_factory).create_array(std::move(value_type), std::move(shape)); next_factory = (next_factory + 1) % hpx::get_num_localities(hpx::launch::sync); return hpx::make_ready_future(obj.get()); } hpx::future<hpx::id_type> object_factory_server::create_sparse_tensor(type value_type, std::vector<util::index_t> shape, const sparse_tensor_layout& layout) { /*auto choosen_factory = local_factories_.at(0); auto shape_array = choosen_factory.create_array(types::integer(), {util::to_uindex(shape.size())}); auto sell_tensor_type = types::struct_( "sell_tensor", {types::struct_::member(types::array(value_type, 1), "val"), types::struct_::member(types::array(types::integer(), 1), "col"), types::struct_::member(types::array(types::integer(), 1), "cs"), types::struct_::member(types::array(types::integer(), 1), "cl")}); object sell_tensor_val = choosen_factory.create_array(value_type, {layout.nnz}); object sell_tensor_col = choosen_factory.create_array(types::integer(), {layout.nnz}); object sell_tensor_cs = choosen_factory.create_array(types::integer(), {layout.num_chunks + 1}); object sell_tensor_cl = choosen_factory.create_array(types::integer(), {layout.num_chunks}); std::vector<object> sell_tensor_members; sell_tensor_members.push_back(std::move(sell_tensor_val)); sell_tensor_members.push_back(std::move(sell_tensor_col)); sell_tensor_members.push_back(std::move(sell_tensor_cs)); sell_tensor_members.push_back(std::move(sell_tensor_cl)); auto sell_tensor = choosen_factory.create_struct(sell_tensor_type, std::move(sell_tensor_members)); auto sparse_tensor_type = types::struct_( "sparse_tensor", {types::struct_::member(sell_tensor_type, "data"), types::struct_::member(types::array(types::integer(), 1), "shape")}); std::vector<object> sparse_tensor_members; sparse_tensor_members.push_back(std::move(sell_tensor)); sparse_tensor_members.push_back(std::move(shape_array)); auto sparse_tensor = choosen_factory.create_struct(sparse_tensor_type, std::move(sparse_tensor_members)); return hpx::make_ready_future(sparse_tensor.get());*/ std::terminate(); // TODO: Reimplement this. } object_factory::object_factory(hpx::id_type&& id) : base_type(std::move(id)) { } object_factory::object_factory(hpx::future<hpx::id_type>&& id) : base_type(std::move(id)) { } object object_factory::create_scalar(type data_type) { // FIXME: Reevaluate the impact of the manual unwrapping of the future. return hpx::async<object_factory_server::create_scalar_action>( this->get_id(), std::move(data_type)).get(); } object object_factory::create_array(type value_type, std::vector<util::index_t> shape) { // FIXME: Reevaluate the impact of the manual unwrapping of the future. return hpx::async<object_factory_server::create_array_action>( this->get_id(), std::move(value_type), std::move(shape)).get(); } object object_factory::create_sparse_tensor(type value_type, std::vector<util::index_t> shape, const sparse_tensor_layout& layout) { // FIXME: Reevaluate the impact of the manual unwrapping of the future. return hpx::async<object_factory_server::create_sparse_tensor_action>( this->get_id(), std::move(value_type), std::move(shape), std::move(layout)).get(); } }
39.757576
100
0.711319
[ "object", "shape", "vector" ]
441cf4983be67c7673bd89afad944abc0bbd4ea4
40,176
cpp
C++
src/core/eventProvider.cpp
dkorkmazturk/pal
1e1f052a1614dae62ad98048d140a7d22e71b1a6
[ "MIT" ]
null
null
null
src/core/eventProvider.cpp
dkorkmazturk/pal
1e1f052a1614dae62ad98048d140a7d22e71b1a6
[ "MIT" ]
null
null
null
src/core/eventProvider.cpp
dkorkmazturk/pal
1e1f052a1614dae62ad98048d140a7d22e71b1a6
[ "MIT" ]
null
null
null
/* *********************************************************************************************************************** * * Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * **********************************************************************************************************************/ #include "core/eventProvider.h" #include "core/queue.h" #include "core/platform.h" #include "core/gpuMemory.h" #include "core/devDriverUtil.h" #include "palSysUtil.h" #include "devDriverServer.h" #include "core/devDriverEventService.h" #include "core/devDriverEventServiceConv.h" #include "core/eventDefs.h" #include "core/gpuMemory.h" #include "palSysUtil.h" #include "util/rmtTokens.h" #include "util/rmtResourceDescriptions.h" using namespace Util; using namespace DevDriver; namespace Pal { static constexpr uint32 kEventFlushTimeoutInMs = 10; static const char kEventDescription[] = "All available events are RmtTokens directly embedded."; const void* EventProvider::GetEventDescriptionData() const { return kEventDescription; } uint32 EventProvider::GetEventDescriptionDataSize() const { return sizeof(kEventDescription); } EventProvider::EventProvider(Platform* pPlatform) : DevDriver::EventProtocol::BaseEventProvider( { pPlatform, DevDriverAlloc, DevDriverFree }, static_cast<uint32>(PalEvent::Count), kEventFlushTimeoutInMs ), m_pPlatform(pPlatform), m_eventService({ pPlatform, DevDriverAlloc, DevDriverFree }), m_logRmtVersion(false) {} // ===================================================================================================================== Result EventProvider::Init() { Result result = Result::Success; // The event provider runs in a no-op mode when developer mode is not enabled if (m_pPlatform->IsDeveloperModeEnabled()) { DevDriverServer* pServer = m_pPlatform->GetDevDriverServer(); PAL_ASSERT(pServer != nullptr); IMsgChannel* pMsgChannel = pServer->GetMessageChannel(); PAL_ASSERT(pMsgChannel != nullptr); EventProtocol::EventServer* pEventServer = pServer->GetEventServer(); PAL_ASSERT(pEventServer != nullptr); result = (pMsgChannel->RegisterService(&m_eventService) == DevDriver::Result::Success) ? Result::Success : Result::ErrorUnknown; if (result == Result::Success) { result = (pEventServer->RegisterProvider(this) == DevDriver::Result::Success) ? Result::Success : Result::ErrorUnknown; if (result != Result::Success) { DD_UNHANDLED_RESULT(pMsgChannel->UnregisterService(&m_eventService)); } } } return result; } // ===================================================================================================================== void EventProvider::Destroy() { // The event provider runs in a no-op mode when developer mode is not enabled if (m_pPlatform->IsDeveloperModeEnabled()) { DevDriverServer* pServer = m_pPlatform->GetDevDriverServer(); PAL_ASSERT(pServer != nullptr); IMsgChannel* pMsgChannel = pServer->GetMessageChannel(); PAL_ASSERT(pMsgChannel != nullptr); EventProtocol::EventServer* pEventServer = pServer->GetEventServer(); PAL_ASSERT(pEventServer != nullptr); DD_UNHANDLED_RESULT(pEventServer->UnregisterProvider(this)); DD_UNHANDLED_RESULT(pMsgChannel->UnregisterService(&m_eventService)); } } // ===================================================================================================================== // Performs required actions in response to this event provider being enabled by a tool. void EventProvider::OnEnable() { DevDriver::Platform::LockGuard<DevDriver::Platform::Mutex> providerLock(m_providerLock); m_logRmtVersion = true; } // ===================================================================================================================== // Determines if the event would be written to either the EventServer or to the log file, used to determine if a log // event call should bother constructing the log event data structure. bool EventProvider::ShouldLog( PalEvent eventId ) const { return (m_eventService.IsMemoryProfilingEnabled() || (QueryEventWriteStatus(static_cast<uint32>(eventId)) == DevDriver::Result::Success)); } // ===================================================================================================================== // Logs an event on creation of a GPU Memory allocation (physical or virtual). void EventProvider::LogCreateGpuMemoryEvent( const GpuMemory* pGpuMemory) { // We only want to log new allocations if ((pGpuMemory != nullptr) && (pGpuMemory->IsGpuVaPreReserved() == false)) { static constexpr PalEvent eventId = PalEvent::CreateGpuMemory; if (ShouldLog(eventId)) { const GpuMemoryDesc desc = pGpuMemory->Desc(); CreateGpuMemoryData data = {}; data.handle = reinterpret_cast<GpuMemHandle>(pGpuMemory); data.size = desc.size; data.alignment = desc.alignment; data.heapCount = desc.heapCount; for (uint32 i = 0; i < data.heapCount; i++) { data.heaps[i] = desc.heaps[i]; } data.isVirtual = desc.flags.isVirtual; data.isInternal = pGpuMemory->IsClient(); data.isExternalShared = desc.flags.isExternal; data.gpuVirtualAddr = desc.gpuVirtAddr; LogEvent(eventId, &data, sizeof(data)); } } } // ===================================================================================================================== // Logs an event when a GPU Memory allocation (physical or virtual) is destroyed. void EventProvider::LogDestroyGpuMemoryEvent( const GpuMemory* pGpuMemory) { static constexpr PalEvent eventId = PalEvent::DestroyGpuMemory; if (ShouldLog(eventId)) { DestroyGpuMemoryData data = {}; data.handle = reinterpret_cast<GpuMemHandle>(pGpuMemory); data.gpuVirtualAddr = pGpuMemory->Desc().gpuVirtAddr; LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== // Logs an event when a resource has GPU memory bound to it. void EventProvider::LogGpuMemoryResourceBindEvent( const GpuMemoryResourceBindEventData& eventData) { static constexpr PalEvent eventId = PalEvent::GpuMemoryResourceBind; if (ShouldLog(eventId)) { PAL_ASSERT(eventData.pObj != nullptr); GpuMemoryResourceBindData data = {}; data.handle = reinterpret_cast<GpuMemHandle>(eventData.pGpuMemory); data.gpuVirtualAddr = (eventData.pGpuMemory != nullptr) ? eventData.pGpuMemory->Desc().gpuVirtAddr : 0; data.resourceHandle = reinterpret_cast<ResourceHandle>(eventData.pObj); data.requiredSize = eventData.requiredGpuMemSize; data.offset = eventData.offset; data.isSystemMemory = eventData.isSystemMemory; LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== // Logs an event when a GPU memory allocation is mapped for CPU access. void EventProvider::LogGpuMemoryCpuMapEvent( const GpuMemory* pGpuMemory) { static constexpr PalEvent eventId = PalEvent::GpuMemoryCpuMap; if (ShouldLog(eventId)) { GpuMemoryCpuMapData data = {}; data.handle = reinterpret_cast<GpuMemHandle>(pGpuMemory); data.gpuVirtualAddr = pGpuMemory->Desc().gpuVirtAddr; LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== // Logs an event when a GPU memory allocation is unmapped for CPU access. void EventProvider::LogGpuMemoryCpuUnmapEvent( const GpuMemory* pGpuMemory) { static constexpr PalEvent eventId = PalEvent::GpuMemoryCpuUnmap; if (ShouldLog(eventId)) { GpuMemoryCpuUnmapData data = {}; data.handle = reinterpret_cast<GpuMemHandle>(pGpuMemory); data.gpuVirtualAddr = pGpuMemory->Desc().gpuVirtAddr; LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== // Logs an event when GPU memory allocations are added to a per-device or per-queue reference list. The flags field is // a GpuMemoryRefFlags flags type. // NOTE: It is expected that pQueue will always be null for WDDM2. void EventProvider::LogGpuMemoryAddReferencesEvent( uint32 gpuMemRefCount, const GpuMemoryRef* pGpuMemoryRefs, IQueue* pQueue, uint32 flags) { static constexpr PalEvent eventId = PalEvent::GpuMemoryAddReference; if (ShouldLog(eventId)) { for (uint32 i=0; i < gpuMemRefCount; i++) { GpuMemoryAddReferenceData data = {}; data.handle = reinterpret_cast<GpuMemHandle>(pGpuMemoryRefs[i].pGpuMemory); data.gpuVirtualAddr = pGpuMemoryRefs[i].pGpuMemory->Desc().gpuVirtAddr; data.queueHandle = reinterpret_cast<QueueHandle>(pQueue); data.flags = flags; LogEvent(eventId, &data, sizeof(data)); } } } // ===================================================================================================================== // Logs an event when GPU memory allocations are removed from a per-device or per-queue reference list. // NOTE: It is expected that pQueue will always be null for WDDM2. void EventProvider::LogGpuMemoryRemoveReferencesEvent( uint32 gpuMemoryCount, IGpuMemory*const* ppGpuMemory, IQueue* pQueue) { static constexpr PalEvent eventId = PalEvent::GpuMemoryRemoveReference; if (ShouldLog(eventId)) { for (uint32 i = 0; i < gpuMemoryCount; i++) { GpuMemoryRemoveReferenceData data = {}; data.handle = reinterpret_cast<GpuMemHandle>(ppGpuMemory[i]); data.gpuVirtualAddr = ppGpuMemory[i]->Desc().gpuVirtAddr; data.queueHandle = reinterpret_cast<QueueHandle>(pQueue); LogEvent(eventId, &data, sizeof(data)); } } } // ===================================================================================================================== // Logs an event when a resource that requires GPU memory is created. See the ResourceType enum for the list of // resources this applies to. void EventProvider::LogGpuMemoryResourceCreateEvent( const ResourceCreateEventData& eventData) { static constexpr PalEvent eventId = PalEvent::GpuMemoryResourceCreate; if (ShouldLog(eventId)) { PAL_ASSERT(eventData.pObj != nullptr); GpuMemoryResourceCreateData data = {}; data.handle = reinterpret_cast<ResourceHandle>(eventData.pObj); data.type = eventData.type; data.descriptionSize = eventData.resourceDescSize; data.pDescription = eventData.pResourceDescData; LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== // Logs an event when a resource that requires GPU memory is destroyed. See the ResourceType enum for the list of // resources this applies to. void EventProvider::LogGpuMemoryResourceDestroyEvent( const ResourceDestroyEventData& eventData) { static constexpr PalEvent eventId = PalEvent::GpuMemoryResourceDestroy; if (ShouldLog(eventId)) { PAL_ASSERT(eventData.pObj != nullptr); GpuMemoryResourceDestroyData data = {}; data.handle = reinterpret_cast<ResourceHandle>(eventData.pObj); LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== // Logs an event capturing the assignment of an app-specified name for an object. void EventProvider::LogDebugNameEvent( const DebugNameEventData& eventData) { static constexpr PalEvent eventId = PalEvent::DebugName; if (ShouldLog(eventId)) { PAL_ASSERT(eventData.pObj != nullptr); DebugNameData data = {}; data.handle = reinterpret_cast<ResourceHandle>(eventData.pObj); data.pDebugName = eventData.pDebugName; data.nameSize = static_cast<uint32>(strlen(eventData.pDebugName)); LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== // Logs a miscellaneous event that requires no additional data. See MiscEventType for the list of miscellaneous events. void EventProvider::LogGpuMemoryMiscEvent( const MiscEventData& eventData) { static constexpr PalEvent eventId = PalEvent::GpuMemoryMisc; if (ShouldLog(eventId)) { GpuMemoryMiscData data = {}; data.type = eventData.eventType; data.engine = eventData.engine; LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== // Logs an event when an application/driver wants to insert a snapshot marker into the event data. A snapshot is a // named point in time that can give context to the surrounding event data. void EventProvider::LogGpuMemorySnapshotEvent( const GpuMemorySnapshotEventData& eventData) { static constexpr PalEvent eventId = PalEvent::GpuMemorySnapshot; if (ShouldLog(eventId)) { GpuMemorySnapshotData data = {}; data.pSnapshotName = eventData.pSnapshotName; LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== // Logs an event when a driver wants to correlate internal driver information with the equivalent resource ID. // Allows the client to correlate PAL resources with arbitrary data, such as data provided by the // driver, runtime, or application. void EventProvider::LogResourceCorrelationEvent( const ResourceCorrelationEventData& eventData) { static constexpr PalEvent eventId = PalEvent::ResourceCorrelation; if (ShouldLog(eventId)) { ResourceCorrelationData data = {}; data.handle = reinterpret_cast<ResourceHandle>(eventData.pObj); data.driverHandle = reinterpret_cast<ResourceHandle>(eventData.pDriverPrivate); LogEvent(eventId, &data, sizeof(data)); } } // ===================================================================================================================== void EventProvider::LogEvent( PalEvent eventId, const void* pEventData, size_t eventDataSize) { static_assert(static_cast<uint32>(PalEvent::Count) == 16, "Write support for new event!"); if (ShouldLog(eventId)) { // The RMT format requires that certain tokens strictly follow each other (e.g. resource create + description), // so we need to lock to ensure another event isn't inserted into the stream while writing dependent tokens. DevDriver::Platform::LockGuard<DevDriver::Platform::Mutex> providerLock(m_providerLock); // The first time we have something to log, we need to log the RmtVersion first if (m_logRmtVersion) { if (ShouldLog(PalEvent::RmtVersion)) { // If RMT logging is enabled, the first token we emit should be the RmtVersion event static const RmtDataVersion kRmtVersionEvent = { RMT_FILE_DATA_CHUNK_MAJOR_VERSION, RMT_FILE_DATA_CHUNK_MINOR_VERSION }; WriteEvent(static_cast<uint32>(PalEvent::RmtVersion), &kRmtVersionEvent, sizeof(RmtDataVersion)); m_logRmtVersion = false; } } const EventTimestamp timestamp = m_eventTimer.CreateTimestamp(); uint8 delta = 0; if (timestamp.type == EventTimestampType::Full) { RMT_MSG_TIMESTAMP tsToken(timestamp.full.timestamp, timestamp.full.frequency); WriteTokenData(tsToken); } else if (timestamp.type == EventTimestampType::LargeDelta) { RMT_MSG_TIME_DELTA tdToken(timestamp.largeDelta.delta, timestamp.largeDelta.numBytes); WriteTokenData(tdToken); } else { delta = timestamp.smallDelta.delta; } switch (eventId) { case PalEvent::ResourceCorrelation: { const ResourceCorrelationData* pData = reinterpret_cast<const ResourceCorrelationData*>(pEventData); const uint32 handle = LowPart(pData->handle); const uint32 driverHandle = LowPart(pData->driverHandle); RMT_MSG_USERDATA_RSRC_CORRELATION eventToken(delta, handle, driverHandle); WriteTokenData(eventToken); break; } case PalEvent::Count: case PalEvent::Invalid: { PAL_ASSERT_ALWAYS(); break; } case PalEvent::RmtToken: case PalEvent::RmtVersion: { // RmtToken and RmtVersion should not be logged through this function PAL_ASSERT_ALWAYS(); break; } case PalEvent::CreateGpuMemory: { PAL_ASSERT(sizeof(CreateGpuMemoryData) == eventDataSize); const CreateGpuMemoryData* pData = reinterpret_cast<const CreateGpuMemoryData*>(pEventData); static_assert((GpuHeapCount >= 4), "We store 4 heaps in the RMT_MSG_VIRTUAL_ALLOCATE message. Ensure we're not out of bounds."); RMT_MSG_VIRTUAL_ALLOCATE eventToken( delta, pData->size, pData->isInternal ? RMT_OWNER_CLIENT_DRIVER : RMT_OWNER_APP, // For now we only distinguish between driver // app ownership pData->gpuVirtualAddr, PalToRmtHeapType(pData->heaps[0]), PalToRmtHeapType(pData->heaps[1]), PalToRmtHeapType(pData->heaps[2]), PalToRmtHeapType(pData->heaps[3]), static_cast<DevDriver::uint8>(pData->heapCount)); WriteTokenData(eventToken); break; } case PalEvent::DestroyGpuMemory: { PAL_ASSERT(sizeof(DestroyGpuMemoryData) == eventDataSize); const DestroyGpuMemoryData* pData = reinterpret_cast<const DestroyGpuMemoryData*>(pEventData); RMT_MSG_FREE_VIRTUAL eventToken(delta, pData->gpuVirtualAddr); WriteTokenData(eventToken); break; } case PalEvent::GpuMemoryResourceCreate: { LogResourceCreateEvent(delta, pEventData, eventDataSize); break; } case PalEvent::GpuMemoryResourceDestroy: { PAL_ASSERT(sizeof(GpuMemoryResourceDestroyData) == eventDataSize); const GpuMemoryResourceDestroyData* pData = reinterpret_cast<const GpuMemoryResourceDestroyData*>(pEventData); RMT_MSG_RESOURCE_DESTROY eventToken(delta, LowPart(pData->handle)); WriteTokenData(eventToken); break; } case PalEvent::GpuMemoryMisc: { PAL_ASSERT(sizeof(GpuMemoryMiscData) == eventDataSize); const GpuMemoryMiscData* pData = reinterpret_cast<const GpuMemoryMiscData*>(pEventData); RMT_MSG_MISC eventToken(delta, PalToRmtMiscEventType(pData->type)); WriteTokenData(eventToken); break; } case PalEvent::GpuMemorySnapshot: { PAL_ASSERT(sizeof(GpuMemorySnapshotData) == eventDataSize); const GpuMemorySnapshotData* pData = reinterpret_cast<const GpuMemorySnapshotData*>(pEventData); RMT_MSG_USERDATA_EMBEDDED_STRING eventToken( delta, RMT_USERDATA_EVENT_TYPE_SNAPSHOT, pData->pSnapshotName); WriteTokenData(eventToken); break; } case PalEvent::DebugName: { PAL_ASSERT(sizeof(DebugNameData) == eventDataSize); const DebugNameData* pData = reinterpret_cast<const DebugNameData*>(pEventData); RMT_MSG_USERDATA_DEBUG_NAME eventToken( delta, pData->pDebugName, LowPart(pData->handle)); WriteTokenData(eventToken); break; } case PalEvent::GpuMemoryResourceBind: { PAL_ASSERT(sizeof(GpuMemoryResourceBindData) == eventDataSize); const GpuMemoryResourceBindData* pData = reinterpret_cast<const GpuMemoryResourceBindData*>(pEventData); RMT_MSG_RESOURCE_BIND eventToken( delta, pData->gpuVirtualAddr + pData->offset, pData->requiredSize, LowPart(pData->resourceHandle), pData->isSystemMemory); WriteTokenData(eventToken); GpuMemory* pGpuMemory = reinterpret_cast<GpuMemory*>(pData->handle); if (pGpuMemory != nullptr) { if (pData->requiredSize > pGpuMemory->Desc().size) { // GPU memory smaller than resource size DD_ASSERT_ALWAYS(); } } break; } case PalEvent::GpuMemoryCpuMap: { PAL_ASSERT(sizeof(GpuMemoryCpuMapData) == eventDataSize); const GpuMemoryCpuMapData* pData = reinterpret_cast<const GpuMemoryCpuMapData*>(pEventData); RMT_MSG_CPU_MAP eventToken(delta, pData->gpuVirtualAddr, false); WriteTokenData(eventToken); break; } case PalEvent::GpuMemoryCpuUnmap: { PAL_ASSERT(sizeof(GpuMemoryCpuUnmapData) == eventDataSize); const GpuMemoryCpuUnmapData* pData = reinterpret_cast<const GpuMemoryCpuUnmapData*>(pEventData); RMT_MSG_CPU_MAP eventToken(delta, pData->gpuVirtualAddr, true); WriteTokenData(eventToken); break; } case PalEvent::GpuMemoryAddReference: { PAL_ASSERT(sizeof(GpuMemoryAddReferenceData) == eventDataSize); const GpuMemoryAddReferenceData* pData = reinterpret_cast<const GpuMemoryAddReferenceData*>(pEventData); RMT_MSG_RESOURCE_REFERENCE eventToken( delta, false, // isRemove pData->gpuVirtualAddr, static_cast<uint8>(pData->queueHandle) & 0x7f); WriteTokenData(eventToken); break; } case PalEvent::GpuMemoryRemoveReference: { PAL_ASSERT(sizeof(GpuMemoryRemoveReferenceData) == eventDataSize); const GpuMemoryRemoveReferenceData* pData = reinterpret_cast<const GpuMemoryRemoveReferenceData*>(pEventData); RMT_MSG_RESOURCE_REFERENCE eventToken( delta, true, // isRemove pData->gpuVirtualAddr, static_cast<uint8>(pData->queueHandle) & 0x7f); WriteTokenData(eventToken); break; } } } } // ===================================================================================================================== void EventProvider::LogResourceCreateEvent( uint8 delta, const void* pEventData, size_t eventDataSize) { PAL_ASSERT(eventDataSize == sizeof(GpuMemoryResourceCreateData)); const auto* pRsrcCreateData = reinterpret_cast<const GpuMemoryResourceCreateData*>(pEventData); RMT_MSG_RESOURCE_CREATE rsrcCreateToken( delta, LowPart(pRsrcCreateData->handle), RMT_OWNER_KMD, 0, RMT_COMMIT_TYPE_COMMITTED, PalToRmtResourceType(pRsrcCreateData->type)); WriteTokenData(rsrcCreateToken); switch (pRsrcCreateData->type) { case ResourceType::Image: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionImage)); const auto* pImageData = reinterpret_cast<const ResourceDescriptionImage*>(pRsrcCreateData->pDescription); RMT_IMAGE_DESC_CREATE_INFO imgCreateInfo = {}; imgCreateInfo.createFlags = PalToRmtImgCreateFlags(pImageData->pCreateInfo->flags); imgCreateInfo.usageFlags = PalToRmtImgUsageFlags(pImageData->pCreateInfo->usageFlags); imgCreateInfo.imageType = PalToRmtImageType(pImageData->pCreateInfo->imageType); imgCreateInfo.dimensions.dimension_X = static_cast<uint16>(pImageData->pCreateInfo->extent.width); imgCreateInfo.dimensions.dimension_Y = static_cast<uint16>(pImageData->pCreateInfo->extent.height); imgCreateInfo.dimensions.dimension_Z = static_cast<uint16>(pImageData->pCreateInfo->extent.depth); imgCreateInfo.format = PalToRmtImageFormat(pImageData->pCreateInfo->swizzledFormat); imgCreateInfo.mips = static_cast<uint8>(pImageData->pCreateInfo->mipLevels); imgCreateInfo.slices = static_cast<uint8>(pImageData->pCreateInfo->arraySize); imgCreateInfo.samples = static_cast<uint8>(pImageData->pCreateInfo->samples); imgCreateInfo.fragments = static_cast<uint8>(pImageData->pCreateInfo->fragments); imgCreateInfo.tilingType = PalToRmtTilingType(pImageData->pCreateInfo->tiling); imgCreateInfo.tilingOptMode = PalToRmtTilingOptMode(pImageData->pCreateInfo->tilingOptMode); imgCreateInfo.metadataMode = PalToRmtMetadataMode(pImageData->pCreateInfo->metadataMode); imgCreateInfo.maxBaseAlignment = pImageData->pCreateInfo->maxBaseAlign; imgCreateInfo.isPresentable = pImageData->isPresentable; imgCreateInfo.imageSize = static_cast<uint32>(pImageData->pMemoryLayout->dataSize); imgCreateInfo.metadataOffset = static_cast<uint32>(pImageData->pMemoryLayout->metadataOffset); imgCreateInfo.metadataSize = static_cast<uint32>(pImageData->pMemoryLayout->metadataSize); imgCreateInfo.metadataHeaderOffset = static_cast<uint32>(pImageData->pMemoryLayout->metadataHeaderOffset); imgCreateInfo.metadataHeaderSize = static_cast<uint32>(pImageData->pMemoryLayout->metadataHeaderSize); imgCreateInfo.imageAlignment = pImageData->pMemoryLayout->dataAlignment; imgCreateInfo.metadataAlignment = pImageData->pMemoryLayout->metadataAlignment; imgCreateInfo.metadataHeaderAlignment = pImageData->pMemoryLayout->metadataHeaderAlignment; imgCreateInfo.isFullscreen = pImageData->isFullscreen; RMT_RESOURCE_TYPE_IMAGE_TOKEN imgDesc(imgCreateInfo); WriteTokenData(imgDesc); break; } case ResourceType::Buffer: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionBuffer)); const auto* pBufferData = reinterpret_cast<const ResourceDescriptionBuffer*>(pRsrcCreateData->pDescription); // @TODO - add static asserts to make sure the bit positions in RMT_BUFFER_CREATE/USAGE_FLAGS match Pal values RMT_RESOURCE_TYPE_BUFFER_TOKEN bufferDesc( static_cast<uint8>(pBufferData->createFlags), static_cast<uint16>(pBufferData->usageFlags), pBufferData->size); WriteTokenData(bufferDesc); break; } case ResourceType::Pipeline: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionPipeline)); const auto* pPipelineData = reinterpret_cast<const ResourceDescriptionPipeline*>(pRsrcCreateData->pDescription); RMT_PIPELINE_CREATE_FLAGS flags; flags.CLIENT_INTERNAL = pPipelineData->pCreateFlags->clientInternal; flags.OVERRIDE_GPU_HEAP = 0; // pipeline heap override has been removed in PAL version 631.0 RMT_PIPELINE_HASH hash; hash.hashUpper = pPipelineData->pPipelineInfo->internalPipelineHash.unique; hash.hashLower = pPipelineData->pPipelineInfo->internalPipelineHash.stable; const auto& shaderHashes = pPipelineData->pPipelineInfo->shader; RMT_PIPELINE_STAGES stages; stages.PS_STAGE = ShaderHashIsNonzero(shaderHashes[static_cast<uint32>(ShaderType::Pixel)].hash); stages.HS_STAGE = ShaderHashIsNonzero(shaderHashes[static_cast<uint32>(ShaderType::Hull)].hash); stages.DS_STAGE = ShaderHashIsNonzero(shaderHashes[static_cast<uint32>(ShaderType::Domain)].hash); stages.VS_STAGE = ShaderHashIsNonzero(shaderHashes[static_cast<uint32>(ShaderType::Vertex)].hash); stages.GS_STAGE = ShaderHashIsNonzero(shaderHashes[static_cast<uint32>(ShaderType::Geometry)].hash); stages.CS_STAGE = ShaderHashIsNonzero(shaderHashes[static_cast<uint32>(ShaderType::Compute)].hash); stages.TS_STAGE = ShaderHashIsNonzero(shaderHashes[static_cast<uint32>(ShaderType::Task)].hash); stages.MS_STAGE = ShaderHashIsNonzero(shaderHashes[static_cast<uint32>(ShaderType::Mesh)].hash); RMT_RESOURCE_TYPE_PIPELINE_TOKEN pipelineDesc(flags, hash, stages, false); WriteTokenData(pipelineDesc); break; } case ResourceType::Heap: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionHeap)); const auto* pHeapData = reinterpret_cast<const ResourceDescriptionHeap*>(pRsrcCreateData->pDescription); RMT_HEAP_FLAGS rmtFlags = {}; if (Util::TestAnyFlagSet(pHeapData->flags, static_cast<uint32>(ResourceDescriptionHeapFlags::NonRenderTargetDepthStencilTextures))) { rmtFlags.NON_RT_DS_TEXTURES = 1; } if (Util::TestAnyFlagSet(pHeapData->flags, static_cast<uint32>(ResourceDescriptionHeapFlags::Buffers))) { rmtFlags.BUFFERS = 1; } if (Util::TestAnyFlagSet(pHeapData->flags, static_cast<uint32>(ResourceDescriptionHeapFlags::CoherentSystemWide))) { rmtFlags.COHERENT_SYSTEM_WIDE = 1; } if (Util::TestAnyFlagSet(pHeapData->flags, static_cast<uint32>(ResourceDescriptionHeapFlags::Primary))) { rmtFlags.PRIMARY = 1; } if (Util::TestAnyFlagSet(pHeapData->flags, static_cast<uint32>(ResourceDescriptionHeapFlags::RenderTargetDepthStencilTextures))) { rmtFlags.RT_DS_TEXTURES = 1; } if (Util::TestAnyFlagSet(pHeapData->flags, static_cast<uint32>(ResourceDescriptionHeapFlags::DenyL0Demotion))) { rmtFlags.DENY_L0_PROMOTION = 1; } RMT_RESOURCE_TYPE_HEAP_TOKEN heapDesc( rmtFlags, pHeapData->size, RMT_PAGE_SIZE_4KB, //< @TODO - we don't currently have this info, so just set to 4KB static_cast<uint8>(pHeapData->preferredGpuHeap)); WriteTokenData(heapDesc); break; } case ResourceType::GpuEvent: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionGpuEvent)); const auto* pGpuEventData = reinterpret_cast<const ResourceDescriptionGpuEvent*>(pRsrcCreateData->pDescription); const bool isGpuOnly = (pGpuEventData->pCreateInfo->flags.gpuAccessOnly == 1); RMT_RESOURCE_TYPE_GPU_EVENT_TOKEN gpuEventDesc(isGpuOnly); WriteTokenData(gpuEventDesc); break; } case ResourceType::BorderColorPalette: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionBorderColorPalette)); const auto* pBcpData = reinterpret_cast<const ResourceDescriptionBorderColorPalette*>(pRsrcCreateData->pDescription); RMT_RESOURCE_TYPE_BORDER_COLOR_PALETTE_TOKEN bcpDesc(static_cast<uint8>(pBcpData->pCreateInfo->paletteSize)); WriteTokenData(bcpDesc); break; } case ResourceType::PerfExperiment: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionPerfExperiment)); const auto* pPerfExperimentData = reinterpret_cast<const ResourceDescriptionPerfExperiment*>(pRsrcCreateData->pDescription); RMT_RESOURCE_TYPE_PERF_EXPERIMENT_TOKEN perfExperimentDesc( static_cast<uint32>(pPerfExperimentData->spmSize), static_cast<uint32>(pPerfExperimentData->sqttSize), static_cast<uint32>(pPerfExperimentData->perfCounterSize)); WriteTokenData(perfExperimentDesc); break; } case ResourceType::QueryPool: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionQueryPool)); const auto* pQueryPoolData = reinterpret_cast<const ResourceDescriptionQueryPool*>(pRsrcCreateData->pDescription); RMT_RESOURCE_TYPE_QUERY_HEAP_TOKEN queryHeapDesc( PalToRmtQueryHeapType(pQueryPoolData->pCreateInfo->queryPoolType), (pQueryPoolData->pCreateInfo->flags.enableCpuAccess == 1)); WriteTokenData(queryHeapDesc); break; } case ResourceType::VideoEncoder: { break; } case ResourceType::VideoDecoder: { break; } case ResourceType::DescriptorHeap: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionDescriptorHeap)); const auto* pDescriptorHeapData = reinterpret_cast<const ResourceDescriptionDescriptorHeap*>(pRsrcCreateData->pDescription); RMT_RESOURCE_TYPE_DESCRIPTOR_HEAP_TOKEN descriptorHeapDesc( PalToRmtDescriptorType(pDescriptorHeapData->type), pDescriptorHeapData->isShaderVisible, static_cast<uint8>(pDescriptorHeapData->nodeMask), static_cast<uint16>(pDescriptorHeapData->numDescriptors)); WriteTokenData(descriptorHeapDesc); break; } case ResourceType::DescriptorPool: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionDescriptorPool)); const auto* pDescriptorPoolData = reinterpret_cast<const ResourceDescriptionDescriptorPool*>(pRsrcCreateData->pDescription); RMT_RESOURCE_TYPE_POOL_SIZE_TOKEN poolSizeDesc( static_cast<uint16>(pDescriptorPoolData->maxSets), static_cast<uint8>(pDescriptorPoolData->numPoolSize)); WriteTokenData(poolSizeDesc); // Then loop through writing RMT_POOL_SIZE_DESCs for (uint32 i = 0; i < pDescriptorPoolData->numPoolSize; ++i) { RMT_POOL_SIZE_DESC poolSize( PalToRmtDescriptorType(pDescriptorPoolData->pPoolSizes[i].type), static_cast<uint16>(pDescriptorPoolData->pPoolSizes[i].numDescriptors)); WriteTokenData(poolSize); } break; } case ResourceType::CmdAllocator: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionCmdAllocator)); const auto* pCmdAllocatorData = reinterpret_cast<const ResourceDescriptionCmdAllocator*>(pRsrcCreateData->pDescription); RMT_RESOURCE_TYPE_CMD_ALLOCATOR_TOKEN cmdAllocatorDesc( PalToRmtCmdAllocatorCreateFlags(pCmdAllocatorData->pCreateInfo->flags), PalToRmtHeapType(pCmdAllocatorData->pCreateInfo->allocInfo[CmdAllocType::CommandDataAlloc].allocHeap), pCmdAllocatorData->pCreateInfo->allocInfo[CmdAllocType::CommandDataAlloc].allocSize, pCmdAllocatorData->pCreateInfo->allocInfo[CmdAllocType::CommandDataAlloc].suballocSize, PalToRmtHeapType(pCmdAllocatorData->pCreateInfo->allocInfo[CmdAllocType::EmbeddedDataAlloc].allocHeap), pCmdAllocatorData->pCreateInfo->allocInfo[CmdAllocType::EmbeddedDataAlloc].allocSize, pCmdAllocatorData->pCreateInfo->allocInfo[CmdAllocType::EmbeddedDataAlloc].suballocSize, PalToRmtHeapType(pCmdAllocatorData->pCreateInfo->allocInfo[CmdAllocType::GpuScratchMemAlloc].allocHeap), pCmdAllocatorData->pCreateInfo->allocInfo[CmdAllocType::GpuScratchMemAlloc].allocSize, pCmdAllocatorData->pCreateInfo->allocInfo[CmdAllocType::GpuScratchMemAlloc].suballocSize); WriteTokenData(cmdAllocatorDesc); break; } case ResourceType::MiscInternal: { PAL_ASSERT(pRsrcCreateData->descriptionSize == sizeof(ResourceDescriptionMiscInternal)); const auto* pMiscInternalData = reinterpret_cast<const ResourceDescriptionMiscInternal*>(pRsrcCreateData->pDescription); RMT_RESOURCE_TYPE_MISC_INTERNAL_TOKEN miscInternalDesc(PalToRmtMiscInternalType(pMiscInternalData->type)); WriteTokenData(miscInternalDesc); break; } case ResourceType::IndirectCmdGenerator: // IndirectCmdGenerator has no description data PAL_ASSERT(pRsrcCreateData->descriptionSize == 0); break; case ResourceType::MotionEstimator: // MotionEstimator has no description data PAL_ASSERT(pRsrcCreateData->descriptionSize == 0); break; case ResourceType::Timestamp: // Timestamp has no description data PAL_ASSERT(pRsrcCreateData->descriptionSize == 0); break; default: PAL_ASSERT_ALWAYS(); break; } } } // Pal
41.4613
126
0.614247
[ "mesh", "geometry", "object" ]
441ff3ba566de4f35daf766f1fe7e10efa79f19c
17,549
cc
C++
src/modules/desktop_capture/win/wgc_capturer_win_unittest.cc
ilya-fedin/tg_owt
d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589
[ "BSD-3-Clause" ]
162
2018-04-03T04:29:45.000Z
2022-03-30T19:41:27.000Z
src/modules/desktop_capture/win/wgc_capturer_win_unittest.cc
ilya-fedin/tg_owt
d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589
[ "BSD-3-Clause" ]
59
2020-08-24T09:17:42.000Z
2022-02-27T23:33:37.000Z
src/modules/desktop_capture/win/wgc_capturer_win_unittest.cc
ilya-fedin/tg_owt
d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589
[ "BSD-3-Clause" ]
62
2018-03-26T08:38:18.000Z
2022-03-14T02:29:47.000Z
/* * Copyright (c) 2020 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "modules/desktop_capture/win/wgc_capturer_win.h" #include <string> #include <utility> #include <vector> #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/win/test_support/test_window.h" #include "modules/desktop_capture/win/window_capture_utils.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/thread.h" #include "rtc_base/time_utils.h" #include "rtc_base/win/scoped_com_initializer.h" #include "rtc_base/win/windows_version.h" #include "system_wrappers/include/metrics.h" #include "test/gtest.h" namespace webrtc { namespace { const char kWindowThreadName[] = "wgc_capturer_test_window_thread"; const WCHAR kWindowTitle[] = L"WGC Capturer Test Window"; const char kCapturerImplHistogram[] = "WebRTC.DesktopCapture.Win.DesktopCapturerImpl"; const char kCapturerResultHistogram[] = "WebRTC.DesktopCapture.Win.WgcCapturerResult"; const int kSuccess = 0; const int kSessionStartFailure = 4; const char kCaptureSessionResultHistogram[] = "WebRTC.DesktopCapture.Win.WgcCaptureSessionStartResult"; const int kSourceClosed = 1; const char kCaptureTimeHistogram[] = "WebRTC.DesktopCapture.Win.WgcCapturerFrameTime"; const int kSmallWindowWidth = 200; const int kSmallWindowHeight = 100; const int kMediumWindowWidth = 300; const int kMediumWindowHeight = 200; const int kLargeWindowWidth = 400; const int kLargeWindowHeight = 500; // The size of the image we capture is slightly smaller than the actual size of // the window. const int kWindowWidthSubtrahend = 14; const int kWindowHeightSubtrahend = 7; // Custom message constants so we can direct our thread to close windows // and quit running. const UINT kNoOp = WM_APP; const UINT kDestroyWindow = WM_APP + 1; const UINT kQuitRunning = WM_APP + 2; enum CaptureType { kWindowCapture = 0, kScreenCapture = 1 }; } // namespace class WgcCapturerWinTest : public ::testing::TestWithParam<CaptureType>, public DesktopCapturer::Callback { public: void SetUp() override { if (rtc::rtc_win::GetVersion() < rtc::rtc_win::Version::VERSION_WIN10_RS5) { RTC_LOG(LS_INFO) << "Skipping WgcCapturerWinTests on Windows versions < RS5."; GTEST_SKIP(); } com_initializer_ = std::make_unique<ScopedCOMInitializer>(ScopedCOMInitializer::kMTA); EXPECT_TRUE(com_initializer_->Succeeded()); } void SetUpForWindowCapture(int window_width = kMediumWindowWidth, int window_height = kMediumWindowHeight) { capturer_ = WgcCapturerWin::CreateRawWindowCapturer( DesktopCaptureOptions::CreateDefault()); CreateWindowOnSeparateThread(window_width, window_height); StartWindowThreadMessageLoop(); source_id_ = GetTestWindowIdFromSourceList(); } void SetUpForScreenCapture() { capturer_ = WgcCapturerWin::CreateRawScreenCapturer( DesktopCaptureOptions::CreateDefault()); source_id_ = GetScreenIdFromSourceList(); } void TearDown() override { if (window_open_) { CloseTestWindow(); } } // The window must live on a separate thread so that we can run a message pump // without blocking the test thread. This is necessary if we are interested in // having GraphicsCaptureItem events (i.e. the Closed event) fire, and it more // closely resembles how capture works in the wild. void CreateWindowOnSeparateThread(int window_width, int window_height) { window_thread_ = rtc::Thread::Create(); window_thread_->SetName(kWindowThreadName, nullptr); window_thread_->Start(); window_thread_->Invoke<void>(RTC_FROM_HERE, [this, window_width, window_height]() { window_thread_id_ = GetCurrentThreadId(); window_info_ = CreateTestWindow(kWindowTitle, window_height, window_width); window_open_ = true; while (!IsWindowResponding(window_info_.hwnd)) { RTC_LOG(LS_INFO) << "Waiting for test window to become responsive in " "WgcWindowCaptureTest."; } while (!IsWindowValidAndVisible(window_info_.hwnd)) { RTC_LOG(LS_INFO) << "Waiting for test window to be visible in " "WgcWindowCaptureTest."; } }); ASSERT_TRUE(window_thread_->RunningForTest()); ASSERT_FALSE(window_thread_->IsCurrent()); } void StartWindowThreadMessageLoop() { window_thread_->PostTask(RTC_FROM_HERE, [this]() { MSG msg; BOOL gm; while ((gm = ::GetMessage(&msg, NULL, 0, 0)) != 0 && gm != -1) { ::DispatchMessage(&msg); if (msg.message == kDestroyWindow) { DestroyTestWindow(window_info_); } if (msg.message == kQuitRunning) { PostQuitMessage(0); } } }); } void CloseTestWindow() { ::PostThreadMessage(window_thread_id_, kDestroyWindow, 0, 0); ::PostThreadMessage(window_thread_id_, kQuitRunning, 0, 0); window_thread_->Stop(); window_open_ = false; } DesktopCapturer::SourceId GetTestWindowIdFromSourceList() { // Frequently, the test window will not show up in GetSourceList because it // was created too recently. Since we are confident the window will be found // eventually we loop here until we find it. intptr_t src_id; do { DesktopCapturer::SourceList sources; EXPECT_TRUE(capturer_->GetSourceList(&sources)); auto it = std::find_if( sources.begin(), sources.end(), [&](const DesktopCapturer::Source& src) { return src.id == reinterpret_cast<intptr_t>(window_info_.hwnd); }); src_id = it->id; } while (src_id != reinterpret_cast<intptr_t>(window_info_.hwnd)); return src_id; } DesktopCapturer::SourceId GetScreenIdFromSourceList() { DesktopCapturer::SourceList sources; EXPECT_TRUE(capturer_->GetSourceList(&sources)); EXPECT_GT(sources.size(), 0ULL); return sources[0].id; } void DoCapture() { // Sometimes the first few frames are empty becaues the capture engine is // still starting up. We also may drop a few frames when the window is // resized or un-minimized. do { capturer_->CaptureFrame(); } while (result_ == DesktopCapturer::Result::ERROR_TEMPORARY); EXPECT_EQ(result_, DesktopCapturer::Result::SUCCESS); EXPECT_TRUE(frame_); EXPECT_GT(metrics::NumEvents(kCapturerResultHistogram, kSuccess), successful_captures_); ++successful_captures_; } void ValidateFrame(int expected_width, int expected_height) { EXPECT_EQ(frame_->size().width(), expected_width - kWindowWidthSubtrahend); EXPECT_EQ(frame_->size().height(), expected_height - kWindowHeightSubtrahend); // Verify the buffer contains as much data as it should, and that the right // colors are found. int data_length = frame_->stride() * frame_->size().height(); // The first and last pixel should have the same color because they will be // from the border of the window. // Pixels have 4 bytes of data so the whole pixel needs a uint32_t to fit. uint32_t first_pixel = static_cast<uint32_t>(*frame_->data()); uint32_t last_pixel = static_cast<uint32_t>( *(frame_->data() + data_length - DesktopFrame::kBytesPerPixel)); EXPECT_EQ(first_pixel, last_pixel); // Let's also check a pixel from the middle of the content area, which the // TestWindow will paint a consistent color for us to verify. uint8_t* middle_pixel = frame_->data() + (data_length / 2); int sub_pixel_offset = DesktopFrame::kBytesPerPixel / 4; EXPECT_EQ(*middle_pixel, kTestWindowBValue); middle_pixel += sub_pixel_offset; EXPECT_EQ(*middle_pixel, kTestWindowGValue); middle_pixel += sub_pixel_offset; EXPECT_EQ(*middle_pixel, kTestWindowRValue); middle_pixel += sub_pixel_offset; // The window is opaque so we expect 0xFF for the Alpha channel. EXPECT_EQ(*middle_pixel, 0xFF); } // DesktopCapturer::Callback interface // The capturer synchronously invokes this method before `CaptureFrame()` // returns. void OnCaptureResult(DesktopCapturer::Result result, std::unique_ptr<DesktopFrame> frame) override { result_ = result; frame_ = std::move(frame); } protected: std::unique_ptr<ScopedCOMInitializer> com_initializer_; DWORD window_thread_id_; std::unique_ptr<rtc::Thread> window_thread_; WindowInfo window_info_; intptr_t source_id_; bool window_open_ = false; DesktopCapturer::Result result_; int successful_captures_ = 0; std::unique_ptr<DesktopFrame> frame_; std::unique_ptr<DesktopCapturer> capturer_; }; TEST_P(WgcCapturerWinTest, SelectValidSource) { if (GetParam() == CaptureType::kWindowCapture) { SetUpForWindowCapture(); } else { SetUpForScreenCapture(); } EXPECT_TRUE(capturer_->SelectSource(source_id_)); } TEST_P(WgcCapturerWinTest, SelectInvalidSource) { if (GetParam() == CaptureType::kWindowCapture) { capturer_ = WgcCapturerWin::CreateRawWindowCapturer( DesktopCaptureOptions::CreateDefault()); source_id_ = kNullWindowId; } else { capturer_ = WgcCapturerWin::CreateRawScreenCapturer( DesktopCaptureOptions::CreateDefault()); source_id_ = kInvalidScreenId; } EXPECT_FALSE(capturer_->SelectSource(source_id_)); } TEST_P(WgcCapturerWinTest, Capture) { if (GetParam() == CaptureType::kWindowCapture) { SetUpForWindowCapture(); } else { SetUpForScreenCapture(); } EXPECT_TRUE(capturer_->SelectSource(source_id_)); capturer_->Start(this); EXPECT_GE(metrics::NumEvents(kCapturerImplHistogram, DesktopCapturerId::kWgcCapturerWin), 1); DoCapture(); EXPECT_GT(frame_->size().width(), 0); EXPECT_GT(frame_->size().height(), 0); } TEST_P(WgcCapturerWinTest, CaptureTime) { if (GetParam() == CaptureType::kWindowCapture) { SetUpForWindowCapture(); } else { SetUpForScreenCapture(); } EXPECT_TRUE(capturer_->SelectSource(source_id_)); capturer_->Start(this); int64_t start_time; do { start_time = rtc::TimeNanos(); capturer_->CaptureFrame(); } while (result_ == DesktopCapturer::Result::ERROR_TEMPORARY); int capture_time_ms = (rtc::TimeNanos() - start_time) / rtc::kNumNanosecsPerMillisec; EXPECT_TRUE(frame_); // The test may measure the time slightly differently than the capturer. So we // just check if it's within 5 ms. EXPECT_NEAR(frame_->capture_time_ms(), capture_time_ms, 5); EXPECT_GE( metrics::NumEvents(kCaptureTimeHistogram, frame_->capture_time_ms()), 1); } INSTANTIATE_TEST_SUITE_P(SourceAgnostic, WgcCapturerWinTest, ::testing::Values(CaptureType::kWindowCapture, CaptureType::kScreenCapture)); // Monitor specific tests. TEST_F(WgcCapturerWinTest, FocusOnMonitor) { SetUpForScreenCapture(); EXPECT_TRUE(capturer_->SelectSource(0)); // You can't set focus on a monitor. EXPECT_FALSE(capturer_->FocusOnSelectedSource()); } TEST_F(WgcCapturerWinTest, CaptureAllMonitors) { SetUpForScreenCapture(); EXPECT_TRUE(capturer_->SelectSource(kFullDesktopScreenId)); capturer_->Start(this); DoCapture(); EXPECT_GT(frame_->size().width(), 0); EXPECT_GT(frame_->size().height(), 0); } // Window specific tests. TEST_F(WgcCapturerWinTest, FocusOnWindow) { capturer_ = WgcCapturerWin::CreateRawWindowCapturer( DesktopCaptureOptions::CreateDefault()); window_info_ = CreateTestWindow(kWindowTitle); source_id_ = GetScreenIdFromSourceList(); EXPECT_TRUE(capturer_->SelectSource(source_id_)); EXPECT_TRUE(capturer_->FocusOnSelectedSource()); HWND hwnd = reinterpret_cast<HWND>(source_id_); EXPECT_EQ(hwnd, ::GetActiveWindow()); EXPECT_EQ(hwnd, ::GetForegroundWindow()); EXPECT_EQ(hwnd, ::GetFocus()); DestroyTestWindow(window_info_); } TEST_F(WgcCapturerWinTest, SelectMinimizedWindow) { SetUpForWindowCapture(); MinimizeTestWindow(reinterpret_cast<HWND>(source_id_)); EXPECT_FALSE(capturer_->SelectSource(source_id_)); UnminimizeTestWindow(reinterpret_cast<HWND>(source_id_)); EXPECT_TRUE(capturer_->SelectSource(source_id_)); } TEST_F(WgcCapturerWinTest, SelectClosedWindow) { SetUpForWindowCapture(); EXPECT_TRUE(capturer_->SelectSource(source_id_)); CloseTestWindow(); EXPECT_FALSE(capturer_->SelectSource(source_id_)); } TEST_F(WgcCapturerWinTest, UnsupportedWindowStyle) { // Create a window with the WS_EX_TOOLWINDOW style, which WGC does not // support. window_info_ = CreateTestWindow(kWindowTitle, kMediumWindowWidth, kMediumWindowHeight, WS_EX_TOOLWINDOW); capturer_ = WgcCapturerWin::CreateRawWindowCapturer( DesktopCaptureOptions::CreateDefault()); DesktopCapturer::SourceList sources; EXPECT_TRUE(capturer_->GetSourceList(&sources)); auto it = std::find_if( sources.begin(), sources.end(), [&](const DesktopCapturer::Source& src) { return src.id == reinterpret_cast<intptr_t>(window_info_.hwnd); }); // We should not find the window, since we filter for unsupported styles. EXPECT_EQ(it, sources.end()); DestroyTestWindow(window_info_); } TEST_F(WgcCapturerWinTest, IncreaseWindowSizeMidCapture) { SetUpForWindowCapture(kSmallWindowWidth, kSmallWindowHeight); EXPECT_TRUE(capturer_->SelectSource(source_id_)); capturer_->Start(this); DoCapture(); ValidateFrame(kSmallWindowWidth, kSmallWindowHeight); ResizeTestWindow(window_info_.hwnd, kSmallWindowWidth, kMediumWindowHeight); DoCapture(); // We don't expect to see the new size until the next capture, as the frame // pool hadn't had a chance to resize yet to fit the new, larger image. DoCapture(); ValidateFrame(kSmallWindowWidth, kMediumWindowHeight); ResizeTestWindow(window_info_.hwnd, kLargeWindowWidth, kMediumWindowHeight); DoCapture(); DoCapture(); ValidateFrame(kLargeWindowWidth, kMediumWindowHeight); } TEST_F(WgcCapturerWinTest, ReduceWindowSizeMidCapture) { SetUpForWindowCapture(kLargeWindowWidth, kLargeWindowHeight); EXPECT_TRUE(capturer_->SelectSource(source_id_)); capturer_->Start(this); DoCapture(); ValidateFrame(kLargeWindowWidth, kLargeWindowHeight); ResizeTestWindow(window_info_.hwnd, kLargeWindowWidth, kMediumWindowHeight); // We expect to see the new size immediately because the image data has shrunk // and will fit in the existing buffer. DoCapture(); ValidateFrame(kLargeWindowWidth, kMediumWindowHeight); ResizeTestWindow(window_info_.hwnd, kSmallWindowWidth, kMediumWindowHeight); DoCapture(); ValidateFrame(kSmallWindowWidth, kMediumWindowHeight); } TEST_F(WgcCapturerWinTest, MinimizeWindowMidCapture) { SetUpForWindowCapture(); EXPECT_TRUE(capturer_->SelectSource(source_id_)); capturer_->Start(this); // Minmize the window and capture should continue but return temporary errors. MinimizeTestWindow(window_info_.hwnd); for (int i = 0; i < 10; ++i) { capturer_->CaptureFrame(); EXPECT_EQ(result_, DesktopCapturer::Result::ERROR_TEMPORARY); } // Reopen the window and the capture should continue normally. UnminimizeTestWindow(window_info_.hwnd); DoCapture(); // We can't verify the window size here because the test window does not // repaint itself after it is unminimized, but capturing successfully is still // a good test. } TEST_F(WgcCapturerWinTest, CloseWindowMidCapture) { SetUpForWindowCapture(); EXPECT_TRUE(capturer_->SelectSource(source_id_)); capturer_->Start(this); DoCapture(); ValidateFrame(kMediumWindowWidth, kMediumWindowHeight); CloseTestWindow(); // We need to call GetMessage to trigger the Closed event and the capturer's // event handler for it. If we are too early and the Closed event hasn't // arrived yet we should keep trying until the capturer receives it and stops. auto* wgc_capturer = static_cast<WgcCapturerWin*>(capturer_.get()); while (wgc_capturer->IsSourceBeingCaptured(source_id_)) { // Since the capturer handles the Closed message, there will be no message // for us and GetMessage will hang, unless we send ourselves a message // first. ::PostThreadMessage(GetCurrentThreadId(), kNoOp, 0, 0); MSG msg; ::GetMessage(&msg, NULL, 0, 0); ::DispatchMessage(&msg); } // Occasionally, one last frame will have made it into the frame pool before // the window closed. The first call will consume it, and in that case we need // to make one more call to CaptureFrame. capturer_->CaptureFrame(); if (result_ == DesktopCapturer::Result::SUCCESS) capturer_->CaptureFrame(); EXPECT_GE(metrics::NumEvents(kCapturerResultHistogram, kSessionStartFailure), 1); EXPECT_GE(metrics::NumEvents(kCaptureSessionResultHistogram, kSourceClosed), 1); EXPECT_EQ(result_, DesktopCapturer::Result::ERROR_PERMANENT); } } // namespace webrtc
34.477407
80
0.721409
[ "vector" ]
4424e621760d41d309475640a87490f0ba9b3ea0
6,364
cpp
C++
src/energyplus/Test/AirConditionerVariableRefrigerantFlow_GTest.cpp
mehrdad-shokri/OpenStudio
1773b54ce1cb660818ac0114dd7eefae6639ca36
[ "blessing" ]
null
null
null
src/energyplus/Test/AirConditionerVariableRefrigerantFlow_GTest.cpp
mehrdad-shokri/OpenStudio
1773b54ce1cb660818ac0114dd7eefae6639ca36
[ "blessing" ]
null
null
null
src/energyplus/Test/AirConditionerVariableRefrigerantFlow_GTest.cpp
mehrdad-shokri/OpenStudio
1773b54ce1cb660818ac0114dd7eefae6639ca36
[ "blessing" ]
null
null
null
/*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following * disclaimer. * * (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided with the distribution. * * (3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote products * derived from this software without specific prior written permission from the respective party. * * (4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other derivative works * may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar designation without specific prior * written permission from Alliance for Sustainable Energy, LLC. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED * STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************************************************************/ #include <gtest/gtest.h> #include "EnergyPlusFixture.hpp" #include "../ForwardTranslator.hpp" #include "../ReverseTranslator.hpp" #include "../../model/Model.hpp" #include "../../model/AirConditionerVariableRefrigerantFlow.hpp" #include "../../model/PlantLoop.hpp" #include "../../model/Node.hpp" #include <utilities/idd/IddEnums.hxx> #include <utilities/idd/AirConditioner_VariableRefrigerantFlow_FieldEnums.hxx> #include <resources.hxx> #include <sstream> using namespace openstudio::energyplus; using namespace openstudio::model; using namespace openstudio; TEST_F(EnergyPlusFixture,ForwardTranslatorAirConditionerVariableRefrigerantFlow_harcodedCondenserType) { // Lambda to dry up code auto translateAndCheckOneVRFAndCondenserType = [](const Model&m, const std::string& expectedCondenserType, unsigned expectedNumberOfErrors) { ForwardTranslator ft; // Translate Workspace w = ft.translateModel(m); // No Errors EXPECT_EQ(expectedNumberOfErrors, ft.errors().size()); std::vector<WorkspaceObject> objs = w.getObjectsByType(IddObjectType::AirConditioner_VariableRefrigerantFlow); EXPECT_EQ(1u, objs.size()); WorkspaceObject i_vrf = objs[0]; EXPECT_EQ(i_vrf.getString(AirConditioner_VariableRefrigerantFlowFields::CondenserType).get(), expectedCondenserType); }; std::vector<std::string> noWaterCondenserTypes({"AirCooled", "EvaporativelyCooled"}); for(const std::string& condenserType: noWaterCondenserTypes) { for (bool hasPlantLoop : { false, true }) { Model m; AirConditionerVariableRefrigerantFlow vrf(m); vrf.setCondenserType(condenserType); if (hasPlantLoop) { PlantLoop p(m); EXPECT_TRUE(p.addDemandBranchForComponent(vrf)); // One Error, still harcoded translateAndCheckOneVRFAndCondenserType(m, condenserType, 1); } else { // No Error translateAndCheckOneVRFAndCondenserType(m, condenserType, 0); } } } // WaterCooled std::string condenserType("WaterCooled"); for (bool hasPlantLoop : { false, true }) { Model m; AirConditionerVariableRefrigerantFlow vrf(m); vrf.setCondenserType(condenserType); if (hasPlantLoop) { PlantLoop p(m); EXPECT_TRUE(p.addDemandBranchForComponent(vrf)); // No Error translateAndCheckOneVRFAndCondenserType(m, condenserType, 0); } else { // One Error, still harcoded translateAndCheckOneVRFAndCondenserType(m, condenserType, 1); } } } TEST_F(EnergyPlusFixture,ForwardTranslatorAirConditionerVariableRefrigerantFlow_defaultedCondenserType) { ForwardTranslator ft; // No Plant Loop => AirCooled { Model m; AirConditionerVariableRefrigerantFlow vrf(m); vrf.resetCondenserType(); EXPECT_TRUE(vrf.isCondenserTypeDefaulted()); EXPECT_EQ("AirCooled", vrf.condenserType()); // Translate Workspace w = ft.translateModel(m); // No Errors EXPECT_EQ(0u, ft.errors().size()); std::vector<WorkspaceObject> objs = w.getObjectsByType(IddObjectType::AirConditioner_VariableRefrigerantFlow); EXPECT_EQ(1u, objs.size()); WorkspaceObject i_vrf = objs[0]; EXPECT_EQ(i_vrf.getString(AirConditioner_VariableRefrigerantFlowFields::CondenserType).get(), "AirCooled"); } // Plant Loop => WaterCooled { Model m; AirConditionerVariableRefrigerantFlow vrf(m); vrf.resetCondenserType(); PlantLoop p(m); EXPECT_TRUE(p.addDemandBranchForComponent(vrf)); EXPECT_TRUE(vrf.isCondenserTypeDefaulted()); EXPECT_EQ("WaterCooled", vrf.condenserType()); // Translate Workspace w = ft.translateModel(m); // No Errors EXPECT_EQ(0u, ft.errors().size()); std::vector<WorkspaceObject> objs = w.getObjectsByType(IddObjectType::AirConditioner_VariableRefrigerantFlow); EXPECT_EQ(1u, objs.size()); WorkspaceObject i_vrf = objs[0]; EXPECT_EQ(i_vrf.getString(AirConditioner_VariableRefrigerantFlowFields::CondenserType).get(), "WaterCooled"); } }
35.160221
143
0.710088
[ "vector", "model" ]
44292a0eced8eecd2f13caedbf34c787b5c761e0
4,889
hpp
C++
include/OggVorbisEncoder/Lookups/EnvelopeLookup_--c.hpp
RedBrumbler/virtuoso-codegen
e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3
[ "Unlicense" ]
null
null
null
include/OggVorbisEncoder/Lookups/EnvelopeLookup_--c.hpp
RedBrumbler/virtuoso-codegen
e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3
[ "Unlicense" ]
null
null
null
include/OggVorbisEncoder/Lookups/EnvelopeLookup_--c.hpp
RedBrumbler/virtuoso-codegen
e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3
[ "Unlicense" ]
null
null
null
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: OggVorbisEncoder.Lookups.EnvelopeLookup #include "OggVorbisEncoder/Lookups/EnvelopeLookup.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils-properties.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils-fields.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Begin forward declares // Forward declaring namespace: System namespace System { // Forward declaring type: Func`2<T, TResult> template<typename T, typename TResult> class Func_2; } // Forward declaring namespace: OggVorbisEncoder::Lookups namespace OggVorbisEncoder::Lookups { // Forward declaring type: EnvelopeFilterState class EnvelopeFilterState; } // Completed forward declares #include "beatsaber-hook/shared/utils/il2cpp-type-check.hpp" NEED_NO_BOX(::OggVorbisEncoder::Lookups::EnvelopeLookup::$$c); DEFINE_IL2CPP_ARG_TYPE(::OggVorbisEncoder::Lookups::EnvelopeLookup::$$c*, "OggVorbisEncoder.Lookups", "EnvelopeLookup/<>c"); // Type namespace: OggVorbisEncoder.Lookups namespace OggVorbisEncoder::Lookups { // Size: 0x10 #pragma pack(push, 1) // Autogenerated type: OggVorbisEncoder.Lookups.EnvelopeLookup/OggVorbisEncoder.Lookups.<>c // [TokenAttribute] Offset: FFFFFFFF // [CompilerGeneratedAttribute] Offset: FFFFFFFF class EnvelopeLookup::$$c : public ::Il2CppObject { public: // Get static field: static public readonly OggVorbisEncoder.Lookups.EnvelopeLookup/OggVorbisEncoder.Lookups.<>c <>9 static ::OggVorbisEncoder::Lookups::EnvelopeLookup::$$c* _get_$$9(); // Set static field: static public readonly OggVorbisEncoder.Lookups.EnvelopeLookup/OggVorbisEncoder.Lookups.<>c <>9 static void _set_$$9(::OggVorbisEncoder::Lookups::EnvelopeLookup::$$c* value); // Get static field: static public System.Func`2<System.Int32,OggVorbisEncoder.Lookups.EnvelopeFilterState> <>9__17_0 static ::System::Func_2<int, ::OggVorbisEncoder::Lookups::EnvelopeFilterState*>* _get_$$9__17_0(); // Set static field: static public System.Func`2<System.Int32,OggVorbisEncoder.Lookups.EnvelopeFilterState> <>9__17_0 static void _set_$$9__17_0(::System::Func_2<int, ::OggVorbisEncoder::Lookups::EnvelopeFilterState*>* value); // static private System.Void .cctor() // Offset: 0x126626C static void _cctor(); // OggVorbisEncoder.Lookups.EnvelopeFilterState <.ctor>b__17_0(System.Int32 s) // Offset: 0x12662D4 ::OggVorbisEncoder::Lookups::EnvelopeFilterState* $_ctor$b__17_0(int s); // public System.Void .ctor() // Offset: 0x12662CC // Implemented from: System.Object // Base method: System.Void Object::.ctor() template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary> static EnvelopeLookup::$$c* New_ctor() { static auto ___internal__logger = ::Logger::get().WithContext("::OggVorbisEncoder::Lookups::EnvelopeLookup::$$c::.ctor"); return THROW_UNLESS((::il2cpp_utils::New<EnvelopeLookup::$$c*, creationType>())); } }; // OggVorbisEncoder.Lookups.EnvelopeLookup/OggVorbisEncoder.Lookups.<>c #pragma pack(pop) } #include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp" // Writing MetadataGetter for method: OggVorbisEncoder::Lookups::EnvelopeLookup::$$c::_cctor // Il2CppName: .cctor template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (*)()>(&OggVorbisEncoder::Lookups::EnvelopeLookup::$$c::_cctor)> { static const MethodInfo* get() { return ::il2cpp_utils::FindMethod(classof(OggVorbisEncoder::Lookups::EnvelopeLookup::$$c*), ".cctor", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{}); } }; // Writing MetadataGetter for method: OggVorbisEncoder::Lookups::EnvelopeLookup::$$c::$_ctor$b__17_0 // Il2CppName: <.ctor>b__17_0 template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<::OggVorbisEncoder::Lookups::EnvelopeFilterState* (OggVorbisEncoder::Lookups::EnvelopeLookup::$$c::*)(int)>(&OggVorbisEncoder::Lookups::EnvelopeLookup::$$c::$_ctor$b__17_0)> { static const MethodInfo* get() { static auto* s = &::il2cpp_utils::GetClassFromName("System", "Int32")->byval_arg; return ::il2cpp_utils::FindMethod(classof(OggVorbisEncoder::Lookups::EnvelopeLookup::$$c*), "<.ctor>b__17_0", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{s}); } }; // Writing MetadataGetter for method: OggVorbisEncoder::Lookups::EnvelopeLookup::$$c::New_ctor // Il2CppName: .ctor // Cannot get method pointer of value based method overload from template for constructor! // Try using FindMethod instead!
55.556818
244
0.741256
[ "object", "vector" ]
442df3a492f3a5374daa90d40b124f3dfcfa6822
13,066
cpp
C++
src/game/client/c_ai_basenpc.cpp
LillyWho/TF2HLCoop
04d572fbf7da76c7d4e8f9481bad5a27b5406203
[ "Unlicense" ]
2
2019-04-08T00:09:06.000Z
2020-11-22T23:12:30.000Z
src/game/client/c_ai_basenpc.cpp
Kenzzer/TF2HLCoop
86097fe5c7f097fbfff4b3c394280cc53c2cadf9
[ "Unlicense" ]
null
null
null
src/game/client/c_ai_basenpc.cpp
Kenzzer/TF2HLCoop
86097fe5c7f097fbfff4b3c394280cc53c2cadf9
[ "Unlicense" ]
1
2021-05-01T15:43:17.000Z
2021-05-01T15:43:17.000Z
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "cbase.h" #include "c_ai_basenpc.h" #include "engine/ivdebugoverlay.h" #if defined( HL2_DLL ) || defined( HL2_EPISODIC ) #include "c_basehlplayer.h" #endif #include "death_pose.h" #ifdef TF_CLASSIC_CLIENT #include "c_tf_player.h" #include "tf_shareddefs.h" #include "iclientmode.h" #include "vgui/ILocalize.h" #include "soundenvelope.h" #include "IEffects.h" #endif // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" #if defined( CAI_BaseNPC ) #undef CAI_BaseNPC #endif #define PING_MAX_TIME 2.0 IMPLEMENT_CLIENTCLASS_DT( C_AI_BaseNPC, DT_AI_BaseNPC, CAI_BaseNPC ) RecvPropInt( RECVINFO( m_lifeState ) ), RecvPropBool( RECVINFO( m_bPerformAvoidance ) ), RecvPropBool( RECVINFO( m_bIsMoving ) ), RecvPropBool( RECVINFO( m_bFadeCorpse ) ), RecvPropInt( RECVINFO ( m_iDeathPose) ), RecvPropInt( RECVINFO( m_iDeathFrame) ), RecvPropInt( RECVINFO( m_iHealth ) ), RecvPropInt( RECVINFO( m_iMaxHealth ) ), RecvPropInt( RECVINFO( m_iSpeedModRadius ) ), RecvPropInt( RECVINFO( m_iSpeedModSpeed ) ), RecvPropInt( RECVINFO( m_bSpeedModActive ) ), RecvPropBool( RECVINFO( m_bImportanRagdoll ) ), RecvPropFloat( RECVINFO( m_flTimePingEffect ) ), RecvPropString( RECVINFO( m_szClassname ) ), #ifdef TF_CLASSIC_CLIENT RecvPropInt( RECVINFO( m_nPlayerCond ) ), RecvPropInt( RECVINFO( m_nNumHealers ) ), RecvPropBool( RECVINFO( m_bBurningDeath ) ), RecvPropInt( RECVINFO( m_nTFFlags ) ) #endif END_RECV_TABLE() extern ConVar cl_npc_speedmod_intime; bool NPC_IsImportantNPC( C_BaseAnimating *pAnimating ) { C_AI_BaseNPC *pBaseNPC = dynamic_cast < C_AI_BaseNPC* > ( pAnimating ); if ( pBaseNPC == NULL ) return false; return pBaseNPC->ImportantRagdoll(); } C_AI_BaseNPC::C_AI_BaseNPC() { #ifdef TF_CLASSIC_CLIENT m_pBurningSound = NULL; m_pBurningEffect = NULL; m_flBurnEffectStartTime = 0; m_flBurnEffectEndTime = 0; m_hRagdoll.Set( NULL ); #endif } //----------------------------------------------------------------------------- // Makes ragdolls ignore npcclip brushes //----------------------------------------------------------------------------- unsigned int C_AI_BaseNPC::PhysicsSolidMaskForEntity( void ) const { // This allows ragdolls to move through npcclip brushes if ( !IsRagdoll() ) { return MASK_NPCSOLID; } return MASK_SOLID; } void C_AI_BaseNPC::ClientThink( void ) { BaseClass::ClientThink(); #ifdef HL2_DLL C_BaseHLPlayer *pPlayer = dynamic_cast<C_BaseHLPlayer*>( C_BasePlayer::GetLocalPlayer() ); if ( ShouldModifyPlayerSpeed() == true ) { if ( pPlayer ) { float flDist = (GetAbsOrigin() - pPlayer->GetAbsOrigin()).LengthSqr(); if ( flDist <= GetSpeedModifyRadius() ) { if ( pPlayer->m_hClosestNPC ) { if ( pPlayer->m_hClosestNPC != this ) { float flDistOther = (pPlayer->m_hClosestNPC->GetAbsOrigin() - pPlayer->GetAbsOrigin()).Length(); //If I'm closer than the other NPC then replace it with myself. if ( flDist < flDistOther ) { pPlayer->m_hClosestNPC = this; pPlayer->m_flSpeedModTime = gpGlobals->curtime + cl_npc_speedmod_intime.GetFloat(); } } } else { pPlayer->m_hClosestNPC = this; pPlayer->m_flSpeedModTime = gpGlobals->curtime + cl_npc_speedmod_intime.GetFloat(); } } } } #endif // HL2_DLL #ifdef HL2_EPISODIC C_BaseHLPlayer *pPlayer = dynamic_cast<C_BaseHLPlayer*>( C_BasePlayer::GetLocalPlayer() ); if ( pPlayer && m_flTimePingEffect > gpGlobals->curtime ) { float fPingEffectTime = m_flTimePingEffect - gpGlobals->curtime; if ( fPingEffectTime > 0.0f ) { Vector vRight, vUp; Vector vMins, vMaxs; float fFade; if( fPingEffectTime <= 1.0f ) { fFade = 1.0f - (1.0f - fPingEffectTime); } else { fFade = 1.0f; } GetRenderBounds( vMins, vMaxs ); AngleVectors (pPlayer->GetAbsAngles(), NULL, &vRight, &vUp ); Vector p1 = GetAbsOrigin() + vRight * vMins.x + vUp * vMins.z; Vector p2 = GetAbsOrigin() + vRight * vMaxs.x + vUp * vMins.z; Vector p3 = GetAbsOrigin() + vUp * vMaxs.z; int r = 0 * fFade; int g = 255 * fFade; int b = 0 * fFade; debugoverlay->AddLineOverlay( p1, p2, r, g, b, true, 0.05f ); debugoverlay->AddLineOverlay( p2, p3, r, g, b, true, 0.05f ); debugoverlay->AddLineOverlay( p3, p1, r, g, b, true, 0.05f ); } } #endif } void C_AI_BaseNPC::OnPreDataChanged( DataUpdateType_t updateType ) { BaseClass::OnPreDataChanged( updateType ); #ifdef TF_CLASSIC_CLIENT m_iOldTeam = GetTeamNumber(); m_nOldConditions = m_nPlayerCond; #endif } void C_AI_BaseNPC::OnDataChanged( DataUpdateType_t type ) { BaseClass::OnDataChanged( type ); if ( ( ShouldModifyPlayerSpeed() == true ) || ( m_flTimePingEffect > gpGlobals->curtime ) ) { SetNextClientThink( CLIENT_THINK_ALWAYS ); } #ifdef TF_CLASSIC_CLIENT if ( type == DATA_UPDATE_CREATED ) { InitInvulnerableMaterial(); } else { if ( m_iOldTeam != GetTeamNumber() ) { InitInvulnerableMaterial(); } } if ( InCond( TF_COND_BURNING ) && !m_pBurningSound ) { StartBurningSound(); } // Update conditions from last network change if ( m_nOldConditions != m_nPlayerCond ) { UpdateConditions(); m_nOldConditions = m_nPlayerCond; } #endif } void C_AI_BaseNPC::UpdateOnRemove( void ) { #ifdef TF_CLASSIC_CLIENT ParticleProp()->OwnerSetDormantTo( true ); ParticleProp()->StopParticlesInvolving( this ); RemoveAllCond(); #endif BaseClass::UpdateOnRemove(); } bool C_AI_BaseNPC::GetRagdollInitBoneArrays( matrix3x4_t *pDeltaBones0, matrix3x4_t *pDeltaBones1, matrix3x4_t *pCurrentBones, float boneDt ) { bool bRet = true; if ( !ForceSetupBonesAtTime( pDeltaBones0, gpGlobals->curtime - boneDt ) ) bRet = false; GetRagdollCurSequenceWithDeathPose( this, pDeltaBones1, gpGlobals->curtime, m_iDeathPose, m_iDeathFrame ); float ragdollCreateTime = PhysGetSyncCreateTime(); if ( ragdollCreateTime != gpGlobals->curtime ) { // The next simulation frame begins before the end of this frame // so initialize the ragdoll at that time so that it will reach the current // position at curtime. Otherwise the ragdoll will simulate forward from curtime // and pop into the future a bit at this point of transition if ( !ForceSetupBonesAtTime( pCurrentBones, ragdollCreateTime ) ) bRet = false; } else { if ( !SetupBones( pCurrentBones, MAXSTUDIOBONES, BONE_USED_BY_ANYTHING, gpGlobals->curtime ) ) bRet = false; } return bRet; } #ifdef TF_CLASSIC_CLIENT //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- int C_AI_BaseNPC::InternalDrawModel( int flags ) { bool bUseInvulnMaterial = InCond( TF_COND_INVULNERABLE ); if ( bUseInvulnMaterial ) { modelrender->ForcedMaterialOverride( *GetInvulnMaterialRef() ); } int ret = BaseClass::InternalDrawModel( flags ); if ( bUseInvulnMaterial ) { modelrender->ForcedMaterialOverride( NULL ); } return ret; } //----------------------------------------------------------------------------- // Purpose: Don't take damage decals while invulnerable //----------------------------------------------------------------------------- void C_AI_BaseNPC::AddDecal( const Vector& rayStart, const Vector& rayEnd, const Vector& decalCenter, int hitbox, int decalIndex, bool doTrace, trace_t& tr, int maxLODToDecal ) { if ( InCond( TF_COND_STEALTHED ) ) { return; } if ( InCond( TF_COND_INVULNERABLE ) ) { Vector vecDir = rayEnd - rayStart; VectorNormalize(vecDir); g_pEffects->Ricochet( rayEnd - (vecDir * 8), -vecDir ); return; } // don't decal from inside NPC if ( tr.startsolid ) { return; } BaseClass::AddDecal( rayStart, rayEnd, decalCenter, hitbox, decalIndex, doTrace, tr, maxLODToDecal ); } C_BaseAnimating *C_AI_BaseNPC::BecomeRagdollOnClient() { C_BaseAnimating *pRagdoll = BaseClass::BecomeRagdollOnClient(); if ( pRagdoll ) { m_hRagdoll.Set( pRagdoll ); if ( m_bBurningDeath ) pRagdoll->ParticleProp()->Create( "burningplayer_corpse", PATTACH_ABSORIGIN_FOLLOW ); } return pRagdoll; } //----------------------------------------------------------------------------- // Purpose: // Input : - // Output : IRagdoll* //----------------------------------------------------------------------------- IRagdoll* C_AI_BaseNPC::GetRepresentativeRagdoll() const { if ( m_hRagdoll.Get() ) { C_BaseAnimating *pRagdoll = static_cast<C_BaseAnimating *>( m_hRagdoll.Get() ); if ( !pRagdoll ) return NULL; return pRagdoll->m_pRagdoll; } return NULL; } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- Vector C_AI_BaseNPC::GetObserverCamOrigin( void ) { if ( !IsAlive() ) { IRagdoll *pRagdoll = GetRepresentativeRagdoll(); if ( pRagdoll ) return pRagdoll->GetRagdollOrigin(); } return BaseClass::GetObserverCamOrigin(); } //----------------------------------------------------------------------------- // Purpose: check the newly networked conditions for changes //----------------------------------------------------------------------------- void C_AI_BaseNPC::UpdateConditions( void ) { int nCondChanged = m_nPlayerCond ^ m_nOldConditions; int nCondAdded = nCondChanged & m_nPlayerCond; int nCondRemoved = nCondChanged & m_nOldConditions; int i; for ( i=0;i<TF_COND_LAST;i++ ) { if ( nCondAdded & (1<<i) ) { OnConditionAdded( i ); } else if ( nCondRemoved & (1<<i) ) { OnConditionRemoved( i ); } } } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void C_AI_BaseNPC::GetTargetIDString( wchar_t *sIDString, int iMaxLenInBytes ) { sIDString[0] = '\0'; C_TFPlayer *pLocalTFPlayer = C_TFPlayer::GetLocalTFPlayer(); if ( !pLocalTFPlayer ) return; if ( InSameTeam( pLocalTFPlayer ) || pLocalTFPlayer->IsPlayerClass( TF_CLASS_SPY ) || pLocalTFPlayer->GetTeamNumber() == TEAM_SPECTATOR ) { const char *pszClassname = GetClassname(); wchar_t *wszNPCName; wszNPCName = g_pVGuiLocalize->Find( pszClassname ); if ( !wszNPCName ) { wchar_t wszNPCNameBuf[MAX_PLAYER_NAME_LENGTH]; g_pVGuiLocalize->ConvertANSIToUnicode( pszClassname, wszNPCNameBuf, sizeof(wszNPCNameBuf) ); wszNPCName = wszNPCNameBuf; } const char *printFormatString = NULL; if ( pLocalTFPlayer->GetTeamNumber() == TEAM_SPECTATOR || InSameTeam( pLocalTFPlayer ) ) { printFormatString = "#TF_playerid_sameteam"; } else if ( pLocalTFPlayer->IsPlayerClass( TF_CLASS_SPY ) ) { // Spy can see enemy's health. printFormatString = "#TF_playerid_diffteam"; } wchar_t *wszPrepend = L""; if ( printFormatString ) { g_pVGuiLocalize->ConstructString( sIDString, iMaxLenInBytes, g_pVGuiLocalize->Find(printFormatString), 3, wszPrepend, wszNPCName ); } } } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void C_AI_BaseNPC::GetTargetIDDataString( wchar_t *sDataString, int iMaxLenInBytes ) { sDataString[0] = '\0'; } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void C_AI_BaseNPC::StartBurningSound( void ) { CSoundEnvelopeController &controller = CSoundEnvelopeController::GetController(); if ( !m_pBurningSound ) { CLocalPlayerFilter filter; m_pBurningSound = controller.SoundCreate( filter, entindex(), "Player.OnFire" ); } controller.Play( m_pBurningSound, 0.0, 100 ); controller.SoundChangeVolume( m_pBurningSound, 1.0, 0.1 ); } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void C_AI_BaseNPC::StopBurningSound( void ) { if ( m_pBurningSound ) { CSoundEnvelopeController::GetController().SoundDestroy( m_pBurningSound ); m_pBurningSound = NULL; } } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void C_AI_BaseNPC::InitInvulnerableMaterial( void ) { const char *pszMaterial = NULL; int iTeam = GetTeamNumber(); switch ( iTeam ) { case TF_TEAM_BLUE: pszMaterial = "models/effects/invulnfx_blue.vmt"; break; case TF_TEAM_RED: pszMaterial = "models/effects/invulnfx_red.vmt"; break; default: break; } if ( pszMaterial ) { m_InvulnerableMaterial.Init( pszMaterial, TEXTURE_GROUP_CLIENT_EFFECTS ); } else { m_InvulnerableMaterial.Shutdown(); } } #endif
26.342742
141
0.61174
[ "vector" ]
442e0f4af495b43ac359ac71713f509a13d06fa9
2,226
cpp
C++
c++/centroid_decomposition.cpp
forgotter/Snippets
bb4e39cafe7ef2c1ef3ac24b450a72df350a248b
[ "MIT" ]
38
2018-09-17T18:16:24.000Z
2022-02-10T10:26:23.000Z
c++/centroid_decomposition.cpp
forgotter/Snippets
bb4e39cafe7ef2c1ef3ac24b450a72df350a248b
[ "MIT" ]
1
2020-10-01T10:48:45.000Z
2020-10-04T11:27:44.000Z
c++/centroid_decomposition.cpp
forgotter/Snippets
bb4e39cafe7ef2c1ef3ac24b450a72df350a248b
[ "MIT" ]
12
2018-11-13T13:36:41.000Z
2021-05-02T10:07:44.000Z
/// Name: CentroidDecomposition /// Description: Finds the parent of all vertices in centroid decomposed tree /// Detail: Graph, Centroid, Graph decomposition /// Guarantee: CentroidDecomposition void getCentroid(int& centroid, int idx, int subtreeSize, vector< vector< int > >&tree, vector< bool >&visited, vector< bool >&isCentroid, vector< int >&subtree) { visited[idx] = true; for(auto x: tree[idx]) { if(!visited[x] && !isCentroid[x]) { if(subtree[x] > (subtreeSize/2)) { getCentroid(centroid, x, subtreeSize, tree, visited, isCentroid, subtree); visited[idx] = false; return; } } } centroid = idx; visited[idx] = false; } void dfs(int idx, vector< vector< int > >&tree, vector< bool >&visited, vector< bool >&isCentroid, vector< int >&subtree) { visited[idx] = true; subtree[idx] = 1; for(auto x: tree[idx]) { if(!visited[x] && !isCentroid[x]) { dfs(x, tree, visited, isCentroid, subtree); subtree[idx] += subtree[x]; } } visited[idx] = false; } void decomposeTree(int par, int idx, vector< vector< int > >&tree, vector< int >&decomposedTree, vector< bool >&visited, vector< bool >&isCentroid, vector< int >&subtree) { dfs(idx, tree, visited, isCentroid, subtree); int subtreeSize = subtree[idx]; int centroid = idx; getCentroid(centroid, idx, subtreeSize, tree, visited, isCentroid, subtree); decomposedTree[centroid] = par; isCentroid[centroid] = true; for(auto x: tree[centroid]) { if(!isCentroid[x]) { decomposeTree(centroid, x, tree, decomposedTree, visited, isCentroid, subtree); } } } vector< int >centroidDecomposition(vector< vector< int > >& tree) { vector< int >decomposedTree(tree.size()); vector< bool >visited(tree.size(),false); vector< bool >isCentroid(tree.size(), false); vector< int >subtree(tree.size(), 0); decomposeTree(-1, 0, tree, decomposedTree, visited, isCentroid, subtree); return decomposedTree; } // CentroidDecomposition
34.246154
171
0.596586
[ "vector" ]
442f7967f612f85ef3e52ae9c280c53c3692be26
5,071
cpp
C++
test/yulPhaser/Chromosome.cpp
MrChico/solidity
5b4ea1eb895d5edc9a24ee5c6f96d8580eceec08
[ "MIT" ]
null
null
null
test/yulPhaser/Chromosome.cpp
MrChico/solidity
5b4ea1eb895d5edc9a24ee5c6f96d8580eceec08
[ "MIT" ]
1
2020-06-17T14:24:49.000Z
2020-06-17T14:24:49.000Z
test/yulPhaser/Chromosome.cpp
step21/solidity
2a0d701f709673162e8417d2f388b8171a34e892
[ "MIT" ]
null
null
null
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with solidity. If not, see <http://www.gnu.org/licenses/>. */ #include <test/yulPhaser/TestHelpers.h> #include <tools/yulPhaser/Chromosome.h> #include <tools/yulPhaser/SimulationRNG.h> #include <libyul/optimiser/BlockFlattener.h> #include <libyul/optimiser/ConditionalSimplifier.h> #include <libyul/optimiser/ExpressionInliner.h> #include <libyul/optimiser/ExpressionSimplifier.h> #include <libyul/optimiser/ForLoopConditionOutOfBody.h> #include <libyul/optimiser/ForLoopConditionOutOfBody.h> #include <libyul/optimiser/ForLoopInitRewriter.h> #include <libyul/optimiser/FunctionHoister.h> #include <libyul/optimiser/LoopInvariantCodeMotion.h> #include <libyul/optimiser/RedundantAssignEliminator.h> #include <libyul/optimiser/Rematerialiser.h> #include <libyul/optimiser/Suite.h> #include <libyul/optimiser/StructuralSimplifier.h> #include <libyul/optimiser/UnusedPruner.h> #include <libsolutil/CommonIO.h> #include <boost/test/unit_test.hpp> using namespace std; using namespace solidity::yul; using namespace solidity::util; namespace solidity::phaser::test { BOOST_AUTO_TEST_SUITE(Phaser) BOOST_AUTO_TEST_SUITE(ChromosomeTest) BOOST_AUTO_TEST_CASE(constructor_should_convert_from_string_to_optimisation_steps) { vector<string> expectedSteps{ ConditionalSimplifier::name, FunctionHoister::name, RedundantAssignEliminator::name, ForLoopConditionOutOfBody::name, Rematerialiser::name, ForLoopConditionOutOfBody::name, ExpressionSimplifier::name, ForLoopInitRewriter::name, LoopInvariantCodeMotion::name, ExpressionInliner::name }; BOOST_TEST(Chromosome("ChrOmOsoMe").optimisationSteps() == expectedSteps); } BOOST_AUTO_TEST_CASE(makeRandom_should_return_different_chromosome_each_time) { SimulationRNG::reset(1); for (size_t i = 0; i < 10; ++i) BOOST_TEST(Chromosome::makeRandom(100) != Chromosome::makeRandom(100)); } BOOST_AUTO_TEST_CASE(makeRandom_should_use_every_possible_step_with_the_same_probability) { SimulationRNG::reset(1); constexpr int samplesPerStep = 100; constexpr double relativeTolerance = 0.01; map<string, size_t> stepIndices = enumerateOptmisationSteps(); auto chromosome = Chromosome::makeRandom(stepIndices.size() * samplesPerStep); vector<size_t> samples; for (auto& step: chromosome.optimisationSteps()) samples.push_back(stepIndices.at(step)); const double expectedValue = (stepIndices.size() - 1) / 2.0; const double variance = (stepIndices.size() * stepIndices.size() - 1) / 12.0; BOOST_TEST(abs(mean(samples) - expectedValue) < expectedValue * relativeTolerance); BOOST_TEST(abs(meanSquaredError(samples, expectedValue) - variance) < variance * relativeTolerance); } BOOST_AUTO_TEST_CASE(constructor_should_store_optimisation_steps) { vector<string> steps = { StructuralSimplifier::name, BlockFlattener::name, UnusedPruner::name, }; Chromosome chromosome(steps); BOOST_TEST(steps == chromosome.optimisationSteps()); } BOOST_AUTO_TEST_CASE(constructor_should_allow_duplicate_steps) { vector<string> steps = { StructuralSimplifier::name, StructuralSimplifier::name, BlockFlattener::name, UnusedPruner::name, BlockFlattener::name, }; Chromosome chromosome(steps); BOOST_TEST(steps == chromosome.optimisationSteps()); } BOOST_AUTO_TEST_CASE(output_operator_should_create_concise_and_unambiguous_string_representation) { vector<string> allSteps; for (auto const& step: OptimiserSuite::allSteps()) allSteps.push_back(step.first); Chromosome chromosome(allSteps); BOOST_TEST(chromosome.length() == allSteps.size()); BOOST_TEST(chromosome.optimisationSteps() == allSteps); BOOST_TEST(toString(chromosome) == "flcCUnDvejsxIOoighTLMrmVatud"); } BOOST_AUTO_TEST_CASE(randomOptimisationStep_should_return_each_step_with_same_probability) { SimulationRNG::reset(1); constexpr int samplesPerStep = 100; constexpr double relativeTolerance = 0.01; map<string, size_t> stepIndices = enumerateOptmisationSteps(); vector<size_t> samples; for (size_t i = 0; i <= stepIndices.size() * samplesPerStep; ++i) samples.push_back(stepIndices.at(Chromosome::randomOptimisationStep())); const double expectedValue = (stepIndices.size() - 1) / 2.0; const double variance = (stepIndices.size() * stepIndices.size() - 1) / 12.0; BOOST_TEST(abs(mean(samples) - expectedValue) < expectedValue * relativeTolerance); BOOST_TEST(abs(meanSquaredError(samples, expectedValue) - variance) < variance * relativeTolerance); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() }
32.299363
101
0.791363
[ "vector" ]
4435691b129cb9384681595d65345fa251189b13
42,057
cc
C++
modules/mod_shell_reports.cc
mueller/mysql-shell
29bafc5692bd536a12c4e41c54cb587375fe52cf
[ "Apache-2.0" ]
119
2016-04-14T14:16:22.000Z
2022-03-08T20:24:38.000Z
modules/mod_shell_reports.cc
mueller/mysql-shell
29bafc5692bd536a12c4e41c54cb587375fe52cf
[ "Apache-2.0" ]
9
2017-04-26T20:48:42.000Z
2021-09-07T01:52:44.000Z
modules/mod_shell_reports.cc
mueller/mysql-shell
29bafc5692bd536a12c4e41c54cb587375fe52cf
[ "Apache-2.0" ]
51
2016-07-20T05:06:48.000Z
2022-03-09T01:20:53.000Z
/* * Copyright (c) 2018, 2020, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, * as published by the Free Software Foundation. * * This program is also distributed with certain software (including * but not limited to OpenSSL) that is licensed under separate terms, as * designated in a particular file or component or in included license * documentation. The authors of MySQL hereby grant you an additional * permission to link the program and your derivative works with the * separately licensed software that they have included with MySQL. * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License, version 2.0, for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "modules/mod_shell_reports.h" #include <algorithm> #include <limits> #include <locale> #include <set> #include "modules/reports/query.h" #include "modules/reports/thread.h" #include "modules/reports/threads.h" #include "modules/reports/utils.h" #include "mysqlshdk/include/shellcore/utils_help.h" #include "mysqlshdk/libs/textui/textui.h" #include "mysqlshdk/libs/utils/options.h" #include "mysqlshdk/libs/utils/threads.h" #include "mysqlshdk/libs/utils/utils_general.h" #include "mysqlshdk/libs/utils/utils_string.h" namespace mysqlsh { namespace { const std::set<std::string> kReportOptionTypes = {"string", "integer", "float", "bool"}; REGISTER_HELP_OBJECT(reports, shell); REGISTER_HELP(REPORTS_BRIEF, "Gives access to built-in and user-defined reports."); REGISTER_HELP(REPORTS_DETAIL, "The 'reports' object provides access to built-in reports."); REGISTER_HELP(REPORTS_DETAIL1, "All user-defined reports registered using the " "shell.<<<registerReport>>>() method are also available here."); REGISTER_HELP(REPORTS_DETAIL2, "The reports are provided as methods of this object, with names " "corresponding to the names of the available reports."); REGISTER_HELP(REPORTS_DETAIL3, "All methods have the same signature: <b>Dict report(Session " "session, List argv, Dict options)</b>, where:"); REGISTER_HELP( REPORTS_DETAIL4, "@li session - Session object used by the report to obtain the data."); REGISTER_HELP(REPORTS_DETAIL5, "@li argv (optional) - Array of strings representing additional " "arguments."); REGISTER_HELP(REPORTS_DETAIL6, "@li options (optional) - Dictionary with values for various " "report-specific options."); REGISTER_HELP(REPORTS_DETAIL7, "Each report returns a dictionary with the following keys:"); REGISTER_HELP(REPORTS_DETAIL8, "@li report (required) - List of JSON objects containing the " "report. The number and types of items in this list depend on " "type of the report."); REGISTER_HELP(REPORTS_DETAIL9, "For more information on a report use: " "<b>shell.reports.help('report_name')</b>."); static constexpr auto k_report_key = "report"; static constexpr auto k_vertical_key = "vertical"; static constexpr auto k_wildcard_character = "*"; static constexpr auto k_report_type_list = "list"; static constexpr auto k_report_type_report = "report"; static constexpr auto k_report_type_print = "print"; static constexpr auto k_report_type_custom = "custom"; Report::Type to_report_type(const std::string &type) { if (k_report_type_list == type) { return Report::Type::LIST; } else if (k_report_type_report == type) { return Report::Type::REPORT; } else if (k_report_type_print == type) { return Report::Type::PRINT; } else { // user cannot register reports of custom type throw shcore::Exception::argument_error( "Report type must be one of: " + shcore::str_join( std::vector<std::string>{k_report_type_list, k_report_type_report, k_report_type_print}, ", ") + "."); } } std::string to_string(Report::Type type) { switch (type) { case Report::Type::LIST: return k_report_type_list; case Report::Type::REPORT: return k_report_type_report; case Report::Type::PRINT: return k_report_type_print; case Report::Type::CUSTOM: return k_report_type_custom; } throw std::logic_error("Unknown value of Report::Type"); } std::string to_string(const Report::Argc &argc) { std::string result; if (argc.first == 0 && argc.second == Report::k_asterisk) { result += "any number of"; } else { result += std::to_string(argc.first); if (argc.first != argc.second) { result += "-"; if (argc.second == Report::k_asterisk) { result += k_wildcard_character; } else { result += std::to_string(argc.second); } } } result += " argument"; if (argc.first != argc.second || argc.first != 1) { result += "s"; } return result; } void validate_option_type(shcore::Value_type type) { switch (type) { case shcore::Value_type::String: case shcore::Value_type::Bool: case shcore::Value_type::Integer: case shcore::Value_type::Float: // valid type return; default: throw shcore::Exception::argument_error( "Option type must be one of: 'string', 'bool', 'integer', 'float'."); } } uint32_t to_uint32(const std::string &v) { try { return shcore::lexical_cast<uint32_t>(v); } catch (const std::invalid_argument &) { throw shcore::Exception::argument_error("Cannot convert '" + v + "' to an unsigned integer."); } } Report::Argc get_report_argc(const std::string &argc_s) { if (argc_s.empty()) { return {0, 0}; } const auto argc = shcore::str_split(argc_s, "-"); Report::Argc result; switch (argc.size()) { case 1: if (argc[0] == k_wildcard_character) { result = std::make_pair(0, Report::k_asterisk); } else { const auto limit = to_uint32(argc[0]); result = std::make_pair(limit, limit); } break; case 2: { const auto lower = to_uint32(argc[0]); const auto upper = argc[1] == k_wildcard_character ? Report::k_asterisk : to_uint32(argc[1]); result = std::make_pair(lower, upper); } break; default: throw shcore::Exception::argument_error( "The value associated with the key named 'argc' has wrong format."); } return result; } Report::Examples get_report_examples(const shcore::Array_t &ex) { Report::Examples examples; if (ex) { for (const auto &e : *ex) { if (shcore::Value_type::Map != e.type) { throw shcore::Exception::argument_error( "The value associated with the key named 'examples' should be a " "list of dictionaries."); } Report::Example example; shcore::Option_unpacker{e.as_map()} .required("description", &example.description) .optional("args", &example.args) .optional("options", &example.options) .end(); examples.emplace_back(std::move(example)); } } return examples; } Report::Option *find_option(const Report::Options &options, const std::string &name) { const auto pos = std::find_if(options.begin(), options.end(), [&name](const Report::Options::value_type &o) { return o->parameter->name == name || o->short_name == name; }); return options.end() == pos ? nullptr : pos->get(); } std::vector<shcore::Help_registry::Example> get_function_examples( const Report &report) { std::vector<shcore::Help_registry::Example> examples; for (const auto &example : report.examples()) { shcore::Help_registry::Example e; e.code = report.name() + "(session"; if (report.argc().second > 0 || report.has_options()) { e.code.append(", ["); for (const auto &a : example.args) { e.code.append(shcore::quote_string(a, '"')).append(", "); } if (!example.args.empty()) { e.code.pop_back(); e.code.pop_back(); } e.code.append("]"); } if (report.has_options()) { e.code.append(", {"); for (const auto &o : example.options) { const auto spec = find_option(report.options(), o.first); assert(spec); e.code.append(shcore::quote_string(spec->parameter->name, '"')) .append(": "); switch (spec->parameter->type()) { case shcore::Value_type::String: e.code.append(shcore::quote_string(o.second, '"')); break; case shcore::Value_type::Bool: case shcore::Value_type::Integer: case shcore::Value_type::Float: e.code.append(o.second); break; default: throw std::logic_error("Unknown option type."); } e.code.append(", "); } if (!example.options.empty()) { e.code.pop_back(); e.code.pop_back(); } e.code.append("}"); } e.code.append(")"); e.description = example.description; examples.emplace_back(std::move(e)); } return examples; } class Native_report_function : public shcore::Cpp_function { public: Native_report_function(const std::string &name, const Report::Native_report &report) : shcore::Cpp_function( &m_metadata, [report](const shcore::Argument_list &args) { const auto &session = args.object_at<ShellBaseSession>(0); if (!session) { throw shcore::Exception::argument_error( "Argument #1 is expected to be one of 'ClassicSession, " "Session'."); } if (!session->is_open()) { throw shcore::Exception::argument_error( "Executing the report requires an open session."); } // it's not an array if it's null const auto argv = args.size() < 2 || args[1].type != shcore::Value_type::Array ? shcore::make_array() : args.array_at(1); // it's not a map if it's null const auto options = args.size() < 3 || args[2].type != shcore::Value_type::Map ? shcore::make_dict() : args.map_at(2); return shcore::Value(report(session, argv, options)); }) { for (std::size_t i = 0; i < shcore::array_size(m_metadata.name); ++i) { m_metadata.name[i] = name; } m_metadata.param_types = {{"session", shcore::Value_type::Object}, {"?argv", shcore::Value_type::Array}, {"?options", shcore::Value_type::Map}}; m_metadata.signature = gen_signature(m_metadata.param_types); m_metadata.return_type = shcore::Value_type::Map; } ~Native_report_function() override = default; private: shcore::Cpp_function::Metadata m_metadata; }; std::string list_formatter(const shcore::Array_t &a, const shcore::Dictionary_t &options) { bool is_vertical = false; shcore::Option_unpacker{options}.required(k_vertical_key, &is_vertical).end(); if (a->size() < 1) { throw shcore::Exception::runtime_error( "List report should contain at least one row."); } for (const auto &row : *a) { if (row.type != shcore::Value_type::Array) { throw shcore::Exception::runtime_error( "List report should return a list of lists."); } } const auto output = is_vertical ? reports::vertical_formatter(a) : reports::table_formatter(a); // output is empty if report returned just names of columns return output.empty() ? "Report returned no data." : output; } std::string report_formatter(const shcore::Array_t &a, const shcore::Dictionary_t &) { if (a->size() != 1) { throw shcore::Exception::runtime_error( "Report of type 'report' should contain exactly one element."); } return a->at(0).yaml(); } std::string print_formatter(const shcore::Array_t &, const shcore::Dictionary_t &) { // print formatter suppresses all output return ""; } Parameter_definition::Options upcast(const Report::Options &in) { return Parameter_definition::Options(in.begin(), in.end()); } Report::Options downcast(const Parameter_definition::Options &in) { Report::Options out; for (const auto &p : in) { out.emplace_back(std::dynamic_pointer_cast<Report::Option>(p)); } return out; } struct Argv_validator : public shcore::Parameter_validator { explicit Argv_validator(const Report::Argc &argc) : m_argc(argc) {} void validate(const shcore::Parameter &param, const shcore::Value &data, shcore::Parameter_context *context) const override { Parameter_validator::validate(param, data, context); const auto argv = data.as_array(); const auto argc = argv ? argv->size() : 0; if (argc < m_argc.first || argc > m_argc.second) { throw shcore::Exception::argument_error(shcore::str_format( "%s 'argv' is expecting %s.", context->str().c_str(), to_string(m_argc).c_str())); } } private: Report::Argc m_argc; }; std::string normalize_report_name(const std::string &name) { return shcore::str_lower(shcore::str_replace(name, "-", "_")); } } // namespace class Shell_reports::Report_options : public shcore::Options { public: explicit Report_options(std::unique_ptr<Report> r) : m_report_name(std::move(r->m_name)), m_options(std::move(r->m_options)), m_argc(std::move(r->m_argc)), m_formatter(std::move(r->m_formatter)) { { // each report has an option to display help Report::Option help{"help", shcore::Value_type::Bool}; help.brief = "Display this help and exit."; help.short_name = "h"; add_startup_options()(&m_show_help, false, help.command_line_names(), ""); m_command_line_options.emplace_back(std::move(help)); } // list reports can be displayed vertically if (Report::Type::LIST == r->type()) { Report::Option vertical{"vertical", shcore::Value_type::Bool}; vertical.brief = "Display records vertically."; vertical.short_name = "E"; add_startup_options()(&m_vertical, false, vertical.command_line_names(), ""); m_command_line_options.emplace_back(std::move(vertical)); } // add options expected by the report for (const auto &o : m_options) { const auto &p = o->parameter; // register the option add_startup_options()( o->command_line_names(), "", [&o, &p, this](const std::string &, const char *new_value) { // convert to the expected type shcore::Value value; switch (p->type()) { case shcore::Value_type::String: { value = shcore::Value(new_value ? new_value : ""); shcore::Parameter_context context{ m_report_name + ":", {{"option '--" + o->command_line_name() + "'", {}}}}; p->validator<shcore::String_validator>()->validate(*p, value, &context); break; } case shcore::Value_type::Bool: value = shcore::Value(true); break; case shcore::Value_type::Integer: try { value = shcore::Value(shcore::lexical_cast<int64_t>(new_value)); } catch (const std::invalid_argument &) { throw prepare_exception("cannot convert '" + std::string(new_value) + "' to a signed integer"); } break; case shcore::Value_type::Float: try { value = shcore::Value(shcore::lexical_cast<double>(new_value)); } catch (const std::invalid_argument &) { throw prepare_exception("cannot convert '" + std::string(new_value) + "' to a floating-point number"); } break; default: throw std::logic_error("Unexpected type: " + shcore::type_name(p->type())); } // store the value m_parsed_options->emplace(p->name, value); // if option is required, erase it from the list of missing ones if (o->is_required()) { m_missing_options.erase( std::remove(m_missing_options.begin(), m_missing_options.end(), p->name), m_missing_options.end()); } }, o->command_line_name()); } initialize_help(r->brief(), r->details(), r->examples()); } const std::string &name() const { return m_report_name; } bool show_help() const { return m_show_help; } bool vertical() const { return m_vertical; } void parse_args(const std::vector<std::string> &args) { // reset previous values and prepare for parsing reset(); // prepare arguments std::vector<const char *> raw_args; raw_args.emplace_back(m_report_name.c_str()); for (const auto &a : args) { raw_args.emplace_back(a.c_str()); } // NULL must be the last argument in the vector raw_args.emplace_back(nullptr); // validate and parse provided arguments // NULL should not be included in the size of arguments handle_cmdline_options(raw_args.size() - 1, &raw_args[0], false, [this](Iterator *it) { // handle extra arguments if (it->valid() && '-' != it->option()[0]) { // first option which does not begin with '-' // marks the beginning of arguments const auto cmdline = it->iterator(); while (cmdline->valid()) { m_arguments.emplace_back(cmdline->get()); } return true; } else { return false; } }); // if help was not requested, perform additional validations if (!show_help()) { const auto usage = "For usage information please run: \\show " + m_report_name + " --help"; // check if all required options are here if (!m_missing_options.empty()) { std::transform(m_missing_options.begin(), m_missing_options.end(), m_missing_options.begin(), [](const std::string &o) { return "--" + o; }); throw prepare_exception("missing required option(s): " + shcore::str_join(m_missing_options, ", ") + ". " + usage); } // check if there's the right amount of additional arguments const auto argc = m_arguments.size(); if (argc < m_argc.first || argc > m_argc.second) { throw prepare_exception("report is expecting " + to_string(m_argc) + ", " + std::to_string(argc) + " provided. " + usage); } // optionally add additional arguments for (const auto &a : m_arguments) { m_parsed_arguments->emplace_back(a); } } } shcore::Array_t get_parsed_arguments() const { if (show_help()) { throw std::logic_error( "User requested help, arguments are not available."); } return m_parsed_arguments; } shcore::Dictionary_t get_parsed_options() const { if (show_help()) { throw std::logic_error("User requested help, options are not available."); } return m_parsed_options; } std::string help() const { return shcore::Help_manager{}.get_help(*m_help_topic); } bool requires_argv() const { return m_argc.second > 0 || requires_options(); } bool requires_options() const { return !m_options.empty(); } const Report::Formatter &formatter() const { return m_formatter; } private: void reset() { // reset to default values m_show_help = false; m_vertical = false; m_missing_options.clear(); m_arguments.clear(); m_parsed_options = shcore::make_dict(); m_parsed_arguments = shcore::make_array(); // mark all required options as missing for (const auto &o : m_options) { if (o->is_required()) { m_missing_options.emplace_back(o->parameter->name); } } } void initialize_help(const std::string &brief, const std::vector<std::string> &details, const Report::Examples &examples) { if (nullptr == m_help_topic) { const auto help = shcore::Help_registry::get(); const auto prefix = "CMD_SHOW_" + shcore::str_upper(m_report_name); const auto topic = help->add_help_topic(m_report_name, shcore::Topic_type::COMMAND, prefix, "CMD_SHOW", shcore::IShell_core::all_scripting_modes(), shcore::Keyword_location::LOCAL_CTX) .back(); if (!brief.empty()) help->add_help(prefix, "BRIEF", brief, shcore::Keyword_location::LOCAL_CTX); const auto has_arguments = m_argc.second > 0; { std::vector<std::string> syntax; std::string required; for (const auto &o : m_options) { if (o->is_required()) { required.append(" ").append( shcore::str_join(o->command_line_names(), "|")); } } for (const auto &command : {"show", "watch"}) { std::string line = "\\" + std::string(command) + " <b>" + m_report_name + "</b>" + required + " [OPTIONS]"; if (has_arguments) { line += " [ARGS]"; } syntax.emplace_back(std::move(line)); } help->add_help(prefix, "SYNTAX", syntax, shcore::Keyword_location::LOCAL_CTX); } { std::vector<std::string> contents; for (const auto &d : details) { contents.emplace_back(d); } contents.emplace_back("Options:"); const auto add_option = [&contents](const Report::Option &o) { std::string line; line.append("@entrynl{"); line.append(shcore::str_join(o.command_line_names(), ", ")); line.append("} ").append(o.command_line_brief()); contents.emplace_back(std::move(line)); }; for (const auto &o : m_command_line_options) { add_option(o); } for (const auto &o : m_options) { add_option(*o); } for (const auto &o : m_options) { for (const auto &d : o->details) { contents.emplace_back(d); } } if (has_arguments) { contents.emplace_back("Arguments:"); contents.emplace_back("This report accepts " + to_string(m_argc) + "."); } help->add_help(prefix, "DETAIL", contents, shcore::Keyword_location::LOCAL_CTX); } { // examples std::vector<shcore::Help_registry::Example> ex; for (const auto &example : examples) { shcore::Help_registry::Example e; e.code = "\\show " + m_report_name; for (const auto &o : example.options) { const auto spec = find_option(m_options, o.first); assert(spec); const auto name = (o.first.length() > 1 ? "-" : "") + ("-" + o.first); switch (spec->parameter->type()) { case shcore::Value_type::String: e.code.append(" ").append(name); if (!o.second.empty()) { e.code.append(" "); if (std::string::npos != o.second.find(" ")) { e.code.append(shcore::quote_string(o.second, '"')); } else { e.code.append(o.second); } } break; case shcore::Value_type::Bool: if ("true" == o.second) { e.code.append(" ").append(name); } break; case shcore::Value_type::Integer: case shcore::Value_type::Float: e.code.append(" ").append(name).append(" ").append(o.second); break; default: throw std::logic_error("Unknown option type."); } } for (const auto &a : example.args) { e.code.append(" "); if (std::string::npos != a.find(" ")) { e.code.append(shcore::quote_string(a, '"')); } else { e.code.append(a); } } e.description = example.description; ex.emplace_back(std::move(e)); } help->add_help(prefix, ex, shcore::Keyword_location::LOCAL_CTX); } m_help_topic = topic; } } shcore::Exception prepare_exception(const std::string &e) const { return shcore::Exception::argument_error(m_report_name + ": " + e); } const std::string m_report_name; const Report::Options m_options; const Report::Argc m_argc; const Report::Formatter m_formatter; shcore::Help_topic *m_help_topic = nullptr; bool m_show_help; bool m_vertical; std::vector<std::string> m_missing_options; std::vector<std::string> m_arguments; shcore::Dictionary_t m_parsed_options; shcore::Array_t m_parsed_arguments; std::vector<Report::Option> m_command_line_options; }; Report::Option::Option(const std::string &n, shcore::Value_type type, bool required) : Parameter_definition(n, type, required ? shcore::Param_flag::Mandatory : shcore::Param_flag::Optional) {} std::vector<std::string> Report::Option::command_line_names() const { std::vector<std::string> names; const auto &p = this->parameter; std::string long_name = "--" + command_line_name(); // non-Boolean reports require a value if (shcore::Value_type::Bool != p->type()) { if (empty) long_name += "["; long_name += "=" + shcore::str_lower(shcore::type_name(p->type())); if (empty) long_name += "]"; } names.emplace_back(std::move(long_name)); // options can optionally have short (one letter) form if (!this->short_name.empty()) { names.emplace_back("-" + this->short_name); } return names; } std::string Report::Option::command_line_name() const { return shcore::from_camel_case_to_dashes(parameter->name); } std::string Report::Option::command_line_brief() const { std::string cmdline_brief; if (this->is_required()) { cmdline_brief += "(required) "; } cmdline_brief += this->brief; const auto validator = this->parameter->validator<shcore::String_validator>(); if (validator) { const auto &allowed = validator->allowed(); if (!allowed.empty()) { cmdline_brief += " Allowed values: " + shcore::str_join(allowed, ", ") + "."; } } return cmdline_brief; } const uint32_t Report::k_asterisk = std::numeric_limits<uint32_t>::max(); Report::Report(const std::string &name, Type type, const shcore::Function_base_ref &function) : m_name(name), m_type(type), m_function(function) { switch (type) { case Type::LIST: m_formatter = list_formatter; break; case Type::REPORT: m_formatter = report_formatter; break; case Type::PRINT: m_formatter = print_formatter; break; default: // formatter needs to be set explicitly break; } } Report::Report(const std::string &name, Type type, const Native_report &function) : Report(name, type, std::make_shared<Native_report_function>(name, function)) {} const std::string &Report::name() const { return m_name; } Report::Type Report::type() const { return m_type; } const shcore::Function_base_ref &Report::function() const { return m_function; } const std::string &Report::brief() const { return m_brief; } void Report::set_brief(const std::string &brief) { m_brief = brief; } const std::vector<std::string> &Report::details() const { return m_details; } void Report::set_details(const std::vector<std::string> &details) { m_details = details; } const Report::Options &Report::options() const { return m_options; } void Report::set_options(const Options &options) { // Validates options are not in the reserved options for the \watch // command. Other options such as help and vertical(E) will be properly // reported as clashes with command line options std::set<std::string> reserved = {"interval", "nocls", "i"}; for (const auto &o : options) { validate_option(*o); if (reserved.find(o->parameter->name) != reserved.end()) { throw shcore::Exception::argument_error( "Option '" + o->parameter->name + "' is reserved for use with the \\watch command."); } if (!o->short_name.empty() && reserved.find(o->short_name) != reserved.end()) { throw shcore::Exception::argument_error( "Short name '" + o->short_name + "' is reserved for use with the \\watch command."); } } m_options = options; } const Report::Argc &Report::argc() const { return m_argc; } void Report::set_argc(const Argc &argc) { if (argc.first > argc.second) { throw shcore::Exception::argument_error( "The lower limit of 'argc' cannot be greater than upper limit."); } m_argc = argc; } const Report::Formatter &Report::formatter() const { return m_formatter; } void Report::set_formatter(const Report::Formatter &formatter) { m_formatter = formatter; } const Report::Examples &Report::examples() const { return m_examples; } void Report::set_examples(Examples &&examples) { for (const auto &e : examples) { validate_example(e); } m_examples = std::move(examples); } bool Report::requires_options() const { return m_options.end() != std::find_if(m_options.begin(), m_options.end(), [](const std::shared_ptr<Report::Option> &o) { return o->parameter->flag == shcore::Param_flag::Mandatory; }); } bool Report::has_options() const { return !m_options.empty(); } void Report::validate_option(const Option &option) { if (!option.short_name.empty()) { if (option.short_name.length() > 1) { throw shcore::Exception::argument_error( "Short name of an option must be exactly one character long."); } if (!std::isalnum(option.short_name[0], std::locale{})) { throw shcore::Exception::argument_error( "Short name of an option must be an alphanumeric character."); } } validate_option_type(option.parameter->type()); if (shcore::Value_type::Bool == option.parameter->type() && option.is_required()) { throw shcore::Exception::argument_error( "Option of type 'bool' cannot be required."); } if (option.empty && shcore::Value_type::String != option.parameter->type()) { throw shcore::Exception::argument_error( "Only option of type 'string' can accept empty values."); } } void Report::validate_example(const Example &example) const { if (example.args.size() < m_argc.first || example.args.size() > m_argc.second) { throw shcore::Exception::argument_error( "Report expects " + to_string(m_argc) + ", example has: " + std::to_string(example.args.size())); } for (const auto &o : example.options) { const auto spec = find_option(m_options, o.first); if (nullptr == spec) { throw shcore::Exception::argument_error( "Option named '" + o.first + "' used in example does not exist."); } const auto type = spec->parameter->type(); if (type == shcore::Value_type::Bool && "true" != o.second && "false" != o.second) { throw shcore::Exception::argument_error( "Option named '" + o.first + "' used in example is a Boolean, should have value 'true' or " "'false'."); } if (type == shcore::Value_type::String && "" == o.second && !spec->empty) { throw shcore::Exception::argument_error( "Option named '" + o.first + "' used in example cannot be an empty string."); } } } Shell_reports::Shell_reports(const std::string &name, const std::string &qualified_name) : Extensible_object(name, qualified_name, true) { enable_help(); // Do not register the reports for the second time if we're inside of a // thread. if (mysqlshdk::utils::in_main_thread()) { reports::register_query_report(this); reports::register_threads_report(this); reports::register_thread_report(this); } } // needs to be defined here due to Shell_reports::Report_options being // incomplete type Shell_reports::~Shell_reports() = default; std::shared_ptr<Parameter_definition> Shell_reports::start_parsing_parameter( const shcore::Dictionary_t &definition, shcore::Option_unpacker *unpacker) const { auto option = std::make_shared<Report::Option>(""); unpacker->optional("shortcut", &option->short_name); unpacker->optional("empty", &option->empty); // type is optional here, but base class requires it, insert default value if // not present if (definition->end() == definition->find("type")) { definition->emplace("type", "string"); } return option; } void Shell_reports::register_report(const std::string &name, const std::string &type, const shcore::Function_base_ref &report, const shcore::Dictionary_t &description) { if (!report) { throw shcore::Exception::type_error( "Argument #3 is expected to be a function"); } auto new_report = std::make_unique<Report>(name, to_report_type(type), report); if (description) { std::string brief; std::vector<std::string> details; shcore::Array_t options; std::string argc; shcore::Array_t examples; shcore::Option_unpacker{description} .optional("brief", &brief) .optional("details", &details) .optional("options", &options) .optional("argc", &argc) .optional("examples", &examples) .end(); new_report->set_brief(brief); new_report->set_details(details); shcore::Parameter_context context{"", {{"option", {}}}}; new_report->set_options(downcast( parse_parameters(options, &context, kReportOptionTypes, false))); new_report->set_argc(get_report_argc(argc)); new_report->set_examples(get_report_examples(examples)); } register_report(std::move(new_report)); } void Shell_reports::register_report(std::unique_ptr<Report> report) { auto normalized_name = normalize_report_name(report->name()); { const auto it = m_reports.find(normalized_name); if (m_reports.end() != it) { const auto error = report->name() == it->second->name() ? "Duplicate report: " + report->name() : "Name '" + report->name() + "' conflicts with an existing report: " + it->second->name(); throw shcore::Exception::argument_error(error); } } std::vector<std::string> details = { "This is a '" + to_string(report->type()) + "' type report."}; details.insert(details.end(), report->details().begin(), report->details().end()); std::vector<std::shared_ptr<Parameter_definition>> parameters; { // first parameter - session (required) auto session = std::make_shared<Parameter_definition>( "session", shcore::Value_type::Object, shcore::Param_flag::Mandatory); session->brief = "A Session object to be used to execute the report."; session->parameter->validator<shcore::Object_validator>()->set_allowed( {"ClassicSession", "Session"}); parameters.emplace_back(std::move(session)); } // second parameter - argv - if report expects arguments or has any options if (report->argc().second > 0 || report->has_options()) { // argv is mandatory if report expects at least one argument or if options // are required auto argv = std::make_shared<Parameter_definition>( "argv", shcore::Value_type::Array, report->argc().first > 0 || report->requires_options() ? shcore::Param_flag::Mandatory : shcore::Param_flag::Optional); argv->brief = "Extra arguments. Report expects " + to_string(report->argc()) + "."; argv->parameter->set_validator( std::make_unique<Argv_validator>(report->argc())); parameters.emplace_back(std::move(argv)); } // third parameter - options - only if report has any options if (report->has_options()) { // this parameter is mandatory if any of the options is required auto options = std::make_shared<Parameter_definition>( "options", shcore::Value_type::Map, report->requires_options() ? shcore::Param_flag::Mandatory : shcore::Param_flag::Optional); options->brief = "Options expected by the report."; options->set_options(upcast(report->m_options)); parameters.emplace_back(std::move(options)); } // Make sure the report_option creation does not error before // attempting registering both the report and the function, for // that, backups the data needed for the function registration const auto brief = report->brief(); const auto function = report->function(); const auto examples = get_function_examples(*report); auto roptions = std::make_unique<Report_options>(std::move(report)); // Reports must have the same name in both Python and JavaScript auto fd = std::make_shared<Function_definition>( roptions->name() + "|" + roptions->name(), parameters, brief, details, examples); // method should have the same name in both JS and Python register_function(fd, function); m_reports.emplace(std::move(normalized_name), std::move(roptions)); } std::vector<std::string> Shell_reports::list_reports() const { std::vector<std::string> reports; std::transform(m_reports.begin(), m_reports.end(), std::back_inserter(reports), [](const decltype(m_reports)::value_type &pair) { return pair.second->name(); }); return reports; } std::string Shell_reports::call_report( const std::string &name, const std::shared_ptr<ShellBaseSession> &session, const std::vector<std::string> &args) { // report must exist const auto report_iterator = m_reports.find(normalize_report_name(name)); if (m_reports.end() == report_iterator) { throw shcore::Exception::argument_error("Unknown report: " + name); } // arguments must be valid const auto report_options = report_iterator->second.get(); report_options->parse_args(args); if (report_options->show_help()) { // get help return report_options->help(); } else { // session must be open if (!session || !session->is_open()) { throw shcore::Exception::argument_error( "Executing the report requires an existing, open session."); } // prepare arguments shcore::Argument_list arguments; arguments.push_back(shcore::Value(session)); if (report_options->requires_argv()) { arguments.push_back( shcore::Value(report_options->get_parsed_arguments())); } if (report_options->requires_options()) { // convert args into dictionary arguments.push_back(shcore::Value(report_options->get_parsed_options())); } // call the report const auto result = call(report_options->name(), arguments); if (shcore::Value_type::Map != result.type) { throw shcore::Exception::runtime_error( "Report should return a dictionary."); } shcore::Array_t report; shcore::Option_unpacker{result.as_map()} .required(k_report_key, &report) .end(); if (!report) { throw shcore::Exception::runtime_error( "Option 'report' is expected to be of type Array, but is Null"); } const auto display_options = shcore::make_dict(); display_options->emplace(k_vertical_key, report_options->vertical()); return report_options->formatter()(report, display_options); } } } // namespace mysqlsh
32.301843
80
0.593718
[ "object", "vector", "transform" ]
4435ba9bf8b87a7cd350aa3306a78e77f53eaf40
983
hpp
C++
src/armnn/layers/ReshapeLayer.hpp
KevinRodrigues05/armnn_caffe2_parser
c577f2c6a3b4ddb6ba87a882723c53a248afbeba
[ "MIT" ]
null
null
null
src/armnn/layers/ReshapeLayer.hpp
KevinRodrigues05/armnn_caffe2_parser
c577f2c6a3b4ddb6ba87a882723c53a248afbeba
[ "MIT" ]
null
null
null
src/armnn/layers/ReshapeLayer.hpp
KevinRodrigues05/armnn_caffe2_parser
c577f2c6a3b4ddb6ba87a882723c53a248afbeba
[ "MIT" ]
null
null
null
// // Copyright © 2017 Arm Ltd. All rights reserved. // See LICENSE file in the project root for full license information. // #pragma once #include "LayerWithParameters.hpp" namespace armnn { class ReshapeLayer : public LayerWithParameters<ReshapeDescriptor> { public: virtual std::unique_ptr<IWorkload> CreateWorkload(const Graph& graph, const IWorkloadFactory& factory) const override; ReshapeLayer* Clone(Graph& graph) const override; void ValidateTensorShapesFromInputs() override; std::vector<TensorShape> InferOutputShapes(const std::vector<TensorShape>& inputShapes) const override; bool IsEqual(const Layer& other) const { return (other.GetType() == LayerType::Reshape) && m_Param.m_TargetShape == boost::polymorphic_downcast<const ReshapeLayer*>(&other)->m_Param.m_TargetShape; } protected: ReshapeLayer(const ReshapeDescriptor& desc, const char* name); ~ReshapeLayer() = default; }; } // namespace
28.085714
120
0.728383
[ "vector" ]
443cc1686b64bf54fc553da784c253bf0815fd83
5,634
cpp
C++
searchcore/src/tests/proton/matching/termdataextractor_test.cpp
Anlon-Burke/vespa
5ecd989b36cc61716bf68f032a3482bf01fab726
[ "Apache-2.0" ]
4,054
2017-08-11T07:58:38.000Z
2022-03-31T22:32:15.000Z
searchcore/src/tests/proton/matching/termdataextractor_test.cpp
Anlon-Burke/vespa
5ecd989b36cc61716bf68f032a3482bf01fab726
[ "Apache-2.0" ]
4,854
2017-08-10T20:19:25.000Z
2022-03-31T19:04:23.000Z
searchcore/src/tests/proton/matching/termdataextractor_test.cpp
Anlon-Burke/vespa
5ecd989b36cc61716bf68f032a3482bf01fab726
[ "Apache-2.0" ]
541
2017-08-10T18:51:18.000Z
2022-03-11T03:18:56.000Z
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Unit tests for TermDataExtractor. #include <vespa/log/log.h> LOG_SETUP("termdataextractor_test"); #include <vespa/searchcore/proton/matching/querynodes.h> #include <vespa/searchcore/proton/matching/resolveviewvisitor.h> #include <vespa/searchcore/proton/matching/termdataextractor.h> #include <vespa/searchcore/proton/matching/viewresolver.h> #include <vespa/searchlib/fef/tablemanager.h> #include <vespa/searchlib/fef/itermdata.h> #include <vespa/searchlib/fef/test/indexenvironment.h> #include <vespa/searchlib/query/tree/location.h> #include <vespa/searchlib/query/tree/point.h> #include <vespa/searchlib/query/tree/querybuilder.h> #include <vespa/searchlib/query/weight.h> #include <vespa/vespalib/testkit/testapp.h> #include <string> #include <vector> namespace fef_test = search::fef::test; using search::fef::FieldInfo; using search::fef::FieldType; using search::fef::ITermData; using search::fef::IIndexEnvironment; using search::query::Location; using search::query::Node; using search::query::Point; using search::query::QueryBuilder; using search::query::Range; using search::query::Weight; using std::string; using std::vector; using namespace proton::matching; using CollectionType = FieldInfo::CollectionType; namespace search { class AttributeManager; } namespace { const string field = "field"; const uint32_t id[] = { 10, 11, 12, 13, 14, 15, 16, 17, 18 }; Node::UP getQuery(const ViewResolver &resolver) { QueryBuilder<ProtonNodeTypes> query_builder; query_builder.addAnd(8); query_builder.addNumberTerm("0.0", field, id[0], Weight(0)); query_builder.addPrefixTerm("foo", field, id[1], Weight(0)); query_builder.addStringTerm("bar", field, id[2], Weight(0)); query_builder.addSubstringTerm("baz", field, id[3], Weight(0)); query_builder.addSuffixTerm("qux", field, id[4], Weight(0)); query_builder.addRangeTerm(Range(), field, id[5], Weight(0)); query_builder.addWeightedSetTerm(1, field, id[6], Weight(0)) .addTerm("bar", Weight(0)); query_builder.addLocationTerm(Location(Point{10, 10}, 3, 0), field, id[7], Weight(0)); Node::UP node = query_builder.build(); fef_test::IndexEnvironment index_environment; index_environment.getFields().push_back(FieldInfo(FieldType::INDEX, CollectionType::SINGLE, field, 0)); index_environment.getFields().push_back(FieldInfo(FieldType::INDEX, CollectionType::SINGLE, "foo", 1)); index_environment.getFields().push_back(FieldInfo(FieldType::INDEX, CollectionType::SINGLE, "bar", 2)); ResolveViewVisitor visitor(resolver, index_environment); node->accept(visitor); return node; } TEST("requireThatTermsAreAdded") { Node::UP node = getQuery(ViewResolver()); vector<const ITermData *> term_data; TermDataExtractor::extractTerms(*node, term_data); EXPECT_EQUAL(8u, term_data.size()); for (int i = 0; i < 8; ++i) { EXPECT_EQUAL(id[i], term_data[i]->getUniqueId()); EXPECT_EQUAL(1u, term_data[i]->numFields()); } } TEST("requireThatAViewWithTwoFieldsGivesOneTermDataPerTerm") { ViewResolver resolver; resolver.add(field, "foo"); resolver.add(field, "bar"); Node::UP node = getQuery(resolver); vector<const ITermData *> term_data; TermDataExtractor::extractTerms(*node, term_data); EXPECT_EQUAL(8u, term_data.size()); for (int i = 0; i < 8; ++i) { EXPECT_EQUAL(id[i], term_data[i]->getUniqueId()); EXPECT_EQUAL(2u, term_data[i]->numFields()); } } TEST("requireThatUnrankedTermsAreSkipped") { QueryBuilder<ProtonNodeTypes> query_builder; query_builder.addAnd(2); query_builder.addStringTerm("term1", field, id[0], Weight(0)); query_builder.addStringTerm("term2", field, id[1], Weight(0)) .setRanked(false); Node::UP node = query_builder.build(); vector<const ITermData *> term_data; TermDataExtractor::extractTerms(*node, term_data); EXPECT_EQUAL(1u, term_data.size()); ASSERT_TRUE(term_data.size() >= 1); EXPECT_EQUAL(id[0], term_data[0]->getUniqueId()); } TEST("requireThatNegativeTermsAreSkipped") { QueryBuilder<ProtonNodeTypes> query_builder; query_builder.addAnd(2); query_builder.addStringTerm("term1", field, id[0], Weight(0)); query_builder.addAndNot(2); query_builder.addStringTerm("term2", field, id[1], Weight(0)); query_builder.addAndNot(2); query_builder.addStringTerm("term3", field, id[2], Weight(0)); query_builder.addStringTerm("term4", field, id[3], Weight(0)); Node::UP node = query_builder.build(); vector<const ITermData *> term_data; TermDataExtractor::extractTerms(*node, term_data); EXPECT_EQUAL(2u, term_data.size()); ASSERT_TRUE(term_data.size() >= 2); EXPECT_EQUAL(id[0], term_data[0]->getUniqueId()); EXPECT_EQUAL(id[1], term_data[1]->getUniqueId()); } TEST("requireThatSameElementIsSkipped") { QueryBuilder<ProtonNodeTypes> query_builder; query_builder.addAnd(2); query_builder.addSameElement(2, field); query_builder.addStringTerm("term1", field, id[0], Weight(1)); query_builder.addStringTerm("term2", field, id[1], Weight(1)); query_builder.addStringTerm("term3", field, id[2], Weight(1)); Node::UP node = query_builder.build(); vector<const ITermData *> term_data; TermDataExtractor::extractTerms(*node, term_data); EXPECT_EQUAL(1u, term_data.size()); ASSERT_TRUE(term_data.size() >= 1); EXPECT_EQUAL(id[2], term_data[0]->getUniqueId()); } } // namespace TEST_MAIN() { TEST_RUN_ALL(); }
37.065789
107
0.713703
[ "vector" ]
443e3c2717e2599ff22a71804c922f4ed7c601f6
16,571
cpp
C++
host/errors/src/host.cpp
mariodruiz/Vitis_Accel_Examples
1fc7747d8892c5c72d33c2063a7b8e11af3c1447
[ "Apache-2.0" ]
null
null
null
host/errors/src/host.cpp
mariodruiz/Vitis_Accel_Examples
1fc7747d8892c5c72d33c2063a7b8e11af3c1447
[ "Apache-2.0" ]
1
2020-10-23T06:50:31.000Z
2020-10-23T06:50:31.000Z
host/errors/src/host.cpp
mariodruiz/Vitis_Accel_Examples
1fc7747d8892c5c72d33c2063a7b8e11af3c1447
[ "Apache-2.0" ]
null
null
null
/** * Copyright (C) 2020 Xilinx, Inc * * Licensed under the Apache License, Version 2.0 (the "License"). You may * not use this file except in compliance with the License. A copy of the * License is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ #define CL_USE_DEPRECATED_OPENCL_1_2_APIS #include <CL/cl.h> #include <cstdio> #include <fstream> #include <iosfwd> #include <string> #include <vector> using std::ifstream; using std::ios; using std::streamsize; using std::string; using std::vector; #define ERROR_CASE(err) \ case err: \ return #err; \ break const char* error_string(cl_int error_code) { switch (error_code) { ERROR_CASE(CL_SUCCESS); ERROR_CASE(CL_DEVICE_NOT_FOUND); ERROR_CASE(CL_DEVICE_NOT_AVAILABLE); ERROR_CASE(CL_COMPILER_NOT_AVAILABLE); ERROR_CASE(CL_MEM_OBJECT_ALLOCATION_FAILURE); ERROR_CASE(CL_OUT_OF_RESOURCES); ERROR_CASE(CL_OUT_OF_HOST_MEMORY); ERROR_CASE(CL_PROFILING_INFO_NOT_AVAILABLE); ERROR_CASE(CL_MEM_COPY_OVERLAP); ERROR_CASE(CL_IMAGE_FORMAT_MISMATCH); ERROR_CASE(CL_IMAGE_FORMAT_NOT_SUPPORTED); ERROR_CASE(CL_BUILD_PROGRAM_FAILURE); ERROR_CASE(CL_MAP_FAILURE); ERROR_CASE(CL_INVALID_VALUE); ERROR_CASE(CL_INVALID_DEVICE_TYPE); ERROR_CASE(CL_INVALID_PLATFORM); ERROR_CASE(CL_INVALID_DEVICE); ERROR_CASE(CL_INVALID_CONTEXT); ERROR_CASE(CL_INVALID_QUEUE_PROPERTIES); ERROR_CASE(CL_INVALID_COMMAND_QUEUE); ERROR_CASE(CL_INVALID_HOST_PTR); ERROR_CASE(CL_INVALID_MEM_OBJECT); ERROR_CASE(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR); ERROR_CASE(CL_INVALID_IMAGE_SIZE); ERROR_CASE(CL_INVALID_SAMPLER); ERROR_CASE(CL_INVALID_BINARY); ERROR_CASE(CL_INVALID_BUILD_OPTIONS); ERROR_CASE(CL_INVALID_PROGRAM); ERROR_CASE(CL_INVALID_PROGRAM_EXECUTABLE); ERROR_CASE(CL_INVALID_KERNEL_NAME); ERROR_CASE(CL_INVALID_KERNEL_DEFINITION); ERROR_CASE(CL_INVALID_KERNEL); ERROR_CASE(CL_INVALID_ARG_INDEX); ERROR_CASE(CL_INVALID_ARG_VALUE); ERROR_CASE(CL_INVALID_ARG_SIZE); ERROR_CASE(CL_INVALID_KERNEL_ARGS); ERROR_CASE(CL_INVALID_WORK_DIMENSION); ERROR_CASE(CL_INVALID_WORK_GROUP_SIZE); ERROR_CASE(CL_INVALID_WORK_ITEM_SIZE); ERROR_CASE(CL_INVALID_GLOBAL_OFFSET); ERROR_CASE(CL_INVALID_EVENT_WAIT_LIST); ERROR_CASE(CL_INVALID_EVENT); ERROR_CASE(CL_INVALID_OPERATION); ERROR_CASE(CL_INVALID_GL_OBJECT); ERROR_CASE(CL_INVALID_BUFFER_SIZE); ERROR_CASE(CL_INVALID_MIP_LEVEL); ERROR_CASE(CL_INVALID_GLOBAL_WORK_SIZE); ERROR_CASE(CL_COMPILE_PROGRAM_FAILURE); ERROR_CASE(CL_LINKER_NOT_AVAILABLE); ERROR_CASE(CL_LINK_PROGRAM_FAILURE); ERROR_CASE(CL_DEVICE_PARTITION_FAILED); ERROR_CASE(CL_KERNEL_ARG_INFO_NOT_AVAILABLE); ERROR_CASE(CL_INVALID_PROPERTY); ERROR_CASE(CL_INVALID_IMAGE_DESCRIPTOR); ERROR_CASE(CL_INVALID_COMPILER_OPTIONS); ERROR_CASE(CL_INVALID_LINKER_OPTIONS); ERROR_CASE(CL_INVALID_DEVICE_PARTITION_COUNT); default: printf("Unknown OpenCL Error (%d)\n", error_code); break; } return nullptr; } static const char* error_message = "Error: Result mismatch:\n" "i = %d CPU result = %d Device result = %d\n"; vector<unsigned char> readBinary(const std::string& fileName) { ifstream file(fileName, ios::binary | ios::ate); if (file) { file.seekg(0, ios::end); streamsize size = file.tellg(); file.seekg(0, ios::beg); vector<unsigned char> buffer(size); file.read((char*)buffer.data(), size); return buffer; } else { return std::vector<unsigned char>(0); } } // This example just prints out string description for given OpenCL error code. int main(int argc, char** argv) { if (argc != 2) { printf("Usage: %s <XCLBIN File>\n", argv[0]); return EXIT_FAILURE; } static const int elements = 1024; char* binary_file_path = argv[1]; // Error handling in OpenCL is performed using the cl_int specifier. OpenCL // functions either return or accept pointers to cl_int types to indicate if // an error occurred. cl_int err; if ((err = clGetPlatformIDs(0, nullptr, nullptr))) { printf( "Received Expected Error calling clGetPlatformIDs: %s\n" "\tThis error is usually caused by a failed OpenCL installation or " "if both the platforms and num_platforms parameters are null. In " "this case we passed incorrect values to the function. We " "intentionally threw this error so we will not be exiting the " "program. \n\n", error_string(err)); // Normally you would exit the program if this call returned an error // but in // this case we will continue processing after fixing the command // exit(EXIT_FAILURE); } cl_uint num_platforms; if ((err = clGetPlatformIDs(0, nullptr, &num_platforms))) { printf( "Fatal Error calling clGetPlatformIDs: %s\n" "This can be caused by an invalid installation of the OpenCL " "runtime. Please make sure the installation was successful.\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } if (num_platforms == 0) { printf( "No platforms were found. This could be caused because the OpenCL " "icd was not installed in the /etc/OpenCL/vendors directory.\n"); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } vector<cl_platform_id> platforms(num_platforms + 1); if ((err = clGetPlatformIDs(num_platforms, platforms.data(), nullptr))) { printf("Error: Failed to find an OpenCL platform!\n"); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } string platform_name(1024, '\0'); size_t actual_size = 0; if ((err = clGetPlatformInfo(platforms[0], CL_PLATFORM_NAME, platform_name.size(), (void*)platform_name.data(), &actual_size))) { printf("Error: Could not determine platform name!\n"); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } printf("Platform Name: %s\n", platform_name.c_str()); cl_uint num_devices = 0; if ((err = clGetDeviceIDs(platforms[0], CL_DEVICE_TYPE_CPU, 0, nullptr, &num_devices))) { printf( "Received Expected Error calling clGetDeviceIDs: %s\n" "This error appears when we try to create a device and no devices " "are found on the platform. In this case we passed " "CL_DEVICE_TYPE_CPU as the device type which is not available on " "the %s platform. We intentionally threw this error so we will not " "be exiting the program.\n\n", error_string(err), platform_name.c_str()); } cl_device_id device_id = 0; if ((err = clGetDeviceIDs(platforms[0], CL_DEVICE_TYPE_ALL, 1, &device_id, nullptr))) { printf( "Fatal Error calling clGetDeviceIDs: %s\n" "Unexpected error getting device IDs. This may happen if you are " "Targeting hardware or software emulation and the " "XCL_EMULATION_MODE environment variable is not set. Also makeyou " "have set the you have run the emconfigutil to setup the emulation " "environment.\n\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } cl_context_properties props[3] = {CL_CONTEXT_PLATFORM, (cl_context_properties)platforms[0], 0}; // clCreate* function calls return the object so they return error codes // using // pointers to cl_int as their last parameters cl_context context = clCreateContext(props, 0, &device_id, nullptr, nullptr, &err); if (err) { printf( "Received Expected Error calling clCreateContext: %s\n" "\tMost clCreate* calls accept error codes as their last parameter " "instead of returning the error value. This error occurred because " "we passed 0 for the num_devices variable. We intentionally threw " "this error so we will not be exiting the program.\n\n", error_string(err)); } context = clCreateContext(props, 1, &device_id, nullptr, nullptr, &err); cl_command_queue command_queue = clCreateCommandQueue(context, device_id, CL_QUEUE_PROFILING_ENABLE, &err); if (err) { printf( "Fatal Error calling clCreateCommandQueue: %s\n" "Unexpected error creating a command queue.\n\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } // Loading the file std::string wrong_binary_file_path = "XYZ"; vector<unsigned char> incorrect_binary = readBinary(wrong_binary_file_path); size_t binary_size = incorrect_binary.size(); const unsigned char* incorrect_binary_data = incorrect_binary.data(); cl_program program = clCreateProgramWithBinary(context, 1, &device_id, &binary_size, &incorrect_binary_data, nullptr, &err); if (err) { printf( "Received Expected Error calling clCreateProgramWithBinary: %s\n" "Errors caused during program creation are usually due to invalid " "binaries. The binary may be targeting a different shell. " "It may also have been corrupted or incorrectly read from disk. We " "intentionally caused this error so we will not be exiting the " "program.\n\n", error_string(err)); } std::vector<unsigned char> binary = readBinary(binary_file_path); binary_size = binary.size(); const unsigned char* binary_data = binary.data(); program = clCreateProgramWithBinary(context, 1, &device_id, &binary_size, &binary_data, nullptr, &err); if (err) { printf( "Fatal Error calling clCreateProgramWithBinary: %s\n" "Unexpected error creating a program from binary. Make sure you " "executed this program with the correct path to the binary.\n\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } cl_kernel kernel = clCreateKernel(program, "InvalidKernelName", &err); if (err) { printf( "Received Expected Error calling clCreateKernel: %s\n" "Errors calling clCreateKernel are usually caused if the name " "passed into the function does not match a kernel in the binary. " "We intentionally caused this error so we will not be exiting the " "program.\n\n", error_string(err)); } kernel = clCreateKernel(program, "vector_add", &err); if (err) { printf( "Fatal Error calling clCreateKernel: %s\n" "Unexpected error when creating kernel. Make sure you passed the " "correct binary into the executable of this program.\n\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } cl_mem buffer_a = clCreateBuffer(context, CL_MEM_READ_ONLY, 0, nullptr, &err); if (err) { printf( "Received Expected Error calling clCreateBuffer: %s\n" "There can be several reasons for buffer creation to fail. It " "could be because device could not allocate enough memory for this " "buffer. The pointer could be null and either CL_MEM_USE_HOST_PTR " "or CL_MEM_COPY_HOST_PTR are passed into the flags parameter. In " "this case we passed zero(0) as the size of the buffer. We " "intentionally caused this error so we will not be exiting the " "program.\n\n", error_string(err)); } size_t size = elements * sizeof(int); buffer_a = clCreateBuffer(context, CL_MEM_READ_ONLY, size, nullptr, &err); if (err) { printf("Fatal Error calling clCreateBuffer: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } cl_mem buffer_b = clCreateBuffer(context, CL_MEM_READ_ONLY, size, nullptr, &err); if (err) { printf("Fatal Error calling clCreateBuffer: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } cl_mem buffer_result = clCreateBuffer(context, CL_MEM_WRITE_ONLY, size, nullptr, &err); if (err) { printf("Fatal Error calling clCreateBuffer: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } vector<int> A(elements, 32); vector<int> B(elements, 10); vector<int> C(elements); if ((err = clSetKernelArg(kernel, 0, sizeof(cl_mem), &buffer_result))) { printf("Fatal Error calling clSetKernelArg: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } if ((err = clSetKernelArg(kernel, 1, sizeof(cl_mem), &buffer_a))) { printf("Fatal Error calling clSetKernelArg: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } if ((err = clSetKernelArg(kernel, 2, sizeof(cl_mem), &buffer_b))) { printf("Fatal Error calling clSetKernelArg: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } if ((err = clSetKernelArg(kernel, 3, sizeof(int), &elements))) { printf("Fatal Error calling clSetKernelArg: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } if ((err = clEnqueueWriteBuffer(command_queue, buffer_a, CL_FALSE, 0, size + 1, A.data(), 0, nullptr, nullptr))) { printf( "Received Expected Error calling clEnqueueWriteBuffer: %s\n" "Errors calling clEnqueueWriteBuffer tend to occur due to invalid " "pointers or invalid size of the transfer. Make sure that the host " "pointer is correct and that you are transferring less than the " "size of the buffer. Here we tried to transfer data that was " "larger than the size of the buffer. We intentionally caused this " "error so we will not be exiting the program.\n\n", error_string(err)); } if ((err = clEnqueueWriteBuffer(command_queue, buffer_a, CL_FALSE, 0, size, A.data(), 0, nullptr, nullptr))) { printf("Fatal Error calling clEnqueueWriteBuffer: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } if ((err = clEnqueueWriteBuffer(command_queue, buffer_b, CL_FALSE, 0, size, B.data(), 0, nullptr, nullptr))) { printf("Fatal Error calling clEnqueueWriteBuffer: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } size_t global = 1; size_t local = 1; if ((err = clEnqueueNDRangeKernel(command_queue, kernel, 1, nullptr, &global, &local, 0, nullptr, nullptr))) { printf("Fatal Error calling clEnqueueNDRangeKernel: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } if ((err = clEnqueueReadBuffer(command_queue, buffer_result, CL_TRUE, 0, size, C.data(), 0, nullptr, nullptr))) { printf("Fatal Error calling clEnqueueWriteBuffer: %s\n", error_string(err)); printf("TEST FAILED\n"); exit(EXIT_FAILURE); } int failed = 0; for (int i = 0; i < elements; i++) { int host_result = A[i] + B[i]; if (C[i] != host_result) { printf(error_message, i, host_result, C[i]); failed = 1; break; } } clReleaseMemObject(buffer_a); clReleaseMemObject(buffer_b); clReleaseMemObject(buffer_result); clReleaseKernel(kernel); clReleaseProgram(program); clReleaseCommandQueue(command_queue); clReleaseContext(context); printf("TEST %s\n", (failed ? "FAILED" : "PASSED")); return (failed ? EXIT_FAILURE : EXIT_SUCCESS); }
40.220874
118
0.647698
[ "object", "vector" ]
44412da126f6a3202c823c4a58e958c54b804f8d
1,865
cpp
C++
thrift/lib/cpp2/protocol/test/F14RoundTripTest.cpp
maalbash/fbthrift
9d2c799d228cb0dce931ddde9ce339db53f2d8e9
[ "Apache-2.0" ]
null
null
null
thrift/lib/cpp2/protocol/test/F14RoundTripTest.cpp
maalbash/fbthrift
9d2c799d228cb0dce931ddde9ce339db53f2d8e9
[ "Apache-2.0" ]
null
null
null
thrift/lib/cpp2/protocol/test/F14RoundTripTest.cpp
maalbash/fbthrift
9d2c799d228cb0dce931ddde9ce339db53f2d8e9
[ "Apache-2.0" ]
null
null
null
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <type_traits> #include <vector> #include <folly/portability/GTest.h> #include <thrift/lib/cpp2/protocol/CompactProtocol.h> #include <thrift/lib/cpp2/protocol/Serializer.h> #include <thrift/lib/cpp2/protocol/test/gen-cpp2/Module_types.h> using namespace std; using namespace folly; using namespace apache::thrift; using namespace apache::thrift::test; namespace { using CompactSerializer = Serializer<CompactProtocolReader, CompactProtocolWriter>; class F14RoundTripTest : public testing::Test {}; } // namespace // F14Vector* containers have the additional guarantee (over unordered // containers) that iteration order roundtrips. TEST_F(F14RoundTripTest, RoundTrip) { StructWithF14VectorContainers s0; for (size_t i = 0; i < 5; ++i) { s0.m_ref()->emplace(i, i); s0.s_ref()->emplace(i); } const auto serialized = CompactSerializer::serialize<string>(s0); StructWithF14VectorContainers s1; CompactSerializer::deserialize(serialized, s1); auto as_vector = [](const auto& c) { return vector<typename std::decay_t<decltype(c)>::value_type>( c.begin(), c.end()); }; EXPECT_EQ(as_vector(*s0.m_ref()), as_vector(*s1.m_ref())); EXPECT_EQ(as_vector(*s0.s_ref()), as_vector(*s1.s_ref())); }
30.57377
75
0.730831
[ "vector" ]
444192abed4953ea29a290c50a071ca43bd324cc
10,685
cc
C++
lib/NS3/src/core/model/object-base.cc
HauserV/madv
588f24b1bcbc66946526ea2768629c778a8d8dfb
[ "MIT" ]
null
null
null
lib/NS3/src/core/model/object-base.cc
HauserV/madv
588f24b1bcbc66946526ea2768629c778a8d8dfb
[ "MIT" ]
null
null
null
lib/NS3/src/core/model/object-base.cc
HauserV/madv
588f24b1bcbc66946526ea2768629c778a8d8dfb
[ "MIT" ]
null
null
null
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> */ #include "object-base.h" #include "log.h" #include "trace-source-accessor.h" #include "attribute-construction-list.h" #include "string.h" //#include "ns3/core-config.h" #ifdef HAVE_STDLIB_H #include <cstdlib> #endif /** * \file * \ingroup object * ns3::ObjectBase class implementation. */ namespace ns3 { NS_LOG_COMPONENT_DEFINE ("ObjectBase"); NS_OBJECT_ENSURE_REGISTERED (ObjectBase); /** * Ensure the TypeId for ObjectBase gets fully configured * to anchor the inheritance tree properly. * * \relates ns3::ObjectBase * * \return The TypeId for ObjectBase. */ static TypeId GetObjectIid (void) { NS_LOG_FUNCTION_NOARGS (); TypeId tid = TypeId ("ns3::ObjectBase"); tid.SetParent (tid); tid.SetGroupName ("Core"); return tid; } TypeId ObjectBase::GetTypeId (void) { NS_LOG_FUNCTION_NOARGS (); static TypeId tid = GetObjectIid (); return tid; } ObjectBase::~ObjectBase () { NS_LOG_FUNCTION (this); } void ObjectBase::NotifyConstructionCompleted (void) { NS_LOG_FUNCTION (this); } void ObjectBase::ConstructSelf (const AttributeConstructionList &attributes) { // loop over the inheritance tree back to the Object base class. NS_LOG_FUNCTION (this << &attributes); TypeId tid = GetInstanceTypeId (); do { // loop over all attributes in object type NS_LOG_DEBUG ("construct tid="<<tid.GetName ()<<", params="<<tid.GetAttributeN ()); for (uint32_t i = 0; i < tid.GetAttributeN (); i++) { struct TypeId::AttributeInformation info = tid.GetAttribute(i); NS_LOG_DEBUG ("try to construct \""<< tid.GetName ()<<"::"<< info.name <<"\""); // is this attribute stored in this AttributeConstructionList instance ? Ptr<AttributeValue> value = attributes.Find(info.checker); // See if this attribute should not be set here in the // constructor. if (!(info.flags & TypeId::ATTR_CONSTRUCT)) { // Handle this attribute if it should not be // set here. if (value == 0) { // Skip this attribute if it's not in the // AttributeConstructionList. continue; } else { // This is an error because this attribute is not // settable in its constructor but is present in // the AttributeConstructionList. NS_FATAL_ERROR ("Attribute name="<<info.name<<" tid="<<tid.GetName () << ": initial value cannot be set using attributes"); } } if (value != 0) { // We have a matching attribute value. if (DoSet (info.accessor, info.checker, *value)) { NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< info.name<<"\""); continue; } } #ifdef HAVE_GETENV // No matching attribute value so we try to look at the env var. char *envVar = getenv ("NS_ATTRIBUTE_DEFAULT"); if (envVar != 0) { std::string env = std::string (envVar); std::string::size_type cur = 0; std::string::size_type next = 0; while (next != std::string::npos) { next = env.find (";", cur); std::string tmp = std::string (env, cur, next-cur); std::string::size_type equal = tmp.find ("="); if (equal != std::string::npos) { std::string name = tmp.substr (0, equal); std::string value = tmp.substr (equal+1, tmp.size () - equal - 1); if (name == tid.GetAttributeFullName (i)) { if (DoSet (info.accessor, info.checker, StringValue (value))) { NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< info.name <<"\" from env var"); break; } } } cur = next + 1; } } #endif /* HAVE_GETENV */ // No matching attribute value so we try to set the default value. DoSet (info.accessor, info.checker, *info.initialValue); NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< info.name <<"\" from initial value."); } tid = tid.GetParent (); } while (tid != ObjectBase::GetTypeId ()); NotifyConstructionCompleted (); } bool ObjectBase::DoSet (Ptr<const AttributeAccessor> accessor, Ptr<const AttributeChecker> checker, const AttributeValue &value) { NS_LOG_FUNCTION (this << accessor << checker << &value); Ptr<AttributeValue> v = checker->CreateValidValue (value); if (v == 0) { return false; } bool ok = accessor->Set (this, *v); return ok; } void ObjectBase::SetAttribute (std::string name, const AttributeValue &value) { NS_LOG_FUNCTION (this << name << &value); struct TypeId::AttributeInformation info; TypeId tid = GetInstanceTypeId (); if (!tid.LookupAttributeByName (name, &info)) { NS_FATAL_ERROR ("Attribute name="<<name<<" does not exist for this object: tid="<<tid.GetName ()); } if (!(info.flags & TypeId::ATTR_SET) || !info.accessor->HasSetter ()) { NS_FATAL_ERROR ("Attribute name="<<name<<" is not settable for this object: tid="<<tid.GetName ()); } if (!DoSet (info.accessor, info.checker, value)) { NS_FATAL_ERROR ("Attribute name="<<name<<" could not be set for this object: tid="<<tid.GetName ()); } } bool ObjectBase::SetAttributeFailSafe (std::string name, const AttributeValue &value) { NS_LOG_FUNCTION (this << name << &value); struct TypeId::AttributeInformation info; TypeId tid = GetInstanceTypeId (); if (!tid.LookupAttributeByName (name, &info)) { return false; } if (!(info.flags & TypeId::ATTR_SET) || !info.accessor->HasSetter ()) { return false; } return DoSet (info.accessor, info.checker, value); } void ObjectBase::GetAttribute (std::string name, AttributeValue &value) const { NS_LOG_FUNCTION (this << name << &value); struct TypeId::AttributeInformation info; TypeId tid = GetInstanceTypeId (); if (!tid.LookupAttributeByName (name, &info)) { NS_FATAL_ERROR ("Attribute name="<<name<<" does not exist for this object: tid="<<tid.GetName ()); } if (!(info.flags & TypeId::ATTR_GET) || !info.accessor->HasGetter ()) { NS_FATAL_ERROR ("Attribute name="<<name<<" is not gettable for this object: tid="<<tid.GetName ()); } bool ok = info.accessor->Get (this, value); if (ok) { return; } StringValue *str = dynamic_cast<StringValue *> (&value); if (str == 0) { NS_FATAL_ERROR ("Attribute name="<<name<<" tid="<<tid.GetName () << ": input value is not a string"); } Ptr<AttributeValue> v = info.checker->Create (); ok = info.accessor->Get (this, *PeekPointer (v)); if (!ok) { NS_FATAL_ERROR ("Attribute name="<<name<<" tid="<<tid.GetName () << ": could not get value"); } str->Set (v->SerializeToString (info.checker)); } bool ObjectBase::GetAttributeFailSafe (std::string name, AttributeValue &value) const { NS_LOG_FUNCTION (this << name << &value); struct TypeId::AttributeInformation info; TypeId tid = GetInstanceTypeId (); if (!tid.LookupAttributeByName (name, &info)) { return false; } if (!(info.flags & TypeId::ATTR_GET) || !info.accessor->HasGetter ()) { return false; } bool ok = info.accessor->Get (this, value); if (ok) { return true; } StringValue *str = dynamic_cast<StringValue *> (&value); if (str == 0) { return false; } Ptr<AttributeValue> v = info.checker->Create (); ok = info.accessor->Get (this, *PeekPointer (v)); if (!ok) { return false; } str->Set (v->SerializeToString (info.checker)); return true; } bool ObjectBase::TraceConnectWithoutContext (std::string name, const CallbackBase &cb) { NS_LOG_FUNCTION (this << name << &cb); TypeId tid = GetInstanceTypeId (); Ptr<const TraceSourceAccessor> accessor = tid.LookupTraceSourceByName (name); if (accessor == 0) { return false; } bool ok = accessor->ConnectWithoutContext (this, cb); return ok; } bool ObjectBase::TraceConnect (std::string name, std::string context, const CallbackBase &cb) { NS_LOG_FUNCTION (this << name << context << &cb); TypeId tid = GetInstanceTypeId (); Ptr<const TraceSourceAccessor> accessor = tid.LookupTraceSourceByName (name); if (accessor == 0) { return false; } bool ok = accessor->Connect (this, context, cb); return ok; } bool ObjectBase::TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) { NS_LOG_FUNCTION (this << name << &cb); TypeId tid = GetInstanceTypeId (); Ptr<const TraceSourceAccessor> accessor = tid.LookupTraceSourceByName (name); if (accessor == 0) { return false; } bool ok = accessor->DisconnectWithoutContext (this, cb); return ok; } bool ObjectBase::TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) { NS_LOG_FUNCTION (this << name << context << &cb); TypeId tid = GetInstanceTypeId (); Ptr<const TraceSourceAccessor> accessor = tid.LookupTraceSourceByName (name); if (accessor == 0) { return false; } bool ok = accessor->Disconnect (this, context, cb); return ok; } } // namespace ns3
30.704023
141
0.593262
[ "object" ]
444314cbc9a0615e7ac9359815bd4ef1ec9d11c8
2,696
cpp
C++
src/Interface.cpp
Lw-Cui/Computer-Graphic
c1a6d777b40c250f2449e112255afa72c08b9249
[ "MIT" ]
null
null
null
src/Interface.cpp
Lw-Cui/Computer-Graphic
c1a6d777b40c250f2449e112255afa72c08b9249
[ "MIT" ]
null
null
null
src/Interface.cpp
Lw-Cui/Computer-Graphic
c1a6d777b40c250f2449e112255afa72c08b9249
[ "MIT" ]
null
null
null
#include <iostream> #include <memory> #include <SFML/Graphics.hpp> #include <SFML/Window.hpp> #include <Line.hpp> using namespace std; using namespace sf; using namespace graphics; int main() { // create the window sf::RenderWindow window(sf::VideoMode(800, 600), "Computer Graphics"); std::vector<sf::Vertex> points; std::shared_ptr<graphics::Shape> ptr; sf::Color color = Default; sf::Vector2f lastPosition; while (window.isOpen()) { // check all the window's events that were triggered since the last iteration of the loop sf::Event event; while (window.pollEvent(event)) { // "close requested" event: we close the window if (event.type == sf::Event::Closed) { window.close(); } else if (event.type == sf::Event::MouseButtonPressed) { if (event.mouseButton.button == sf::Mouse::Left) { // A new loop if (color == Default && ptr) ptr = nullptr; lastPosition = sf::Vector2f{static_cast<float>(event.mouseButton.x), static_cast<float>(event.mouseButton.y)}; points.push_back(sf::Vertex{lastPosition, color}); } else if (event.mouseButton.button == sf::Mouse::Right) { if (color == Default && points.size() > 2) { points.push_back(points.front()); ptr = make_shared<Polygon>(points); } else if (color == Default && points.size() == 2) { //ptr = make_shared<Line>(*points.begin(), *++points.begin()); ptr = make_shared<Circle>(*points.begin(), *++points.begin()); } else { points.push_back(points.front()); ptr = ptr->cutBy(points); } if (color == Default) color = Scissor; else color = Default; points.clear(); } } } // clear the window with black color window.clear(sf::Color::White); sf::Vector2f currentPosition{sf::Mouse::getPosition(window)}; if (ptr) { sf::Transform tran = sf::Transform::Identity; if (color == Default) tran.translate(currentPosition - lastPosition); window.draw(*ptr, tran); } for (std::size_t i = 0; i + 1 < points.size(); i++) window.draw(Line(points[i], points[i + 1])); if (!points.empty()) window.draw(Line{points.back(), sf::Vertex{currentPosition, color}}); window.display(); } return 0; }
40.848485
97
0.526706
[ "shape", "vector", "transform" ]
44466844396e4e072932e385a8aed9bbe9190fa4
629
hpp
C++
rnctools/include/StatisticsSimple.hpp
Red9/server-core
da3db0ee76d07e8731b3b67d4e7624b288ffcc67
[ "MIT" ]
null
null
null
rnctools/include/StatisticsSimple.hpp
Red9/server-core
da3db0ee76d07e8731b3b67d4e7624b288ffcc67
[ "MIT" ]
null
null
null
rnctools/include/StatisticsSimple.hpp
Red9/server-core
da3db0ee76d07e8731b3b67d4e7624b288ffcc67
[ "MIT" ]
null
null
null
#include "RNCStreamProcessor.hpp" #include "Sensor.hpp" #include "AxisStatistics.hpp" #include "rapidjson/writer.h" #include "JSONOutput.hpp" #ifndef RED9_SRLM_STATISTICSSIMPLE_HPP__ #define RED9_SRLM_STATISTICSSIMPLE_HPP__ class StatisticsSimple : public RNCStreamProcessor, public JSONOutput { private: Sensor * sensor; AxisStatistics * magnitude; std::vector<AxisStatistics *> axes; public: StatisticsSimple(Sensor * sensor_, bool magnitude_); void process(StreamItem *item); void writeResults(rapidjson::Writer<rapidjson::StringBuffer> &writer); }; #endif // RED9_SRLM_STATISTICSSIMPLE_HPP__
22.464286
74
0.772655
[ "vector" ]
444c633113224aa90180e7eee9e7de295deb0a1d
173
cpp
C++
src/behaviour-tree/tasks/task-idle.cpp
xterminal86/nrogue
1d4e578b3d854b8e4d41f5ba1477de9b2c9e864f
[ "MIT" ]
7
2019-03-05T05:32:13.000Z
2022-01-10T10:06:47.000Z
src/behaviour-tree/tasks/task-idle.cpp
xterminal86/nrogue
1d4e578b3d854b8e4d41f5ba1477de9b2c9e864f
[ "MIT" ]
2
2020-01-19T16:43:51.000Z
2021-12-16T14:54:56.000Z
src/behaviour-tree/tasks/task-idle.cpp
xterminal86/nrogue
1d4e578b3d854b8e4d41f5ba1477de9b2c9e864f
[ "MIT" ]
null
null
null
#include "task-idle.h" #include "game-object.h" BTResult TaskIdle::Run() { //DebugLog("[TaskIdle]\n"); _objectToControl->FinishTurn(); return BTResult::Success; }
13.307692
33
0.676301
[ "object" ]
445069366e4a2795a4631bd92d0b05309d8a32a7
20,665
cc
C++
chromium/ui/gfx/color_analysis.cc
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
27
2016-04-27T01:02:03.000Z
2021-12-13T08:53:19.000Z
chromium/ui/gfx/color_analysis.cc
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
2
2017-03-09T09:00:50.000Z
2017-09-21T15:48:20.000Z
chromium/ui/gfx/color_analysis.cc
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
17
2016-04-27T02:06:39.000Z
2019-12-18T08:07:00.000Z
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/gfx/color_analysis.h" #include <limits.h> #include <stdint.h> #include <algorithm> #include <limits> #include <vector> #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkUnPreMultiply.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/color_utils.h" namespace color_utils { namespace { // RGBA KMean Constants const uint32_t kNumberOfClusters = 4; const int kNumberOfIterations = 50; const HSL kDefaultLowerHSLBound = {-1, -1, 0.15}; const HSL kDefaultUpperHSLBound = {-1, -1, 0.85}; // Background Color Modification Constants const SkColor kDefaultBgColor = SK_ColorWHITE; // Support class to hold information about each cluster of pixel data in // the KMean algorithm. While this class does not contain all of the points // that exist in the cluster, it keeps track of the aggregate sum so it can // compute the new center appropriately. class KMeanCluster { public: KMeanCluster() { Reset(); } void Reset() { centroid_[0] = centroid_[1] = centroid_[2] = 0; aggregate_[0] = aggregate_[1] = aggregate_[2] = 0; counter_ = 0; weight_ = 0; } inline void SetCentroid(uint8_t r, uint8_t g, uint8_t b) { centroid_[0] = r; centroid_[1] = g; centroid_[2] = b; } inline void GetCentroid(uint8_t* r, uint8_t* g, uint8_t* b) { *r = centroid_[0]; *g = centroid_[1]; *b = centroid_[2]; } inline bool IsAtCentroid(uint8_t r, uint8_t g, uint8_t b) { return r == centroid_[0] && g == centroid_[1] && b == centroid_[2]; } // Recomputes the centroid of the cluster based on the aggregate data. The // number of points used to calculate this center is stored for weighting // purposes. The aggregate and counter are then cleared to be ready for the // next iteration. inline void RecomputeCentroid() { if (counter_ > 0) { centroid_[0] = static_cast<uint8_t>(aggregate_[0] / counter_); centroid_[1] = static_cast<uint8_t>(aggregate_[1] / counter_); centroid_[2] = static_cast<uint8_t>(aggregate_[2] / counter_); aggregate_[0] = aggregate_[1] = aggregate_[2] = 0; weight_ = counter_; counter_ = 0; } } inline void AddPoint(uint8_t r, uint8_t g, uint8_t b) { aggregate_[0] += r; aggregate_[1] += g; aggregate_[2] += b; ++counter_; } // Just returns the distance^2. Since we are comparing relative distances // there is no need to perform the expensive sqrt() operation. inline uint32_t GetDistanceSqr(uint8_t r, uint8_t g, uint8_t b) { return (r - centroid_[0]) * (r - centroid_[0]) + (g - centroid_[1]) * (g - centroid_[1]) + (b - centroid_[2]) * (b - centroid_[2]); } // In order to determine if we have hit convergence or not we need to see // if the centroid of the cluster has moved. This determines whether or // not the centroid is the same as the aggregate sum of points that will be // used to generate the next centroid. inline bool CompareCentroidWithAggregate() { if (counter_ == 0) return false; return aggregate_[0] / counter_ == centroid_[0] && aggregate_[1] / counter_ == centroid_[1] && aggregate_[2] / counter_ == centroid_[2]; } // Returns the previous counter, which is used to determine the weight // of the cluster for sorting. inline uint32_t GetWeight() const { return weight_; } static bool SortKMeanClusterByWeight(const KMeanCluster& a, const KMeanCluster& b) { return a.GetWeight() > b.GetWeight(); } private: uint8_t centroid_[3]; // Holds the sum of all the points that make up this cluster. Used to // generate the next centroid as well as to check for convergence. uint32_t aggregate_[3]; uint32_t counter_; // The weight of the cluster, determined by how many points were used // to generate the previous centroid. uint32_t weight_; }; // Un-premultiplies each pixel in |bitmap| into an output |buffer|. Requires // approximately 10 microseconds for a 16x16 icon on an Intel Core i5. void UnPreMultiply(const SkBitmap& bitmap, uint32_t* buffer, int buffer_size) { SkAutoLockPixels auto_lock(bitmap); uint32_t* in = static_cast<uint32_t*>(bitmap.getPixels()); uint32_t* out = buffer; int pixel_count = std::min(bitmap.width() * bitmap.height(), buffer_size); for (int i = 0; i < pixel_count; ++i) *out++ = SkUnPreMultiply::PMColorToColor(*in++); } } // namespace KMeanImageSampler::KMeanImageSampler() { } KMeanImageSampler::~KMeanImageSampler() { } GridSampler::GridSampler() : calls_(0) { } GridSampler::~GridSampler() { } int GridSampler::GetSample(int width, int height) { // Hand-drawn bitmaps often have special outlines or feathering at the edges. // Start our sampling inset from the top and left edges. For example, a 10x10 // image with 4 clusters would be sampled like this: // .......... // .0.4.8.... // .......... // .1.5.9.... // .......... // .2.6...... // .......... // .3.7...... // .......... const int kPadX = 1; const int kPadY = 1; int x = kPadX + (calls_ / kNumberOfClusters) * ((width - 2 * kPadX) / kNumberOfClusters); int y = kPadY + (calls_ % kNumberOfClusters) * ((height - 2 * kPadY) / kNumberOfClusters); int index = x + (y * width); ++calls_; return index % (width * height); } SkColor FindClosestColor(const uint8_t* image, int width, int height, SkColor color) { uint8_t in_r = SkColorGetR(color); uint8_t in_g = SkColorGetG(color); uint8_t in_b = SkColorGetB(color); // Search using distance-squared to avoid expensive sqrt() operations. int best_distance_squared = std::numeric_limits<int32_t>::max(); SkColor best_color = color; const uint8_t* byte = image; for (int i = 0; i < width * height; ++i) { uint8_t b = *(byte++); uint8_t g = *(byte++); uint8_t r = *(byte++); uint8_t a = *(byte++); // Ignore fully transparent pixels. if (a == 0) continue; int distance_squared = (in_b - b) * (in_b - b) + (in_g - g) * (in_g - g) + (in_r - r) * (in_r - r); if (distance_squared < best_distance_squared) { best_distance_squared = distance_squared; best_color = SkColorSetRGB(r, g, b); } } return best_color; } // For a 16x16 icon on an Intel Core i5 this function takes approximately // 0.5 ms to run. // TODO(port): This code assumes the CPU architecture is little-endian. SkColor CalculateKMeanColorOfBuffer(uint8_t* decoded_data, int img_width, int img_height, const HSL& lower_bound, const HSL& upper_bound, KMeanImageSampler* sampler) { SkColor color = kDefaultBgColor; if (img_width > 0 && img_height > 0) { std::vector<KMeanCluster> clusters; clusters.resize(kNumberOfClusters, KMeanCluster()); // Pick a starting point for each cluster std::vector<KMeanCluster>::iterator cluster = clusters.begin(); while (cluster != clusters.end()) { // Try up to 10 times to find a unique color. If no unique color can be // found, destroy this cluster. bool color_unique = false; for (int i = 0; i < 10; ++i) { int pixel_pos = sampler->GetSample(img_width, img_height) % (img_width * img_height); uint8_t b = decoded_data[pixel_pos * 4]; uint8_t g = decoded_data[pixel_pos * 4 + 1]; uint8_t r = decoded_data[pixel_pos * 4 + 2]; uint8_t a = decoded_data[pixel_pos * 4 + 3]; // Skip fully transparent pixels as they usually contain black in their // RGB channels but do not contribute to the visual image. if (a == 0) continue; // Loop through the previous clusters and check to see if we have seen // this color before. color_unique = true; for (std::vector<KMeanCluster>::iterator cluster_check = clusters.begin(); cluster_check != cluster; ++cluster_check) { if (cluster_check->IsAtCentroid(r, g, b)) { color_unique = false; break; } } // If we have a unique color set the center of the cluster to // that color. if (color_unique) { cluster->SetCentroid(r, g, b); break; } } // If we don't have a unique color erase this cluster. if (!color_unique) { cluster = clusters.erase(cluster); } else { // Have to increment the iterator here, otherwise the increment in the // for loop will skip a cluster due to the erase if the color wasn't // unique. ++cluster; } } // If all pixels in the image are transparent we will have no clusters. if (clusters.empty()) return color; bool convergence = false; for (int iteration = 0; iteration < kNumberOfIterations && !convergence; ++iteration) { // Loop through each pixel so we can place it in the appropriate cluster. uint8_t* pixel = decoded_data; uint8_t* decoded_data_end = decoded_data + (img_width * img_height * 4); while (pixel < decoded_data_end) { uint8_t b = *(pixel++); uint8_t g = *(pixel++); uint8_t r = *(pixel++); uint8_t a = *(pixel++); // Skip transparent pixels, see above. if (a == 0) continue; uint32_t distance_sqr_to_closest_cluster = UINT_MAX; std::vector<KMeanCluster>::iterator closest_cluster = clusters.begin(); // Figure out which cluster this color is closest to in RGB space. for (std::vector<KMeanCluster>::iterator cluster = clusters.begin(); cluster != clusters.end(); ++cluster) { uint32_t distance_sqr = cluster->GetDistanceSqr(r, g, b); if (distance_sqr < distance_sqr_to_closest_cluster) { distance_sqr_to_closest_cluster = distance_sqr; closest_cluster = cluster; } } closest_cluster->AddPoint(r, g, b); } // Calculate the new cluster centers and see if we've converged or not. convergence = true; for (std::vector<KMeanCluster>::iterator cluster = clusters.begin(); cluster != clusters.end(); ++cluster) { convergence &= cluster->CompareCentroidWithAggregate(); cluster->RecomputeCentroid(); } } // Sort the clusters by population so we can tell what the most popular // color is. std::sort(clusters.begin(), clusters.end(), KMeanCluster::SortKMeanClusterByWeight); // Loop through the clusters to figure out which cluster has an appropriate // color. Skip any that are too bright/dark and go in order of weight. for (std::vector<KMeanCluster>::iterator cluster = clusters.begin(); cluster != clusters.end(); ++cluster) { uint8_t r, g, b; cluster->GetCentroid(&r, &g, &b); SkColor current_color = SkColorSetARGB(SK_AlphaOPAQUE, r, g, b); HSL hsl; SkColorToHSL(current_color, &hsl); if (IsWithinHSLRange(hsl, lower_bound, upper_bound)) { // If we found a valid color just set it and break. We don't want to // check the other ones. color = current_color; break; } else if (cluster == clusters.begin()) { // We haven't found a valid color, but we are at the first color so // set the color anyway to make sure we at least have a value here. color = current_color; } } } // Find a color that actually appears in the image (the K-mean cluster center // will not usually be a color that appears in the image). return FindClosestColor(decoded_data, img_width, img_height, color); } SkColor CalculateKMeanColorOfPNG(scoped_refptr<base::RefCountedMemory> png, const HSL& lower_bound, const HSL& upper_bound, KMeanImageSampler* sampler) { int img_width = 0; int img_height = 0; std::vector<uint8_t> decoded_data; SkColor color = kDefaultBgColor; if (png.get() && png->size() && gfx::PNGCodec::Decode(png->front(), png->size(), gfx::PNGCodec::FORMAT_BGRA, &decoded_data, &img_width, &img_height)) { return CalculateKMeanColorOfBuffer(&decoded_data[0], img_width, img_height, lower_bound, upper_bound, sampler); } return color; } SkColor CalculateKMeanColorOfPNG(scoped_refptr<base::RefCountedMemory> png) { GridSampler sampler; return CalculateKMeanColorOfPNG( png, kDefaultLowerHSLBound, kDefaultUpperHSLBound, &sampler); } SkColor CalculateKMeanColorOfBitmap(const SkBitmap& bitmap, const HSL& lower_bound, const HSL& upper_bound, KMeanImageSampler* sampler) { // SkBitmap uses pre-multiplied alpha but the KMean clustering function // above uses non-pre-multiplied alpha. Transform the bitmap before we // analyze it because the function reads each pixel multiple times. int pixel_count = bitmap.width() * bitmap.height(); scoped_ptr<uint32_t[]> image(new uint32_t[pixel_count]); UnPreMultiply(bitmap, image.get(), pixel_count); return CalculateKMeanColorOfBuffer(reinterpret_cast<uint8_t*>(image.get()), bitmap.width(), bitmap.height(), lower_bound, upper_bound, sampler); } SkColor CalculateKMeanColorOfBitmap(const SkBitmap& bitmap) { GridSampler sampler; return CalculateKMeanColorOfBitmap( bitmap, kDefaultLowerHSLBound, kDefaultUpperHSLBound, &sampler); } gfx::Matrix3F ComputeColorCovariance(const SkBitmap& bitmap) { // First need basic stats to normalize each channel separately. SkAutoLockPixels bitmap_lock(bitmap); gfx::Matrix3F covariance = gfx::Matrix3F::Zeros(); if (!bitmap.getPixels()) return covariance; // Assume ARGB_8888 format. DCHECK(bitmap.colorType() == kN32_SkColorType); int64_t r_sum = 0; int64_t g_sum = 0; int64_t b_sum = 0; int64_t rr_sum = 0; int64_t gg_sum = 0; int64_t bb_sum = 0; int64_t rg_sum = 0; int64_t rb_sum = 0; int64_t gb_sum = 0; for (int y = 0; y < bitmap.height(); ++y) { SkPMColor* current_color = static_cast<uint32_t*>(bitmap.getAddr32(0, y)); for (int x = 0; x < bitmap.width(); ++x, ++current_color) { SkColor c = SkUnPreMultiply::PMColorToColor(*current_color); SkColor r = SkColorGetR(c); SkColor g = SkColorGetG(c); SkColor b = SkColorGetB(c); r_sum += r; g_sum += g; b_sum += b; rr_sum += r * r; gg_sum += g * g; bb_sum += b * b; rg_sum += r * g; rb_sum += r * b; gb_sum += g * b; } } // Covariance (not normalized) is E(X*X.t) - m * m.t and this is how it // is calculated below. // Each row below represents a row of the matrix describing (co)variances // of R, G and B channels with (R, G, B) int pixel_n = bitmap.width() * bitmap.height(); covariance.set( static_cast<float>( static_cast<double>(rr_sum) / pixel_n - static_cast<double>(r_sum * r_sum) / pixel_n / pixel_n), static_cast<float>( static_cast<double>(rg_sum) / pixel_n - static_cast<double>(r_sum * g_sum) / pixel_n / pixel_n), static_cast<float>( static_cast<double>(rb_sum) / pixel_n - static_cast<double>(r_sum * b_sum) / pixel_n / pixel_n), static_cast<float>( static_cast<double>(rg_sum) / pixel_n - static_cast<double>(r_sum * g_sum) / pixel_n / pixel_n), static_cast<float>( static_cast<double>(gg_sum) / pixel_n - static_cast<double>(g_sum * g_sum) / pixel_n / pixel_n), static_cast<float>( static_cast<double>(gb_sum) / pixel_n - static_cast<double>(g_sum * b_sum) / pixel_n / pixel_n), static_cast<float>( static_cast<double>(rb_sum) / pixel_n - static_cast<double>(r_sum * b_sum) / pixel_n / pixel_n), static_cast<float>( static_cast<double>(gb_sum) / pixel_n - static_cast<double>(g_sum * b_sum) / pixel_n / pixel_n), static_cast<float>( static_cast<double>(bb_sum) / pixel_n - static_cast<double>(b_sum * b_sum) / pixel_n / pixel_n)); return covariance; } bool ApplyColorReduction(const SkBitmap& source_bitmap, const gfx::Vector3dF& color_transform, bool fit_to_range, SkBitmap* target_bitmap) { DCHECK(target_bitmap); SkAutoLockPixels source_lock(source_bitmap); SkAutoLockPixels target_lock(*target_bitmap); DCHECK(source_bitmap.getPixels()); DCHECK(target_bitmap->getPixels()); DCHECK_EQ(kN32_SkColorType, source_bitmap.colorType()); DCHECK_EQ(kAlpha_8_SkColorType, target_bitmap->colorType()); DCHECK_EQ(source_bitmap.height(), target_bitmap->height()); DCHECK_EQ(source_bitmap.width(), target_bitmap->width()); DCHECK(!source_bitmap.empty()); // Elements of color_transform are explicitly off-loaded to local values for // efficiency reasons. Note that in practice images may correspond to entire // tab captures. float t0 = 0.0; float tr = color_transform.x(); float tg = color_transform.y(); float tb = color_transform.z(); if (fit_to_range) { // We will figure out min/max in a preprocessing step and adjust // actual_transform as required. float max_val = std::numeric_limits<float>::min(); float min_val = std::numeric_limits<float>::max(); for (int y = 0; y < source_bitmap.height(); ++y) { const SkPMColor* source_color_row = static_cast<SkPMColor*>( source_bitmap.getAddr32(0, y)); for (int x = 0; x < source_bitmap.width(); ++x) { SkColor c = SkUnPreMultiply::PMColorToColor(source_color_row[x]); uint8_t r = SkColorGetR(c); uint8_t g = SkColorGetG(c); uint8_t b = SkColorGetB(c); float gray_level = tr * r + tg * g + tb * b; max_val = std::max(max_val, gray_level); min_val = std::min(min_val, gray_level); } } // Adjust the transform so that the result is scaling. float scale = 0.0; t0 = -min_val; if (max_val > min_val) scale = 255.0f / (max_val - min_val); t0 *= scale; tr *= scale; tg *= scale; tb *= scale; } for (int y = 0; y < source_bitmap.height(); ++y) { const SkPMColor* source_color_row = static_cast<SkPMColor*>( source_bitmap.getAddr32(0, y)); uint8_t* target_color_row = target_bitmap->getAddr8(0, y); for (int x = 0; x < source_bitmap.width(); ++x) { SkColor c = SkUnPreMultiply::PMColorToColor(source_color_row[x]); uint8_t r = SkColorGetR(c); uint8_t g = SkColorGetG(c); uint8_t b = SkColorGetB(c); float gl = t0 + tr * r + tg * g + tb * b; if (gl < 0) gl = 0; if (gl > 0xFF) gl = 0xFF; target_color_row[x] = static_cast<uint8_t>(gl); } } return true; } bool ComputePrincipalComponentImage(const SkBitmap& source_bitmap, SkBitmap* target_bitmap) { if (!target_bitmap) { NOTREACHED(); return false; } gfx::Matrix3F covariance = ComputeColorCovariance(source_bitmap); gfx::Matrix3F eigenvectors = gfx::Matrix3F::Zeros(); gfx::Vector3dF eigenvals = covariance.SolveEigenproblem(&eigenvectors); gfx::Vector3dF principal = eigenvectors.get_column(0); if (eigenvals == gfx::Vector3dF() || principal == gfx::Vector3dF()) return false; // This may happen for some edge cases. return ApplyColorReduction(source_bitmap, principal, true, target_bitmap); } } // color_utils
35.264505
80
0.61713
[ "vector", "transform" ]
445196e43d713d0216839dfe8d3c520e29ba210e
2,626
cpp
C++
src/wamr/codegen.cpp
faasm/faasm
bc8f4cac582a159166d7368fa751ac55b670d33c
[ "Apache-2.0" ]
278
2020-10-01T16:37:06.000Z
2022-03-31T07:06:01.000Z
src/wamr/codegen.cpp
faasm/faasm
bc8f4cac582a159166d7368fa751ac55b670d33c
[ "Apache-2.0" ]
78
2020-10-01T18:46:16.000Z
2022-03-18T15:39:03.000Z
src/wamr/codegen.cpp
faasm/faasm
bc8f4cac582a159166d7368fa751ac55b670d33c
[ "Apache-2.0" ]
24
2020-10-21T18:45:48.000Z
2022-03-26T08:59:41.000Z
#include <faabric/util/files.h> #include <faabric/util/logging.h> #include <wamr/WAMRWasmModule.h> #include <boost/filesystem.hpp> #include <boost/filesystem/operations.hpp> #include <stdexcept> #include <aot_export.h> #include <wasm_export.h> namespace wasm { std::vector<uint8_t> wamrCodegen(std::vector<uint8_t>& wasmBytes, bool isSgx) { // Make sure WAMR is initialised WAMRWasmModule::initialiseWAMRGlobally(); if (!faabric::util::isWasm(wasmBytes)) { throw std::runtime_error("File is not a wasm binary"); } // Load the module char errorBuffer[128]; wasm_module_t wasmModule = wasm_runtime_load( wasmBytes.data(), wasmBytes.size(), errorBuffer, sizeof(errorBuffer)); if (wasmModule == nullptr) { SPDLOG_ERROR("Failed to import module: {}", errorBuffer); throw std::runtime_error("Failed to load module"); } aot_comp_data_t compileData = aot_create_comp_data(wasmModule); if (compileData == nullptr) { SPDLOG_ERROR("Failed to generat AOT data: {}", aot_get_last_error()); throw std::runtime_error("Failed to generate AOT data"); } AOTCompOption option = { 0 }; option.opt_level = 3; option.size_level = 3; option.output_format = AOT_FORMAT_FILE; option.bounds_checks = 2; if (isSgx) { option.size_level = 1; option.is_sgx_platform = true; } aot_comp_context_t compileContext = aot_create_comp_context(compileData, &option); if (compileContext == nullptr) { SPDLOG_ERROR("Failed to generat AOT context: {}", aot_get_last_error()); throw std::runtime_error("Failed to generate AOT context"); } bool compileSuccess = aot_compile_wasm(compileContext); if (!compileSuccess) { SPDLOG_ERROR("Failed to run codegen on wasm: {}", aot_get_last_error()); throw std::runtime_error("Failed to run codegen"); } // TODO - avoid using a temp file here // Note - WAMR doesn't let us generate an array of bytes, so we have to // write to a temp file, then load the bytes again boost::filesystem::path temp = boost::filesystem::unique_path(); bool aotSuccess = aot_emit_aot_file(compileContext, compileData, temp.c_str()); if (!aotSuccess) { SPDLOG_ERROR("Failed to write AOT file to {}", temp.string()); throw std::runtime_error("Failed to emit AOT file"); } // Read object bytes back in std::vector<uint8_t> objBytes = faabric::util::readFileToBytes(temp.c_str()); // Delete the file boost::filesystem::remove(temp.c_str()); return objBytes; } }
31.261905
80
0.671363
[ "object", "vector" ]
44525eb52df3c46981444448644293bdac81e4a4
23,463
cpp
C++
codec/h264_enc/src/umc_h264_tables.cpp
viticm/ipp-media
1d942e8b04ce1e4e02787e2f451b2091061e1b4d
[ "MIT" ]
1
2022-03-02T20:23:13.000Z
2022-03-02T20:23:13.000Z
codec/h264_enc/src/umc_h264_tables.cpp
viticm/ipp-media
1d942e8b04ce1e4e02787e2f451b2091061e1b4d
[ "MIT" ]
null
null
null
codec/h264_enc/src/umc_h264_tables.cpp
viticm/ipp-media
1d942e8b04ce1e4e02787e2f451b2091061e1b4d
[ "MIT" ]
null
null
null
// // INTEL CORPORATION PROPRIETARY INFORMATION // This software is supplied under the terms of a license agreement or // nondisclosure agreement with Intel Corporation and may not be copied // or disclosed except in accordance with the terms of that agreement. // Copyright (c) 2004 - 2012 Intel Corporation. All Rights Reserved. // #include "umc_config.h" #ifdef UMC_ENABLE_H264_VIDEO_ENCODER #include "umc_h264_tables.h" const Ipp8u EdgePelCountTable [52] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4 }; const Ipp8u EdgePelDiffTable [52] = { 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,10,10,11,12,13,14,15,16,17,18,19,20,21 // QP/2 //0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25 // QP/3 //0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8,9,9,9,10,10,10,11,11,11,12,12,12,13,13,13,14,14,14,15,15,15,16,16,16,17 // QP/4 //0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12 }; const Ipp32s QP_DIV_6[88] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14 }; const Ipp32s QP_MOD_6[88] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3 }; const Ipp16s MAX_PIX_VALUE[5] = { 255, 511, 1023, 2047, 4095}; const Ipp8u block_subblock_mapping_[16] = {0,1,4,5,2,3,6,7,8,9,12,13,10,11,14,15}; const Ipp8u xoff[16] = {0,4,0,4,8,12,8,12,0,4,0, 4, 8,12, 8,12}; const Ipp8u yoff[16] = {0,0,4,4,0, 0,4,4, 8,8,12,12,8, 8,12,12}; // Offset for 8x8 blocks const Ipp8u xoff8[4] = {0,8,0,8}; const Ipp8u yoff8[4] = {0,0,8,8}; // Offset for 16x16 block const Ipp8u yoff16[1] = {0}; // Offsets to advance from one luma subblock to the next, using 8x8 // block ordering of subblocks (ie, subblocks 0..3 are the subblocks // in 8x8 block 0. Table is indexed by current subblock, containing a // pair of values for each. The first value is the x offset to be added, // the second value is the pitch multiplier to use to add the y offset. const Ipp8s xyoff_[16][2] = { {4,0},{-4,4},{4,0},{4,-4}, {4,0},{-4,4},{4,0},{-12,4}, {4,0},{-4,4},{4,0},{4,-4}, {4,0},{-4,4},{4,0},{-12,4} }; ////////////////////////////////////////////////////////// // scan matrices, for Run Length Encoding const Ipp16u bit_index_mask[16] = { 0xfffe, 0xfffd, 0xfffb, 0xfff7, 0xffef, 0xffdf, 0xffbf, 0xff7f, 0xfeff, 0xfdff, 0xfbff, 0xf7ff, 0xefff, 0xdfff, 0xbfff, 0x7fff }; // chroma QP mapping const Ipp8u QPtoChromaQP[52] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21,22,23,24,25,26,27,28,29,29,30,31,32,32,33, 34,34,35,35,36,36,37,37,37,38,38,38,39,39,39,39}; // 4x4 coded block CBP flags/masks const Ipp32u CBP4x4Mask[32] = { 0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010, 0x00000020, 0x00000040, 0x00000080, 0x00000100, 0x00000200, 0x00000400, 0x00000800, 0x00001000, 0x00002000, 0x00004000, 0x00008000, 0x00010000, 0x00020000, 0x00040000, 0x00080000, 0x00100000, 0x00200000, 0x00400000, 0x00800000, 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, }; // 8x8 coded block CBP flags/masks const Ipp32u CBP8x8Mask[12] = { 0x00000f, 0x0000f0, 0x000f00, 0x00f000, 0x010000, 0x020000, 0x040000, 0x080000, 0x100000, 0x200000, 0x400000, 0x800000, }; //////////////////////////////////////////////////////// // Mappings from block number in loop to 8x8 block number const Ipp8u subblock_block_ss[24] = {0,0,1,1,0,0,1,1,2,2,3,3,2,2,3,3, /*luma*/ 4,4,4,4,5,5,5,5/*chroma*/}; const Ipp8u subblock_block_ds[32] = {0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,2,2,2,2,3,3,3,3}; // Mapping from block number in loop to 8x8 block number const Ipp8u subblock_block_mapping[16] = {0,0,1,1,0,0,1,1,2,2,3,3,2,2,3,3}; // chroma block re-mapping const Ipp8u subblock_block_chroma[8] = {4,4,4,4,5,5,5,5}; // Mapping from chroma block number to luma block number where the vector // to be used for chroma can be found const Ipp8u chroma_block_address[4] = {0,2,8,10}; // Table used to prevent single or 'expensive' coefficients are coded const Ipp8u coeff_importance[16] = {3,2,2,1,1,1,0,0,0,0,0,0,0,0,0,0}; const Ipp8u coeff_importance8x8[64] = {3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1, 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; const Ipp32s COEFF_BLOCK_THRESHOLD = 3; const Ipp32s COEFF_MB_THRESHOLD = 5; // The purpose of the thresholds is to prevent that single or // 'expensive' coefficients are coded. With 4x4 transform there is // larger chance that a single coefficient in a 8x8 or 16x16 block // may be nonzero. A single small (level=1) coefficient in a 8x8 block // will cost in bits: 3 or more bits for the coefficient, 4 bits for // EOBs for the 4x4 blocks, possibly also more bits for CBP. Hence // the total 'cost' of that single coefficient will typically be 10-12 // bits which in a RD consideration is too much to justify the Distortion // improvement. The action below is to watch such 'single' coefficients // and set the reconstructed block equal to the prediction according to // a given criterium. The action is taken only for inter blocks. Action // is taken only for luma blocks. Notice that this is a pure encoder issue // and hence does not have any implication on the standard. // i22 is a parameter set in dct4 and accumulated for each 8x8 block. // If level=1 for a coefficient, i22 is increased by a number depending // on RUN for that coefficient. The numbers are (see also dct4): // 3,2,2,1,1,1,0,0,... when RUN equals 0,1,2,3,4,5,6, etc. // If level >1 i22 is increased by 9 (or any number above 3). // The threshold is set to 3. This means for example: // 1: If there is one coefficient with (RUN,level)=(0,1) in a // 8x8 block this coefficient is discarded. // 2: If there are two coefficients with (RUN,level)=(1,1) and // (4,1) the coefficients are also discarded // i33 is the accumulation of i22 over a whole macroblock. If i33 is // 5 or less for the whole MB, all nonzero coefficients are discarded // for the MB and the reconstructed block is set equal to the prediction. // // Search for i22 and i33 to see how the thresholds are used // Encoder tables for coefficient encoding const Ipp8u enc_levrun_inter[16] = {4,2,2,1,1,1,1,1,1,1,0,0,0,0,0,0}; const Ipp8u enc_levrun_intra[8] = {9,3,1,1,1,0,0,0}; const Ipp8u enc_ntab_inter[10][4] = { { 1, 7,15,29}, { 3,17, 0, 0}, { 5,19, 0, 0}, { 9, 0, 0, 0}, {11, 0, 0, 0}, {13, 0, 0, 0}, {21, 0, 0, 0}, {23, 0, 0, 0}, {25, 0, 0, 0}, {27, 0, 0, 0}, }; const Ipp8u enc_ntab_intra[5][9] = { { 1, 5, 9,11,13,23,25,27,29}, { 3,19,21, 0, 0, 0, 0, 0, 0}, { 7, 0, 0, 0, 0, 0, 0, 0, 0}, {15, 0, 0, 0, 0, 0, 0, 0, 0}, {17, 0, 0, 0, 0, 0, 0, 0, 0} }; const Ipp8u enc_ntab_cDC[2][2] = { {1,3}, {5,0} }; const Ipp8u enc_levrun_cDC[4] = { 2,1,0,0 }; //////////////////////////////////////////////////////////////////// // Translation from block number in chroma loop to // actual chroma block number const Ipp8u block_trans[8] = {16,17,18,19,20,21,22,23}; ///////////////////////////////////////////////////////////////////// // RD multiplier (Lagrange factor) // Smoothed P frame version const Ipp16u rd_quant[52] = { 13, 13, 13, 14, 18, 21, 23, 26, 28, 29, 29, 29, 29, 29, 29, 32, 34, 36, 38, 39, 39, 40, 42, 43, 43, 44, 46, 48, 50, 52, 56, 62, 74, 86, 86, 99, 111, 111, 119, 133, 148, 153, 165, 176, 188, 202, 232, 248, 314, 347, 384, 453 }; const Ipp16u rd_quant_intra[52] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 7, 12, 14, 26, 46, 54, 65, 74, 95, 103, 115, 123, 182, 224, 275, 314, 409, 423, 423, 516, 588, 692, 898, 1021, 1125, 1365, 1410, 2006, 2590, 2590, 5395, 5395, 7185, 9268, 11951, 14010 }; const Ipp16u rd_quant_intra_min[52] = { 25, 44, 49, 49, 113, 144, 106, 188, 129, 135, 263, 247, 290, 151, 121, 175, 234, 329, 356, 484, 501, 529, 685, 714, 795, 719, 649, 761, 804, 990, 1210, 1206, 1805, 1744, 1488, 1731, 1404, 1138, 2060, 2768, 3139, 3294, 3284, 3628, 4008, 4205, 4645, 7605, 8485, 28887, 32000, 32000 }; // empty threshold tables // All 4x4 blocks of a 16x16 block with a SAD below this // QP-dependent threshold will be classified as empty. const Ipp32s EmptyThreshold[52] = { 3, 4, 20, 26, 31, 41, 47, 59, 71, 77, 86, 95, 103, 104, 106, 107, 127, 134, 141, 167, 185, 198, 205, 212, 234, 294, 304, 314, 325, 335, 346, 357, 409, 461, 540, 653, 741, 765, 790, 815, 840, 1045, 1259, 1340, 1556, 1772, 2006, 2069, 2102, 2134, 2569, 3290 }; const IppiSize size16x16={16,16}; const IppiSize size16x8={16,8}; const IppiSize size8x16={8,16}; const IppiSize size8x8={8,8}; const IppiSize size8x4={8,4}; const IppiSize size4x8={4,8}; const IppiSize size4x4={4,4}; const IppiSize size4x2={4,2}; const IppiSize size2x4={2,4}; const IppiSize size2x2={2,2}; // Tuned for Stuart & MIB const Ipp32u DirectBSkipMEThres[52] = { 4, 4, 5, 13, 14, 14, 21, 26, 26, 29, 31, 33, 35, 35, 37, 37, 39, 47, 47, 47, 82, 88, 106, 131, 141, 186, 214, 214, 214, 221, 262, 310, 332, 332, 343, 510, 510, 601, 780, 860, 1043, 1225, 1306, 1533, 1533, 1635, 1859, 1859, 2045, 2180, 2180, 2251 }; // Not Tuned!!! const Ipp32u PSkipMEThres[52] = { 1, 1, 1, 1, 1, 2, 3, 3, 5, 7, 9, 12, 16, 16, 19, 23, 28, 35, 43, 52, 63, 76, 86, 97, 110, 107, 116, 125, 134, 147, 167, 189, 215, 265, 310, 362, 424, 496, 563, 639, 725, 756, 901, 1079, 1299, 1573, 1914, 2341, 2876, 5356, 6866, 8800 }; const Ipp32s BestOf5EarlyExitThres[52] = { 38, 38, 38, 38, 38, 38, 38, 38, 38, 46, 46, 46, 50, 50, 50, 50, 60, 60, 60, 68, 68, 68, 68, 68, 68, 71, 95, 95, 95, 107, 153, 176, 176, 176, 202, 209, 209, 284, 294, 314, 359, 371, 383, 383, 396, 452, 516, 533, 628, 739, 841, 1020 }; // Tables used for finding if a luma block is on the edge // of a macroblock. JVT CD block order // tab4, indexed by 8x8 block const Ipp8u left_edge_tab4_[4] = {1,0,1,0}; const Ipp8u top_edge_tab4_[4] = {1,1,0,0}; const Ipp8u right_edge_tab4[4] = {0,1,0,1}; // tab16, indexed by 4x4 subblock const Ipp8u left_edge_tab16_[16] = {1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0}; const Ipp8u top_edge_tab16_[16] = {1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0}; const Ipp8u right_edge_tab16[16] = {0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1}; // 8x4 and 4x8 tables, indexed by [8x8block*4 + subblock] const Ipp8u left_edge_tab16_8x4[16] = {1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0}; const Ipp8u top_edge_tab16_8x4[16] = {1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0}; const Ipp8u right_edge_tab16_8x4[16] = {0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0}; const Ipp8u left_edge_tab16_4x8[16] = {1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0}; const Ipp8u top_edge_tab16_4x8[16] = {1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0}; const Ipp8u right_edge_tab16_4x8[16] = {0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0}; // Tables for MV prediction to find if upper right predictor is // available, indexed by [8x8block*4 + subblock] const Ipp8u above_right_avail_8x4[16] = {0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0}; const Ipp8u above_right_avail_4x8[16] = {0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0}; // Table for 4x4 intra prediction to find if a subblock can use predictors // from above right. Also used for motion vector prediction availability. // JVT CD block order. const Ipp8u above_right_avail_4x4_[16] = {1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0}; const Ipp8u above_right_avail_4x4_lin[16] = { 1,1,1,1, 1,0,1,0, 1,1,1,0, 1,0,1,0 }; // Table for 4x4 intra prediction to find if a subblock can use predictors // from below left. JVT CD block order. const Ipp8u intra4x4_below_left_avail[16] = {1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0}; // chroma vector mapping const Ipp8u c2x2m[4][4] = {{0,0,1,1},{0,0,1,1},{2,2,3,3},{2,2,3,3}}; ////////////////////////////////////////////////////////// // scan matrices Ipp32s dec_single_scan[2][16] = { {0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15}, {0,4,1,8,12,5,9,13,2,6,10,14,3,7,11,15} }; const Ipp32s dec_single_scan_p[4] = {0,1,2,3}; const Ipp32s dec_single_scan_p422[8] = {0,2,1,4,6,3,5,7}; Ipp16s enc_single_scan[2][16] = { {0,1,5,6,2,4,7,12,3,8,11,13,9,10,14,15}, {0,2,8,12,1,5,9,13,3,6,10,14,4,7,11,15} }; const Ipp32s dec_single_scan_8x8[2][64] = { {0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63}, {0, 8, 16, 1, 9, 24, 32, 17, 2, 25, 40, 48, 56, 33, 10, 3, 18, 41, 49, 57, 26, 11, 4, 19, 34, 42, 50, 58, 27, 12, 5, 20, 35, 43, 51, 59, 28, 13, 6, 21, 36, 44, 52, 60, 29, 14, 22, 37, 45, 53, 61, 30, 7, 15, 38, 46, 54, 62, 23, 31, 39, 47, 55, 63} }; Ipp16s enc_single_scan_8x8[2][64] = { { 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63}, { 0, 3, 8, 15, 22, 30, 38, 52, 1, 4, 14, 21, 29, 37, 45, 53, 2, 7, 16, 23, 31, 39, 46, 58, 5, 9, 20, 28, 36, 44, 51, 59, 6, 13, 24, 32, 40, 47, 54, 60, 10, 17, 25, 33, 41, 48, 55, 61, 11, 18, 26, 34, 42, 49, 56, 62, 12, 19, 27, 35, 43, 50, 57, 63} }; const Ipp32s gc_Zeroes[8*8] = { 0 }; const Ipp8u MbPartWidth[NUMBER_OF_MBTYPES] = { 16, // MBTYPE_INTRA 16, // MBTYPE_INTRA_16x16 = 1, 16, // MBTYPE_PCM = 2, // Raw Pixel Coding, qualifies as a INTRA type... 16, // MBTYPE_INTER = 3, // 16x16 16, // MBTYPE_INTER_16x8 = 4, 8, // MBTYPE_INTER_8x16 = 5, 8, // MBTYPE_INTER_8x8 = 6, 8, // MBTYPE_INTER_8x8_REF0 = 7, // same as MBTYPE_INTER_8x8, with all RefIdx=0 16, // MBTYPE_FORWARD = 8, 16, // MBTYPE_BACKWARD = 9, 16, // MBTYPE_SKIPPED = 10, 16, // MBTYPE_DIRECT = 11, 16, // MBTYPE_BIDIR = 12, 16, // MBTYPE_FWD_FWD_16x8 = 13, 8, // MBTYPE_FWD_FWD_8x16 = 14, 16, // MBTYPE_BWD_BWD_16x8 = 15, 8, // MBTYPE_BWD_BWD_8x16 = 16, 16, // MBTYPE_FWD_BWD_16x8 = 17, 8, // MBTYPE_FWD_BWD_8x16 = 18, 16, // MBTYPE_BWD_FWD_16x8 = 19, 8, // MBTYPE_BWD_FWD_8x16 = 20, 16, // MBTYPE_BIDIR_FWD_16x8 = 21, 8, // MBTYPE_BIDIR_FWD_8x16 = 22, 16, // MBTYPE_BIDIR_BWD_16x8 = 23, 8, // MBTYPE_BIDIR_BWD_8x16 = 24, 16, // MBTYPE_FWD_BIDIR_16x8 = 25, 8, // MBTYPE_FWD_BIDIR_8x16 = 26, 16, // MBTYPE_BWD_BIDIR_16x8 = 27, 8, // MBTYPE_BWD_BIDIR_8x16 = 28, 16, // MBTYPE_BIDIR_BIDIR_16x8 = 29, 8, // MBTYPE_BIDIR_BIDIR_8x16 = 30, 8 // MBTYPE_B_8x8 = 31, }; const Ipp8u MbPartHeight[NUMBER_OF_MBTYPES] = { 16, // MBTYPE_INTRA 16, // MBTYPE_INTRA_16x16 = 1, 16, // MBTYPE_PCM = 2, // Raw Pixel Coding, qualifies as a INTRA type... 16, // MBTYPE_INTER = 3, // 16x16 8, // MBTYPE_INTER_16x8 = 4, 16, // MBTYPE_INTER_8x16 = 5, 8, // MBTYPE_INTER_8x8 = 6, 8, // MBTYPE_INTER_8x8_REF0 = 7, // same as MBTYPE_INTER_8x8, with all RefIdx=0 16, // MBTYPE_FORWARD = 8, 16, // MBTYPE_BACKWARD = 9, 16, // MBTYPE_SKIPPED = 10, 16, // MBTYPE_DIRECT = 11, 16, // MBTYPE_BIDIR = 12, 8, // MBTYPE_FWD_FWD_16x8 = 13, 16, // MBTYPE_FWD_FWD_8x16 = 14, 8, // MBTYPE_BWD_BWD_16x8 = 15, 16, // MBTYPE_BWD_BWD_8x16 = 16, 8, // MBTYPE_FWD_BWD_16x8 = 17, 16, // MBTYPE_FWD_BWD_8x16 = 18, 8, // MBTYPE_BWD_FWD_16x8 = 19, 16, // MBTYPE_BWD_FWD_8x16 = 20, 8, // MBTYPE_BIDIR_FWD_16x8 = 21, 16, // MBTYPE_BIDIR_FWD_8x16 = 22, 8, // MBTYPE_BIDIR_BWD_16x8 = 23, 16, // MBTYPE_BIDIR_BWD_8x16 = 24, 8, // MBTYPE_FWD_BIDIR_16x8 = 25, 16, // MBTYPE_FWD_BIDIR_8x16 = 26, 8, // MBTYPE_BWD_BIDIR_16x8 = 27, 16, // MBTYPE_BWD_BIDIR_8x16 = 28, 8, // MBTYPE_BIDIR_BIDIR_16x8 = 29, 16, // MBTYPE_BIDIR_BIDIR_8x16 = 30, 8 // MBTYPE_B_8x8 = 31, }; const Ipp8u DefaultScalingList4x4[2][16] = { {6,13,20,28,13,20,28,32,20,28,32,37,28,32,37,42}, {10,14,20,24,14,20,24,27,20,24,27,30,24,27,30,34} }; const Ipp8u FlatScalingList4x4[16] = { 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 }; const Ipp8u DefaultScalingList8x8[2][64] = { { 6,10,13,16,18,23,25,27,10,11,16,18,23,25,27,29, 13,16,18,23,25,27,29,31,16,18,23,25,27,29,31,33, 18,23,25,27,29,31,33,36,23,25,27,29,31,33,36,38, 25,27,29,31,33,36,38,40,27,29,31,33,36,38,40,42}, { 9,13,15,17,19,21,22,24,13,13,17,19,21,22,24,25, 15,17,19,21,22,24,25,27,17,19,21,22,24,25,27,28, 19,21,22,24,25,27,28,30,21,22,24,25,27,28,30,32, 22,24,25,27,28,30,32,33,24,25,27,28,30,32,33,35} }; const Ipp8u FlatScalingList8x8[64] = { 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 }; const Ipp8u SubWidthC[4] = { 1, 2, 2, 1 }; const Ipp8u SubHeightC[4] = { 1, 2, 1, 1 }; Ipp8u BitsForMV [BITSFORMV_OFFSET + 1 + BITSFORMV_OFFSET]; static const Ipp8u s_BitsForMV[128] = { 1, 3, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 }; class BitsForMV_Initializer { public: BitsForMV_Initializer () { for (Ipp32s qp = 0; qp < 52; qp ++) for (Ipp32s mvl = 0; mvl <= BITSFORMV_OFFSET; mvl ++) { if (mvl < 128) BitsForMV[BITSFORMV_OFFSET + mvl] = BitsForMV[BITSFORMV_OFFSET - mvl] = s_BitsForMV[mvl]; else BitsForMV[BITSFORMV_OFFSET + mvl] = BitsForMV[BITSFORMV_OFFSET - mvl] = s_BitsForMV[mvl >> 7] + 14; } } }; BitsForMV_Initializer initBitsForMV; Ipp16s glob_RDQM[52][BITSMAX]; static const Ipp32s qp_lambda[40] = // pow(2, qp/6) { 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14, 16, 18, 20, 23, 25, 29, 32, 36, 40, 45, 51, 57, 64, 72, 81, 91 }; class RDQM_Initializer { public: RDQM_Initializer () { for (Ipp32s qp = 0; qp < 52; qp ++) for (Ipp32s bits = 0; bits < BITSMAX; bits ++) glob_RDQM[qp][bits] = (Ipp16s)(qp_lambda[MAX(0, qp - 12)] * bits); } }; RDQM_Initializer initRDQM; #if 0 /* int( (pow(2.0,MAX(0,(iQP-12))/3.0)*0.85) + 0.5) */ const Ipp32s lambda_sq[87] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 7, 9, 11, 14, 17, 22, 27, 34, 43, 54, 69, 86, 109, 137, 173, 218, 274, 345, 435, 548, 691, 870, 1097, 1382, 1741, 2193, 2763, 3482, 4387, 5527, 6963, 8773, 11053, 13926, 17546, 22107, 27853, 35092, 44214, 55706, 70185, 88427, 111411, 140369, 176854, 222822, 280739, 353709, 445645, 561477, 707417, 891290, 1122955, 1414834, 1782579, 2245909, 2829668, 3565158, 4491818, 5659336, 7130317, 8983636, 11318672, 14260634, 17967272, 22637345, }; #endif #if 0 /* int( (pow(2.0,iQP)*0.85*2) + 0.5) // lambda*32*/ const int lambda_sq[87] = { 2, 2, 3, 3, 4, 5, 7, 9, 11, 14, 17, 22, 27, 34, 43, 54, 69, 86, 109, 137, 173, 218, 274, 345, 435, 548, 691, 870, 1097, 1382, 1741, 2193, 2763, 3482, 4387, 5527, 6963, 8773, 11053, 13926, 17546, 22107, 27853, 35092, 44214, 55706, 70185, 88427, 111411, 140369, 176854, 222822, 280739, 353709, 445645, 561477, 707417, 891290, 1122955, 1414834, 1782579, 2245909, 2829668, 3565158, 4491818, 5659336, 7130317, 8983636, 11318672, 14260634, 17967272, 22637345, 28521267, 35934545, 45274690, 57042534, 71869090, 90549379, 114085069, 143738180, 181098758, 228170138, 287476359, 362197516, 456340275, 574952719, 724395033 }; #endif //lambda*32 const int lambda_sq[87] = { 2, 2, 3, 3, 4, 5, 7, 9, 11, 14, 17, 22, 27, 34, 43, 54, 69, 86, 109, 137, 160, 224, 288, 352, 448, 544, 704, 864, 1088, 1376, 1728, 2208, 2752, 3488, 4384, 5536, 6976, 8768, 11040, 13920, 17536, 22112, 27840, 35104, 44224, 55712, 70176, 88416, 111424, 140384, 176864, 222816, 280736, 353696, 445632, 561472, 707424, 891296, 1122944, 1414848, 1782592, 2245920, 2829664, 3565152, 4491808, 5659328, 7130304, 8983648, 11318688, 14260640, 17967264, 22637344, 28521280, 35934560, 45274688, 57042528, 71869088, 90549376, 114085056, 143738176, 181098752, 228170144, 287476352, 362197504, 456340288, 574952704, 724395040, }; /* CABAC trans tables: state (MPS and LPS ) + valMPS in 6th bit */ const Ipp8u transTbl[2][128] = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 62, 63, 0, 64, 65, 66, 66, 68, 68, 69, 70, 71, 72, 73, 73, 75, 75, 76, 77, 77, 79, 79, 80, 80, 82, 82, 83, 83, 85, 85, 86, 86, 87, 88, 88, 89, 90, 90, 91, 91, 92, 93, 93, 94, 94, 94, 95, 96, 96, 97, 97, 97, 98, 98, 99, 99, 99, 100, 100, 100, 101, 101, 101, 102, 102, 127 }, { 64, 0, 1, 2, 2, 4, 4, 5, 6, 7, 8, 9, 9, 11, 11, 12, 13, 13, 15, 15, 16, 16, 18, 18, 19, 19, 21, 21, 22, 22, 23, 24, 24, 25, 26, 26, 27, 27, 28, 29, 29, 30, 30, 30, 31, 32, 32, 33, 33, 33, 34, 34, 35, 35, 35, 36, 36, 36, 37, 37, 37, 38, 38, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 126, 127 } }; // Intra MB_Type Offset by Slice Type const Ipp8u IntraMBTypeOffset[5] = { 5, // PREDSLICE 23, // BPREDSLICE 0, // INTRASLICE 5, // S_PREDSLICE 1 // S_INTRASLICE }; #endif //UMC_ENABLE_H264_VIDEO_ENCODER
36.376744
252
0.581341
[ "vector", "transform" ]
445daa4024f2b81bb3682c90abf8bf330634a7a2
13,606
cc
C++
contrib/splitSpectrum/src/splitRangeSpectrum.cc
vincentschut/isce2
1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c
[ "ECL-2.0", "Apache-2.0" ]
1,133
2022-01-07T21:24:57.000Z
2022-01-07T21:33:08.000Z
contrib/splitSpectrum/src/splitRangeSpectrum.cc
vincentschut/isce2
1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c
[ "ECL-2.0", "Apache-2.0" ]
276
2019-02-10T07:18:28.000Z
2022-03-31T21:45:55.000Z
contrib/splitSpectrum/src/splitRangeSpectrum.cc
vincentschut/isce2
1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c
[ "ECL-2.0", "Apache-2.0" ]
235
2019-02-10T05:00:53.000Z
2022-03-18T07:37:24.000Z
/**\file splitRangeSpectrum.cc * \author Heresh Fattahi. * */ #include "splitRangeSpectrum.h" #include <gdal.h> #include <gdal_priv.h> #include <iostream> #include <complex> #include <vector> #include <fftw3.h> #include <math.h> #include "common.h" using namespace std; const float PI = std::acos(-1); const std::complex<float> I(0, 1); using splitSpectrum::splitRangeSpectrum; typedef std::vector< std::complex<float> > cpxVec; typedef std::vector< float > fltVec; int bandPass(GDALDataset* slcSubDataset, cpxVec &spectrum, cpxVec &spectrumSub, cpxVec &slcSub, int ind1, int ind2, int width, int inysize, int cols, int yoff, fltVec rangeTime, float subBandFrequency) { // Band-pass filetr // Copy the spectrum of the High band and center the High Band to center // frequency of the sub-band (demodulation is applied) // First copy the right half of the sub-band spectrum to elements [0:n/2] // where n = ind2 - ind1 // Since the spectrum obtained with FFTW3 is not normalized, we normalize // it by dividing the real and imaginary parts by the length of the signal // for each line, which is cols. //int kk,jj,ii; //#pragma omp parallel for\ // default(shared) //for (kk = 0; kk< inysize * (ind2 - ind1 - width); kk++) //{ // jj = kk/(ind2 -ind1 - width); // ii = kk % (ind2-ind1-width) + ind1 + width; // spectrumSub[jj*cols + ii - ind1 - width] = spectrum[ii+jj*cols]/(1.0f*cols); //} // Then copy the left part part to elements [N-n/2:N] where N is the length // of the signal (N=cols) //#pragma omp parallel for\ // default(shared) //for (kk=0; kk<inysize*width; kk++) //{ // jj = kk/width; // ii = kk%width + ind1; // spectrumSub[jj*cols + ii + cols - width - ind1] = spectrum[ii+jj*cols]/(1.0f*cols); //} //Extracting the sub-band spectrum int kk,jj,ii; #pragma omp parallel for\ default(shared) for (kk = 0; kk < inysize*(ind2-ind1); kk++) { jj = kk/(ind2-ind1); ii = kk % (ind2-ind1) + ind1; spectrumSub[ii+jj*cols] = spectrum[ii+jj*cols]/(1.0f*cols); } // A plan for inverse fft of the sub-band spectrum fftwf_plan planInverse = fftwf_plan_many_dft(1, &cols, inysize, (fftwf_complex *) (&spectrumSub[0]), &cols, 1, cols, (fftwf_complex *) (&slcSub[0]), &cols, 1, cols, FFTW_BACKWARD, FFTW_ESTIMATE); fftwf_execute(planInverse); fftwf_destroy_plan(planInverse); // demodulate the sub band slc to center the sub band spectrum #pragma omp parallel for\ default(shared) for (kk = 0; kk < inysize*cols; kk++) { jj = kk/cols; ii = kk % cols; slcSub[ii+jj*cols] = slcSub[ii+jj*cols]*(std::exp(-1.0f*I*2.0f*PI*subBandFrequency*rangeTime[ii])); } // writing the HB SLC to file using GDAL int status; status = slcSubDataset->GetRasterBand(1)->RasterIO( GF_Write, 0, yoff, cols, inysize, (void*) (&slcSub[0]), cols, inysize, GDT_CFloat32, sizeof(std::complex<float>), sizeof(std::complex<float>)*cols, NULL); return(0); } int index_frequency(double B, int N, double f) // deterrmine the index (n) of a given frequency f // B: bandwidth, N: length of a signal // Assumption: for indices 0 to (N-1)/2, frequency is positive // and for indices larger than (N-1)/2 frequency is negative { // index of a given frequency f int n; // frequency interval double df = B/N; if (f < 0) n = round(f/df + N); else n = round(f/df); return n; } float frequency (double B, int N, int n) // calculates frequency at a given index. // Assumption: for indices 0 to (N-1)/2, frequency is positive // and for indices larger than (N-1)/2 frequency is negative { //frequency interval given B as the total bandwidth double f, df = B/N; int middleIndex = ((N-1)/2); if (n > middleIndex) f = (n-N)*df; else f = n*df; return f; } float adjustCenterFrequency(double B, int N, double dc) { // because of quantization, there may not be an index representing dc. We // therefore adjust dc to make sure that there is an index to represent it. // We find the index that is closest to nominal dc and then adjust dc to the // frequency of that index. // B = full band-width // N = length of signal // dc = center frequency of the sub-band int ind; double df = B/N; if (dc < 0){ ind = N+round(dc/df); } else{ ind = round(dc/df); } dc = frequency (B, N, ind); return dc; } void splitRangeSpectrum::setInputDataset(std::string inDataset) { // set input dataset which is the full-band SLC inputDS = inDataset; } void splitRangeSpectrum::setLowbandDataset(std::string inLbDataset, std::string inHbDataset) { // set output datasets which are two SLCs at low-band and high-band // low-band dataset lbDS = inLbDataset; // high-band dataset hbDS = inHbDataset; } void splitRangeSpectrum::setMemorySize(int inMemSize) { // set memory size memsize = inMemSize; } void splitRangeSpectrum::setBlockSize(int inBlockSize) { // set block size (number of lines to be read as one block) blocksize = inBlockSize; } void splitRangeSpectrum::setBandwidth(double fs, double lBW, double hBW) { // set the range sampling rate and the band-width of low-band and high-band SLC rangeSamplingRate = fs; lowBandWidth = lBW; highBandWidth = hBW; } void splitRangeSpectrum::setSubBandCenterFrequencies(double fl, double fh) { // set center frequencies of low-band and high-band SLCs lowCenterFrequency = fl; highCenterFrequency = fh; } //int split_spectrum_process(splitOptions *opts) //{ int splitRangeSpectrum::split_spectrum_process() { // Print user options to screen //opts->print(); // cols: number of columns of the SLC // rows: number of lines of the SLC int cols, rows; int blockysize; int nbands; // Define NULL GDAL datasets for input full-band SLC and out put sub-band SLCs GDALDataset* slcDataset = NULL; GDALDataset* slcLBDataset = NULL; GDALDataset* slcHBDataset = NULL; // Clock variables double t_start, t_end; // Register GDAL drivers GDALAllRegister(); slcDataset = reinterpret_cast<GDALDataset *>( GDALOpenShared( inputDS.c_str(), GA_ReadOnly)); if (slcDataset == NULL) { std::cout << "Cannot open SLC file { " << inputDS << "}" << endl; std::cout << "GDALOpen failed - " << inputDS << endl; std::cout << "Exiting with error code .... (102) \n"; GDALDestroyDriverManager(); return 102; } cols = slcDataset->GetRasterXSize(); rows = slcDataset->GetRasterYSize(); nbands = slcDataset->GetRasterCount(); // Determine blocksizes // Number of vectors = 6 // Memory for one pixel CFloat32 = 8 byte // cols=number of columns in one line blockysize = int((memsize * 1.0e6)/(cols * 8 * 6) ); std::cout << "Computed block size based on memory size = " << blockysize << " lines \n"; // if (blockysize < opts->blocksize) // blockysize = opts->blocksize; std::cout << "Block size = " << blockysize << " lines \n"; int totalblocks = ceil( rows / (1.0 * blockysize)); std::cout << "Total number of blocks to process: " << totalblocks << "\n"; // Start the clock t_start = getWallTime(); // Array for reading complex SLC data std::vector< std::complex<float> > slc(cols*blockysize); // Array for spectrum of full band SLC std::vector< std::complex<float> > spectrum(cols*blockysize); // Array for spectrum of low-band SLC std::vector< std::complex<float> > spectrumLB(cols*blockysize); // Array for spectrum of high-band SLC std::vector< std::complex<float> > spectrumHB(cols*blockysize); // Array for low-band SLC std::vector< std::complex<float> > slcLB(cols*blockysize); //Array for high-band SLC std::vector< std::complex<float> > slcHB(cols*blockysize); //vector for range time std::vector< float > rangeTime(cols); // populating vector of range time for one line for (int ii = 0; ii < cols; ii++) { rangeTime[ii] = ii/rangeSamplingRate; } // Start block-by-block processing int blockcount = 0; int status; // number of threads int nthreads; nthreads = numberOfThreads(); // creating output datasets GDALDriver *poDriver = (GDALDriver*) GDALGetDriverByName("ENVI"); char **mOptions = NULL; mOptions = CSLSetNameValue(mOptions, "INTERLEAVE", "BIL"); mOptions = CSLSetNameValue(mOptions, "SUFFIX", "ADD"); // creating output datasets for low-band SLC slcLBDataset = (GDALDataset*) poDriver->Create(lbDS.c_str(), cols, rows, 1, GDT_CFloat32, mOptions); if (slcLBDataset == NULL) { std::cout << "Could not create meanamp dataset {" << lbDS << "} \n"; std::cout << "Exiting with non-zero error code ... 104 \n"; GDALClose(slcDataset); GDALDestroyDriverManager(); return 104; } // creating output datasets for high-band SLC slcHBDataset = (GDALDataset*) poDriver->Create(hbDS.c_str(), cols, rows, 1, GDT_CFloat32, mOptions); if (slcHBDataset == NULL) { std::cout << "Could not create meanamp dataset {" << lbDS << "} \n"; std::cout << "Exiting with non-zero error code ... 104 \n"; GDALClose(slcDataset); GDALDestroyDriverManager(); return 104; } CSLDestroy(mOptions); float highBand [2]; float lowBand [2]; cout << "sub-band center frequencies after adjustment: " << endl; cout << "low-band: " << lowCenterFrequency << endl; cout << "high-band: " << highCenterFrequency << endl; lowBand[0] = lowCenterFrequency - lowBandWidth/2.0; lowBand[1] = lowBand[0] + lowBandWidth; highBand[0] = highCenterFrequency - highBandWidth/2.0; highBand[1] = highBand[0] + highBandWidth; // defining the pixel number of the high-band int indH1, indH2, widthHB; // index of the lower bound of the high-band indH1 = index_frequency(rangeSamplingRate, cols, highBand[0]); // index of the upper bound of the High Band indH2 = index_frequency(rangeSamplingRate, cols, highBand[1]); // width of the subband (unit pixels) widthHB = (indH2 - indH1)/2; // defining the pixel number of the low-band int indL1, indL2, widthLB; // index of the lower bound of the low-band indL1 = index_frequency(rangeSamplingRate, cols, lowBand[0]); // index of the upper bound of the low-band indL2 = index_frequency(rangeSamplingRate, cols, lowBand[1]); // width of the subband (unit pixels) widthLB = (indL2 - indL1)/2; // Block-by-block processing int fftw_status; fftw_status = fftwf_init_threads(); cout << "fftw_status: " << fftw_status; for (int yoff=0; yoff < rows; yoff += blockysize) { // Increment block counter blockcount++; // Determine number of rows to read int inysize = blockysize; if ((yoff+inysize) > rows) inysize = rows - yoff; // Read a block of the SLC data to cpxdata array status = slcDataset->GetRasterBand(1)->RasterIO( GF_Read, 0, yoff, cols, inysize, (void*) (&slc[0]), cols, inysize, GDT_CFloat32, sizeof(std::complex<float>), sizeof(std::complex<float>)*cols, NULL); // creating the forward 1D fft plan for inysize lines of SLC data. // Each fft is applied on multiple lines of SLC data. fftwf_plan_with_nthreads(nthreads); fftwf_plan plan = fftwf_plan_many_dft(1, &cols, inysize, (fftwf_complex *) (&slc[0]), &cols, 1, cols, (fftwf_complex *) (&spectrum[0]), &cols, 1, cols, FFTW_FORWARD, FFTW_ESTIMATE); // execute the fft plan fftwf_execute(plan); fftwf_destroy_plan(plan); // bandpass the spectrum for low-band, demodulate to center the sub-band // spectrum, and normalize the sub-band spectrum bandPass(slcLBDataset, spectrum, spectrumLB, slcLB, indL1, indL2, widthLB, inysize, cols, yoff, rangeTime, lowCenterFrequency); // bandpass the spectrum for high-band, demodulate to center the sub-band // spectrum, and normalize the sub-band spectrum bandPass(slcHBDataset, spectrum, spectrumHB, slcHB, indH1, indH2, widthHB, inysize, cols, yoff, rangeTime, highCenterFrequency); } t_end = getWallTime(); std::cout << "splitSpectrum processing time: " << (t_end-t_start)/60.0 << " mins \n"; //close the datasets GDALClose(slcDataset); GDALClose(slcLBDataset); GDALClose(slcHBDataset); return (0); };
31.715618
201
0.602455
[ "vector" ]
445f0c66f24d898c3c7811ee0c0be3965e15650f
2,627
hpp
C++
STest/STest/Scenario/BoundedScenario.hpp
WaterBubbles/fprime
dfb1e72bfbe4f21c0014bf78d762fddb3b5c39a1
[ "Apache-2.0" ]
2
2021-02-23T06:56:03.000Z
2021-02-23T07:03:53.000Z
STest/STest/Scenario/BoundedScenario.hpp
WaterBubbles/fprime
dfb1e72bfbe4f21c0014bf78d762fddb3b5c39a1
[ "Apache-2.0" ]
9
2021-02-21T07:27:44.000Z
2021-02-21T07:27:58.000Z
STest/STest/Scenario/BoundedScenario.hpp
WaterBubbles/fprime
dfb1e72bfbe4f21c0014bf78d762fddb3b5c39a1
[ "Apache-2.0" ]
3
2020-09-05T18:17:21.000Z
2020-11-15T04:06:24.000Z
// ====================================================================== // \title BoundedScenario.hpp // \author bocchino // \brief Run a scenario, bounding the number of steps // // \copyright // Copyright (C) 2017 California Institute of Technology. // ALL RIGHTS RESERVED. United States Government Sponsorship // acknowledged. // ====================================================================== #ifndef STest_BoundedScenario_HPP #define STest_BoundedScenario_HPP #include "STest/Scenario/ConditionalScenario.hpp" namespace STest { //! Run a scenario, bounding the number of steps template<typename State> class BoundedScenario : public ConditionalScenario<State> { public: // ---------------------------------------------------------------------- // Constructors and destructors // ---------------------------------------------------------------------- //! Construct a BoundedScenario object BoundedScenario( const char *const name, //!< The name of the bounded scenario Scenario<State>& scenario, //!< The scenario to run const U32 bound //!< The bound ) : ConditionalScenario<State>(name, scenario), numSteps(0), bound(bound) { } //! Destroy a BoundedScenario object ~BoundedScenario(void) { } public: // ---------------------------------------------------------------------- // ConditionalScenario implementation // ---------------------------------------------------------------------- //! The virtual condition required by CondtiionalScenario //! \return Whether the condition holds bool condition_ConditionalScenario( const State& state //!< The system state ) const { return this->numSteps < this->bound; } //! The virtual implementation of nextRule required by ConditionalScenario void nextRule_ConditionalScenario( const Rule<State> *const nextRule //!< The next rule ) { if (nextRule != NULL) { ++this->numSteps; } } //! The virtual implementation of reset required by ConditionalScenario void reset_ConditionalScenario(void) { this->numSteps = 0; } private: // ---------------------------------------------------------------------- // Private member variables // ---------------------------------------------------------------------- //! The number of steps U32 numSteps; //! The bound on the number of steps const U32 bound; }; } #endif
28.247312
80
0.486867
[ "object" ]
445f931802863b7e50baa65bf31225e5768de717
4,486
cpp
C++
threshsign/test/TestLagrange.cpp
sync-bft/concord-bft
423db97caf10681e38527dd9d78e668dd016a7e9
[ "Apache-2.0" ]
1
2019-07-16T14:54:58.000Z
2019-07-16T14:54:58.000Z
threshsign/test/TestLagrange.cpp
yuliasherman/concord-bft
81c5278828c4d05f4822087659decd4a926e85c9
[ "Apache-2.0" ]
null
null
null
threshsign/test/TestLagrange.cpp
yuliasherman/concord-bft
81c5278828c4d05f4822087659decd4a926e85c9
[ "Apache-2.0" ]
1
2020-12-06T21:02:03.000Z
2020-12-06T21:02:03.000Z
// Concord // // Copyright (c) 2018 VMware, Inc. All Rights Reserved. // // This product is licensed to you under the Apache 2.0 license (the "License"). // You may not use this product except in compliance with the Apache 2.0 License. // // This product may include a number of subcomponents with separate copyright // notices and license terms. Your use of these subcomponents is subject to the // terms and conditions of the subcomponent's license, as noted in the // LICENSE file. #include "threshsign/Configuration.h" #include <map> #include <set> #include <vector> #include <string> #include <cassert> #include <memory> #include <algorithm> #include <stdexcept> #include "Logger.hpp" #include "Utils.h" #include "Timer.h" #include "XAssert.h" #include "app/RelicMain.h" #include "threshsign/VectorOfShares.h" #include "threshsign/bls/relic/Library.h" #include "threshsign/bls/relic/BlsPublicParameters.h" #include "threshsign/bls/relic/PublicParametersFactory.h" #include "bls/relic/LagrangeInterpolation.h" using namespace std; using namespace BLS::Relic; /** * Converts a sequence of +/- i's into a subset of signers. */ void seqToSubset(VectorOfShares& signers, std::vector<int> seq) { for (int i : seq) { testAssertNotZero(i); testAssertLessThanOrEqual(i, MAX_NUM_OF_SHARES); if (i > 0) signers.add(i); else { testAssertTrue(signers.contains(-i)); signers.remove(-i); } } } int RelicAppMain(const Library& lib, const std::vector<std::string>& args) { (void)lib; (void)args; std::vector<int> seqs[] = { {1, 2, 3}, {1, -1, 1}, {1, -1, 1, 2}, {1, 2, 3, 4, -4}, {1, 2, 4, 5, 7, -2}, {1, 2, 4, 5, 7, -2, -5}, {1, 2, 4, 5, 7, -2, -5, 2, -4, 4, 9}, {2, 1, 3, -1, -2, 4, 5, 2, 1, 9, -5, 5, 6, -9, 9, 7, -5, 5, -7, 8, 7, -8, 8}, }; BlsPublicParameters params = PublicParametersFactory::getWhatever(); VectorOfShares signers; for (const std::vector<int>& seq : seqs) { signers.clear(); seqToSubset(signers, seq); LOG_INFO(GL, " * Testing signers: " << signers); int numSigners = *std::max_element(seq.begin(), seq.end()); // LOG_DEBUG(GL, "Max signer ID: " << numSigners); std::vector<BNT> incrCoeffs(static_cast<size_t>(numSigners + 1), BNT(0)); LagrangeIncrementalCoeffs lagr(numSigners, params); // Add and remove signers as indicated by the sequence of operations for (int s : seq) { if (s < 0) { LOG_DEBUG(GL, "Remove signer " << -s << ": "); lagr.removeSigner(-s); } else { LOG_DEBUG(GL, "Add signer " << s << ": "); lagr.addSigner(s); } LOG_DEBUG(GL, lagr.getSigners()); } lagr.finalize(incrCoeffs); // Should have the same signers in our Lagrange code as the ones we're computing Lagrange for next testAssertEqual(signers, lagr.getSigners()); // Now construct Lagrange coefficients normally std::vector<BNT> naiveCoeffs(static_cast<size_t>(numSigners + 1), BNT(0)); testAssertEqual(incrCoeffs.size(), naiveCoeffs.size()); lagrangeCoeffNaiveReduced(signers, naiveCoeffs, lib.getG2Order()); testAssertEqual(incrCoeffs.size(), naiveCoeffs.size()); // Make sure the coefficients match auto result = std::mismatch(incrCoeffs.begin(), incrCoeffs.end(), naiveCoeffs.begin()); if (result.first != incrCoeffs.end()) { size_t pos = static_cast<size_t>(result.first - incrCoeffs.begin()); LOG_ERROR(GL, "Mismatch for signer " << pos); LOG_ERROR(GL, " incrCoeffs[" << pos << "] = " << *result.first); LOG_ERROR(GL, " naiveCoeffs[" << pos << "] = " << *result.second); throw std::runtime_error("Bad coeffs"); } std::vector<BNT> lagrCoeffs(static_cast<size_t>(numSigners + 1), BNT(0)); testAssertEqual(incrCoeffs.size(), lagrCoeffs.size()); lagrangeCoeffAccumReduced(signers, lagrCoeffs, lib.getG2Order()); testAssertEqual(incrCoeffs.size(), lagrCoeffs.size()); // Make sure the coefficients match result = std::mismatch(incrCoeffs.begin(), incrCoeffs.end(), lagrCoeffs.begin()); if (result.first != incrCoeffs.end()) { size_t pos = static_cast<size_t>(result.first - incrCoeffs.begin()); LOG_ERROR(GL, "Mismatch for signer " << pos); LOG_ERROR(GL, " incrCoeffs[" << pos << "] = " << *result.first); LOG_ERROR(GL, " lagrCoeffs[" << pos << "] = " << *result.second); throw std::runtime_error("Bad coeffs"); } } return 0; }
33.22963
102
0.642443
[ "vector" ]
44613284b52c61e8a360ac7c8328d0be3e0b96b2
3,635
cc
C++
lib/win/src/radio_watcher.cc
batmac/noble
605fa3a383d3b7a05cd8312a45c78b057a0b099a
[ "MIT" ]
396
2018-12-19T13:39:13.000Z
2022-03-29T00:55:46.000Z
lib/win/src/radio_watcher.cc
batmac/noble
605fa3a383d3b7a05cd8312a45c78b057a0b099a
[ "MIT" ]
219
2018-12-18T20:49:08.000Z
2022-03-31T08:03:41.000Z
lib/win/src/radio_watcher.cc
batmac/noble
605fa3a383d3b7a05cd8312a45c78b057a0b099a
[ "MIT" ]
153
2018-12-19T18:45:39.000Z
2022-03-31T11:33:21.000Z
// // radio_watcher.cc // noble-winrt-native // // Created by Georg Vienna on 07.09.18. // #pragma once #include "radio_watcher.h" #include "winrt_cpp.h" using winrt::Windows::Devices::Radios::RadioKind; using winrt::Windows::Foundation::AsyncStatus; template <typename O, typename M, class... Types> auto bind2(O* object, M method, Types&... args) { return std::bind(method, object, std::placeholders::_1, std::placeholders::_2, args...); } #define RADIO_INTERFACE_CLASS_GUID \ L"System.Devices.InterfaceClassGuid:=\"{A8804298-2D5F-42E3-9531-9C8C39EB29CE}\"" RadioWatcher::RadioWatcher() : mRadio(nullptr), watcher(DeviceInformation::CreateWatcher(RADIO_INTERFACE_CLASS_GUID)) { mAddedRevoker = watcher.Added(winrt::auto_revoke, bind2(this, &RadioWatcher::OnAdded)); mUpdatedRevoker = watcher.Updated(winrt::auto_revoke, bind2(this, &RadioWatcher::OnUpdated)); mRemovedRevoker = watcher.Removed(winrt::auto_revoke, bind2(this, &RadioWatcher::OnRemoved)); auto completed = bind2(this, &RadioWatcher::OnCompleted); mCompletedRevoker = watcher.EnumerationCompleted(winrt::auto_revoke, completed); } void RadioWatcher::Start(std::function<void(Radio& radio)> on) { radioStateChanged = on; inEnumeration = true; initialDone = false; initialCount = 0; watcher.Start(); } IAsyncOperation<Radio> RadioWatcher::GetRadios(std::set<winrt::hstring> ids) { Radio bluetooth = nullptr; for (auto id : ids) { try { auto radio = co_await Radio::FromIdAsync(id); if (radio && radio.Kind() == RadioKind::Bluetooth) { auto state = radio.State(); // we only get state changes for turned on/off adapter but not for disabled adapter if (state == RadioState::On || state == RadioState::Off) { bluetooth = radio; } } } catch (...) { // Radio::RadioFromAsync throws if the device is not available (unplugged) } } co_return bluetooth; } void RadioWatcher::OnRadioChanged() { GetRadios(radioIds).Completed([=](auto&& asyncOp, auto&& status) { if (status == AsyncStatus::Completed) { Radio radio = asyncOp.GetResults(); // !radio: to handle if there is no radio if (!radio || radio != mRadio) { if (radio) { mRadioStateChangedRevoker.revoke(); mRadioStateChangedRevoker = radio.StateChanged( winrt::auto_revoke, [=](Radio radio, auto&&) { radioStateChanged(radio); }); } else { mRadioStateChangedRevoker.revoke(); } radioStateChanged(radio); mRadio = radio; } } else { mRadio = nullptr; mRadioStateChangedRevoker.revoke(); radioStateChanged(mRadio); } }); } void RadioWatcher::OnAdded(DeviceWatcher watcher, DeviceInformation info) { radioIds.insert(info.Id()); if (!inEnumeration) { OnRadioChanged(); } } void RadioWatcher::OnUpdated(DeviceWatcher watcher, DeviceInformationUpdate info) { OnRadioChanged(); } void RadioWatcher::OnRemoved(DeviceWatcher watcher, DeviceInformationUpdate info) { radioIds.erase(info.Id()); OnRadioChanged(); } void RadioWatcher::OnCompleted(DeviceWatcher watcher, IInspectable info) { inEnumeration = false; OnRadioChanged(); }
28.849206
100
0.606052
[ "object" ]
4467f25279b80113d6d38bf038bc27e1fc99f766
14,177
hpp
C++
include/quiver/dot.hpp
Fytch/Quiver
572c59bbc7aaef0e61318d6d0feaf5771b38cfdb
[ "MIT" ]
null
null
null
include/quiver/dot.hpp
Fytch/Quiver
572c59bbc7aaef0e61318d6d0feaf5771b38cfdb
[ "MIT" ]
1
2018-11-28T12:55:50.000Z
2018-11-28T12:55:50.000Z
include/quiver/dot.hpp
Fytch/Quiver
572c59bbc7aaef0e61318d6d0feaf5771b38cfdb
[ "MIT" ]
1
2018-08-19T16:48:23.000Z
2018-08-19T16:48:23.000Z
/* * Quiver - A graph theory library * Copyright (C) 2018 Josua Rieder (josua.rieder1996@gmail.com) * Distributed under the MIT License. * See the enclosed file LICENSE.txt for further information. */ #ifndef QUIVER_DOT_HPP_INCLUDED #define QUIVER_DOT_HPP_INCLUDED #include <quiver/util.hpp> #include <cstdint> #include <cassert> #include <variant> #include <optional> #include <string> #include <stdexcept> #include <cmath> #include <ostream> #include <iomanip> namespace quiver { namespace dot { struct color_hex { std::uint8_t r, g, b, a = 0xFF; constexpr color_hex(std::uint8_t r, std::uint8_t g, std::uint8_t b) noexcept : r(r), g(g), b(b) { } constexpr color_hex(std::uint8_t r, std::uint8_t g, std::uint8_t b, std::uint8_t a) noexcept : r(r), g(g), b(b), a(a) { } }; inline std::ostream& operator<<(std::ostream& stream, color_hex const& color) { constexpr auto int2hex = [](int x) -> char { assert(0 <= x && x < 16); return x < 10 ? '0' + x : 'a' + (x - 10); }; stream << '"'; stream << '#'; stream << int2hex(color.r / 16) << int2hex(color.r % 16); stream << int2hex(color.g / 16) << int2hex(color.g % 16); stream << int2hex(color.b / 16) << int2hex(color.b % 16); if(color.a != 0xFF) stream << int2hex(color.a / 16) << int2hex(color.a % 16); stream << '"'; return stream; } enum color_enum { // cba copying the entirety of the X11 and SVG tables in here; I'm just giving a sane subset aqua, black, blue, dark_blue, brown, crimson, cyan, fuchsia, gold, gray, green, dark_green, lime, olive, orange, pink, purple, red, teal, white, yellow, }; inline std::ostream& operator<<(std::ostream& stream, color_enum color) { switch(color) { case aqua: stream << "Aqua"; break; case black: stream << "Black"; break; case blue: stream << "Blue"; break; case dark_blue: stream << "Dark Blue"; break; case brown: stream << "Brown"; break; case crimson: stream << "Crimson"; break; case cyan: stream << "Cyan"; break; case fuchsia: stream << "Fuchsia"; break; case gold: stream << "Gold"; break; case gray: stream << "Gray"; break; case green: stream << "Green"; break; case dark_green: stream << "Dark Green"; break; case lime: stream << "Lime"; break; case olive: stream << "Olive"; break; case orange: stream << "Orange"; break; case pink: stream << "Pink"; break; case purple: stream << "Purple"; break; case red: stream << "Red"; break; case teal: stream << "Teal"; break; case white: stream << "White"; break; case yellow: stream << "Yellow"; break; default: assert(false); } return stream; } // deliberately not supporting HSV colors using color_t = std::variant<color_hex, color_enum>; inline std::ostream& operator<<(std::ostream& stream, color_t const& color) { std::visit([&](auto const& x) { stream << x; }, color); return stream; } class penwidth_t { public: using value_type = double; private: value_type m_width; public: penwidth_t(value_type width = 1.0) : m_width(width) { if(!std::isnormal(width) || width < 0.0) throw std::invalid_argument("quiver::dot::penwidth_t::penwidth_t: invalid pen width"); } constexpr value_type get() const noexcept { return m_width; } }; inline std::ostream& operator<<(std::ostream& stream, penwidth_t width) { return stream << width.get(); } class fontsize_t { public: using value_type = double; private: value_type m_size; public: fontsize_t(value_type size = 14.0) : m_size(size) { if(!std::isnormal(size) || size < 1.0) throw std::invalid_argument("quiver::dot::fontsize_t::fontsize_t: invalid font size"); } constexpr value_type get() const noexcept { return m_size; } }; inline std::ostream& operator<<(std::ostream& stream, fontsize_t size) { return stream << size.get(); } /*struct attribs { std::optional<std::variant<Enum, Hex>> color; std::optional<std::string> custom_attribs; }; [](auto edge) -> attribs { attribs a; switch(edge.color) { case Color::red: return ColorEnum::red; case Color::green: return "[color=green]"; case Color::blue: a.color = "blue"; break; default: ; } return a; }*/ /* digraph G { label="My Graph"; splines="line"; node [fontcolor=gray fontsize=32 shape=circle] edge [color="green"] 1 [label="xyz",color="red",fillcolor="blue",style="filled,dashed"]; 1->2 [label="Some Label",color="red",penwidth=2.0]; 3->4; } */ // https://graphviz.org/doc/info/attrs.html // TODO: style // TODO: splines // TODO: shape // TODO: support html labels. do this by replacing labels from string to variant<string, html> where html is a strong typedef of string struct graph_attributes { std::optional<color_t> bgcolor; // background color std::optional<std::string> label; std::optional<color_t> fontcolor; std::optional<std::string> fontname; std::optional<fontsize_t> fontsize; // TODO: maybe std::pair<std::string_view, std::string>? std::optional<std::string> custom; // custom attributes, should be of the form "a=b; c=d" // graph_attributes() // TODO: implement constexpr bool any() const noexcept { return bgcolor || label || fontcolor || fontname || fontsize || custom; } }; inline std::ostream& operator<<(std::ostream& stream, graph_attributes const& ga) { if(ga.bgcolor) stream << "\tbgcolor=" << *ga.bgcolor << ";\n"; if(ga.label) stream << "\tlabel=" << std::quoted(*ga.label) << ";\n"; if(ga.fontcolor) stream << "\tfontcolor=" << *ga.fontcolor << ";\n"; if(ga.fontname) stream << "\tfontname=" << std::quoted(*ga.fontname) << ";\n"; if(ga.fontsize) stream << "\tfontsize=" << *ga.fontsize << ";\n"; if(ga.custom) stream << '\t' << *ga.custom << ";\n"; return stream; } struct node_attributes { std::optional<color_t> color; // outline color std::optional<penwidth_t> penwidth; // outline thickness std::optional<color_t> fillcolor; // interior filling color std::optional<std::string> label; std::optional<color_t> fontcolor; std::optional<std::string> fontname; std::optional<fontsize_t> fontsize; // TODO: maybe std::pair<std::string_view, std::string>? std::optional<std::string> custom; // custom attributes, should be of the form "a=b; c=d" // node_attributes() // TODO: implement constexpr bool any() const noexcept { return color || penwidth || fillcolor || label || fontcolor || fontname || fontsize || custom; } }; inline std::ostream& operator<<(std::ostream& stream, node_attributes const& na) { // TODO: no final ", " if(na.color) stream << "color=" << *na.color << ", "; if(na.penwidth) stream << "penwidth=" << *na.penwidth << ", "; if(na.fillcolor) stream << "fillcolor=" << *na.fillcolor << ", " << "style=filled, "; // TODO: hack because we don't have style yet if(na.label) stream << "label=" << std::quoted(*na.label) << ", "; if(na.fontcolor) stream << "fontcolor=" << *na.fontcolor << ", "; if(na.fontname) stream << "fontname=" << std::quoted(*na.fontname) << ", "; if(na.fontsize) stream << "fontsize=" << *na.fontsize << ", "; if(na.custom) stream << *na.custom << ", "; return stream; } struct edge_attributes { std::optional<color_t> color; // outline color std::optional<penwidth_t> penwidth; // outline thickness std::optional<color_t> fillcolor; // interior filling color std::optional<std::string> label; std::optional<color_t> fontcolor; std::optional<std::string> fontname; std::optional<fontsize_t> fontsize; // TODO: maybe std::pair<std::string_view, std::string>? std::optional<std::string> custom; // custom attributes, should be of the form "a=b; c=d" // edge_attributes() // TODO: implement constexpr bool any() const noexcept { return color || penwidth || fillcolor || label || fontcolor || fontname || fontsize || custom; } }; inline std::ostream& operator<<(std::ostream& stream, edge_attributes const& ea) { // TODO: no final ", " if(ea.color) stream << "color=" << *ea.color << ", "; if(ea.penwidth) stream << "penwidth=" << *ea.penwidth << ", "; if(ea.fillcolor) stream << "fillcolor=" << *ea.fillcolor << ", "; if(ea.label) stream << "label=" << std::quoted(*ea.label) << ", "; if(ea.fontcolor) stream << "fontcolor=" << *ea.fontcolor << ", "; if(ea.fontname) stream << "fontname=" << std::quoted(*ea.fontname) << ", "; if(ea.fontsize) stream << "fontsize=" << *ea.fontsize << ", "; if(ea.custom) stream << *ea.custom << ", "; return stream; } } namespace detail { template<typename node_invocable_t, typename vertex_t> constexpr dot::node_attributes invoke_node_invocable(node_invocable_t&& node_invocable, vertex_index_t index, vertex_t const& vertex) { if constexpr(std::is_invocable_r_v<dot::node_attributes, node_invocable_t, vertex_index_t, vertex_t const&>) return std::forward<node_invocable_t>(node_invocable)(index, vertex); else if constexpr(std::is_invocable_r_v<dot::node_attributes, node_invocable_t, vertex_t const&, vertex_index_t>) return std::forward<node_invocable_t>(node_invocable)(vertex, index); else if constexpr(std::is_invocable_r_v<dot::node_attributes, node_invocable_t, vertex_t const&>) return std::forward<node_invocable_t>(node_invocable)(vertex); else if constexpr(std::is_invocable_r_v<dot::node_attributes, node_invocable_t, vertex_index_t>) return std::forward<node_invocable_t>(node_invocable)(index); else static_assert(get_false<node_invocable_t>(), "cannot invoke node_invocable"); } template<typename edge_invocable_t, typename out_edge_t> constexpr dot::edge_attributes invoke_edge_invocable(edge_invocable_t&& edge_invocable, vertex_index_t from, out_edge_t const& out_edge) { if constexpr(std::is_invocable_r_v<dot::edge_attributes, edge_invocable_t, vertex_index_t, out_edge_t const&>) return std::forward<edge_invocable_t>(edge_invocable)(from, out_edge); else if constexpr(std::is_invocable_r_v<dot::edge_attributes, edge_invocable_t, vertex_index_t, vertex_index_t>) return std::forward<edge_invocable_t>(edge_invocable)(from, out_edge.to); else static_assert(get_false<edge_invocable_t>(), "cannot invoke edge_invocable"); } } template<typename graph_t, typename node_invocable_t, typename edge_invocable_t> std::ostream& to_dot( std::ostream& stream, graph_t const& graph, dot::graph_attributes const& global_graph_attributes, dot::node_attributes const& global_node_attributes, dot::edge_attributes const& global_edge_attributes, node_invocable_t const& node_invocable, // maps (vertex_index_t) or (vertex_t const&) or (vertex_index_t, graph_t::vertex_t const&) or (graph_t::vertex_t const&, vertex_index_t) -> dot::node_attributes edge_invocable_t const& edge_invocable // maps (vertex_index_t, vertex_index_t) or (vertex_index_t, graph_t::out_edge_t const&) -> dot::edge_attributes ) { if constexpr(graph.directivity == directed) stream << "di"; stream << "graph\n"; stream << "{\n"; stream << global_graph_attributes; if(global_node_attributes.any()) stream << "\tnode [" << global_node_attributes << "]\n"; if(global_edge_attributes.any()) stream << "\tedge [" << global_edge_attributes << "]\n"; // vertices // TODO: dont emit vertices if they don't have special attribs and they are part of at least one edge { vertex_index_t vert_index = 0; for(auto const& vert : graph.V) { const dot::node_attributes na = detail::invoke_node_invocable(node_invocable, vert_index, vert); const bool any = na.any(); if(vert.out_edges.empty() || any) { stream << '\t' << vert_index; if(any) stream << " [" << na << ']'; stream << ";\n"; } ++vert_index; } } // edges { vertex_index_t vert_index = 0; for(auto const& vert : graph.V) { for(auto const& out_edge : vert.out_edges) { if(graph.directivity == undirected && vert_index > out_edge.to) continue; stream << '\t' << vert_index; if constexpr(graph.directivity == directed) stream << "->"; else stream << "--"; stream << out_edge.to; dot::edge_attributes ea = detail::invoke_edge_invocable(edge_invocable, vert_index, out_edge); if(ea.any()) stream << " [" << ea << ']'; stream << ";\n"; } ++vert_index; } } stream << "}\n"; return stream; } template<typename graph_t> std::ostream& to_dot(std::ostream& stream, graph_t const& graph) { if constexpr(graph.directivity == directed) stream << "di"; stream << "graph\n"; stream << "{\n"; // vertices // TODO: dont emit vertices if they don't have special attribs and they are part of at least one edge. WE ALREADY DO IT HALFWAYS IN THE ABOVE OVERLOAD for(vertex_index_t vert_index = 0; vert_index < graph.V.size(); ++vert_index) stream << '\t' << vert_index << ";\n"; // edges { vertex_index_t vert_index = 0; for(auto const& vert : graph.V) { for(auto const& out_edge : vert.out_edges) if constexpr(graph.directivity == directed) { stream << '\t' << vert_index << "->" << out_edge.to << ";\n"; } else if constexpr(graph.directivity == undirected) { if(vert_index <= out_edge.to) stream << '\t' << vert_index << "--" << out_edge.to << ";\n"; } ++vert_index; } } stream << "}\n"; return stream; } /* template<typename graph_t> std::string to_dot(graph_t const& graph) { std::stringstream strstr; to_dot(strstr, graph); return strstr.str(); } */ } #endif // !QUIVER_DOT_HPP_INCLUDED
27.421663
203
0.633138
[ "shape" ]
4468301617f2746fd2b7151e7d10590245dbc2e4
475
cpp
C++
Problems/Codeforces/CF-931D.cpp
zhugezy/giggle
dfa50744a9fd328678b75af8135bbd770f18a6ac
[ "MIT" ]
6
2019-10-12T15:14:10.000Z
2020-02-02T11:16:00.000Z
Problems/Codeforces/CF-931D.cpp
zhugezy/giggle
dfa50744a9fd328678b75af8135bbd770f18a6ac
[ "MIT" ]
73
2019-10-11T15:09:40.000Z
2020-09-15T07:49:24.000Z
Problems/Codeforces/CF-931D.cpp
zhugezy/giggle
dfa50744a9fd328678b75af8135bbd770f18a6ac
[ "MIT" ]
5
2019-10-14T02:57:39.000Z
2020-06-19T09:38:34.000Z
// CF931D #include <bits/stdc++.h> using namespace std; const int N = 100010; vector<int> edge[N]; int cnt[N]; void dfs(int u, int dep) { cnt[dep]++; for (int i = 0; i < edge[u].size(); ++i) { dfs(edge[u][i], dep + 1); } } int main() { int n, t, ans = 0; scanf("%d", &n); for (int i = 2; i <= n; ++i) { scanf("%d", &t); edge[t].push_back(i); } dfs(1, 0); for (int i = 0; i < n; ++i) ans += cnt[i] % 2; printf("%d\n", ans); return 0; }
16.964286
44
0.48
[ "vector" ]
446afd34ae5c1e3aae12d0d73736eb41555d8e8c
2,484
cpp
C++
Overdrive/render/shape_sphere.cpp
png85/Overdrive
e763827546354c7c75395ab1a82949a685ecb880
[ "MIT" ]
41
2015-02-21T08:54:00.000Z
2021-05-11T16:01:29.000Z
Overdrive/render/shape_sphere.cpp
png85/Overdrive
e763827546354c7c75395ab1a82949a685ecb880
[ "MIT" ]
1
2018-05-14T10:02:09.000Z
2018-05-14T10:02:09.000Z
Overdrive/render/shape_sphere.cpp
png85/Overdrive
e763827546354c7c75395ab1a82949a685ecb880
[ "MIT" ]
10
2015-10-07T05:44:08.000Z
2020-12-01T09:00:01.000Z
#include "stdafx.h" #include "shape_sphere.h" #include <boost/math/constants/constants.hpp> namespace overdrive { namespace render { namespace shape { Sphere::Sphere( float radius, unsigned int slices, unsigned int stacks ): mVertexBuffer((slices + 1) * (stacks + 1)), mIndexBuffer((slices * 2 * (stacks - 1)) * 3) { { using attributes::PositionNormalTexCoord; using boost::math::float_constants::pi; float theta; float phi; float thetaFactor = 2.0f * pi / slices; float phiFactor = pi / stacks; glm::vec3 position; glm::vec3 normal; glm::vec2 texCoord; auto vertices = mVertexBuffer.map(); unsigned int index = 0; for (unsigned int i = 0; i <= slices; ++i) { theta = i * thetaFactor; texCoord.s = static_cast<float>(i) / stacks; for (unsigned int j = 0; j <= stacks; ++j) { phi = j * phiFactor; texCoord.t = static_cast<float>(j) / stacks; normal.x = sinf(phi) * cosf(theta); normal.y = sinf(phi) * sinf(theta); normal.z = cosf(phi); position = normal * radius; vertices[index++] = PositionNormalTexCoord{ position, normal, texCoord }; } } } { auto indices = mIndexBuffer.map(); unsigned int index = 0; for (GLuint i = 0; i < slices; ++i) { GLuint stackStart = i * (stacks + 1); GLuint nextStackStart = (i + 1) * (stacks + 1); for (GLuint j = 0; j < stacks; ++j) { if (j == 0) { indices[index ] = stackStart; indices[index + 1] = stackStart + 1; indices[index + 2] = nextStackStart + 1; index += 3; } else if (j == (stacks - 1)) { indices[index ] = stackStart + j; indices[index + 1] = stackStart + j + 1; indices[index + 2] = nextStackStart + j; index += 3; } else { indices[index ] = stackStart + j; indices[index + 1] = stackStart + j + 1; indices[index + 2] = nextStackStart + j + 1; indices[index + 3] = nextStackStart + j; indices[index + 4] = stackStart + j; indices[index + 5] = nextStackStart + j + 1; index += 6; } } } } mVAO.attach(mIndexBuffer); mVAO.attach(mVertexBuffer); } void Sphere::draw() { mVAO.draw(); } } } }
24.352941
81
0.515298
[ "render", "shape" ]
446d4734e08ed1c38df4b415e7a4160bb8aa45bf
10,601
cpp
C++
hphp/runtime/ext/ext_icu.cpp
ndwhelan/hiphop-php
2638538cdedb531ccea39961d9372dbc54adc229
[ "PHP-3.01", "Zend-2.0" ]
4
2015-11-05T15:52:36.000Z
2021-12-17T09:45:07.000Z
hphp/runtime/ext/ext_icu.cpp
amit2014/hhvm
5c6896ccd1b51466233c08b7bd2c6b60bcdb4ff5
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
hphp/runtime/ext/ext_icu.cpp
amit2014/hhvm
5c6896ccd1b51466233c08b7bd2c6b60bcdb4ff5
[ "PHP-3.01", "Zend-2.0" ]
2
2019-02-02T01:57:38.000Z
2019-07-03T07:28:45.000Z
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) | | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ */ #include "hphp/runtime/ext/ext_icu.h" #include <vector> #include <string> #include <boost/scoped_ptr.hpp> #include <unicode/rbbi.h> #include <unicode/translit.h> #include <unicode/uregex.h> #include <unicode/ustring.h> #include "icu/LifeEventTokenizer.h" // nolint #include "icu/ICUMatcher.h" // nolint #include "icu/ICUTransliterator.h" // nolint using namespace U_ICU_NAMESPACE; namespace HPHP { /////////////////////////////////////////////////////////////////////////////// const int64_t k_UREGEX_CASE_INSENSITIVE = UREGEX_CASE_INSENSITIVE; const int64_t k_UREGEX_COMMENTS = UREGEX_COMMENTS; const int64_t k_UREGEX_DOTALL = UREGEX_DOTALL; const int64_t k_UREGEX_MULTILINE = UREGEX_MULTILINE; const int64_t k_UREGEX_UWORD = UREGEX_UWORD; // Intentionally higher in case ICU adds more constants. const int64_t k_UREGEX_OFFSET_CAPTURE = 1LL<<32; /////////////////////////////////////////////////////////////////////////////// typedef tbb::concurrent_hash_map<const StringData*,const RegexPattern*, StringDataHashCompare> PatternStringMap; static PatternStringMap s_patternCacheMap; Variant f_icu_match(const String& pattern, const String& subject, VRefParam matches /* = null */, int64_t flags /* = 0 */) { UErrorCode status = U_ZERO_ERROR; if (matches.isReferenced()) { matches = Array(); } // Create hash map key by concatenating pattern and flags. StringBuffer bpattern; bpattern.append(pattern); bpattern.append(':'); bpattern.append(flags); String spattern = bpattern.detach(); // Find compiled pattern matcher in hash map or add it. PatternStringMap::accessor accessor; const RegexPattern* rpattern; if (s_patternCacheMap.find(accessor, spattern.get())) { rpattern = accessor->second; } else { // First 32 bits are reserved for ICU-specific flags. rpattern = RegexPattern::compile( UnicodeString::fromUTF8(pattern.data()), (flags & 0xFFFFFFFF), status); if (U_FAILURE(status)) { return false; } if (s_patternCacheMap.insert( accessor, makeStaticString(spattern.get()))) { accessor->second = rpattern; } else { delete rpattern; rpattern = accessor->second; } } // Build regex matcher from compiled pattern and passed-in subject. UnicodeString usubject = UnicodeString::fromUTF8(subject.data()); boost::scoped_ptr<RegexMatcher> matcher(rpattern->matcher(usubject, status)); if (U_FAILURE(status)) { return false; } // Return 0 or 1 depending on whether or not a match was found and // (optionally), set matched (sub-)patterns for passed-in reference. int matched = 0; if (matcher->find()) { matched = 1; if (matches.isReferenced()) { int32_t count = matcher->groupCount(); for (int32_t i = 0; i <= count; i++) { UnicodeString ustring = matcher->group(i, status); if (U_FAILURE(status)) { return false; } // Convert UnicodeString back to UTF-8. std::string string; ustring.toUTF8String(string); String match = String(string); if (flags & k_UREGEX_OFFSET_CAPTURE) { // start() returns the index in UnicodeString, which // normally means the index into an array of 16-bit // code "units" (not "points"). int32_t start = matcher->start(i, status); if (U_FAILURE(status)) { return false; } start = usubject.countChar32(0, start); matches->append(make_packed_array(match, start)); } else { matches->append(match); } } } } return matched; } // Need to have a valid installation of the transliteration data in /lib64. // Initialization will be taken care of by ext_array which also uses icu. class TransliteratorWrapper { public: TransliteratorWrapper() { UnicodeString basicID("Any-Latin ; NFKD; [:nonspacing mark:] Remove"); UnicodeString basicIDAccent("Any-Latin ; NFKC"); UErrorCode status = U_ZERO_ERROR; m_tl = Transliterator::createInstance(basicID, UTRANS_FORWARD, status); // Note that if the first createInstance fails, the status will cause the // second createInstance to also fail. m_tl_accent = Transliterator::createInstance(basicIDAccent, UTRANS_FORWARD, status); if (U_FAILURE(status)) { raise_warning(std::string(u_errorName(status))); //m_tl should be NULL if createInstance fails but better safe than sorry. m_tl = NULL; m_tl_accent = NULL; } } void transliterate(UnicodeString& u_str) { if (m_tl) { m_tl->transliterate(u_str); } else { raise_warning("Transliterator not initialized."); } } void transliterate_with_accents(UnicodeString& u_str) { if (m_tl_accent) { m_tl_accent->transliterate(u_str); } else { raise_warning("Transliterator not initialized."); } } private: Transliterator* m_tl; Transliterator* m_tl_accent; }; IMPLEMENT_THREAD_LOCAL(TransliteratorWrapper, s_transliterator); String f_icu_transliterate(const String& str, bool remove_accents) { UnicodeString u_str = UnicodeString::fromUTF8(str.data()); if (remove_accents) { s_transliterator->transliterate(u_str); } else { s_transliterator->transliterate_with_accents(u_str); } // Convert UnicodeString back to UTF-8. std::string string; u_str.toUTF8String(string); return String(string); } // There are quicker ways to do this conversion, but it's necessary to follow // this to match the functionality of fbcode/multifeed/text/TokenizeTextMap.cpp. std::string icuStringToUTF8(const UnicodeString& ustr) { UErrorCode status = U_ZERO_ERROR; int32_t bufSize = 0; std::string result; // Calculate the size of the buffer needed to hold ustr, converted to UTF-8. u_strToUTF8(NULL, 0, &bufSize, ustr.getBuffer(), ustr.length(), &status); if (status != U_BUFFER_OVERFLOW_ERROR && status != U_STRING_NOT_TERMINATED_WARNING) { return result; } result.resize(bufSize); status = U_ZERO_ERROR; u_strToUTF8(&result[0], bufSize, NULL, ustr.getBuffer(), ustr.length(), &status); if (U_FAILURE(status)) { result.clear(); } return result; } // Regex matchers for spaces and numbers. class SpaceMatcher : public ICUMatcher { public: SpaceMatcher() { set("^\\s+$"); } }; class NumMatcher : public ICUMatcher { public: NumMatcher() { set("\\d"); } }; // Transliterator to convert UnicodeStrings to lower case. class LowerCaseTransliterator : public ICUTransliterator { public: LowerCaseTransliterator() { set("Upper; Lower;"); } }; // Thread-local globals. IMPLEMENT_THREAD_LOCAL(SpaceMatcher, s_spaceMatcher); IMPLEMENT_THREAD_LOCAL(NumMatcher, s_numMatcher); IMPLEMENT_THREAD_LOCAL(LowerCaseTransliterator, s_lctranslit); /* Normalize a unicode string depending on its type. * See icu/Tokenizer.cpp for definition of types. */ void normalizeToken(struct Token& token) { UnicodeString& str = token.value; int32_t type = token.status; switch (type) { // punctuations case 0: break; case 100: str = s_numMatcher->replaceAll(str, "X"); break; // words case 200: s_lctranslit->transliterate(str); break; // katekana/hiragana case 300: s_lctranslit->transliterate(str); break; // ideographic case 400: s_lctranslit->transliterate(str); break; case 500: str = "TOKEN_EMAIL"; break; case 501: str = "TOKEN_URL"; break; // emoticon case 502: s_lctranslit->transliterate(str); break; case 503: str = "TOKEN_HEART"; break; // exclamation case 504: break; case 505: str = "TOKEN_DATE"; break; case 506: str = "TOKEN_MONEY"; break; case 507: str = "TOKEN_TIME"; break; //acronym, lower casing because could just be capitalized word case 508: s_lctranslit->transliterate(str); break; default: str = ""; } } /* Returns a list of tokens, but with various normalizations performed * based on the token type. * * Default behavior: * Whitespace: dropped (removed from output) * Words: converted to lower case * Numbers: replaced with #XXX, where the number of X's is based on the * format of the number; any punctuation is maintained * Japanese/Chinese scripts: converted to lower case * Email: Converted to TOKEN_EMAIL * URL: Converted to TOKEN_URL * Emoticon: Left as-is * Heart: Converted to TOKEN_HEART * Exclamation: Replaced with an empty string * Date: Replaced with TOKEN_DATE * Money: Replaced with TOKEN_MONEY * Time: Replaced with TOKEN_TIME * Acronym: converted to lower case * Other: replaced with empty string * */ Array f_icu_tokenize(const String& text) { // Boundary markers that indicate the beginning and end of a token stream. const String BEGIN_MARKER("_B_"); const String END_MARKER("_E_"); Array ret; std::vector<Token> tokens; tokenizeString(tokens, getMaster(), UnicodeString::fromUTF8(text.data())); int i = 0; ret.set(i++, BEGIN_MARKER); for(std::vector<Token>::iterator iter = tokens.begin(); iter != tokens.end(); iter++) { normalizeToken(*iter); const UnicodeString& word = iter->value; // Ignore spaces and empty strings. if(!s_spaceMatcher->matches(word) && word.length() > 0) { ret.set(i++, String(icuStringToUTF8(word))); } } ret.set(i++, END_MARKER); return ret; } /////////////////////////////////////////////////////////////////////////////// }
31.739521
80
0.638902
[ "vector" ]
446ec4fedf7686d5dc189843556bfd4e08395091
6,313
cpp
C++
oneEngine/oneGame/source/m04-editor/standalone/seqeditor/noderenderer/EnumPropertyRenderer.cpp
skarik/1Engine
84e846544b4a89af8fd7e9236131363096538ef4
[ "BSD-3-Clause" ]
8
2017-12-08T02:59:31.000Z
2022-02-02T04:30:03.000Z
oneEngine/oneGame/source/m04-editor/standalone/seqeditor/noderenderer/EnumPropertyRenderer.cpp
skarik/1Engine
84e846544b4a89af8fd7e9236131363096538ef4
[ "BSD-3-Clause" ]
2
2021-04-16T03:44:42.000Z
2021-08-30T06:48:44.000Z
oneEngine/oneGame/source/m04-editor/standalone/seqeditor/noderenderer/EnumPropertyRenderer.cpp
skarik/1Engine
84e846544b4a89af8fd7e9236131363096538ef4
[ "BSD-3-Clause" ]
1
2021-04-16T02:09:54.000Z
2021-04-16T02:09:54.000Z
#include "./EnumPropertyRenderer.h" #include "./NodeBoardRenderer.h" #include "../NodeBoardState.h" #include "../SequenceEditor.h" #include "core-ext/containers/arStringEnum.h" m04::editor::sequence::EnumPropertyRenderer::EnumPropertyRenderer ( const CreationParameters& params ) : IPropertyRenderer(params) { // Find the matching enum definition const auto& editorEnums = m_nodeRenderer->GetNodeBoardState()->GetEditor()->GetEnums(); arstring128 enumDefinitionName; std::string identifierLower = m_property->identifier; core::utils::string::ToLower(identifierLower); if (editorEnums.find(identifierLower.c_str()) != editorEnums.end()) { enumDefinitionName = identifierLower.c_str(); } else { // Take display name and remove the spaces std::string moddedDisplayName = m_property->label; moddedDisplayName.erase(std::remove(moddedDisplayName.begin(), moddedDisplayName.end(), ' ')); core::utils::string::ToLower(moddedDisplayName); if (editorEnums.find(moddedDisplayName.c_str()) != editorEnums.end()) { enumDefinitionName = moddedDisplayName.c_str(); } } //ARCORE_ASSERT(enumDefinitionName.length() > 0); // TODO m_enumDefinition = editorEnums.find(enumDefinitionName)->second; } void m04::editor::sequence::EnumPropertyRenderer::OnClicked ( const ui::eventide::Element::EventMouse& mouse_event ) { typedef ui::eventide::Element::EventMouse EventMouse; ARCORE_ASSERT(mouse_event.type == EventMouse::Type::kClicked); if (mouse_event.button == core::kMBLeft) { if (m_enumDefinition != NULL) { // find matching enum name int32_t currentEnumIndex = -1; const char* str = GetNode()->view->GetPropertyAsString(m_property->identifier); if (str == NULL || strlen(str) == 0) { currentEnumIndex = 0; } else { auto enumValue = m_enumDefinition->CreateValue(str); if (enumValue.IsValid()) { currentEnumIndex = enumValue.GetEnumIndex(); } else { currentEnumIndex = 0; } } // scroll thru values currentEnumIndex++; auto enumValue = m_enumDefinition->CreateValueFromIndex(currentEnumIndex); if (enumValue.IsValid()) { GetNode()->view->SetProperty(m_property->identifier, enumValue.GetName()); } else { GetNode()->view->SetProperty(m_property->identifier, m_enumDefinition->CreateValueFromIndex(0).GetName()); } } } } void m04::editor::sequence::EnumPropertyRenderer::BuildMesh ( void ) { using namespace ui::eventide; ParamsForText textParams; ParamsForCube cubeParams; ParamsForQuad quadParams; textParams = ParamsForText(); textParams.string = m_property->label.c_str(); textParams.font_texture = &m_nodeRenderer->GetRenderResources().m_fontTexture; textParams.position = m_bboxAll.GetCenterPoint() - Vector3f(m_bboxAll.GetExtents().x, m_bboxAll.GetExtents().y, 0) + Vector3f(0, 0, 0.1F); textParams.rotation = m_nodeRenderer->GetBBoxAbsolute().m_M.getRotator(); textParams.size = math::lerp(0.0F, ui::eventide::DefaultStyler.text.buttonSize, ui::eventide::DefaultStyler.text.headingSize); textParams.alignment = AlignHorizontal::kLeft; textParams.color = m_propertyState->m_hovered ? DefaultStyler.text.headingColor : DefaultStyler.text.headingColor.Lerp(DefaultStyler.box.defaultColor, 0.3F); buildText(textParams); /*quadParams = {}; quadParams.position = bbox_key.GetCenterPoint(); quadParams.size = Vector3f(1, 1, 1) * (bbox_key.GetExtents().y); quadParams.color = Color(1, 1, 1, 1).Lerp(DefaultStyler.box.defaultColor, 0.5F); buildQuad(quadParams); if (node->sequenceInfo->view->GetPropertyAsBool(in_property.identifier)) { quadParams = {}; quadParams.position = bbox_key.GetCenterPoint() + Vector3f(0, 0, 2); quadParams.size = Vector3f(1, 1, 1) * (bbox_key.GetExtents().y - m_padding.x * 0.5F); quadParams.uvs = Rect(128.0F / 1024, 0.0F, 128.0F / 1024, 128.0F / 1024); quadParams.texture = &m_uiElementsTexture; quadParams.color = Color(1, 1, 1, 1); buildQuad(quadParams); }*/ // TODO: so much of this can be moved to a separate class and cached (or at least just cached) // Now, render the current setting if (m_enumDefinition != NULL) { // find matching enum name const char* str = GetNode()->view->GetPropertyAsString(m_property->identifier); if (str == NULL || strlen(str) == 0) { str = m_enumDefinition->GetEnumName(0); //todo } else { auto enumValue = m_enumDefinition->CreateValue(str); if (enumValue.IsValid()) { str = enumValue.GetName(); } else { str = m_enumDefinition->GetEnumName(0); //todo } } arstring256 camelCasedValue = core::utils::string::CamelCaseToReadable(str, strlen(str)); camelCasedValue[0] = ::toupper(camelCasedValue[0]); textParams = ParamsForText(); textParams.string = camelCasedValue.c_str(); textParams.font_texture = &m_nodeRenderer->GetRenderResources().m_fontTexture; textParams.position = m_bboxKey.GetCenterPoint() - Vector3f(m_bboxKey.GetExtents().x, m_bboxKey.GetExtents().y, 0) + Vector3f(0, 0, 0.1F); textParams.rotation = m_nodeRenderer->GetBBoxAbsolute().m_M.getRotator(); textParams.size = math::lerp(0.0F, ui::eventide::DefaultStyler.text.buttonSize, ui::eventide::DefaultStyler.text.headingSize); textParams.alignment = AlignHorizontal::kLeft; textParams.color = m_propertyState->m_hovered ? DefaultStyler.text.headingColor : DefaultStyler.text.headingColor.Lerp(DefaultStyler.box.defaultColor, 0.3F); buildText(textParams); } } void m04::editor::sequence::EnumPropertyRenderer::UpdateLayout ( const Vector3f& upper_left_corner, const Real left_column_width, const core::math::BoundingBox& node_bbox ) { m_bboxHeight = ui::eventide::DefaultStyler.text.buttonSize + m_nodeRenderer->GetPadding().y; m_bboxAll = core::math::BoundingBox( Matrix4x4(), upper_left_corner + Vector3f(m_nodeRenderer->GetPadding().x, 0, 0), upper_left_corner + Vector3f((node_bbox.GetExtents().x - m_nodeRenderer->GetPadding().x) * 2.0F, -ui::eventide::DefaultStyler.text.buttonSize, 4.0F) ); m_bboxKey = core::math::BoundingBox( Matrix4x4(), upper_left_corner + Vector3f(left_column_width, 0, 0) + Vector3f(m_nodeRenderer->GetPadding().x, 0, 0), upper_left_corner + Vector3f((node_bbox.GetExtents().x - m_nodeRenderer->GetPadding().x) * 2.0F, -ui::eventide::DefaultStyler.text.buttonSize, 4.0F) ); }
36.281609
172
0.728972
[ "render" ]
4471a1748596063928585cf9e1160ca3a25d683c
6,913
hpp
C++
relational_operators/UpdateOperator.hpp
craig-chasseur/incubator-quickstep
00ca1e4b3a9c9838dcb9509058b8a40b0f573617
[ "Apache-2.0" ]
null
null
null
relational_operators/UpdateOperator.hpp
craig-chasseur/incubator-quickstep
00ca1e4b3a9c9838dcb9509058b8a40b0f573617
[ "Apache-2.0" ]
null
null
null
relational_operators/UpdateOperator.hpp
craig-chasseur/incubator-quickstep
00ca1e4b3a9c9838dcb9509058b8a40b0f573617
[ "Apache-2.0" ]
1
2021-12-04T18:48:44.000Z
2021-12-04T18:48:44.000Z
/** * Copyright 2011-2015 Quickstep Technologies LLC. * Copyright 2015-2016 Pivotal Software, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. **/ #ifndef QUICKSTEP_RELATIONAL_OPERATORS_UPDATE_OPERATOR_HPP_ #define QUICKSTEP_RELATIONAL_OPERATORS_UPDATE_OPERATOR_HPP_ #include <cstddef> #include <memory> #include <unordered_map> #include <vector> #include "catalog/CatalogRelation.hpp" #include "catalog/CatalogTypedefs.hpp" #include "query_execution/QueryContext.hpp" #include "query_execution/QueryExecutionTypedefs.hpp" #include "relational_operators/RelationalOperator.hpp" #include "relational_operators/WorkOrder.hpp" #include "storage/StorageBlockInfo.hpp" #include "utility/Macros.hpp" #include "glog/logging.h" #include "tmb/id_typedefs.h" namespace tmb { class MessageBus; } namespace quickstep { class CatalogRelationSchema; class InsertDestination; class Predicate; class Scalar; class StorageManager; class WorkOrderProtosContainer; class WorkOrdersContainer; /** \addtogroup RelationalOperators * @{ */ /** * @note We assume that UpdateOperator won't have dependencies in the query plan * DAG. Thus it will have all the input that it needs before execution. * If at all in the future, if UpdateOperator has dependencies, we can * follow similar arrangement as in SelectOperator. **/ class UpdateOperator : public RelationalOperator { public: /** * @brief Constructor * * @param query_id The ID of the query to which this operator belongs. * @param relation The relation to perform the UPDATE over. * @param relocation_destination_index The index of the InsertDestination in * the QueryContext to relocate tuples which can not be updated * in-place. * @param predicate_index The index of predicate in QueryContext. All tuples * matching pred will be updated (or kInvalidPredicateId to update all * tuples). * @param update_group_index The index of a update group (the map of * attribute_ids to Scalars) which should be evaluated to get the new * value for the corresponding attribute. * * @warning The constructed InsertDestination should belong to relation, but * must NOT contain any pre-existing blocks. **/ UpdateOperator( const std::size_t query_id, const CatalogRelation &relation, const QueryContext::insert_destination_id relocation_destination_index, const QueryContext::predicate_id predicate_index, const QueryContext::update_group_id update_group_index) : RelationalOperator(query_id), relation_(relation), relocation_destination_index_(relocation_destination_index), predicate_index_(predicate_index), update_group_index_(update_group_index), input_blocks_(relation.getBlocksSnapshot()), started_(false) {} ~UpdateOperator() override {} bool getAllWorkOrders(WorkOrdersContainer *container, QueryContext *query_context, StorageManager *storage_manager, const tmb::client_id scheduler_client_id, tmb::MessageBus *bus) override; bool getAllWorkOrderProtos(WorkOrderProtosContainer *container) override; QueryContext::insert_destination_id getInsertDestinationID() const override { return relocation_destination_index_; } const relation_id getOutputRelationID() const override { return relation_.getID(); } private: const CatalogRelation &relation_; const QueryContext::insert_destination_id relocation_destination_index_; const QueryContext::predicate_id predicate_index_; const QueryContext::update_group_id update_group_index_; const std::vector<block_id> input_blocks_; bool started_; DISALLOW_COPY_AND_ASSIGN(UpdateOperator); }; /** * @brief A WorkOrder produced by UpdateOperator. **/ class UpdateWorkOrder : public WorkOrder { public: /** * @brief Constructor * * @param query_id The ID of the query to which this WorkOrder belongs. * @param relation The relation to perform the UPDATE over. * @param predicate All tuples matching \c predicate will be updated (or NULL * to update all tuples). * @param assignments The assignments (the map of attribute_ids to Scalars) * which should be evaluated to get the new value for the corresponding * attribute. * @param input_block_id The block id. * @param relocation_destination The InsertDestination to relocate tuples * which can not be updated in-place. * @param storage_manager The StorageManager to use. * @param update_operator_index The index of the Update Operator in the query * plan DAG. * @param scheduler_client_id The TMB client ID of the scheduler thread. * @param bus A pointer to the TMB. **/ UpdateWorkOrder( const std::size_t query_id, const CatalogRelationSchema &relation, const block_id input_block_id, const Predicate *predicate, const std::unordered_map<attribute_id, std::unique_ptr<const Scalar>> &assignments, InsertDestination *relocation_destination, StorageManager *storage_manager, const std::size_t update_operator_index, const tmb::client_id scheduler_client_id, MessageBus *bus) : WorkOrder(query_id), relation_(relation), input_block_id_(input_block_id), predicate_(predicate), assignments_(assignments), relocation_destination_(DCHECK_NOTNULL(relocation_destination)), storage_manager_(DCHECK_NOTNULL(storage_manager)), update_operator_index_(update_operator_index), scheduler_client_id_(scheduler_client_id), bus_(DCHECK_NOTNULL(bus)) {} ~UpdateWorkOrder() override {} void execute() override; private: const CatalogRelationSchema &relation_; const block_id input_block_id_; const Predicate *predicate_; const std::unordered_map<attribute_id, std::unique_ptr<const Scalar>> &assignments_; InsertDestination *relocation_destination_; StorageManager *storage_manager_; const std::size_t update_operator_index_; const tmb::client_id scheduler_client_id_; MessageBus *bus_; DISALLOW_COPY_AND_ASSIGN(UpdateWorkOrder); }; /** @} */ } // namespace quickstep #endif // QUICKSTEP_RELATIONAL_OPERATORS_UPDATE_OPERATOR_HPP_
34.738693
86
0.733545
[ "vector" ]
447674ac759407b28d2666b67e292374514e1824
3,417
cc
C++
Codeforces/362 Division 1/Problem D/D.cc
VastoLorde95/Competitive-Programming
6c990656178fb0cd33354cbe5508164207012f24
[ "MIT" ]
170
2017-07-25T14:47:29.000Z
2022-01-26T19:16:31.000Z
Codeforces/362 Division 1/Problem D/D.cc
navodit15/Competitive-Programming
6c990656178fb0cd33354cbe5508164207012f24
[ "MIT" ]
null
null
null
Codeforces/362 Division 1/Problem D/D.cc
navodit15/Competitive-Programming
6c990656178fb0cd33354cbe5508164207012f24
[ "MIT" ]
55
2017-07-28T06:17:33.000Z
2021-10-31T03:06:22.000Z
#include <bits/stdc++.h> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #define fi first #define se second #define pb push_back #define mp make_pair #define foreach(it, v) for(__typeof((v).begin()) it=(v).begin(); it != (v).end(); ++it) #define meta __FUNCTION__,__LINE__ #define _ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define __ freopen("input.txt","r",stdin);freopen("output.txt","w",stdout); using namespace std; const long double PI = 3.1415926535897932384626433832795; template<typename S, typename T> ostream& operator<<(ostream& out,pair<S,T> const& p){out<<'('<<p.fi<<", "<<p.se<<')';return out;} template<typename T> ostream& operator<<(ostream& out,vector<T> const& v){ int l=v.size();for(int i=0;i<l-1;i++)out<<v[i]<<' ';if(l>0)out<<v[l-1];return out;} void tr(){cout << endl;} template<typename S, typename ... Strings> void tr(S x, const Strings&... rest){cout<<x<<' ';tr(rest...);} typedef long long ll; typedef pair<int,int> pii; const int N = 210, M = 26; const ll INF = 1ll << 60; bitset<N> suff[N]; struct Matrix{ int n; vector<vector<ll> > m; Matrix(int nn = 0, bool id = false){ n = nn; m.resize(n); for(int i = 0; i < n; i++) m[i].resize(n, -INF); if(id) for(int i = 0; i < n; i++) m[i][i] = 0; } vector<ll>& operator[](int i){return m[i];} int size(){return n;} }; Matrix operator*(Matrix &A, Matrix &B){ int n = A.size(); Matrix C(n); for(int i = 0; i < n; i++) for(int j = 0; j < n; j++) for(int k = 0; k < n; k++) C[i][j] = max(C[i][j], A[i][k] + B[k][j]); return C; } Matrix fast(Matrix A, ll b){ Matrix ret(N, true); while(b){ if((b&1)) ret = ret * A; A = A * A; b >>= 1; } return ret; } int a[N]; struct AhoCorasick{ vector<vector<int> > tree; vector<int> f; int ncnt; queue<int> q; AhoCorasick(vector<vector<int> > &w){ f.resize(N, -1); tree.resize(N); for(int i = 0; i < N; i++) tree[i].resize(M, -1); ncnt = 1; for(int j = 0; j < w.size(); j++){ vector<int> &v = w[j]; int cur = 0; for(int i = 0; i < v.size(); i++){ if(tree[cur][v[i]] == -1) tree[cur][v[i]] = ncnt++; cur = tree[cur][v[i]]; } suff[cur][j] = 1; } for(int i = 0; i < M; i++){ if(tree[0][i] == -1) tree[0][i] = 0; else{ f[tree[0][i]] = 0; q.push(tree[0][i]); } } while(!q.empty()){ int cur = q.front(); q.pop(); suff[cur] |= suff[f[cur]]; for(int i = 0; i < M; i++){ if(tree[cur][i] == -1) tree[cur][i] = tree[f[cur]][i]; else{ f[tree[cur][i]] = tree[f[cur]][i]; q.push(tree[cur][i]); } } } } Matrix buildMatrix(){ Matrix ret(N, true); vector<ll> wt(N); for(int i = 0; i < N; i++) for(int j = 0; j < N; j++) if(suff[i][j]) wt[i] += a[j]; for(int i = 0; i < ncnt; i++){ for(int j = 0; j < M; j++){ int k = tree[i][j]; assert(k >= 0 and k < N); ret[i][k] = max(ret[i][k], wt[k]); } } return ret; } }; int n; ll l; int main(){ _ cin >> n >> l; for(int i = 0; i < n; i++){ cin >> a[i]; } vector<vector<int> > w; for(int i = 0; i < n; i++){ vector<int> v; string s; cin >> s; for(char &c : s) v.pb(c-'a'); w.pb(v); } Matrix m = AhoCorasick(w).buildMatrix(); m = fast(m, l); ll ans = 0; for(int i = 0; i < N; i++) ans = max(ans, m[0][i]); cout << ans << endl; return 0; }
19.982456
97
0.522095
[ "vector" ]
447bbdea64c25c7c8eb7b28228537ffb4935e82f
1,554
hpp
C++
include/internal/csv_utility.hpp
andiwand/csv-parser
d911abcd564642424d4b01bee270fe70501f51b9
[ "MIT" ]
null
null
null
include/internal/csv_utility.hpp
andiwand/csv-parser
d911abcd564642424d4b01bee270fe70501f51b9
[ "MIT" ]
1
2020-08-04T16:38:30.000Z
2020-08-05T06:34:52.000Z
include/internal/csv_utility.hpp
andiwand/csv-parser
d911abcd564642424d4b01bee270fe70501f51b9
[ "MIT" ]
null
null
null
#pragma once #include "compatibility.hpp" #include "constants.hpp" #include "data_type.h" #include <string> #include <type_traits> #include <unordered_map> namespace csv { /** Returned by get_file_info() */ struct CSVFileInfo { std::string filename; /**< Filename */ std::vector<std::string> col_names; /**< CSV column names */ char delim; /**< Delimiting character */ RowCount n_rows; /**< Number of rows in a file */ int n_cols; /**< Number of columns in a CSV */ }; /** @name Shorthand Parsing Functions * @brief Convienience functions for parsing small strings */ ///@{ CSVReader operator ""_csv(const char*, size_t); CSVReader parse(csv::string_view in, CSVFormat format = CSVFormat()); ///@} /** @name Utility Functions */ ///@{ std::unordered_map<std::string, DataType> csv_data_types(const std::string&); CSVFileInfo get_file_info(const std::string& filename); int get_col_pos(const std::string filename, const std::string col_name, const CSVFormat format = CSVFormat::guess_csv()); ///@} namespace internals { template<typename T> inline bool is_equal(T a, T b, T epsilon = 0.001) { /** Returns true if two floating point values are about the same */ static_assert(std::is_floating_point<T>::value, "T must be a floating point type."); return std::abs(a - b) < epsilon; } } }
35.318182
96
0.593951
[ "vector" ]
447cc2b6a80c51ec6bce851871ab9b77a72cc3eb
34,952
cpp
C++
src/chrono/timestepper/ChTimestepper.cpp
chfeller/chrono
652d5a6ed433611f2d335cf33b7da5658bf6f620
[ "BSD-3-Clause" ]
1
2015-03-19T16:48:13.000Z
2015-03-19T16:48:13.000Z
src/chrono/timestepper/ChTimestepper.cpp
chfeller/chrono
652d5a6ed433611f2d335cf33b7da5658bf6f620
[ "BSD-3-Clause" ]
null
null
null
src/chrono/timestepper/ChTimestepper.cpp
chfeller/chrono
652d5a6ed433611f2d335cf33b7da5658bf6f620
[ "BSD-3-Clause" ]
null
null
null
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of the distribution and at // http://projectchrono.org/license-chrono.txt. // // ============================================================================= // Authors: Alessandro Tasora, Radu Serban // ============================================================================= #include <cmath> #include "chrono/timestepper/ChTimestepper.h" namespace chrono { // ----------------------------------------------------------------------------- // Trick to avoid putting the following mapper macro inside the class definition in .h file: // enclose macros in local 'my_enum_mappers', just to avoid avoiding cluttering of the parent class. class my_enum_mappers : public ChTimestepper { public: CH_ENUM_MAPPER_BEGIN(Type); CH_ENUM_VAL(Type::EULER_IMPLICIT); CH_ENUM_VAL(Type::EULER_IMPLICIT_LINEARIZED); CH_ENUM_VAL(Type::EULER_IMPLICIT_PROJECTED); CH_ENUM_VAL(Type::TRAPEZOIDAL); CH_ENUM_VAL(Type::TRAPEZOIDAL_LINEARIZED); CH_ENUM_VAL(Type::HHT); CH_ENUM_VAL(Type::HEUN); CH_ENUM_VAL(Type::RUNGEKUTTA45); CH_ENUM_VAL(Type::EULER_EXPLICIT); CH_ENUM_VAL(Type::LEAPFROG); CH_ENUM_VAL(Type::NEWMARK); CH_ENUM_VAL(Type::CUSTOM); CH_ENUM_MAPPER_END(Type); }; void ChTimestepper::ArchiveOUT(ChArchiveOut& marchive) { // version number marchive.VersionWrite<ChTimestepper>(); // method type: my_enum_mappers::Type_mapper typemapper; Type type = GetType(); marchive << CHNVP(typemapper(type), "timestepper_type"); // serialize all member data: marchive << CHNVP(verbose); marchive << CHNVP(Qc_do_clamp); marchive << CHNVP(Qc_clamping); } void ChTimestepper::ArchiveIN(ChArchiveIn& marchive) { // version number int version = marchive.VersionRead<ChTimestepper>(); // method type: my_enum_mappers::Type_mapper typemapper; Type type = GetType(); marchive >> CHNVP(typemapper(type), "timestepper_type"); // stream in all member data: marchive >> CHNVP(verbose); marchive >> CHNVP(Qc_do_clamp); marchive >> CHNVP(Qc_clamping); } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperEulerExpl) // Euler explicit timestepper. // This performs the typical y_new = y+ dy/dt * dt integration with Euler formula. void ChTimestepperEulerExpl::Advance(const double dt) { // setup main vectors GetIntegrable()->StateSetup(Y, dYdt); // setup auxiliary vectors L.Reset(this->GetIntegrable()->GetNconstr()); GetIntegrable()->StateGather(Y, T); // state <- system GetIntegrable()->StateSolve(dYdt, L, Y, T, dt, false); // dY/dt = f(Y,T) // Euler formula! // y_new= y + dy/dt * dt Y = Y + dYdt * dt; // also: GetIntegrable().StateIncrement(y_new, y, Dy); T += dt; GetIntegrable()->StateScatter(Y, T); // state -> system GetIntegrable()->StateScatterDerivative(dYdt); // -> system auxiliary data GetIntegrable()->StateScatterReactions(L); // -> system auxiliary data } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperEulerExplIIorder) // Euler explicit timestepper customized for II order. // (It gives the same results of ChTimestepperEulerExpl, // but this performs a bit faster because it can exploit // the special structure of ChIntegrableIIorder) // This performs the typical // x_new = x + v * dt // v_new = v + a * dt // integration with Euler formula. void ChTimestepperEulerExplIIorder::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors Dv.Reset(mintegrable->GetNcoords_v(), GetIntegrable()); L.Reset(mintegrable->GetNconstr()); mintegrable->StateGather(X, V, T); // state <- system mintegrable->StateSolveA(A, L, X, V, T, dt, false); // Dv/dt = f(x,v,T) // Euler formula! X = X + V * dt; // x_new= x + v * dt V = V + A * dt; // v_new= v + a * dt T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterAcceleration(A); // -> system auxiliary data mintegrable->StateScatterReactions(L); // -> system auxiliary data } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperEulerSemiImplicit) // Euler semi-implicit timestepper // This performs the typical // v_new = v + a * dt // x_new = x + v_new * dt // integration with Euler semi-implicit formula. void ChTimestepperEulerSemiImplicit::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors L.Reset(mintegrable->GetNconstr()); mintegrable->StateGather(X, V, T); // state <- system mintegrable->StateSolveA(A, L, X, V, T, dt, false); // Dv/dt = f(x,v,T) Dv = f(x,v,T)*dt // Semi-implicit Euler formula! (note the order of update of x and v, respect to original Euler II order explicit) V = V + A * dt; // v_new= v + a * dt X = X + V * dt; // x_new= x + v_new * dt T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterAcceleration(A); // -> system auxiliary data mintegrable->StateScatterReactions(L); // -> system auxiliary data } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperRungeKuttaExpl) // Performs a step of a 4th order explicit Runge-Kutta integration scheme. void ChTimestepperRungeKuttaExpl::Advance(const double dt) { // setup main vectors GetIntegrable()->StateSetup(Y, dYdt); // setup auxiliary vectors int n_y = GetIntegrable()->GetNcoords_y(); int n_dy = GetIntegrable()->GetNcoords_dy(); int n_c = GetIntegrable()->GetNconstr(); y_new.Reset(n_y, GetIntegrable()); Dydt1.Reset(n_dy, GetIntegrable()); Dydt2.Reset(n_dy, GetIntegrable()); Dydt3.Reset(n_dy, GetIntegrable()); Dydt4.Reset(n_dy, GetIntegrable()); L.Reset(n_c); GetIntegrable()->StateGather(Y, T); // state <- system GetIntegrable()->StateSolve(Dydt1, L, Y, T, dt, false); // note, 'false'=no need to update with StateScatter before computation y_new = Y + Dydt1 * 0.5 * dt; // integrable.StateIncrement(y_new, Y, Dydt1*0.5*dt); GetIntegrable()->StateSolve(Dydt2, L, y_new, T + dt * 0.5, dt); y_new = Y + Dydt2 * 0.5 * dt; // integrable.StateIncrement(y_new, Y, Dydt2*0.5*dt); GetIntegrable()->StateSolve(Dydt3, L, y_new, T + dt * 0.5, dt); y_new = Y + Dydt3 * dt; // integrable.StateIncrement(y_new, Y, Dydt3*dt); GetIntegrable()->StateSolve(Dydt4, L, y_new, T + dt, dt); Y = Y + (Dydt1 + Dydt2 * 2.0 + Dydt3 * 2.0 + Dydt4) * (1. / 6.) * dt; // integrable.StateIncrement(...); dYdt = Dydt4; // to check T += dt; GetIntegrable()->StateScatter(Y, T); // state -> system GetIntegrable()->StateScatterDerivative(dYdt); // -> system auxiliary data GetIntegrable()->StateScatterReactions(L); // -> system auxiliary data } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperHeun) // Performs a step of a Heun explicit integrator. It is like a 2nd Runge Kutta. void ChTimestepperHeun::Advance(const double dt) { // setup main vectors GetIntegrable()->StateSetup(Y, dYdt); // setup auxiliary vectors int n_y = GetIntegrable()->GetNcoords_y(); int n_dy = GetIntegrable()->GetNcoords_dy(); int n_c = GetIntegrable()->GetNconstr(); y_new.Reset(n_y, GetIntegrable()); Dydt1.Reset(n_dy, GetIntegrable()); Dydt2.Reset(n_dy, GetIntegrable()); L.Reset(n_c); GetIntegrable()->StateGather(Y, T); // state <- system GetIntegrable()->StateSolve(Dydt1, L, Y, T, dt, false); // note, 'false'=no need to update with StateScatter before computation y_new = Y + Dydt1 * dt; GetIntegrable()->StateSolve(Dydt2, L, y_new, T + dt, dt); Y = Y + (Dydt1 + Dydt2) * (dt / 2.); dYdt = Dydt2; T += dt; GetIntegrable()->StateScatter(Y, T); // state -> system GetIntegrable()->StateScatterDerivative(dYdt); // -> system auxiliary data GetIntegrable()->StateScatterReactions(L); // -> system auxiliary data } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperLeapfrog) // Performs a step of a Leapfrog explicit integrator. // It is a symplectic method, with 2nd order accuracy, // at least when F depends on positions only. // Note: uses last step acceleration: changing or resorting // the numbering of DOFs will invalidate it. // Suggestion: use the ChTimestepperEulerSemiImplicit, it gives // the same accuracy with a bit of faster performance. void ChTimestepperLeapfrog::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors L.Reset(mintegrable->GetNconstr()); Aold.Reset(mintegrable->GetNcoords_v(), GetIntegrable()); mintegrable->StateGather(X, V, T); // state <- system mintegrable->StateGatherAcceleration(Aold); // advance X (uses last A) X = X + V * dt + Aold * (0.5 * dt * dt); // computes new A (NOTE!!true for imposing a state-> system scatter update,because X changed..) mintegrable->StateSolveA(A, L, X, V, T, dt, true); // Dv/dt = f(x,v,T) Dv = f(x,v,T)*dt // advance V V = V + (Aold + A) * (0.5 * dt); T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterAcceleration(A); // -> system auxiliary data mintegrable->StateScatterReactions(L); // -> system auxiliary data } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperEulerImplicit) // Performs a step of Euler implicit for II order systems void ChTimestepperEulerImplicit::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors Dv.Reset(mintegrable->GetNcoords_v(), GetIntegrable()); Dl.Reset(mintegrable->GetNconstr()); Xnew.Reset(mintegrable->GetNcoords_x(), mintegrable); Vnew.Reset(mintegrable->GetNcoords_v(), mintegrable); R.Reset(mintegrable->GetNcoords_v()); Qc.Reset(mintegrable->GetNconstr()); L.Reset(mintegrable->GetNconstr()); mintegrable->StateGather(X, V, T); // state <- system // Extrapolate a prediction as warm start Xnew = X + V * dt; Vnew = V; //+ A()*dt; // use Newton Raphson iteration to solve implicit Euler for v_new // // [ M - dt*dF/dv - dt^2*dF/dx Cq' ] [ Dv ] = [ M*(v_old - v_new) + dt*f + dt*Cq'*l ] // [ Cq 0 ] [ -dt*Dl ] = [ -C/dt ] numiters = 0; numsetups = 0; numsolves = 0; for (int i = 0; i < this->GetMaxiters(); ++i) { mintegrable->StateScatter(Xnew, Vnew, T + dt); // state -> system R.Reset(); Qc.Reset(); mintegrable->LoadResidual_F(R, dt); mintegrable->LoadResidual_Mv(R, (V - Vnew), 1.0); mintegrable->LoadResidual_CqL(R, L, dt); mintegrable->LoadConstraint_C(Qc, 1.0 / dt, Qc_do_clamp, Qc_clamping); if (verbose) GetLog() << " Euler iteration=" << i << " |R|=" << R.NormInf() << " |Qc|=" << Qc.NormInf() << "\n"; if ((R.NormInf() < abstolS) && (Qc.NormInf() < abstolL)) break; mintegrable->StateSolveCorrection( Dv, Dl, R, Qc, 1.0, // factor for M -dt, // factor for dF/dv -dt * dt, // factor for dF/dx Xnew, Vnew, T + dt, // not used here (scatter = false) false, // do not StateScatter update to Xnew Vnew T+dt before computing correction true // always call the solver's Setup ); numiters++; numsetups++; numsolves++; Dl *= (1.0 / dt); // Note it is not -(1.0/dt) because we assume StateSolveCorrection already flips sign of Dl L += Dl; Vnew += Dv; Xnew = X + Vnew * dt; } mintegrable->StateScatterAcceleration( (Vnew - V) * (1 / dt)); // -> system auxiliary data (i.e acceleration as measure, fits DVI/MDI) X = Xnew; V = Vnew; T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterReactions(L); // -> system auxiliary data } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperEulerImplicitLinearized) // Performs a step of Euler implicit for II order systems // using the Anitescu/Stewart/Trinkle single-iteration method, // that is a bit like an implicit Euler where one performs only // the first NR corrector iteration. // If the solver in StateSolveCorrection is a CCP complementarity // solver, this is the typical Anitescu stabilized timestepper for DVIs. void ChTimestepperEulerImplicitLinearized::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors Dl.Reset(mintegrable->GetNconstr()); R.Reset(mintegrable->GetNcoords_v()); Qc.Reset(mintegrable->GetNconstr()); L.Reset(mintegrable->GetNconstr()); mintegrable->StateGather(X, V, T); // state <- system mintegrable->StateGatherReactions(L); // state <- system (may be needed for warm starting StateSolveCorrection) L *= dt; // because reactions = forces, here L = impulses Vold = V; // solve only 1st NR step, using v_new = 0, so Dv = v_new , therefore // // [ M - dt*dF/dv - dt^2*dF/dx Cq' ] [ Dv ] = [ M*(v_old - v_new) + dt*f] // [ Cq 0 ] [ -dt*Dl ] = [ -C/dt - Ct ] // // becomes the Anitescu/Trinkle timestepper: // // [ M - dt*dF/dv - dt^2*dF/dx Cq' ] [ v_new ] = [ M*(v_old) + dt*f] // [ Cq 0 ] [ -dt*l ] = [ -C/dt - Ct ] mintegrable->LoadResidual_F(R, dt); mintegrable->LoadResidual_Mv(R, V, 1.0); mintegrable->LoadConstraint_C(Qc, 1.0 / dt, Qc_do_clamp, Qc_clamping); mintegrable->LoadConstraint_Ct(Qc, 1.0); mintegrable->StateSolveCorrection( V, L, R, Qc, 1.0, // factor for M -dt, // factor for dF/dv -dt * dt, // factor for dF/dx X, V, T + dt, // not needed false, // do not StateScatter update to Xnew Vnew T+dt before computing correction true // force a call to the solver's Setup() function ); L *= (1.0 / dt); // Note it is not -(1.0/dt) because we assume StateSolveCorrection already flips sign of Dl mintegrable->StateScatterAcceleration( (V - Vold) * (1 / dt)); // -> system auxiliary data (i.e acceleration as measure, fits DVI/MDI) X += V * dt; T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterReactions(L); // -> system auxiliary data } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperEulerImplicitProjected) // Performs a step of Euler implicit for II order systems // using a semi implicit Euler without constr.stabilization, followed by a projection, // that is: a speed problem followed by a position problem that // keeps constraint drifting 'closed' by using a projection. // If the solver in StateSolveCorrection is a CCP complementarity // solver, this is the Tasora stabilized timestepper for DVIs. void ChTimestepperEulerImplicitProjected::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors Dl.Reset(mintegrable->GetNconstr()); R.Reset(mintegrable->GetNcoords_v()); Qc.Reset(mintegrable->GetNconstr()); L.Reset(mintegrable->GetNconstr()); mintegrable->StateGather(X, V, T); // state <- system Vold = V; // 1 // Do a Anitescu/Trinkle timestepper (it could be without the C/dt correction): // // [ M - dt*dF/dv - dt^2*dF/dx Cq' ] [ v_new ] = [ M*(v_old) + dt*f] // [ Cq 0 ] [ -dt*l ] = [ -Ct ] mintegrable->LoadResidual_F(R, dt); mintegrable->LoadResidual_Mv(R, V, 1.0); mintegrable->LoadConstraint_C(Qc, 1.0 / dt, Qc_do_clamp, 0); // may be avoided mintegrable->LoadConstraint_Ct(Qc, 1.0); mintegrable->StateSolveCorrection( V, L, R, Qc, 1.0, // factor for M -dt, // factor for dF/dv -dt * dt, // factor for dF/dx X, V, T + dt, // not needed false, // do not StateScatter update to Xnew Vnew T+dt before computing correction true // force a call to the solver's Setup() function ); L *= (1.0 / dt); // Note it is not -(1.0/dt) because we assume StateSolveCorrection already flips sign of Dl mintegrable->StateScatterAcceleration( (V - Vold) * (1 / dt)); // -> system auxiliary data (i.e acceleration as measure, fits DVI/MDI) X += V * dt; T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterReactions(L); // -> system auxiliary data // 2 // Do the position stabilization (single NR step on constraints, with mass matrix as metric) Dl.Reset(mintegrable->GetNconstr()); R.Reset(mintegrable->GetNcoords_v()); Qc.Reset(mintegrable->GetNconstr()); L.Reset(mintegrable->GetNconstr()); Vold.Reset(mintegrable->GetNcoords_v(), V.GetIntegrable()); // // [ M Cq' ] [ dpos ] = [ 0 ] // [ Cq 0 ] [ l ] = [ -C ] mintegrable->LoadConstraint_C(Qc, 1.0, false, 0); mintegrable->StateSolveCorrection( Vold, L, R, Qc, 1.0, // factor for M 0, // factor for dF/dv 0, // factor for dF/dx X, V, T, // not needed false, // do not StateScatter update to Xnew Vnew T+dt before computing correction true // force a call to the solver's Setup() function ); X += Vold; // here we used 'Vold' as 'dpos' to recycle Vold and avoid allocating a new vector dpos mintegrable->StateScatter(X, V, T); // state -> system } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperTrapezoidal) // Performs a step of trapezoidal implicit for II order systems // NOTE this is a modified version of the trapezoidal for DAE: the // original derivation would lead to a scheme that produces oscillatory // reactions in constraints, so this is a modified version that is first // order in constraint reactions. Use damped HHT or damped Newmark for // more advanced options. void ChTimestepperTrapezoidal::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors Dv.Reset(mintegrable->GetNcoords_v(), GetIntegrable()); Dl.Reset(mintegrable->GetNconstr()); Xnew.Reset(mintegrable->GetNcoords_x(), mintegrable); Vnew.Reset(mintegrable->GetNcoords_v(), mintegrable); L.Reset(mintegrable->GetNconstr()); R.Reset(mintegrable->GetNcoords_v()); Rold.Reset(mintegrable->GetNcoords_v()); Qc.Reset(mintegrable->GetNconstr()); mintegrable->StateGather(X, V, T); // state <- system // mintegrable->StateGatherReactions(L); // <- system assume l_old = 0; otherwise DAE gives oscillatory reactions // extrapolate a prediction as a warm start Xnew = X + V * dt; Vnew = V; // +A()*dt; // use Newton Raphson iteration to solve implicit trapezoidal for v_new // // [ M - dt/2*dF/dv - dt^2/4*dF/dx Cq' ] [ Dv ] = [ M*(v_old - v_new) + dt/2(f_old + f_new + Cq*l_old + Cq*l_new)] // [ Cq 0 ] [ -dt/2*Dl ] = [ -C/dt ] mintegrable->LoadResidual_F(Rold, dt * 0.5); // dt/2*f_old mintegrable->LoadResidual_Mv(Rold, V, 1.0); // M*v_old // mintegrable->LoadResidual_CqL(Rold, L, dt*0.5); // dt/2*l_old assume L_old = 0 numiters = 0; numsetups = 0; numsolves = 0; for (int i = 0; i < this->GetMaxiters(); ++i) { mintegrable->StateScatter(Xnew, Vnew, T + dt); // state -> system R = Rold; Qc.Reset(); mintegrable->LoadResidual_F(R, dt * 0.5); // + dt/2*f_new mintegrable->LoadResidual_Mv(R, Vnew, -1.0); // - M*v_new mintegrable->LoadResidual_CqL(R, L, dt * 0.5); // + dt/2*Cq*l_new mintegrable->LoadConstraint_C(Qc, 1.0 / dt, Qc_do_clamp, Qc_clamping); // -C/dt if (verbose) GetLog() << " Trapezoidal iteration=" << i << " |R|=" << R.NormTwo() << " |Qc|=" << Qc.NormTwo() << "\n"; if ((R.NormInf() < abstolS) && (Qc.NormInf() < abstolL)) break; mintegrable->StateSolveCorrection( Dv, Dl, R, Qc, 1.0, // factor for M -dt * 0.5, // factor for dF/dv -dt * dt * 0.25, // factor for dF/dx Xnew, Vnew, T + dt, // not used here (scatter = false) false, // do not StateScatter update to Xnew Vnew T+dt before computing correction true // always force a call to the solver's Setup() function ); numiters++; numsetups++; numsolves++; Dl *= (2.0 / dt); // Note it is not -(2.0/dt) because we assume StateSolveCorrection already flips sign of Dl L += Dl; Vnew += Dv; Xnew = X + ((Vnew + V) * (dt * 0.5)); // Xnew = Xold + h/2(Vnew+Vold) } mintegrable->StateScatterAcceleration( (Vnew - V) * (1 / dt)); // -> system auxiliary data (i.e acceleration as measure, fits DVI/MDI) X = Xnew; V = Vnew; T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterReactions(L *= 0.5); // -> system auxiliary data (*=0.5 cause we used the hack of l_old = 0) } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperTrapezoidalLinearized) // Performs a step of trapezoidal implicit linearized for II order systems void ChTimestepperTrapezoidalLinearized::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors Dv.Reset(mintegrable->GetNcoords_v(), GetIntegrable()); Dl.Reset(mintegrable->GetNconstr()); Xnew.Reset(mintegrable->GetNcoords_x(), mintegrable); Vnew.Reset(mintegrable->GetNcoords_v(), mintegrable); L.Reset(mintegrable->GetNconstr()); R.Reset(mintegrable->GetNcoords_v()); Rold.Reset(mintegrable->GetNcoords_v()); Qc.Reset(mintegrable->GetNconstr()); mintegrable->StateGather(X, V, T); // state <- system // mintegrable->StateGatherReactions(L); // <- system assume l_old = 0; // extrapolate a prediction as a warm start Xnew = X + V * dt; Vnew = V; // solve implicit trapezoidal for v_new // // [ M - dt/2*dF/dv - dt^2/4*dF/dx Cq' ] [ Dv ] = [ M*(v_old - v_new) + dt/2(f_old + f_new + Cq*l_old + Cq*l_new)] // [ Cq 0 ] [ -dt/2*Dl ] = [ -C/dt ] mintegrable->LoadResidual_F(Rold, dt * 0.5); // dt/2*f_old mintegrable->LoadResidual_Mv(Rold, V, 1.0); // M*v_old // mintegrable->LoadResidual_CqL(Rold, L, dt*0.5); // dt/2*l_old assume l_old = 0; mintegrable->StateScatter(Xnew, Vnew, T + dt); // state -> system R = Rold; Qc.Reset(); mintegrable->LoadResidual_F(R, dt * 0.5); // + dt/2*f_new mintegrable->LoadResidual_Mv(R, Vnew, -1.0); // - M*v_new // mintegrable->LoadResidual_CqL(R, L, dt*0.5); // + dt/2*Cq*l_new assume l_old = 0; mintegrable->LoadConstraint_C(Qc, 1.0 / dt, Qc_do_clamp, Qc_clamping); // -C/dt mintegrable->StateSolveCorrection( Dv, Dl, R, Qc, 1.0, // factor for M -dt * 0.5, // factor for dF/dv -dt * dt * 0.25, // factor for dF/dx Xnew, Vnew, T + dt, // not used here (scatter = false) false, // do not StateScatter update to Xnew Vnew T+dt before computing correction true // force a call to the solver's Setup() function ); numiters = 1; numsetups = 1; numsolves = 1; Dl *= (2.0 / dt); // Note it is not -(2.0/dt) because we assume StateSolveCorrection already flips sign of Dl L += Dl; Vnew += Dv; Xnew = X + ((Vnew + V) * (dt * 0.5)); // Xnew = Xold + h/2(Vnew+Vold) X = Xnew; V = Vnew; T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterAcceleration( (Dv *= (1 / dt))); // -> system auxiliary data (i.e acceleration as measure, fits DVI/MDI) mintegrable->StateScatterReactions(L *= 0.5); // -> system auxiliary data (*=0.5 cause use l_old = 0) } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperTrapezoidalLinearized2) // Performs a step of trapezoidal implicit linearized for II order systems //*** SIMPLIFIED VERSION -DOES NOT WORK - PREFER ChTimestepperTrapezoidalLinearized void ChTimestepperTrapezoidalLinearized2::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors Dv.Reset(mintegrable->GetNcoords_v(), GetIntegrable()); Xnew.Reset(mintegrable->GetNcoords_x(), mintegrable); Vnew.Reset(mintegrable->GetNcoords_v(), mintegrable); L.Reset(mintegrable->GetNconstr()); R.Reset(mintegrable->GetNcoords_v()); Qc.Reset(mintegrable->GetNconstr()); mintegrable->StateGather(X, V, T); // state <- system // extrapolate a prediction as a warm start Xnew = X + V * dt; Vnew = V; // use Newton Raphson iteration to solve implicit trapezoidal for v_new // // [ M - dt/2*dF/dv - dt^2/4*dF/dx Cq' ] [ v_new ] = [ M*(v_old) + dt/2(f_old + f_new)] // [ Cq 0 ] [ -dt/2*L ] m= [ -C/dt ] mintegrable->LoadResidual_F(R, dt * 0.5); // dt/2*f_old mintegrable->LoadResidual_Mv(R, V, 1.0); // M*v_old mintegrable->StateScatter(Xnew, Vnew, T + dt); // state -> system Qc.Reset(); mintegrable->LoadResidual_F(R, dt * 0.5); // + dt/2*f_new mintegrable->LoadConstraint_C(Qc, 1.0 / dt, Qc_do_clamp, Qc_clamping); // -C/dt mintegrable->StateSolveCorrection( Vnew, L, R, Qc, 1.0, // factor for M -dt * 0.5, // factor for dF/dv -dt * dt * 0.25, // factor for dF/dx Xnew, Vnew, T + dt, // not used here (scatter = false) false, // do not StateScatter update to Xnew Vnew T+dt before computing correction true // force a call to the solver's Setup() function ); numiters = 1; numsetups = 1; numsolves = 1; L *= (2.0 / dt); // Note it is not -(2.0/dt) because we assume StateSolveCorrection already flips sign of Dl X += ((Vnew + V) * (dt * 0.5)); // Xnew = Xold + h/2(Vnew+Vold) mintegrable->StateScatterAcceleration( (Vnew - V) * (1 / dt)); // -> system auxiliary data (i.e acceleration as measure, fits DVI/MDI) V = Vnew; T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterReactions(L); // -> system auxiliary data } // ----------------------------------------------------------------------------- // Register into the object factory, to enable run-time dynamic creation and persistence CH_FACTORY_REGISTER(ChTimestepperNewmark) // Set the numerical damping parameter gamma and the beta parameter. void ChTimestepperNewmark::SetGammaBeta(double mgamma, double mbeta) { gamma = mgamma; if (gamma < 0.5) gamma = 0.5; if (gamma > 1) gamma = 1; beta = mbeta; if (beta < 0) beta = 0; if (beta > 1) beta = 1; } // Performs a step of Newmark constrained implicit for II order DAE systems void ChTimestepperNewmark::Advance(const double dt) { // downcast ChIntegrableIIorder* mintegrable = (ChIntegrableIIorder*)this->integrable; // setup main vectors mintegrable->StateSetup(X, V, A); // setup auxiliary vectors Da.Reset(mintegrable->GetNcoords_a(), GetIntegrable()); Dl.Reset(mintegrable->GetNconstr()); Xnew.Reset(mintegrable->GetNcoords_x(), mintegrable); Vnew.Reset(mintegrable->GetNcoords_v(), mintegrable); Anew.Reset(mintegrable->GetNcoords_a(), mintegrable); R.Reset(mintegrable->GetNcoords_v()); Rold.Reset(mintegrable->GetNcoords_v()); Qc.Reset(mintegrable->GetNconstr()); L.Reset(mintegrable->GetNconstr()); mintegrable->StateGather(X, V, T); // state <- system mintegrable->StateGatherAcceleration(A); // extrapolate a prediction as a warm start Vnew = V; Xnew = X + Vnew * dt; // use Newton Raphson iteration to solve implicit Newmark for a_new // // [ M - dt*gamma*dF/dv - dt^2*beta*dF/dx Cq' ] [ Da ] = [ -M*(a_new) + f_new + Cq*l_new ] // [ Cq 0 ] [ Dl ] = [ -1/(beta*dt^2)*C ] numiters = 0; numsetups = 0; numsolves = 0; for (int i = 0; i < this->GetMaxiters(); ++i) { mintegrable->StateScatter(Xnew, Vnew, T + dt); // state -> system R.Reset(mintegrable->GetNcoords_v()); Qc.Reset(mintegrable->GetNconstr()); mintegrable->LoadResidual_F(R, 1.0); // f_new mintegrable->LoadResidual_CqL(R, L, 1.0); // Cq'*l_new mintegrable->LoadResidual_Mv(R, Anew, -1.0); // - M*a_new mintegrable->LoadConstraint_C(Qc, (1.0 / (beta * dt * dt)), Qc_do_clamp, Qc_clamping); // - 1/(beta*dt^2)*C if (verbose) GetLog() << " Newmark iteration=" << i << " |R|=" << R.NormTwo() << " |Qc|=" << Qc.NormTwo() << "\n"; if ((R.NormInf() < abstolS) && (Qc.NormInf() < abstolL)) break; mintegrable->StateSolveCorrection( Da, Dl, R, Qc, 1.0, // factor for M -dt * gamma, // factor for dF/dv -dt * dt * beta, // factor for dF/dx Xnew, Vnew, T + dt, // not used here (scatter = false) false, // do not StateScatter update to Xnew Vnew T+dt before computing correction true // force a call to the solver's Setup() function ); numiters++; numsetups++; numsolves++; L += Dl; // Note it is not -= Dl because we assume StateSolveCorrection flips sign of Dl Anew += Da; Xnew = X + V * dt + A * (dt * dt * (0.5 - beta)) + Anew * (dt * dt * beta); Vnew = V + A * (dt * (1.0 - gamma)) + Anew * (dt * gamma); } X = Xnew; V = Vnew; A = Anew; T += dt; mintegrable->StateScatter(X, V, T); // state -> system mintegrable->StateScatterAcceleration(A); // -> system auxiliary data mintegrable->StateScatterReactions(L); // -> system auxiliary data } void ChTimestepperNewmark::ArchiveOUT(ChArchiveOut& marchive) { // version number marchive.VersionWrite<ChTimestepperNewmark>(); // serialize parent class: ChTimestepperIIorder::ArchiveOUT(marchive); ChImplicitIterativeTimestepper::ArchiveOUT(marchive); // serialize all member data: marchive << CHNVP(beta); marchive << CHNVP(gamma); } void ChTimestepperNewmark::ArchiveIN(ChArchiveIn& marchive) { // version number int version = marchive.VersionRead<ChTimestepperNewmark>(); // deserialize parent class: ChTimestepperIIorder::ArchiveIN(marchive); ChImplicitIterativeTimestepper::ArchiveIN(marchive); // stream in all member data: marchive >> CHNVP(beta); marchive >> CHNVP(gamma); } } // end namespace chrono
37.991304
128
0.589523
[ "object", "vector" ]
447df841c808b5a332facaa34b456bf92d24bd06
2,709
cpp
C++
Tests/LibCompress/TestBrotli.cpp
Anon1428/serenity
0daf5cc434e7a998da15330bd8b4d46ae1759485
[ "BSD-2-Clause" ]
2
2022-02-16T02:12:38.000Z
2022-02-20T18:40:41.000Z
Tests/LibCompress/TestBrotli.cpp
Anon1428/serenity
0daf5cc434e7a998da15330bd8b4d46ae1759485
[ "BSD-2-Clause" ]
null
null
null
Tests/LibCompress/TestBrotli.cpp
Anon1428/serenity
0daf5cc434e7a998da15330bd8b4d46ae1759485
[ "BSD-2-Clause" ]
null
null
null
/* * Copyright (c) 2022, Michiel Visser <opensource@webmichiel.nl> * * SPDX-License-Identifier: BSD-2-Clause */ #include <LibTest/TestCase.h> #include <LibCompress/Brotli.h> #include <LibCore/Stream.h> static void run_test(StringView const file_name) { // This makes sure that the tests will run both on target and in Lagom. #ifdef __serenity__ String path = String::formatted("/usr/Tests/LibCompress/brotli-test-files/{}", file_name); #else String path = String::formatted("brotli-test-files/{}", file_name); #endif auto cmp_file = MUST(Core::Stream::File::open(path, Core::Stream::OpenMode::Read)); auto cmp_data = MUST(cmp_file->read_all()); String path_compressed = String::formatted("{}.br", path); auto file = MUST(Core::Stream::File::open(path_compressed, Core::Stream::OpenMode::Read)); auto brotli_stream = Compress::BrotliDecompressionStream { *file }; auto data = MUST(brotli_stream.read_all()); EXPECT_EQ(data, cmp_data); } TEST_CASE(brotli_decompress_uncompressed) { run_test("wellhello.txt"); } TEST_CASE(brotli_decompress_simple) { run_test("hello.txt"); } TEST_CASE(brotli_decompress_simple2) { run_test("wellhello2.txt"); } TEST_CASE(brotli_decompress_lorem) { run_test("lorem.txt"); } TEST_CASE(brotli_decompress_lorem2) { run_test("lorem2.txt"); } TEST_CASE(brotli_decompress_transform) { run_test("transform.txt"); } TEST_CASE(brotli_decompress_serenityos_html) { run_test("serenityos.html"); } TEST_CASE(brotli_decompress_happy3rd_html) { run_test("happy3rd.html"); } TEST_CASE(brotli_decompress_katica_regular_10_font) { run_test("KaticaRegular10.font"); } TEST_CASE(brotli_decompress_zero_one_bin) { // This makes sure that the tests will run both on target and in Lagom. #ifdef __serenity__ String path = "/usr/Tests/LibCompress/brotli-test-files/zero-one.bin"; #else String path = "brotli-test-files/zero-one.bin"; #endif String path_compressed = String::formatted("{}.br", path); auto file = MUST(Core::Stream::File::open(path_compressed, Core::Stream::OpenMode::Read)); auto brotli_stream = Compress::BrotliDecompressionStream { *file }; u8 buffer_raw[4096]; Bytes buffer { buffer_raw, 4096 }; size_t bytes_read = 0; while (true) { size_t nread = MUST(brotli_stream.read(buffer)).size(); if (nread == 0) break; for (size_t i = 0; i < nread; i++) { if (bytes_read < 16 * MiB) EXPECT(buffer[i] == 0); else EXPECT(buffer[i] == 1); } bytes_read += nread; } EXPECT(bytes_read == 32 * MiB); EXPECT(brotli_stream.is_eof()); }
23.973451
94
0.677372
[ "transform" ]
448012303e95ac19bbb45d28536c86a6e018d40d
1,805
cpp
C++
homework/BT07/BT07.cpp
Jo3yVX/Homework-INT2215-22
aa24a9f16ec5b959f3eb0868477d3e8b7ee14913
[ "MIT" ]
null
null
null
homework/BT07/BT07.cpp
Jo3yVX/Homework-INT2215-22
aa24a9f16ec5b959f3eb0868477d3e8b7ee14913
[ "MIT" ]
null
null
null
homework/BT07/BT07.cpp
Jo3yVX/Homework-INT2215-22
aa24a9f16ec5b959f3eb0868477d3e8b7ee14913
[ "MIT" ]
null
null
null
#include <iostream> #include <vector> #include <string.h> using namespace std; //7.1 nothing to implement //7.2 void test(int arr[]) { cout << sizeof(arr) << endl; cout << arr << " " << &arr[0]; } //7.3 int count_even(int* arr, int n) { int c = 0; for (int i = 0; i < n; i++) { if (*(arr + i) % 2 == 0) c++; } return c; } //7.4 int search(int* nums, int target, int n) { int right = n - 1; if (right == -1) return -1; int left = 0; while (left <= right) { int m = (left + right) / 2; if (*(nums+m) == target) return m; else if (*(nums+m) > target) right = m - 1; else left = m + 1; } return -1; } //7.5 nothing to implement // memory had been freed before accessed (weird_string() close => pop out of stack (along with its local memory)) //7.7 (before 7.6 since 7.6 has to modify the main function) int countDuplicate(char str1[], int size1, char str2[], int size2) { //asume that str1 is shorter than str2 //if not just swap them but im lazy >.< int c = 0; for (int i = 0; i < size2 - size1; i++) { if (strcmp(str1, str2+i) == 0) c++; } return c; // Welp doesnt work yet, im trying to mess up with strcmp() } //7.6 (modify the main function) // code snip from BT06 //6.8 void print(vector<int> vec) { for (int i = 0; i < vec.size(); i++) cout << vec[i] << " "; cout << endl; } void permute(vector<int> vec, int start, int end) { if (start == end) { print(vec); } for (int i = start; i <= end; i++) { swap(vec[start], vec[i]); permute(vec, start + 1, end); swap(vec[start], vec[i]); //backtracking } } void sub(int n) { vector<int> vec; for (int i = 1; i <= n; i++) vec.push_back(i); permute(vec, 0, vec.size() - 1); } int main(int argc, const char* argv[]) { //sub((int)(argv[1] - '0')); return 0; }
22.5625
113
0.566205
[ "vector" ]
44840870484f941f45eaecff2e56899bd4e29a87
8,232
cc
C++
components/translate/core/browser/translate_language_list_unittest.cc
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
components/translate/core/browser/translate_language_list_unittest.cc
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
components/translate/core/browser/translate_language_list_unittest.cc
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2021-01-05T23:43:46.000Z
2021-01-07T23:36:34.000Z
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/translate/core/browser/translate_language_list.h" #include <string> #include <vector> #include "base/run_loop.h" #include "base/stl_util.h" #include "base/test/bind_test_util.h" #include "base/test/scoped_command_line.h" #include "base/test/task_environment.h" #include "base/threading/thread_task_runner_handle.h" #include "components/translate/core/browser/translate_download_manager.h" #include "components/translate/core/browser/translate_url_util.h" #include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h" #include "services/network/test/test_url_loader_factory.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" namespace translate { // Test that the supported languages can be explicitly set using // SetSupportedLanguages(). TEST(TranslateLanguageListTest, SetSupportedLanguages) { const std::string language_list( "{" "\"sl\":{\"en\":\"English\",\"ja\":\"Japanese\"}," "\"tl\":{\"en\":\"English\",\"ja\":\"Japanese\"}" "}"); base::test::TaskEnvironment task_environment; network::TestURLLoaderFactory test_url_loader_factory; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory = base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( &test_url_loader_factory); TranslateDownloadManager* manager = TranslateDownloadManager::GetInstance(); manager->set_application_locale("en"); manager->set_url_loader_factory(test_shared_loader_factory); EXPECT_TRUE(manager->language_list()->SetSupportedLanguages(language_list)); std::vector<std::string> results; manager->language_list()->GetSupportedLanguages(true /* translate_allowed */, &results); ASSERT_EQ(2u, results.size()); EXPECT_EQ("en", results[0]); EXPECT_EQ("ja", results[1]); manager->ResetForTesting(); } // Test that the language code back-off of locale is done correctly (where // required). TEST(TranslateLanguageListTest, GetLanguageCode) { TranslateLanguageList language_list; EXPECT_EQ("en", language_list.GetLanguageCode("en")); // Test backoff of unsupported locale. EXPECT_EQ("en", language_list.GetLanguageCode("en-US")); // Test supported locale not backed off. EXPECT_EQ("zh-CN", language_list.GetLanguageCode("zh-CN")); } // Test that the translation URL is correctly generated, and that the // translate-security-origin command-line flag correctly overrides the default // value. TEST(TranslateLanguageListTest, TranslateLanguageUrl) { TranslateLanguageList language_list; // Test default security origin. // The command-line override switch should not be set by default. EXPECT_FALSE(base::CommandLine::ForCurrentProcess()->HasSwitch( "translate-security-origin")); EXPECT_EQ("https://translate.googleapis.com/translate_a/l?client=chrome", language_list.TranslateLanguageUrl().spec()); // Test command-line security origin. base::test::ScopedCommandLine scoped_command_line; // Set the override switch. scoped_command_line.GetProcessCommandLine()->AppendSwitchASCII( "translate-security-origin", "https://example.com"); EXPECT_EQ("https://example.com/translate_a/l?client=chrome", language_list.TranslateLanguageUrl().spec()); } // Test that IsSupportedLanguage() is true for languages that should be // supported, and false for invalid languages. TEST(TranslateLanguageListTest, IsSupportedLanguage) { TranslateLanguageList language_list; EXPECT_TRUE(language_list.IsSupportedLanguage("en")); EXPECT_TRUE(language_list.IsSupportedLanguage("zh-CN")); EXPECT_FALSE(language_list.IsSupportedLanguage("xx")); } // Sanity test for the default set of supported languages. The default set of // languages should be large (> 100) and must contain very common languages. // If either of these tests are not true, the default language configuration is // likely to be incorrect. TEST(TranslateLanguageListTest, GetSupportedLanguages) { TranslateLanguageList language_list; std::vector<std::string> languages; language_list.GetSupportedLanguages(true /* translate_allowed */, &languages); // Check there are a lot of default languages. EXPECT_GE(languages.size(), 100ul); // Check that some very common languages are there. EXPECT_TRUE(base::Contains(languages, "en")); EXPECT_TRUE(base::Contains(languages, "es")); EXPECT_TRUE(base::Contains(languages, "fr")); EXPECT_TRUE(base::Contains(languages, "ru")); EXPECT_TRUE(base::Contains(languages, "zh-CN")); EXPECT_TRUE(base::Contains(languages, "zh-TW")); } // Check that we contact the translate server to update the supported language // list when translate is enabled by policy. TEST(TranslateLanguageListTest, GetSupportedLanguagesFetch) { // Set up fake network environment. base::test::TaskEnvironment task_environment; network::TestURLLoaderFactory test_url_loader_factory; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory = base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( &test_url_loader_factory); TranslateDownloadManager::GetInstance()->set_application_locale("en"); TranslateDownloadManager::GetInstance()->set_url_loader_factory( test_shared_loader_factory); GURL actual_url; base::RunLoop loop; // Since translate is allowed by policy, we will schedule a language list // load. Intercept to ensure the URL is correct. test_url_loader_factory.SetInterceptor( base::BindLambdaForTesting([&](const network::ResourceRequest& request) { actual_url = request.url; loop.Quit(); })); // Populate supported languages. std::vector<std::string> languages; TranslateLanguageList language_list; language_list.SetResourceRequestsAllowed(true); language_list.GetSupportedLanguages(true /* translate_allowed */, &languages); // Check that the correct URL is requested. const GURL expected_url = AddApiKeyToUrl(AddHostLocaleToUrl(language_list.TranslateLanguageUrl())); // Simulate fetch completion with just Italian in the supported language list. test_url_loader_factory.AddResponse(expected_url.spec(), R"({"tl" : {"it" : "Italian"}})"); loop.Run(); // Spin an extra loop so that we ensure the SimpleURLLoader fixture callback // is called. base::RunLoop().RunUntilIdle(); EXPECT_TRUE(actual_url.is_valid()); EXPECT_EQ(expected_url.spec(), actual_url.spec()); // Check that the language list has been updated correctly. languages.clear(); language_list.GetSupportedLanguages(true /* translate_allowed */, &languages); EXPECT_EQ(std::vector<std::string>(1, "it"), languages); TranslateDownloadManager::GetInstance()->ResetForTesting(); } // Check that we don't send any network data when translate is disabled by // policy. TEST(TranslateLanguageListTest, GetSupportedLanguagesNoFetch) { // Set up fake network environment. base::test::TaskEnvironment task_environment; network::TestURLLoaderFactory test_url_loader_factory; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory = base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( &test_url_loader_factory); TranslateDownloadManager::GetInstance()->set_application_locale("en"); TranslateDownloadManager::GetInstance()->set_url_loader_factory( test_shared_loader_factory); // Populate supported languages. std::vector<std::string> languages; TranslateLanguageList language_list; language_list.SetResourceRequestsAllowed(true); language_list.GetSupportedLanguages(false /* translate_allowed */, &languages); // Since translate is disabled by policy, we should *not* have scheduled a // language list load. EXPECT_FALSE(language_list.HasOngoingLanguageListLoadingForTesting()); EXPECT_TRUE(test_url_loader_factory.pending_requests()->empty()); TranslateDownloadManager::GetInstance()->ResetForTesting(); } } // namespace translate
42
80
0.753401
[ "vector" ]
4484c57902853bb844c1ed92afa3a321b7c8d402
9,925
cpp
C++
hard_lecture/src/hard_gy955.cpp
yasutomo57jp/ros_lecture
811afaded5a5780fa1291bd41196d80446da1e53
[ "MIT" ]
110
2018-11-13T15:04:35.000Z
2022-03-27T20:48:03.000Z
hard_lecture/src/hard_gy955.cpp
yasutomo57jp/ros_lecture
811afaded5a5780fa1291bd41196d80446da1e53
[ "MIT" ]
4
2020-07-16T13:32:22.000Z
2022-01-11T01:08:12.000Z
hard_lecture/src/hard_gy955.cpp
yasutomo57jp/ros_lecture
811afaded5a5780fa1291bd41196d80446da1e53
[ "MIT" ]
57
2019-07-02T23:43:17.000Z
2022-03-27T20:47:28.000Z
#include "ros/ros.h" #include "sensor_msgs/Imu.h" #include "diagnostic_updater/diagnostic_updater.h" #include <string> #include <unistd.h> #include <fcntl.h> #include <termios.h> #include <deque> #include <sys/ioctl.h> class serial_stream { private: int fd_; std::string device_name_; int baud_rate_; bool connected_; int read_bytes_; public: //0: OK, 1: Not found, 2: Can not Write, 3: Can not Read 4: Connection broken int close_reason_; public: serial_stream(void) { connected_ = false; read_bytes_ = 0; close_reason_ = 0; } void ssOpen(std::string device_name, int baud_rate) { device_name_ = device_name; baud_rate_ = baud_rate; openSerial_(); } bool ssReOpen(void) { if (!connected_) { openSerial_(); return connected_; } else { return false; } } void openSerial_(void) { fd_ = open(device_name_.c_str(), O_RDWR | O_NOCTTY | O_NONBLOCK); fcntl(fd_, F_SETFL, 0); //load configuration struct termios conf_tio; tcgetattr(fd_, &conf_tio); //set baudrate speed_t BAUDRATE; if (baud_rate_ == 9600) { BAUDRATE = B9600; } else if (baud_rate_ == 1000000) { BAUDRATE = B1000000; } else { connected_ = false; close_reason_ = 1; return; } cfsetispeed(&conf_tio, BAUDRATE); cfsetospeed(&conf_tio, BAUDRATE); //non canonical, non echo back conf_tio.c_lflag &= CS8; //conf_tio.c_lflag &= ~(ECHO | ICANON); //non blocking conf_tio.c_cc[VMIN] = 0; conf_tio.c_cc[VTIME] = 0; //store configuration tcsetattr(fd_, TCSANOW, &conf_tio); if (fd_ >= 0) { connected_ = true; close_reason_ = 0; } else { connected_ = false; close_reason_ = 1; } } bool ssCheckStatus(void) { if (connected_) { int stat; int res; res= ioctl(fd_, TIOCMGET, &stat); if(stat & TIOCM_CD) { ssClose(); connected_ = false; close_reason_ = 4; return true; } } return false; } void ssClose(void) { close(fd_); connected_ = false; close_reason_ = 0; } void ssWrite(std::vector<unsigned char> send_data) { if (connected_ && (int)send_data.size() > 0) { int rec = write(fd_, send_data.data(), (int)send_data.size()); if (rec <= 0) { connected_ = false; close_reason_ = 2; ssClose(); } } } std::vector<unsigned char> ssRead(void) { if (connected_) { char buf[256] = {0}; int recv_size = read(fd_, buf, sizeof(buf)); if (recv_size > 0) { read_bytes_ += recv_size; std::vector<unsigned char> recv_data; recv_data.resize(recv_size); for (int i = 0; i < recv_size; i++) recv_data[i] = buf[i]; return recv_data; } } std::vector<unsigned char> null_data; return null_data; } bool isConnected(void) { return connected_; } int getReadBytes(void){ int tmp = read_bytes_; read_bytes_ = 0; return tmp; } }; void print_vecter(std::vector<unsigned char> data) { printf("size: %i\n", (int)data.size()); for (int i = 0; i < (int)data.size(); i++) { printf("%03i,", data[i]); } printf("\n"); } void print_vecter(std::deque<unsigned char> data) { printf("size: %i\n", (int)data.size()); for (int i = 0; i < (int)data.size(); i++) { printf("%03i,", data[i]); } printf("\n"); } class GY955Driver { public: ros::NodeHandle nh_; ros::NodeHandle pnh_; ros::Publisher imu_pub_; diagnostic_updater::Updater updater_; ros::Timer timer1_; ros::Timer timer2_; serial_stream ss0_; std::deque<unsigned char> buffer_data_; std::string device_name_; std::string imu_frame_name_; bool debug_; GY955Driver() : nh_(), pnh_("~") { //Publisher imu_pub_ = nh_.advertise<sensor_msgs::Imu>("imu", 10); //Param device_name_ = "/dev/ttyUSB0"; imu_frame_name_ = "imu_link"; pnh_.getParam("imu_frame_name", imu_frame_name_); debug_ = false; pnh_.getParam("debug", debug_); //Diagnostic updater_.setHardwareID("SerialPort"); updater_.add("Connect", boost::bind(&GY955Driver::diag_callback, this, _1)); ss0_.ssOpen(device_name_, 9600); if (!ss0_.isConnected()) { ROS_ERROR("Serial Fail: cound not open %s", device_name_.c_str()); ros::shutdown(); } std::vector<unsigned char> send_data({170, 16, 10}); ss0_.ssWrite(send_data); if (!ss0_.isConnected()) { ROS_ERROR("Serial Fail: cound not write %s", device_name_.c_str()); ros::shutdown(); } timer1_ = nh_.createTimer(ros::Duration(0.02), &GY955Driver::timer1_callback, this); timer2_ = nh_.createTimer(ros::Duration(1.00), &GY955Driver::timer2_callback, this); } void timer1_callback(const ros::TimerEvent &) { std::vector<unsigned char> recv_data = ss0_.ssRead(); if ((int)recv_data.size() > 0) { //add for (int i = 0; i < (int)recv_data.size(); i++) { buffer_data_.push_back(recv_data[i]); } //extract for (int i = 0; i < (int)buffer_data_.size() - 14; i++) { std::vector<unsigned char> data; if (buffer_data_[i] == 90 && buffer_data_[i + 1] == 90 && buffer_data_[i + 2] == 16 && buffer_data_[i + 3] == 9) { for (int j = i; j < i + 14; j++) { data.push_back(buffer_data_[j]); } for (int j = 0; j < i + 14; j++) { buffer_data_.pop_front(); } if (checkSum(data)) { sensor_msgs::Imu imu_data = convert_data(data); if (checkSize(imu_data)) imu_pub_.publish(imu_data); else if(debug_)ROS_ERROR("NG size"); } else if(debug_)ROS_ERROR("NG checksum"); //print_data(data); break; } } } } void timer2_callback(const ros::TimerEvent &) { if (ss0_.ssCheckStatus()) { ROS_ERROR("Connection Broken %s", device_name_.c_str()); } if (ss0_.ssReOpen()) { ROS_INFO("ReOpen %s", device_name_.c_str()); std::vector<unsigned char> send_data({170, 16, 10}); ss0_.ssWrite(send_data); if (!ss0_.isConnected()) { ROS_ERROR("Serial Fail: cound not write %s", device_name_.c_str()); ros::shutdown(); } } updater_.update(); } bool checkSum(std::vector<unsigned char> data) { if ((int)data.size() >= 2) { int sum = 0; for (int i = 0; i < (int)data.size() - 1; i++) { sum += data[i]; } if (sum % 256 == data.back() % 256) return true; else return false; } return false; } void diag_callback(diagnostic_updater::DiagnosticStatusWrapper &stat){ bool serial_c = ss0_.isConnected(); bool serial_s = ss0_.getReadBytes() > 0; if (serial_c && serial_s)stat.summaryf(diagnostic_msgs::DiagnosticStatus::OK, "Active."); else if(serial_c && !serial_s)stat.summaryf(diagnostic_msgs::DiagnosticStatus::WARN, "No Recieve."); else stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "No Connection."); } int print_data(std::vector<unsigned char> data) { int mode = data[2]; int size = data[3]; int16_t tmp_w = (data[4] * 256 + data[5]); float quat_w = tmp_w / 10000.0; int16_t tmp_x = (data[6] * 256 + data[7]); float quat_x = tmp_x / 10000.0; int16_t tmp_y = (data[8] * 256 + data[9]); float quat_y = tmp_y / 10000.0; int16_t tmp_z = (data[10] * 256 + data[11]); float quat_z = tmp_z / 10000.0; int d0 = (data[12] >> 6) & 0x03; int d1 = (data[12] >> 4) & 0x03; int d2 = (data[12] >> 2) & 0x03; int d3 = (data[12] >> 0) & 0x03; float quat_size = quat_w * quat_w + quat_x * quat_x + quat_y * quat_y + quat_z * quat_z; if (0.9 < quat_size && quat_size < 1.1) { printf("OK\n"); } else { printf("NG\n"); } printf("mag:%f\n", quat_size); int sum = 0; for (int j = 0; j < (int)data.size(); j++) { printf("%03i,", data[j]); sum += data[j]; } printf(":%i %i\n", (int)data.size(), sum % 256); } sensor_msgs::Imu convert_data(std::vector<unsigned char> data) { int mode = data[2]; int size = data[3]; int16_t tmp_w = (data[4] * 256 + data[5]); float quat_w = tmp_w / 10000.0; int16_t tmp_x = (data[6] * 256 + data[7]); float quat_x = tmp_x / 10000.0; int16_t tmp_y = (data[8] * 256 + data[9]); float quat_y = tmp_y / 10000.0; int16_t tmp_z = (data[10] * 256 + data[11]); float quat_z = tmp_z / 10000.0; int d0 = (data[12] >> 6) & 0x03; int d1 = (data[12] >> 4) & 0x03; int d2 = (data[12] >> 2) & 0x03; int d3 = (data[12] >> 0) & 0x03; float quat_size = quat_w * quat_w + quat_x * quat_x + quat_y * quat_y + quat_z * quat_z; sensor_msgs::Imu imu_msg; imu_msg.header.frame_id = "map"; imu_msg.header.stamp = ros::Time::now(); imu_msg.orientation.x = quat_x; imu_msg.orientation.y = quat_y; imu_msg.orientation.z = quat_z; imu_msg.orientation.w = quat_w; return imu_msg; } bool checkSize(sensor_msgs::Imu imu_msg) { float x2 = imu_msg.orientation.x * imu_msg.orientation.x; float y2 = imu_msg.orientation.y * imu_msg.orientation.y; float z2 = imu_msg.orientation.z * imu_msg.orientation.z; float w2 = imu_msg.orientation.w * imu_msg.orientation.w; float size2 = x2 + y2 + z2 + w2; if (0.9 < size2 && size2 < 1.1) return true; return false; } }; int main(int argc, char **argv) { ros::init(argc, argv, "gy955_driver"); ros::NodeHandle nh; GY955Driver gy955_driver; ros::spin(); }
24.32598
120
0.57199
[ "vector" ]
4485c46a88302b34a2903c7d137c39586cf75520
5,554
cpp
C++
Modules/SurfaceInterpolation/mitkPointCloudScoringFilter.cpp
wyyrepo/MITK
d0837f3d0d44f477b888ec498e9a2ed407e79f20
[ "BSD-3-Clause" ]
1
2021-11-20T08:19:27.000Z
2021-11-20T08:19:27.000Z
Modules/SurfaceInterpolation/mitkPointCloudScoringFilter.cpp
wyyrepo/MITK
d0837f3d0d44f477b888ec498e9a2ed407e79f20
[ "BSD-3-Clause" ]
null
null
null
Modules/SurfaceInterpolation/mitkPointCloudScoringFilter.cpp
wyyrepo/MITK
d0837f3d0d44f477b888ec498e9a2ed407e79f20
[ "BSD-3-Clause" ]
null
null
null
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkPointCloudScoringFilter.h" #include <cmath> #include <vtkDoubleArray.h> #include <vtkKdTree.h> #include <vtkPointData.h> #include <vtkPoints.h> #include <vtkPolyVertex.h> #include <vtkSmartPointer.h> #include <vtkUnstructuredGrid.h> mitk::PointCloudScoringFilter::PointCloudScoringFilter() : m_NumberOfOutpPoints(0) { this->SetNumberOfIndexedOutputs(1); } mitk::PointCloudScoringFilter::~PointCloudScoringFilter() { } void mitk::PointCloudScoringFilter::GenerateData() { if (UnstructuredGridToUnstructuredGridFilter::GetNumberOfInputs() != 2) { MITK_ERROR << "Not enough input arguments for PointCloudScoringFilter" << std::endl; return; } DataObjectPointerArray inputs = UnstructuredGridToUnstructuredGridFilter::GetInputs(); mitk::UnstructuredGrid::Pointer edgeGrid = dynamic_cast<mitk::UnstructuredGrid *>(inputs.at(0).GetPointer()); mitk::UnstructuredGrid::Pointer segmGrid = dynamic_cast<mitk::UnstructuredGrid *>(inputs.at(1).GetPointer()); if (edgeGrid->IsEmpty() || segmGrid->IsEmpty()) { if (edgeGrid->IsEmpty()) MITK_ERROR << "edgeGrid is empty" << std::endl; if (segmGrid->IsEmpty()) MITK_ERROR << "segmGrid is empty" << std::endl; } if (m_FilteredScores.size() > 0) m_FilteredScores.clear(); vtkSmartPointer<vtkUnstructuredGrid> edgevtkGrid = edgeGrid->GetVtkUnstructuredGrid(); vtkSmartPointer<vtkUnstructuredGrid> segmvtkGrid = segmGrid->GetVtkUnstructuredGrid(); // KdTree from here vtkSmartPointer<vtkPoints> kdPoints = vtkSmartPointer<vtkPoints>::New(); vtkSmartPointer<vtkKdTree> kdTree = vtkSmartPointer<vtkKdTree>::New(); for (int i = 0; i < edgevtkGrid->GetNumberOfPoints(); i++) { kdPoints->InsertNextPoint(edgevtkGrid->GetPoint(i)); } kdTree->BuildLocatorFromPoints(kdPoints); // KdTree until here vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New(); for (int i = 0; i < segmvtkGrid->GetNumberOfPoints(); i++) { points->InsertNextPoint(segmvtkGrid->GetPoint(i)); } std::vector<ScorePair> score; std::vector<double> distances; double dist_glob = 0.0; double dist = 0.0; for (int i = 0; i < points->GetNumberOfPoints(); i++) { double point[3]; points->GetPoint(i, point); kdTree->FindClosestPoint(point[0], point[1], point[2], dist); dist_glob += dist; distances.push_back(dist); score.push_back(std::make_pair(i, dist)); } double avg = dist_glob / points->GetNumberOfPoints(); double tmpVar = 0.0; double highest = 0.0; for (unsigned int i = 0; i < distances.size(); i++) { tmpVar = tmpVar + ((distances.at(i) - avg) * (distances.at(i) - avg)); if (distances.at(i) > highest) highest = distances.at(i); } // CUBIC MEAN double cubicAll = 0.0; for (unsigned i = 0; i < score.size(); i++) { cubicAll = cubicAll + score.at(i).second * score.at(i).second * score.at(i).second; } double root2 = cubicAll / static_cast<double>(score.size()); double cubic = pow(root2, 1.0 / 3.0); // CUBIC END double metricValue = cubic; for (unsigned int i = 0; i < score.size(); i++) { if (score.at(i).second > metricValue) { m_FilteredScores.push_back(std::make_pair(score.at(i).first, score.at(i).second)); } } m_NumberOfOutpPoints = m_FilteredScores.size(); vtkSmartPointer<vtkPoints> filteredPoints = vtkSmartPointer<vtkPoints>::New(); // storing the distances in the uGrid PointData vtkSmartPointer<vtkDoubleArray> pointDataDistances = vtkSmartPointer<vtkDoubleArray>::New(); pointDataDistances->SetNumberOfComponents(1); pointDataDistances->SetNumberOfTuples(m_FilteredScores.size()); pointDataDistances->SetName("Distances"); for (unsigned int i = 0; i < m_FilteredScores.size(); i++) { mitk::Point3D point; point = segmvtkGrid->GetPoint(m_FilteredScores.at(i).first); filteredPoints->InsertNextPoint(point[0], point[1], point[2]); if (score.at(i).second > 0.001) { double dist[1] = {score.at(i).second}; pointDataDistances->InsertTuple(i, dist); } else { double dist[1] = {0.0}; pointDataDistances->InsertTuple(i, dist); } } unsigned int numPoints = filteredPoints->GetNumberOfPoints(); vtkSmartPointer<vtkPolyVertex> verts = vtkSmartPointer<vtkPolyVertex>::New(); verts->GetPointIds()->SetNumberOfIds(numPoints); for (unsigned int i = 0; i < numPoints; i++) { verts->GetPointIds()->SetId(i, i); } vtkSmartPointer<vtkUnstructuredGrid> uGrid = vtkSmartPointer<vtkUnstructuredGrid>::New(); uGrid->Allocate(1); uGrid->InsertNextCell(verts->GetCellType(), verts->GetPointIds()); uGrid->SetPoints(filteredPoints); uGrid->GetPointData()->AddArray(pointDataDistances); mitk::UnstructuredGrid::Pointer outputGrid = mitk::UnstructuredGrid::New(); outputGrid->SetVtkUnstructuredGrid(uGrid); this->SetNthOutput(0, outputGrid); score.clear(); distances.clear(); } void mitk::PointCloudScoringFilter::GenerateOutputInformation() { Superclass::GenerateOutputInformation(); }
29.700535
111
0.688513
[ "vector" ]
44861d942ea13f486f092cbf3db8e66cb98e6e34
11,968
cxx
C++
src/Plugins/Plugin_imageFileWriter/Plugin_imageFileWriter.cxx
gomezalberto/pretus
63b05419f70ecf8b28ccbb6191eab79637c051ac
[ "MIT" ]
18
2021-11-05T13:04:00.000Z
2022-01-31T14:14:08.000Z
src/Plugins/Plugin_imageFileWriter/Plugin_imageFileWriter.cxx
gomezalberto/pretus
63b05419f70ecf8b28ccbb6191eab79637c051ac
[ "MIT" ]
27
2021-09-14T14:04:28.000Z
2022-02-15T09:58:30.000Z
src/Plugins/Plugin_imageFileWriter/Plugin_imageFileWriter.cxx
gomezalberto/pretus
63b05419f70ecf8b28ccbb6191eab79637c051ac
[ "MIT" ]
1
2021-12-16T12:51:32.000Z
2021-12-16T12:51:32.000Z
#include "Plugin_imageFileWriter.h" #include <ifindImagePeriodicTimer.h> #include <thread> #include <QDir> #include <QDebug> #include <QObject> #include <QCheckBox> #include <QPushButton> #include <QLineEdit> static const std::string sDefaultStreamTypeToWrite("Input"); Q_DECLARE_METATYPE(ifind::Image::Pointer) Plugin_imageFileWriter::Plugin_imageFileWriter(QObject *parent) : Plugin(parent) { this->OutputFolder = ""; this->m_streamtype_to_write = ifind::InitialiseStreamTypeSetFromString(sDefaultStreamTypeToWrite); this->m_folder_policy = 0; /// folder by organ this->subdivide_folders = 0; this->first_subdivision = 0; this->mSaveImages = true; this->mSubfolder = ""; mVerbose = false; mSaveOne = false; { // create widget WidgetType * mWidget_ = new WidgetType; QObject::connect(this, &Plugin_imageFileWriter::ImageToBeSaved, mWidget_, &WidgetType::slot_imageWritten); QObject::connect(this, &Plugin_imageFileWriter::ImageToBeSaved, this, &Plugin_imageFileWriter::slot_Write); QObject::connect(mWidget_->mCheckBoxSaveFiles, &QCheckBox::stateChanged, this, &Plugin_imageFileWriter::slot_toggleSaveImages); QObject::connect(mWidget_->mPushButtonSaveOne, &QPushButton::released, this, &Plugin_imageFileWriter::slot_saveOneImage); QObject::connect(mWidget_->mSubfolderText, &QLineEdit::returnPressed, this, &Plugin_imageFileWriter::slot_setSubFolder); this->mWidget = mWidget_; } this->SetDefaultArguments(); } void Plugin_imageFileWriter::Initialize(void){ Plugin::Initialize(); ifind::Image::Pointer configuration = ifind::Image::New(); configuration->SetMetaData<QString>("SavingImagesToFile_ON","True"); this->mWidget->SetStreamTypes(this->m_streamtype_to_write); WidgetType *w = static_cast<WidgetType *>( this->mWidget); w->setOutputFolder(this->OutputFolder.c_str()); Q_EMIT this->ConfigurationGenerated(configuration); } void Plugin_imageFileWriter::slot_toggleSaveImages(bool b){ this->mSaveImages=b; } void Plugin_imageFileWriter::slot_saveOneImage(){ this->mSaveOne = true; } void Plugin_imageFileWriter::slot_setSubFolder(){ WidgetType *w = static_cast<WidgetType *>( this->mWidget); this->mSubfolder = w->mSubfolderText->text(); } void Plugin_imageFileWriter::slot_imageReceived(ifind::Image::Pointer image){ //std::cout << "Plugin_imageFileWriter::slot_imageReceived() : write image "<< image->GetMetaData<std::string>("DNLTimestamp") << std::endl; /// check the stream of the new image that just arrived. If not in the list of available streams, then add it and transmit a config message. bool is_accounted = this->mAvailableStreamTypes.find(image->GetStreamType()) != this->mAvailableStreamTypes.end(); if (is_accounted == false){ this->mAvailableStreamTypes.insert(image->GetStreamType()); ifind::Image::Pointer config= ifind::Image::New(); config->SetMetaData<std::string>("AvailableStreams",ifind::StreamTypeSetToString(this->mAvailableStreamTypes)); Q_EMIT this->ConfigurationGenerated(config); } /// Send the image through the pipeline if (ifind::IsImageOfStreamTypeSet(image, m_streamtype_to_write)) { if (image->HasKey("DO_NOT_WRITE") || (this->mSaveImages==false && this->mSaveOne == false) ){ // image should not be written. //std::cout << "Plugin_imageFileWriter::slot_imageReceived() : Do not save"<<std::endl; } else { Q_EMIT this->ImageToBeSaved(image); this->mSaveOne = false; } } Q_EMIT this->ImageGenerated(image); } void Plugin_imageFileWriter::SetDefaultArguments(){ this->RemoveArgument("showimage"); this->RemoveArgument("layer"); // arguments are defined with: name, placeholder for value, argument type, description, default value mArguments.push_back({"folder", "<folder>", QString( Plugin::ArgumentType[3] ), "Parent folder to save images. Will be created if does not exist.", QString(this->OutputFolder.c_str())}); mArguments.push_back({"stream", "<stream name>", QString( Plugin::ArgumentType[3] ), "Write images only of a certain stream type, given as a string. If set to \"-\", it saves all.", QString(sDefaultStreamTypeToWrite.c_str())}); mArguments.push_back({"maxfiles", "<N>", QString( Plugin::ArgumentType[1] ), "Maximum number of images in a single folder, will create another folder if this is exceeded. If 0, all files in same folder.", QString::number(this->subdivide_folders)}); mArguments.push_back({"firstsubdivision", "<N>", QString( Plugin::ArgumentType[1] ), "Initial id for the subdivision folder.", QString::number(this->first_subdivision)}); } void Plugin_imageFileWriter::SetCommandLineArguments(int argc, char* argv[]){ Plugin::SetCommandLineArguments(argc, argv); InputParser input(argc, argv, this->GetCompactPluginName().toLower().toStdString()); {const std::string &argument = input.getCmdOption("folder"); if (!argument.empty()){ this->OutputFolder= argument.c_str(); }} {const std::string &argument = input.getCmdOption("stream"); if (!argument.empty()){ this->m_streamtype_to_write = ifind::InitialiseStreamTypeSetFromString(argument.c_str()); }} {const std::string &argument = input.getCmdOption("maxfiles"); if (!argument.empty()){ this->subdivide_folders= atoi(argument.c_str()); }} {const std::string &argument = input.getCmdOption("firstsubdivision"); if (!argument.empty()){ this->first_subdivision= atoi(argument.c_str()); }} {const std::string &argument = input.getCmdOption("verbose"); if (!argument.empty()){ this->mVerbose= atoi(argument.c_str()); }} } std::string Plugin_imageFileWriter::CreateFileName(ifind::Image::Pointer arg, unsigned int layer, bool withextension) { std::ostringstream filename; filename << "image_transducer" << std::stoi(arg->GetMetaData<std::string>("TransducerNumber")) << "_" << std::stoi(arg->GetMetaData<std::string>("NDimensions")) << "D_" << arg->GetMetaData<std::string>("DNLTimestamp"); if(layer >= 0){ filename << "_layer" << layer; } if (withextension){ filename << ".mhd"; } return filename.str(); } void Plugin_imageFileWriter::slot_Write(ifind::Image::Pointer arg) { if (this->mVerbose){ std::cout << "[VERBOSE] Plugin_imageFileWriter::Write() "<< std::endl; } QString dirname; try { /// TODO: make sure you don't save images from this plugin. QString streamfolder = QString::fromStdString(arg->GetMetaData<std::string>("StreamType")); QString subfolder; QString subfolder_(""); if (arg->HasKey("Label")){ subfolder_ = QString::fromStdString( arg->GetMetaData<std::string>("Label") ); } if (this->subdivide_folders >0){ if (this->write_count.find(subfolder_.toStdString())==this->write_count.end()){ // first timer- std::array<int, 2> counts; counts.fill(0); counts[1] = this->first_subdivision; this->write_count[subfolder_.toStdString()] = counts; } auto counts = this->write_count[subfolder_.toStdString()]; if (counts[0]++ > this->subdivide_folders){ counts[0]=0; // number of frame counts[1]++; // number of subdivision" } subfolder = subfolder_ + QString::number(counts[1]); this->write_count[subfolder_.toStdString()] = counts; } else { subfolder = subfolder_; } QDir sessiondirectory(QString::fromStdString(this->OutputFolder)); dirname = sessiondirectory.filePath(streamfolder + QDir::separator() + subfolder); if (this->mSubfolder.length()>0){ dirname = sessiondirectory.filePath(streamfolder + QDir::separator() + this->mSubfolder); } if (!sessiondirectory.mkpath(dirname)) { qWarning() << "Plugin_imageFileWriter::Write() - Cannot create dir " << dirname; return; } } catch( itk::ExceptionObject& ex ) { qDebug() << "Plugin_imageFileWriter::Write() - exception captured when preparing"; qDebug() << ex.what(); } if (this->mVerbose){ std::cout << "\t[VERBOSE] Plugin_imageFileWriter::Write() folders created. Lock mutex "<< std::endl; } //this->m_FileNames.clear(); for(unsigned int l = 0; l < arg->GetNumberOfLayers(); l++) { if (this->mVerbose){ std::cout << "\t[VERBOSE] Plugin_imageFileWriter::Write() trying to write layer "<< l << std::endl; } /// extract name information std::string fname = this->CreateFileName(arg, l, true); std::string filename = dirname.toStdString() + std::string("/") + fname; //this->m_FileNames.push_back(filename); /// convert layer into ITK format if (this->mVerbose){ std::cout << "\t[VERBOSE] Plugin_imageFileWriter::Write() trying to convert layer "<< l << std::endl; } ConverterType::Pointer converter; vtkSmartPointer<vtkImageData> vtkim = arg->GetVTKImage(l); //vtkSmartPointer<vtkImageData> vtkim = vtkSmartPointer<vtkImageData>::New(); //vtkim->DeepCopy(arg->GetVTKImage(l)); if (vtkim == nullptr){ continue; } try { converter = ConverterType::New(); converter->SetInput(vtkim); converter->Update(); } catch( itk::ExceptionObject& ex ) { qDebug() << "Plugin_imageFileWriter::Write() - exception captured when converting formats"; qDebug() << ex.what(); } if (this->mVerbose){ std::cout << "\t[VERBOSE] Plugin_imageFileWriter::Write() converted layer "<< l << std::endl; } ifind::Image::Pointer layer = converter->GetOutput(); //layer->DisconnectPipeline(); layer->SetMetaDataDictionary(arg->GetMetaDataDictionary()); this->WriteLayer(layer, filename, false); if (this->mVerbose){ std::cout << "\t[VERBOSE] Plugin_imageFileWriter::Write() layer "<< l << " written"<< std::endl; } } if (this->mVerbose){ std::cout << "\t[VERBOSE] Plugin_imageFileWriter::Write() mutex unlocked "<< std::endl; } } void Plugin_imageFileWriter::WriteLayer(const ifind::Image::Pointer layer, const std::string &filename, bool headerOnly){ try { /// write the image WriterType::Pointer writer = WriterType::New(); writer->SetFileName(filename); writer->SetInput(layer); //x1writer->Update(); writer->Write(); } catch( itk::ExceptionObject& ex ) { qDebug() << "Plugin_imageFileWriter::Write() - exception captured when writing to "<< filename.c_str(); qDebug() << ex.what(); } } QtPluginWidgetBase *Plugin_imageFileWriter::GetWidget(){ return mWidget; } extern "C" { #ifdef WIN32 /// Function to return an instance of a new LiveCompoundingFilter object __declspec(dllexport) Plugin* construct() { return new Plugin_imageFileWriter(); } #else Plugin* construct() { return new Plugin_imageFileWriter(); } #endif // WIN32 }
36.824615
153
0.621324
[ "object" ]
448b53a0a6f560d44ffcb48158382bcc5fc6327e
9,846
hpp
C++
includes/runners/simulator.hpp
xetqL/ljmpi
9b8bfee106fc2cefb49c32eed9b714b7bfecad94
[ "MIT" ]
1
2020-06-03T14:44:08.000Z
2020-06-03T14:44:08.000Z
includes/runners/simulator.hpp
xetqL/ljmpi
9b8bfee106fc2cefb49c32eed9b714b7bfecad94
[ "MIT" ]
null
null
null
includes/runners/simulator.hpp
xetqL/ljmpi
9b8bfee106fc2cefb49c32eed9b714b7bfecad94
[ "MIT" ]
null
null
null
// // Created by xetql on 27.06.18. // #ifndef NBMPI_SIMULATE_HPP #define NBMPI_SIMULATE_HPP #include <sstream> #include <fstream> #include <iomanip> #include <mpi.h> #include <map> #include <unordered_map> #include <cstdlib> #include "../decision_makers/strategy.hpp" #include "../ljpotential.hpp" #include "../nbody_io.hpp" #include "../utils.hpp" #include "../parallel_utils.hpp" #include "../params.hpp" #include "spdlog/spdlog.h" #include "spdlog/sinks/basic_file_sink.h" using ApplicationTime = Time; using CumulativeLoadImbalanceHistory = std::vector<Time>; using TimeHistory = std::vector<Time>; using Decisions = std::vector<int>; template<int N> using Position = std::array<Real, N>; template<int N> using Velocity = std::array<Real, N>; template<int N, class T, class D, class LoadBalancer, class Wrapper> std::tuple<ApplicationTime, CumulativeLoadImbalanceHistory, Decisions, TimeHistory> simulate( LoadBalancer* LB, MESH_DATA<T> *mesh_data, decision_making::LBPolicy<D>&& lb_policy, Wrapper fWrapper, sim_param_t *params, Probe* probe, MPI_Datatype datatype, const MPI_Comm comm = MPI_COMM_WORLD, const std::string output_names_prefix = "") { auto boxIntersectFunc = fWrapper.getBoxIntersectionFunc(); auto doLoadBalancingFunc= fWrapper.getLoadBalancingFunc(); auto pointAssignFunc = fWrapper.getPointAssignationFunc(); auto getPosPtrFunc = fWrapper.getPosPtrFunc(); auto getVelPtrFunc = fWrapper.getVelPtrFunc(); auto getForceFunc = fWrapper.getForceFunc(); int nproc, rank; MPI_Comm_rank(comm, &rank); MPI_Comm_size(comm, &nproc); const int nframes = params->nframes; const int npframe = params->npframe; SimpleCSVFormatter frame_formater(','); auto time_logger = spdlog::basic_logger_mt("frame_time_logger", "logs/"+output_names_prefix+std::to_string(params->seed)+"/time/frame-p"+std::to_string(rank)+".txt"); auto cmplx_logger = spdlog::basic_logger_mt("frame_cmplx_logger", "logs/"+output_names_prefix+std::to_string(params->seed)+"/complexity/frame-p"+std::to_string(rank)+".txt"); time_logger->set_pattern("%v"); cmplx_logger->set_pattern("%v"); std::vector<T> recv_buf; if (params->record) { recv_buf.reserve(params->npart); gather_elements_on(nproc, rank, params->npart, mesh_data->els, 0, recv_buf, datatype, comm); if (!rank) { auto particle_logger = spdlog::basic_logger_mt("particle_logger", "logs/"+output_names_prefix+std::to_string(params->seed)+"/frames/particles.csv.0"); particle_logger->set_pattern("%v"); std::stringstream str; frame_formater.write_header(str, params->npframe, params->simsize); write_frame_data<N>(str, recv_buf, [](auto& e){return e.position;}, frame_formater); particle_logger->info(str.str()); } } std::vector<Time> times(nproc), my_frame_times(nframes); std::vector<Index> lscl(mesh_data->els.size()), head; std::vector<Complexity> my_frame_cmplx(nframes); // Compute my bounding box as function of my local data auto bbox = get_bounding_box<N>(params->rc, getPosPtrFunc, mesh_data->els); // Compute which cells are on my borders auto borders = get_border_cells_index<N>(LB, bbox, params->rc, boxIntersectFunc, comm); // Get the ghost data from neighboring processors auto remote_el = get_ghost_data<N>(mesh_data->els, getPosPtrFunc, &head, &lscl, bbox, borders, params->rc, datatype, comm); const int nb_data = mesh_data->els.size(); for(int i = 0; i < nb_data; ++i) mesh_data->els[i].lid = i; ApplicationTime app_time = 0.0; CumulativeLoadImbalanceHistory cum_li_hist; cum_li_hist.reserve(nframes*npframe); TimeHistory time_hist; time_hist.reserve(nframes*npframe); Decisions dec; dec.reserve(nframes*npframe); Time total_time = 0.0; for (int frame = 0; frame < nframes; ++frame) { Time comp_time = 0.0; Complexity complexity = 0; for (int i = 0; i < npframe; ++i) { START_TIMER(it_compute_time); complexity += lj::compute_one_step<N>(mesh_data->els, remote_el, getPosPtrFunc, getVelPtrFunc, &head, &lscl, bbox, getForceFunc, borders, params); END_TIMER(it_compute_time); // Measure load imbalance MPI_Allreduce(&it_compute_time, probe->max_it_time(), 1, MPI_TIME, MPI_MAX, comm); MPI_Allreduce(&it_compute_time, probe->min_it_time(), 1, MPI_TIME, MPI_MIN, comm); MPI_Allreduce(&it_compute_time, probe->sum_it_time(), 1, MPI_TIME, MPI_SUM, comm); probe->update_cumulative_imbalance_time(); it_compute_time = *probe->max_it_time(); if(probe->is_balanced()) { probe->update_lb_parallel_efficiencies(); } bool lb_decision = lb_policy.should_load_balance(); cum_li_hist.push_back(probe->get_cumulative_imbalance_time()); dec.push_back(lb_decision); if (lb_decision) { PAR_START_TIMER(lb_time_spent, MPI_COMM_WORLD); doLoadBalancingFunc(LB, mesh_data); PAR_END_TIMER(lb_time_spent, MPI_COMM_WORLD); MPI_Allreduce(MPI_IN_PLACE, &lb_time_spent, 1, MPI_TIME, MPI_MAX, MPI_COMM_WORLD); probe->push_load_balancing_time(lb_time_spent); probe->reset_cumulative_imbalance_time(); it_compute_time += lb_time_spent; if(!rank) { std::cout << "Average C = " << probe->compute_avg_lb_time() << std::endl; } } else { migrate_data(LB, mesh_data->els, pointAssignFunc, datatype, comm); } probe->set_balanced(lb_decision); total_time += it_compute_time; time_hist.push_back(total_time); bbox = get_bounding_box<N>(params->rc, getPosPtrFunc, mesh_data->els); borders = get_border_cells_index<N>(LB, bbox, params->rc, boxIntersectFunc, comm); remote_el = get_ghost_data<N>(mesh_data->els, getPosPtrFunc, &head, &lscl, bbox, borders, params->rc, datatype, comm); comp_time += it_compute_time; probe->next_iteration(); } probe->batch_time = comp_time; if(!rank) std::cout << probe->batch_time << std::endl; app_time += probe->batch_time; // Write metrics to report file if (params->record) { time_logger->info("{:0.6f}", probe->batch_time); cmplx_logger->info("{}", complexity); if(frame % 5 == 0) { time_logger->flush(); cmplx_logger->flush(); } gather_elements_on(nproc, rank, params->npart, mesh_data->els, 0, recv_buf, datatype, comm); if (rank == 0) { spdlog::drop("particle_logger"); auto particle_logger = spdlog::basic_logger_mt("particle_logger", "logs/"+output_names_prefix+std::to_string(params->seed)+"/frames/particles.csv."+ std::to_string(frame + 1)); particle_logger->set_pattern("%v"); std::stringstream str; frame_formater.write_header(str, params->npframe, params->simsize); write_frame_data<N>(str, recv_buf, [](auto& e){return e.position;}, frame_formater); particle_logger->info(str.str()); } } my_frame_times[frame] = probe->batch_time; my_frame_cmplx[frame] = complexity; } MPI_Barrier(comm); std::vector<Time> max_times(nframes), min_times(nframes), avg_times(nframes); Time sum_times; std::vector<Complexity > max_cmplx(nframes), min_cmplx(nframes), avg_cmplx(nframes); Complexity sum_cmplx; std::shared_ptr<spdlog::logger> lb_time_logger; std::shared_ptr<spdlog::logger> lb_cmplx_logger; if(!rank){ lb_time_logger = spdlog::basic_logger_mt("lb_times_logger", "logs/"+output_names_prefix+std::to_string(params->seed)+"/time/frame_statistics.txt"); lb_time_logger->set_pattern("%v"); lb_cmplx_logger = spdlog::basic_logger_mt("lb_cmplx_logger", "logs/"+output_names_prefix+std::to_string(params->seed)+"/complexity/frame_statistics.txt"); lb_cmplx_logger->set_pattern("%v"); } for (int frame = 0; frame < nframes; ++frame) { MPI_Reduce(&my_frame_times[frame], &max_times[frame], 1, MPI_TIME, MPI_MAX, 0, MPI_COMM_WORLD); MPI_Reduce(&my_frame_times[frame], &min_times[frame], 1, MPI_TIME, MPI_MIN, 0, MPI_COMM_WORLD); MPI_Reduce(&my_frame_times[frame], &sum_times, 1, MPI_TIME, MPI_SUM, 0, MPI_COMM_WORLD); MPI_Reduce(&my_frame_cmplx[frame], &max_cmplx[frame], 1, MPI_COMPLEXITY, MPI_MAX, 0, MPI_COMM_WORLD); MPI_Reduce(&my_frame_cmplx[frame], &min_cmplx[frame], 1, MPI_COMPLEXITY, MPI_MIN, 0, MPI_COMM_WORLD); MPI_Reduce(&my_frame_cmplx[frame], &sum_cmplx, 1, MPI_COMPLEXITY, MPI_SUM, 0, MPI_COMM_WORLD); if(!rank) { avg_times[frame] = sum_times / nproc; avg_cmplx[frame] = sum_cmplx / nproc; lb_time_logger->info("{}\t{}\t{}\t{}", max_times[frame], min_times[frame], avg_times[frame], (max_times[frame]/avg_times[frame]-1.0)); lb_cmplx_logger->info("{}\t{}\t{}\t{}", max_cmplx[frame], min_cmplx[frame], avg_cmplx[frame], (max_cmplx[frame]/avg_cmplx[frame]-1.0)); } } spdlog::drop("particle_logger"); spdlog::drop("lb_times_logger"); spdlog::drop("lb_cmplx_logger"); spdlog::drop("frame_time_logger"); spdlog::drop("frame_cmplx_logger"); return { app_time, cum_li_hist, dec, time_hist}; } #endif //NBMPI_SIMULATE_HPP
43.374449
192
0.647471
[ "vector" ]
448e7dbe5a6e58b8b6ef89d7c879fbb304bcb9f1
14,175
cpp
C++
Samples/BackgroundSensors/cpp/Scenario1_DeviceUse.xaml.cpp
dujianxin/Windows-universal-samples
d4e95ff0ac408c5d4d980bb18d53fb2c6556a273
[ "MIT" ]
2,504
2019-05-07T06:56:42.000Z
2022-03-31T19:37:59.000Z
Samples/BackgroundSensors/cpp/Scenario1_DeviceUse.xaml.cpp
dujianxin/Windows-universal-samples
d4e95ff0ac408c5d4d980bb18d53fb2c6556a273
[ "MIT" ]
314
2019-05-08T16:56:30.000Z
2022-03-21T07:13:45.000Z
Samples/BackgroundSensors/cpp/Scenario1_DeviceUse.xaml.cpp
dujianxin/Windows-universal-samples
d4e95ff0ac408c5d4d980bb18d53fb2c6556a273
[ "MIT" ]
2,219
2019-05-07T00:47:26.000Z
2022-03-30T21:12:31.000Z
// Copyright (c) Microsoft. All rights reserved. #include "pch.h" #include "Scenario1_DeviceUse.xaml.h" using namespace SDKTemplate; using namespace Concurrency; using namespace Platform; using namespace Windows::ApplicationModel::Background; using namespace Windows::Devices::Sensors; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; using namespace Windows::Storage; using namespace Windows::UI::Core; using namespace Windows::UI::Xaml; using namespace Windows::UI::Xaml::Controls; using namespace Windows::UI::Xaml::Controls::Primitives; Scenario1_DeviceUse::Scenario1_DeviceUse() : rootPage(MainPage::Current), _deviceUseBackgroundTaskRegistration(nullptr), _deviceUseTrigger(nullptr), _refreshTimer(nullptr) { InitializeComponent(); _accelerometer = Accelerometer::GetDefault(); if (nullptr != _accelerometer) { // Save trigger so that we may start the background task later. // Only one instance of the trigger can exist at a time. Since the trigger // does not implement IDisposable, it may still be in memory when a new // trigger is created. _deviceUseTrigger = ref new DeviceUseTrigger(); // Setup a timer to periodically refresh results when the app is visible. TimeSpan interval; interval.Duration = 1 * 10000000; // 1 second (in 100-nanosecond units) _refreshTimer = ref new DispatcherTimer(); _refreshTimer->Interval = interval; _refreshTimer->Tick += ref new EventHandler<Object^>(this, &Scenario1_DeviceUse::RefreshTimer_Tick); // If the background task is active, start the refresh timer and activate the "Disable" button. // The "IsBackgroundTaskActive" state is set by the background task. const bool isBackgroundTaskActive = ApplicationData::Current->LocalSettings->Values->HasKey("IsBackgroundTaskActive") && (bool)ApplicationData::Current->LocalSettings->Values->Lookup("IsBackgroundTaskActive"); ScenarioEnableButton->IsEnabled = !isBackgroundTaskActive; ScenarioDisableButton->IsEnabled = isBackgroundTaskActive; if (isBackgroundTaskActive) { _refreshTimer->Start(); } // Store a setting for the background task to read ApplicationData::Current->LocalSettings->Values->Insert("IsAppVisible", dynamic_cast<PropertyValue^>(PropertyValue::CreateBoolean(true))); _visibilityToken = Window::Current->VisibilityChanged::add( ref new WindowVisibilityChangedEventHandler(this, &Scenario1_DeviceUse::VisibilityChanged)); } else { rootPage->NotifyUser("No accelerometer found", NotifyType::StatusMessage); } } Scenario1_DeviceUse::~Scenario1_DeviceUse() { ApplicationData::Current->LocalSettings->Values->Insert("IsAppVisible", dynamic_cast<PropertyValue^>(PropertyValue::CreateBoolean(false))); if (nullptr != _accelerometer) { if (nullptr != Window::Current) { Window::Current->VisibilityChanged::remove(_visibilityToken); } _refreshTimer->Stop(); // The default behavior here is to let the background task continue to run when // this scenario exits. The background task can be canceled by clicking on the "Disable" // button the next time the app is navigated to. // To cancel the background task on scenario exit, uncomment this code. // if (nullptr != _deviceUseBackgroundTaskRegistration) // { // _deviceUseBackgroundTaskRegistration->Unregister(true); // } // Unregister from the background task completion event because this object // is being destroyed (notifications will no longer be valid). if (nullptr != _deviceUseBackgroundTaskRegistration) { _deviceUseBackgroundTaskRegistration->Completed::remove(_taskCompletionToken); } } } /// <summary> /// This is the event handler for VisibilityChanged events. /// </summary> /// <param name="sender"></param> /// <param name="e"> /// Event data that can be examined for the current visibility state. /// </param> void Scenario1_DeviceUse::VisibilityChanged(Object^ sender, VisibilityChangedEventArgs^ e) { if (ScenarioDisableButton->IsEnabled) { ApplicationData::Current->LocalSettings->Values->Insert("IsAppVisible", dynamic_cast<PropertyValue^>(PropertyValue::CreateBoolean(e->Visible))); if (e->Visible) { _refreshTimer->Start(); } else { _refreshTimer->Stop(); } } } /// <summary> /// This is the click handler for the 'Enable' button. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Scenario1_DeviceUse::ScenarioEnable(Object^ sender, RoutedEventArgs^ e) { if (nullptr != _accelerometer) { // Make sure this app is allowed to run background tasks. // RequestAccessAsync must be called on the UI thread. create_task(BackgroundExecutionManager::RequestAccessAsync()) .then([this](BackgroundAccessStatus accessStatus) { if ((BackgroundAccessStatus::AlwaysAllowed == accessStatus) || (BackgroundAccessStatus::AllowedSubjectToSystemPolicy == accessStatus)) { try { create_task(StartSensorBackgroundTaskAsync(_accelerometer->DeviceId)) .then([this](task<bool> startedTask) { try { bool started = startedTask.get(); if (started) { _refreshTimer->Start(); ScenarioEnableButton->IsEnabled = false; ScenarioDisableButton->IsEnabled = true; } } catch (Exception ^ex) { rootPage->NotifyUser("Exception in background task: " + ex->Message, NotifyType::ErrorMessage); } }); } catch (Exception ^ex) { rootPage->NotifyUser("Exception in background task: " + ex->Message, NotifyType::ErrorMessage); } } else { rootPage->NotifyUser("Background tasks may be disabled for this app", NotifyType::ErrorMessage); } }); } else { rootPage->NotifyUser("No accelerometer found", NotifyType::StatusMessage); } } /// <summary> /// This is the click handler for the 'Disable' button. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Scenario1_DeviceUse::ScenarioDisable(Object^ sender, RoutedEventArgs^ e) { ScenarioEnableButton->IsEnabled = true; ScenarioDisableButton->IsEnabled = false; _refreshTimer->Stop(); // Cancel and unregister the background task. if (nullptr != _deviceUseBackgroundTaskRegistration) { // Cancel and unregister the background task from the current app session. _deviceUseBackgroundTaskRegistration->Unregister(true); _deviceUseBackgroundTaskRegistration = nullptr; } else { // Cancel and unregister the background task from the previous app session. FindAndCancelExistingBackgroundTask(); } ApplicationData::Current->LocalSettings->Values->Insert("IsBackgroundTaskActive", dynamic_cast<PropertyValue^>(PropertyValue::CreateBoolean(false))); rootPage->NotifyUser("Background task was canceled", NotifyType::StatusMessage); } /// <summary> /// Starts the sensor background task. /// </summary> /// <param name="deviceId">Device Id for the sensor to be used by the task.</param> /// <param name="e"></param> /// <returns> /// A Concurrency::task with a boolean result indicating if the background task /// was started successfully. /// </returns> task<bool> Scenario1_DeviceUse::StartSensorBackgroundTaskAsync(String^ deviceId) { // Make sure only 1 task is running. FindAndCancelExistingBackgroundTask(); // Register the background task. auto backgroundTaskBuilder = ref new BackgroundTaskBuilder(); backgroundTaskBuilder->Name = SampleConstants::Scenario1_TaskName; backgroundTaskBuilder->TaskEntryPoint = SampleConstants::Scenario1_TaskEntryPoint; backgroundTaskBuilder->SetTrigger(_deviceUseTrigger); _deviceUseBackgroundTaskRegistration = backgroundTaskBuilder->Register(); // Make sure we're notified when the task completes or if there is an update. _taskCompletionToken = _deviceUseBackgroundTaskRegistration->Completed::add( ref new BackgroundTaskCompletedEventHandler( this, &Scenario1_DeviceUse::OnBackgroundTaskCompleted)); try { // Request a DeviceUse task to use the accelerometer. return create_task(_deviceUseTrigger->RequestAsync(deviceId)). then([this](DeviceTriggerResult deviceTriggerResult) { bool started = false; switch (deviceTriggerResult) { case DeviceTriggerResult::Allowed: rootPage->NotifyUser("Background task started", NotifyType::StatusMessage); started = true; break; case DeviceTriggerResult::LowBattery: rootPage->NotifyUser("Insufficient battery to run the background task", NotifyType::ErrorMessage); break; case DeviceTriggerResult::DeniedBySystem: // The system can deny a task request if the system-wide DeviceUse task limit is reached. rootPage->NotifyUser("The system has denied the background task request", NotifyType::ErrorMessage); break; default: rootPage->NotifyUser("Could not start the background task: " + deviceTriggerResult.ToString(), NotifyType::ErrorMessage); break; } return started; }); } catch (Platform::COMException^ e) { if (0x8000000E == e->HResult) // HRESULT_FROM_WIN32(ERROR_INVALID_OPERATION) { rootPage->NotifyUser("A previous background task is still running, please wait for it to exit", NotifyType::ErrorMessage); FindAndCancelExistingBackgroundTask(); return task<bool>([]() { return false; }); } else { throw e; // let other exceptions bubble up. } } } /// <summary> /// Finds a previously registered background task for this scenario and cancels it (if present) /// </summary> void Scenario1_DeviceUse::FindAndCancelExistingBackgroundTask() { auto backgroundTaskIter = BackgroundTaskRegistration::AllTasks->First(); auto isBackgroundTask = backgroundTaskIter->HasCurrent; while (isBackgroundTask) { auto backgroundTask = backgroundTaskIter->Current->Value; if (SampleConstants::Scenario1_TaskName == backgroundTask->Name) { backgroundTask->Unregister(true); break; } isBackgroundTask = backgroundTaskIter->MoveNext(); } } /// <summary> /// This is the tick handler for the Refresh timer. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Scenario1_DeviceUse::RefreshTimer_Tick(Object^ /*sender*/, Object^ /*e*/) { if (ApplicationData::Current->LocalSettings->Values->HasKey("SampleCount")) { uint64 sampleCount = (uint64)ApplicationData::Current->LocalSettings->Values->Lookup("SampleCount"); ScenarioOutput_SampleCount->Text = sampleCount.ToString(); } else { ScenarioOutput_SampleCount->Text = "No data"; } } /// <summary> /// This is the background task completion handler. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Scenario1_DeviceUse::OnBackgroundTaskCompleted(BackgroundTaskRegistration^ /*sender*/, BackgroundTaskCompletedEventArgs^ e) { // Dispatch to the UI thread to display the output. Dispatcher->RunAsync(CoreDispatcherPriority::Normal, ref new DispatchedHandler( [this, e]() { // An exception may be thrown if an error occurs in the background task. try { e->CheckResult(); if (ApplicationData::Current->LocalSettings->Values->HasKey("TaskCancelationReason")) { String^ cancelationReason = (String^)ApplicationData::Current->LocalSettings->Values->Lookup("TaskCancelationReason"); rootPage->NotifyUser("Background task was stopped, reason: " + cancelationReason, NotifyType::StatusMessage); } } catch (Exception^ ex) { rootPage->NotifyUser("Exception in background task: " + ex->Message, NotifyType::ErrorMessage); } }, CallbackContext::Any )); // Unregister the background task and let the remaining task finish until completion. if (nullptr != _deviceUseBackgroundTaskRegistration) { _deviceUseBackgroundTaskRegistration->Unregister(false); _deviceUseBackgroundTaskRegistration = nullptr; } }
37.010444
139
0.612205
[ "object" ]
449a2f84354eda1f6cc3536fadd289ac4bc17c2d
2,162
cpp
C++
OJ/acm.hdu.edu.cn/2018multiUniversity02/1010.cpp
webturing/CPlusPlus
6b9c671b0c9a7c0d24d937610bf54e9aec9a5a1f
[ "AFL-2.0" ]
14
2018-06-21T14:41:26.000Z
2021-12-19T14:43:51.000Z
OJ/acm.hdu.edu.cn/2018multiUniversity02/1010.cpp
webturing/CPlusPlus
6b9c671b0c9a7c0d24d937610bf54e9aec9a5a1f
[ "AFL-2.0" ]
null
null
null
OJ/acm.hdu.edu.cn/2018multiUniversity02/1010.cpp
webturing/CPlusPlus
6b9c671b0c9a7c0d24d937610bf54e9aec9a5a1f
[ "AFL-2.0" ]
2
2020-04-20T11:16:53.000Z
2021-01-02T15:58:35.000Z
#include <iostream> #include <stdio.h> #include <math.h> #include <string.h> #include <time.h> #include <stdlib.h> #include <string> #include <bitset> #include <vector> #include <set> #include <map> #include <queue> #include <algorithm> #include <sstream> #include <stack> #include <iomanip> using namespace std; #define pb push_back #define mp make_pair typedef pair<int, int> pii; typedef long long ll; typedef double ld; typedef vector<int> vi; #define fi first #define se second #define fe first #define FO(x) {freopen(#x".in","r",stdin);freopen(#x".out","w",stdout);} #define Edg int M=0,fst[SZ],vb[SZ],nxt[SZ];void ad_de(int a,int b){++M;nxt[M]=fst[a];fst[a]=M;vb[M]=b;}void adde(int a,int b){ad_de(a,b);ad_de(b,a);} #define Edgc int M=0,fst[SZ],vb[SZ],nxt[SZ],vc[SZ];void ad_de(int a,int b,int c){++M;nxt[M]=fst[a];fst[a]=M;vb[M]=b;vc[M]=c;}void adde(int a,int b,int c){ad_de(a,b,c);ad_de(b,a,c);} #define es(x, e) (int e=fst[x];e;e=nxt[e]) #define esb(x, e, b) (int e=fst[x],b=vb[e];e;e=nxt[e],b=vb[e]) #define VIZ {printf("digraph G{\n"); for(int i=1;i<=n;i++) for es(i,e) printf("%d->%d;\n",i,vb[e]); puts("}");} #define VIZ2 {printf("graph G{\n"); for(int i=1;i<=n;i++) for es(i,e) if(vb[e]>=i)printf("%d--%d;\n",i,vb[e]); puts("}");} #define SZ 666666 //orz kczno1 POD only template<typename T> struct vec { T *a; int n; void clear() { n = 0; } void pb(const T &x) { if ((n & -n) == n)a = (T *) realloc(a, (n * 2) * sizeof(T)); a[n++] = x; } inline T *begin() { return a; } inline T *end() { return a + n; } }; int n, x, y, a[SZ], g[SZ], bs[SZ]; void sol() { for (int i = 1; i <= n; ++i) bs[i] = 0; for (int i = 1; i <= n; ++i) scanf("%d", a + i), g[i] = a[i]; sort(g + 1, g + 1 + n); for (int i = 1; i <= n; ++i) a[i] = n + 1 - (lower_bound(g + 1, g + 1 + n, a[i]) - g); ll inv = 0; for (int i = 1; i <= n; ++i) { for (int g = a[i] - 1; g >= 1; g -= g & -g) inv += bs[g]; for (int g = a[i]; g <= n; g += g & -g) ++bs[g]; } printf("%lld\n", min(x, y) * inv); } int main() { while (scanf("%d%d%d", &n, &x, &y) != EOF) sol(); }
28.826667
181
0.533302
[ "vector" ]
44a342da8ac9f88cc8daf29b931cef32c80db540
1,045,004
cpp
C++
Temp/il2cppOutput/il2cppOutput/Bulk_mscorlib_3.cpp
408794550/871AR
3f903d01ae05522413f7be7abb286d1944d00bbb
[ "Apache-2.0" ]
1
2018-08-16T10:43:30.000Z
2018-08-16T10:43:30.000Z
Temp/il2cppOutput/il2cppOutput/Bulk_mscorlib_3.cpp
408794550/871AR
3f903d01ae05522413f7be7abb286d1944d00bbb
[ "Apache-2.0" ]
null
null
null
Temp/il2cppOutput/il2cppOutput/Bulk_mscorlib_3.cpp
408794550/871AR
3f903d01ae05522413f7be7abb286d1944d00bbb
[ "Apache-2.0" ]
null
null
null
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include "class-internals.h" #include "codegen/il2cpp-codegen.h" #include "mscorlib_System_Array3829468939.h" #include "mscorlib_System_ObjectDisposedException2695136451.h" #include "mscorlib_System_String2029220233.h" #include "mscorlib_System_Void1841601450.h" #include "mscorlib_System_InvalidOperationException721527559.h" #include "mscorlib_System_Runtime_Serialization_Serialization228987430.h" #include "mscorlib_System_Runtime_Serialization_StreamingCon1417235061.h" #include "mscorlib_System_Object2689449295.h" #include "mscorlib_System_Exception1927440687.h" #include "mscorlib_System_ObsoleteAttribute3878847927.h" #include "mscorlib_System_Attribute542643598.h" #include "mscorlib_System_Boolean3825574718.h" #include "mscorlib_System_OperatingSystem290860502.h" #include "mscorlib_System_PlatformID1006634368.h" #include "mscorlib_System_Version1755874712.h" #include "mscorlib_System_ArgumentNullException628810857.h" #include "mscorlib_System_Int322071877448.h" #include "mscorlib_System_OrdinalComparer1018219584.h" #include "mscorlib_System_StringComparer1574862926.h" #include "mscorlib_System_OutOfMemoryException1181064283.h" #include "mscorlib_System_SystemException3877406272.h" #include "mscorlib_System_OverflowException1075868493.h" #include "mscorlib_System_ArithmeticException3261462543.h" #include "mscorlib_System_ParamArrayAttribute2144993728.h" #include "mscorlib_System_PlatformNotSupportedException3778770305.h" #include "mscorlib_System_NotSupportedException1793819818.h" #include "mscorlib_System_RankException1539875949.h" #include "mscorlib_System_Reflection_AmbiguousMatchException1406414556.h" #include "mscorlib_System_Reflection_Assembly4268412390.h" #include "mscorlib_System_Reflection_Assembly_ResolveEventHo1761494505.h" #include "mscorlib_System_Type1303803226.h" #include "mscorlib_System_IntPtr2504060609.h" #include "mscorlib_System_Reflection_Module4282841206.h" #include "mscorlib_System_ArgumentException3259014390.h" #include "mscorlib_System_Reflection_AssemblyName894705941.h" #include "mscorlib_System_AppDomain2719102437.h" #include "mscorlib_System_RuntimeTypeHandle2330101084.h" #include "mscorlib_System_Collections_ArrayList4252133567.h" #include "mscorlib_System_Reflection_AssemblyCompanyAttribut2851673381.h" #include "mscorlib_System_Reflection_AssemblyConfigurationAt1678917172.h" #include "mscorlib_System_Reflection_AssemblyCopyrightAttribu177123295.h" #include "mscorlib_System_Reflection_AssemblyDefaultAliasAtt1774139159.h" #include "mscorlib_System_Reflection_AssemblyDelaySignAttrib2705758496.h" #include "mscorlib_System_Reflection_AssemblyDescriptionAttr1018387888.h" #include "mscorlib_System_Reflection_AssemblyFileVersionAttr2897687916.h" #include "mscorlib_System_Reflection_AssemblyInformationalVe3037389657.h" #include "mscorlib_System_Reflection_AssemblyKeyFileAttribute605245443.h" #include "mscorlib_System_Configuration_Assemblies_AssemblyV1223556284.h" #include "mscorlib_System_Byte3683104436.h" #include "mscorlib_System_Configuration_Assemblies_AssemblyH4147282775.h" #include "mscorlib_System_Reflection_StrongNameKeyPair4090869089.h" #include "mscorlib_System_Reflection_AssemblyNameFlags1794031440.h" #include "mscorlib_System_Globalization_CultureInfo3500843524.h" #include "mscorlib_System_Text_StringBuilder1221177846.h" #include "mscorlib_System_Security_Cryptography_Cryptographi3349726436.h" #include "mscorlib_System_Security_Cryptography_RSA3719518354.h" #include "mscorlib_System_Security_SecurityException887327375.h" #include "mscorlib_System_Security_Cryptography_HashAlgorith2624936259.h" #include "mscorlib_System_Security_Cryptography_SHA13336793149.h" #include "mscorlib_System_Reflection_AssemblyProductAttribut1523443169.h" #include "mscorlib_System_Reflection_AssemblyTitleAttribute92945912.h" #include "mscorlib_System_Reflection_AssemblyTrademarkAttrib3740556705.h" #include "mscorlib_System_Reflection_Binder3404612058.h" #include "mscorlib_System_Reflection_Binder_Default3956931304.h" #include "mscorlib_System_Reflection_ParameterInfo2249040075.h" #include "mscorlib_System_Reflection_TargetParameterCountExc1554451430.h" #include "mscorlib_System_Reflection_MethodBase904190842.h" #include "mscorlib_System_Reflection_MemberInfo4043097260.h" #include "mscorlib_System_Reflection_BindingFlags1082350898.h" #include "mscorlib_System_Reflection_ParameterModifier1820634920.h" #include "mscorlib_System_Char3454481338.h" #include "mscorlib_System_Double4078015681.h" #include "mscorlib_System_Single2076509932.h" #include "mscorlib_System_TypeCode2536926201.h" #include "mscorlib_System_Reflection_CallingConventions1097349142.h" #include "mscorlib_System_Reflection_PropertyInfo2253729065.h" #include "mscorlib_System_Reflection_ConstructorInfo2851816542.h" #include "mscorlib_System_Reflection_MemberTypes3343038963.h" #include "mscorlib_System_Reflection_CustomAttributeData3093286891.h" #include "mscorlib_System_Reflection_CustomAttributeTypedArg1498197914.h" #include "mscorlib_System_Collections_ObjectModel_ReadOnlyCo1683983606.h" #include "mscorlib_System_Reflection_CustomAttributeNamedArgum94157543.h" #include "mscorlib_System_Collections_ObjectModel_ReadOnlyCol279943235.h" #include "mscorlib_System_Reflection_DefaultMemberAttribute889804479.h" #include "mscorlib_System_Reflection_Emit_AssemblyBuilder1646117627.h" #include "mscorlib_System_Reflection_Emit_ModuleBuilder4156028127.h" #include "mscorlib_Mono_Security_StrongName117835354.h" #include "mscorlib_System_Reflection_Emit_ByRefType1587086384.h" #include "mscorlib_System_Reflection_Emit_DerivedType1016359113.h" #include "mscorlib_System_Reflection_Emit_ConstructorBuilder700974433.h" #include "mscorlib_System_Reflection_Emit_TypeBuilder3308873219.h" #include "mscorlib_System_Reflection_MethodAttributes790385034.h" #include "mscorlib_System_Reflection_Emit_MethodToken3991686330.h" #include "mscorlib_System_Reflection_Emit_ParameterBuilder3344728474.h" #include "mscorlib_System_RuntimeMethodHandle894824333.h" #include "mscorlib_System_Reflection_Emit_ILGenerator99948092.h" #include "mscorlib_System_Reflection_MethodImplAttributes1541361196.h" #include "mscorlib_System_Reflection_EventInfo4258285342.h" #include "mscorlib_System_Reflection_FieldInfo255040150.h" #include "mscorlib_System_Reflection_MethodInfo3330546337.h" #include "mscorlib_System_Reflection_TypeAttributes2229518203.h" #include "mscorlib_System_Reflection_Emit_EnumBuilder2808714468.h" #include "mscorlib_System_Reflection_Emit_FieldBuilder2784804005.h" #include "mscorlib_System_Reflection_FieldAttributes1122705193.h" #include "mscorlib_System_RuntimeFieldHandle2331729674.h" #include "mscorlib_System_Reflection_Emit_UnmanagedMarshal4270021860.h" #include "mscorlib_System_Reflection_Emit_GenericTypeParamet1370236603.h" #include "mscorlib_System_Reflection_Emit_MethodBuilder644187984.h" #include "mscorlib_System_Reflection_Emit_ILTokenInfo149559338.h" #include "mscorlib_System_Reflection_Emit_OpCode2247480392.h" #include "mscorlib_System_Reflection_Emit_StackBehaviour1390406961.h" #include "mscorlib_System_Reflection_Emit_ILGenerator_LabelD3712112744.h" #include "mscorlib_System_Reflection_Emit_ILGenerator_LabelF4090909514.h" #include "mscorlib_System_TypeLoadException723359155.h" #include "mscorlib_System_Reflection_Emit_ModuleBuilderTokenG578872653.h" #include "mscorlib_System_Reflection_Emit_OpCodeNames1907134268.h" #include "mscorlib_System_Reflection_Emit_OpCodes3494785031.h" #include "mscorlib_System_Reflection_ParameterAttributes1266705348.h" #include "mscorlib_System_Reflection_Emit_PropertyBuilder3694255912.h" #include "mscorlib_System_Reflection_PropertyAttributes883448530.h" #include "mscorlib_System_Runtime_InteropServices_MarshalAsA2900773360.h" #include "mscorlib_System_Runtime_InteropServices_UnmanagedT2550630890.h" #include "mscorlib_System_Int164041245914.h" #include "mscorlib_System_Reflection_EventAttributes2989788983.h" #include "mscorlib_System_Reflection_EventInfo_AddEventAdapt1766862959.h" #include "mscorlib_System_Delegate3022476291.h" #include "mscorlib_System_AsyncCallback163412349.h" #include "mscorlib_System_NonSerializedAttribute399263003.h" #include "mscorlib_System_Runtime_InteropServices_FieldOffse1553145711.h" #include "mscorlib_System_Reflection_MemberFilter3405857066.h" #include "mscorlib_System_Reflection_MemberInfoSerialization2799051170.h" #include "mscorlib_System_Runtime_Serialization_Serialization753258759.h" #include "mscorlib_System_Reflection_Missing1033855606.h" #include "mscorlib_System_Reflection_TypeFilter2905709404.h" #include "mscorlib_System_Reflection_MonoCMethod611352247.h" #include "mscorlib_System_MethodAccessException4093255254.h" #include "mscorlib_System_MemberAccessException2005094827.h" #include "mscorlib_System_Reflection_TargetInvocationExcepti4098620458.h" #include "mscorlib_System_Reflection_MonoEvent2188687691.h" #include "mscorlib_System_Reflection_MonoEventInfo2190036573.h" #include "mscorlib_System_Reflection_MonoField3600053525.h" #include "mscorlib_System_Reflection_TargetException1572104820.h" #include "mscorlib_System_FieldAccessException1797813379.h" #include "mscorlib_System_Reflection_MonoGenericCMethod2923423538.h" #include "mscorlib_System_Reflection_MonoGenericMethod1068099169.h" #include "mscorlib_System_Reflection_MonoMethod116053496.h" #include "mscorlib_System_Threading_ThreadAbortException1150575753.h" #include "mscorlib_System_Runtime_InteropServices_DllImportA3000813225.h" #include "mscorlib_System_Reflection_MonoMethodInfo3646562144.h" #include "mscorlib_System_Runtime_InteropServices_PreserveSi1564965109.h" #include "mscorlib_System_Reflection_MonoProperty2242413552.h" #include "mscorlib_System_Reflection_PInfo957350482.h" #include "mscorlib_System_Reflection_MonoPropertyInfo486106184.h" #include "mscorlib_System_Reflection_MonoProperty_GetterAdap1423755509.h" #include "mscorlib_System_Runtime_InteropServices_InAttribut1394050551.h" #include "mscorlib_System_Runtime_InteropServices_OptionalAtt827982902.h" #include "mscorlib_System_Runtime_InteropServices_OutAttribu1539424546.h" #include "mscorlib_System_Reflection_Pointer937075087.h" #include "mscorlib_System_Reflection_ProcessorArchitecture1620065459.h" #include "mscorlib_System_ResolveEventArgs1859808873.h" #include "mscorlib_System_EventArgs3289624707.h" // System.ObjectDisposedException struct ObjectDisposedException_t2695136451; // System.String struct String_t; // System.InvalidOperationException struct InvalidOperationException_t721527559; // System.Runtime.Serialization.SerializationInfo struct SerializationInfo_t228987430; // System.Exception struct Exception_t1927440687; // System.Object struct Il2CppObject; // System.ObsoleteAttribute struct ObsoleteAttribute_t3878847927; // System.Attribute struct Attribute_t542643598; // System.OperatingSystem struct OperatingSystem_t290860502; // System.Version struct Version_t1755874712; // System.ArgumentNullException struct ArgumentNullException_t628810857; // System.OrdinalComparer struct OrdinalComparer_t1018219584; // System.StringComparer struct StringComparer_t1574862926; // System.OutOfMemoryException struct OutOfMemoryException_t1181064283; // System.SystemException struct SystemException_t3877406272; // System.OverflowException struct OverflowException_t1075868493; // System.ArithmeticException struct ArithmeticException_t3261462543; // System.ParamArrayAttribute struct ParamArrayAttribute_t2144993728; // System.PlatformNotSupportedException struct PlatformNotSupportedException_t3778770305; // System.NotSupportedException struct NotSupportedException_t1793819818; // System.RankException struct RankException_t1539875949; // System.Reflection.AmbiguousMatchException struct AmbiguousMatchException_t1406414556; // System.Reflection.Assembly struct Assembly_t4268412390; // System.Reflection.Assembly/ResolveEventHolder struct ResolveEventHolder_t1761494505; // System.Type struct Type_t; // System.Reflection.ICustomAttributeProvider struct ICustomAttributeProvider_t502202687; // System.Object[] struct ObjectU5BU5D_t3614634134; // System.Reflection.Module struct Module_t4282841206; // System.Type[] struct TypeU5BU5D_t1664964607; // System.ArgumentException struct ArgumentException_t3259014390; // System.Reflection.AssemblyName struct AssemblyName_t894705941; // System.AppDomain struct AppDomain_t2719102437; // System.Reflection.Module[] struct ModuleU5BU5D_t3593287923; // System.Collections.ArrayList struct ArrayList_t4252133567; // System.Reflection.AssemblyCompanyAttribute struct AssemblyCompanyAttribute_t2851673381; // System.Reflection.AssemblyConfigurationAttribute struct AssemblyConfigurationAttribute_t1678917172; // System.Reflection.AssemblyCopyrightAttribute struct AssemblyCopyrightAttribute_t177123295; // System.Reflection.AssemblyDefaultAliasAttribute struct AssemblyDefaultAliasAttribute_t1774139159; // System.Reflection.AssemblyDelaySignAttribute struct AssemblyDelaySignAttribute_t2705758496; // System.Reflection.AssemblyDescriptionAttribute struct AssemblyDescriptionAttribute_t1018387888; // System.Reflection.AssemblyFileVersionAttribute struct AssemblyFileVersionAttribute_t2897687916; // System.Reflection.AssemblyInformationalVersionAttribute struct AssemblyInformationalVersionAttribute_t3037389657; // System.Reflection.AssemblyKeyFileAttribute struct AssemblyKeyFileAttribute_t605245443; // System.Globalization.CultureInfo struct CultureInfo_t3500843524; // System.Text.StringBuilder struct StringBuilder_t1221177846; // System.Byte[] struct ByteU5BU5D_t3397334013; // System.Security.Cryptography.RSA struct RSA_t3719518354; // System.Security.SecurityException struct SecurityException_t887327375; // System.Security.Cryptography.SHA1 struct SHA1_t3336793149; // System.Security.Cryptography.HashAlgorithm struct HashAlgorithm_t2624936259; // System.Array struct Il2CppArray; // System.Reflection.AssemblyProductAttribute struct AssemblyProductAttribute_t1523443169; // System.Reflection.AssemblyTitleAttribute struct AssemblyTitleAttribute_t92945912; // System.Reflection.AssemblyTrademarkAttribute struct AssemblyTrademarkAttribute_t3740556705; // System.Reflection.Binder struct Binder_t3404612058; // System.Reflection.Binder/Default struct Default_t3956931304; // System.Reflection.ParameterInfo[] struct ParameterInfoU5BU5D_t2275869610; // System.Reflection.ParameterInfo struct ParameterInfo_t2249040075; // System.Reflection.TargetParameterCountException struct TargetParameterCountException_t1554451430; // System.Reflection.MethodBase struct MethodBase_t904190842; // System.Reflection.MethodBase[] struct MethodBaseU5BU5D_t2597254495; // System.Reflection.ParameterModifier[] struct ParameterModifierU5BU5D_t963192633; // System.String[] struct StringU5BU5D_t1642385972; // System.Reflection.PropertyInfo struct PropertyInfo_t; // System.Reflection.PropertyInfo[] struct PropertyInfoU5BU5D_t1736152084; // System.Reflection.ConstructorInfo struct ConstructorInfo_t2851816542; // System.Reflection.CustomAttributeData struct CustomAttributeData_t3093286891; // System.Reflection.CustomAttributeTypedArgument[] struct CustomAttributeTypedArgumentU5BU5D_t1075686591; // System.Collections.ObjectModel.ReadOnlyCollection`1<System.Reflection.CustomAttributeTypedArgument> struct ReadOnlyCollection_1_t1683983606; // System.Reflection.CustomAttributeNamedArgument[] struct CustomAttributeNamedArgumentU5BU5D_t3304067486; // System.Collections.ObjectModel.ReadOnlyCollection`1<System.Reflection.CustomAttributeNamedArgument> struct ReadOnlyCollection_1_t279943235; // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeTypedArgument> struct IList_1_t2039138515; // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeNamedArgument> struct IList_1_t635098144; // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeData> struct IList_1_t3634227492; // System.Reflection.MemberInfo struct MemberInfo_t; // System.Reflection.CustomAttributeTypedArgument struct CustomAttributeTypedArgument_t1498197914; // System.Reflection.DefaultMemberAttribute struct DefaultMemberAttribute_t889804479; // System.Reflection.Emit.AssemblyBuilder struct AssemblyBuilder_t1646117627; // System.Reflection.Emit.ModuleBuilder struct ModuleBuilder_t4156028127; // Mono.Security.StrongName struct StrongName_t117835354; // System.Reflection.Emit.ByRefType struct ByRefType_t1587086384; // System.Reflection.Emit.DerivedType struct DerivedType_t1016359113; // System.Reflection.Emit.ConstructorBuilder struct ConstructorBuilder_t700974433; // System.Reflection.Emit.TypeBuilder struct TypeBuilder_t3308873219; // System.Type[][] struct TypeU5BU5DU5BU5D_t2318378278; // System.Reflection.Emit.ParameterBuilder struct ParameterBuilder_t3344728474; // System.Reflection.Emit.ILGenerator struct ILGenerator_t99948092; // System.Reflection.Emit.TokenGenerator struct TokenGenerator_t4150817334; // System.Reflection.EventInfo struct EventInfo_t; // System.Reflection.FieldInfo struct FieldInfo_t; // System.Reflection.FieldInfo[] struct FieldInfoU5BU5D_t125053523; // System.Reflection.MethodInfo struct MethodInfo_t; // System.Reflection.MethodInfo[] struct MethodInfoU5BU5D_t152480188; // System.Reflection.ConstructorInfo[] struct ConstructorInfoU5BU5D_t1996683371; // System.Reflection.Emit.EnumBuilder struct EnumBuilder_t2808714468; // System.Reflection.Emit.FieldBuilder struct FieldBuilder_t2784804005; // System.Reflection.Emit.UnmanagedMarshal struct UnmanagedMarshal_t4270021860; // System.Reflection.Emit.GenericTypeParameterBuilder struct GenericTypeParameterBuilder_t1370236603; // System.Reflection.Emit.MethodBuilder struct MethodBuilder_t644187984; // System.TypeLoadException struct TypeLoadException_t723359155; // System.Reflection.Emit.ModuleBuilderTokenGenerator struct ModuleBuilderTokenGenerator_t578872653; // System.Reflection.Emit.PropertyBuilder struct PropertyBuilder_t3694255912; // System.Runtime.InteropServices.MarshalAsAttribute struct MarshalAsAttribute_t2900773360; // System.Reflection.EventInfo/AddEventAdapter struct AddEventAdapter_t1766862959; // System.Delegate struct Delegate_t3022476291; // System.IAsyncResult struct IAsyncResult_t1999651008; // System.AsyncCallback struct AsyncCallback_t163412349; // System.NonSerializedAttribute struct NonSerializedAttribute_t399263003; // System.Runtime.InteropServices.FieldOffsetAttribute struct FieldOffsetAttribute_t1553145711; // System.Reflection.MemberFilter struct MemberFilter_t3405857066; // System.Reflection.MemberInfoSerializationHolder struct MemberInfoSerializationHolder_t2799051170; // System.Runtime.Serialization.SerializationException struct SerializationException_t753258759; // System.Reflection.Missing struct Missing_t1033855606; // System.Reflection.TypeFilter struct TypeFilter_t2905709404; // System.Reflection.MonoCMethod struct MonoCMethod_t611352247; // System.MemberAccessException struct MemberAccessException_t2005094827; // System.Reflection.TargetInvocationException struct TargetInvocationException_t4098620458; // System.Reflection.MonoEvent struct MonoEvent_t; // System.Reflection.MonoField struct MonoField_t; // System.Reflection.TargetException struct TargetException_t1572104820; // System.FieldAccessException struct FieldAccessException_t1797813379; // System.Reflection.MonoGenericCMethod struct MonoGenericCMethod_t2923423538; // System.Reflection.MonoGenericMethod struct MonoGenericMethod_t; // System.Reflection.MonoMethod struct MonoMethod_t; // System.Runtime.InteropServices.DllImportAttribute struct DllImportAttribute_t3000813225; // System.Runtime.InteropServices.PreserveSigAttribute struct PreserveSigAttribute_t1564965109; // System.Reflection.MonoProperty struct MonoProperty_t; // System.Reflection.MonoProperty/GetterAdapter struct GetterAdapter_t1423755509; // System.MethodAccessException struct MethodAccessException_t4093255254; // System.Runtime.InteropServices.InAttribute struct InAttribute_t1394050551; // System.Runtime.InteropServices.OptionalAttribute struct OptionalAttribute_t827982902; // System.Runtime.InteropServices.OutAttribute struct OutAttribute_t1539424546; // System.Reflection.Pointer struct Pointer_t937075087; // System.Reflection.StrongNameKeyPair struct StrongNameKeyPair_t4090869089; // System.ResolveEventArgs struct ResolveEventArgs_t1859808873; // System.EventArgs struct EventArgs_t3289624707; extern Il2CppCodeGenString* _stringLiteral678640696; extern const uint32_t ObjectDisposedException__ctor_m3156784572_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral163988570; extern const uint32_t ObjectDisposedException__ctor_m2122181801_MetadataUsageId; extern const uint32_t ObjectDisposedException_GetObjectData_m10776306_MetadataUsageId; extern Il2CppClass* String_t_il2cpp_TypeInfo_var; extern Il2CppClass* ArgumentNullException_t628810857_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral3617362; extern const uint32_t OperatingSystem__ctor_m988315539_MetadataUsageId; extern Il2CppClass* OperatingSystem_t290860502_il2cpp_TypeInfo_var; extern const uint32_t OperatingSystem_Clone_m1943707477_MetadataUsageId; extern Il2CppClass* PlatformID_t1006634368_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral1328223296; extern Il2CppCodeGenString* _stringLiteral3024392673; extern Il2CppCodeGenString* _stringLiteral1310822435; extern const uint32_t OperatingSystem_GetObjectData_m2276196875_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral75811245; extern Il2CppCodeGenString* _stringLiteral2342136926; extern Il2CppCodeGenString* _stringLiteral2024976688; extern Il2CppCodeGenString* _stringLiteral2092233885; extern Il2CppCodeGenString* _stringLiteral513568856; extern Il2CppCodeGenString* _stringLiteral2308534349; extern Il2CppCodeGenString* _stringLiteral1690816384; extern Il2CppCodeGenString* _stringLiteral2860987442; extern Il2CppCodeGenString* _stringLiteral372029310; extern const uint32_t OperatingSystem_ToString_m2365121878_MetadataUsageId; extern Il2CppClass* StringComparer_t1574862926_il2cpp_TypeInfo_var; extern const uint32_t OrdinalComparer__ctor_m2952942058_MetadataUsageId; extern const uint32_t OrdinalComparer_Compare_m2856814274_MetadataUsageId; extern const uint32_t OrdinalComparer_Equals_m2808470040_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral372029391; extern const uint32_t OrdinalComparer_GetHashCode_m3400975772_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2159712404; extern const uint32_t OutOfMemoryException__ctor_m1340150080_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral1124468381; extern const uint32_t OverflowException__ctor_m2564269836_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral3018961310; extern const uint32_t PlatformNotSupportedException__ctor_m782561872_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral3468799055; extern const uint32_t RankException__ctor_m2119191472_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2591063177; extern const uint32_t AmbiguousMatchException__ctor_m2088048346_MetadataUsageId; extern Il2CppClass* ResolveEventHolder_t1761494505_il2cpp_TypeInfo_var; extern const uint32_t Assembly__ctor_m1050192922_MetadataUsageId; extern const uint32_t Assembly_get_Location_m3981013809_MetadataUsageId; extern Il2CppClass* MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var; extern const uint32_t Assembly_IsDefined_m2841897391_MetadataUsageId; extern const uint32_t Assembly_GetCustomAttributes_m95309865_MetadataUsageId; extern Il2CppClass* ArgumentException_t3259014390_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral2328218955; extern Il2CppCodeGenString* _stringLiteral345660856; extern const uint32_t Assembly_GetType_m2765594712_MetadataUsageId; extern Il2CppClass* SecurityManager_t3191249573_il2cpp_TypeInfo_var; extern const uint32_t Assembly_GetName_m3984565618_MetadataUsageId; extern Il2CppClass* AssemblyName_t894705941_il2cpp_TypeInfo_var; extern const uint32_t Assembly_UnprotectedGetName_m3014607408_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral3246678936; extern const uint32_t Assembly_GetModule_m2064378601_MetadataUsageId; extern const Il2CppType* Module_t4282841206_0_0_0_var; extern Il2CppClass* ArrayList_t4252133567_il2cpp_TypeInfo_var; extern Il2CppClass* Type_t_il2cpp_TypeInfo_var; extern Il2CppClass* ModuleU5BU5D_t3593287923_il2cpp_TypeInfo_var; extern const uint32_t Assembly_GetModules_m2242070953_MetadataUsageId; extern const MethodInfo* Assembly_GetExecutingAssembly_m776016337_MethodInfo_var; extern const uint32_t Assembly_GetExecutingAssembly_m776016337_MetadataUsageId; extern const uint32_t AssemblyFileVersionAttribute__ctor_m2026149866_MetadataUsageId; extern const Il2CppType* Version_t1755874712_0_0_0_var; extern const Il2CppType* ByteU5BU5D_t3397334013_0_0_0_var; extern const Il2CppType* AssemblyHashAlgorithm_t4147282775_0_0_0_var; extern const Il2CppType* StrongNameKeyPair_t4090869089_0_0_0_var; extern const Il2CppType* AssemblyVersionCompatibility_t1223556284_0_0_0_var; extern const Il2CppType* AssemblyNameFlags_t1794031440_0_0_0_var; extern Il2CppClass* Version_t1755874712_il2cpp_TypeInfo_var; extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var; extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var; extern Il2CppClass* StrongNameKeyPair_t4090869089_il2cpp_TypeInfo_var; extern Il2CppClass* CultureInfo_t3500843524_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral594030812; extern Il2CppCodeGenString* _stringLiteral1952199827; extern Il2CppCodeGenString* _stringLiteral1734555969; extern Il2CppCodeGenString* _stringLiteral2167127169; extern Il2CppCodeGenString* _stringLiteral2837183762; extern Il2CppCodeGenString* _stringLiteral3684797936; extern Il2CppCodeGenString* _stringLiteral2448232678; extern Il2CppCodeGenString* _stringLiteral1836058351; extern Il2CppCodeGenString* _stringLiteral180760614; extern Il2CppCodeGenString* _stringLiteral3706305741; extern const uint32_t AssemblyName__ctor_m609734316_MetadataUsageId; extern Il2CppClass* StringBuilder_t1221177846_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral3774245231; extern Il2CppCodeGenString* _stringLiteral1256080173; extern Il2CppCodeGenString* _stringLiteral3350611209; extern Il2CppCodeGenString* _stringLiteral3574561019; extern Il2CppCodeGenString* _stringLiteral1653664622; extern Il2CppCodeGenString* _stringLiteral3231012720; extern Il2CppCodeGenString* _stringLiteral130462888; extern const uint32_t AssemblyName_get_FullName_m1606421515_MetadataUsageId; extern Il2CppClass* CryptographicException_t3349726436_il2cpp_TypeInfo_var; extern const uint32_t AssemblyName_get_IsPublicKeyValid_m188320564_MetadataUsageId; extern Il2CppClass* SecurityException_t887327375_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral2662378774; extern const uint32_t AssemblyName_InternalGetPublicKeyToken_m3706025887_MetadataUsageId; extern const uint32_t AssemblyName_ComputePublicKeyToken_m2254215863_MetadataUsageId; extern Il2CppClass* AssemblyHashAlgorithm_t4147282775_il2cpp_TypeInfo_var; extern Il2CppClass* AssemblyVersionCompatibility_t1223556284_il2cpp_TypeInfo_var; extern Il2CppClass* AssemblyNameFlags_t1794031440_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral2792112382; extern Il2CppCodeGenString* _stringLiteral416540412; extern Il2CppCodeGenString* _stringLiteral556236101; extern const uint32_t AssemblyName_GetObjectData_m1221677827_MetadataUsageId; extern const uint32_t AssemblyName_Clone_m3390118349_MetadataUsageId; extern Il2CppClass* Default_t3956931304_il2cpp_TypeInfo_var; extern Il2CppClass* Binder_t3404612058_il2cpp_TypeInfo_var; extern const uint32_t Binder__cctor_m3736115807_MetadataUsageId; extern const uint32_t Binder_get_DefaultBinder_m965620943_MetadataUsageId; extern Il2CppClass* TargetParameterCountException_t1554451430_il2cpp_TypeInfo_var; extern const uint32_t Binder_ConvertArgs_m2999223281_MetadataUsageId; extern Il2CppClass* AmbiguousMatchException_t1406414556_il2cpp_TypeInfo_var; extern const uint32_t Binder_FindMostDerivedMatch_m2621831847_MetadataUsageId; extern const uint32_t Default__ctor_m172834064_MetadataUsageId; extern Il2CppClass* TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var; extern const uint32_t Default_BindToMethod_m1132635736_MetadataUsageId; extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var; extern const uint32_t Default_ReorderParameters_m1877749093_MetadataUsageId; extern const Il2CppType* Char_t3454481338_0_0_0_var; extern const Il2CppType* Double_t4078015681_0_0_0_var; extern const Il2CppType* Single_t2076509932_0_0_0_var; extern const Il2CppType* IntPtr_t_0_0_0_var; extern Il2CppClass* Enum_t2459695545_il2cpp_TypeInfo_var; extern Il2CppClass* Char_t3454481338_il2cpp_TypeInfo_var; extern Il2CppClass* Double_t4078015681_il2cpp_TypeInfo_var; extern Il2CppClass* Single_t2076509932_il2cpp_TypeInfo_var; extern Il2CppClass* Convert_t2607082565_il2cpp_TypeInfo_var; extern const uint32_t Default_ChangeType_m3142518280_MetadataUsageId; extern const Il2CppType* Nullable_1_t1398937014_0_0_0_var; extern const Il2CppType* Il2CppObject_0_0_0_var; extern const Il2CppType* Enum_t2459695545_0_0_0_var; extern const uint32_t Default_check_type_m2363631305_MetadataUsageId; extern const Il2CppType* ParamArrayAttribute_t2144993728_0_0_0_var; extern Il2CppCodeGenString* _stringLiteral3322341559; extern const uint32_t Default_SelectMethod_m3081239996_MetadataUsageId; extern const uint32_t Default_GetBetterMethod_m4255740863_MetadataUsageId; extern const MethodInfo* Array_IndexOf_TisType_t_m4216821136_MethodInfo_var; extern const uint32_t Default_CompareCloserType_m1367126249_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2103942763; extern const uint32_t Default_SelectProperty_m4154143536_MetadataUsageId; extern const uint32_t Default_check_type_with_score_m58148013_MetadataUsageId; extern Il2CppClass* ConstructorInfo_t2851816542_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral2199879418; extern Il2CppCodeGenString* _stringLiteral3705238055; extern const uint32_t ConstructorInfo__cctor_m2897369343_MetadataUsageId; extern const uint32_t ConstructorInfo_Invoke_m2144827141_MetadataUsageId; extern Il2CppClass* CustomAttributeTypedArgumentU5BU5D_t1075686591_il2cpp_TypeInfo_var; extern Il2CppClass* CustomAttributeNamedArgumentU5BU5D_t3304067486_il2cpp_TypeInfo_var; extern const MethodInfo* CustomAttributeData_UnboxValues_TisCustomAttributeTypedArgument_t1498197914_m2561215702_MethodInfo_var; extern const MethodInfo* Array_AsReadOnly_TisCustomAttributeTypedArgument_t1498197914_m2855930084_MethodInfo_var; extern const MethodInfo* CustomAttributeData_UnboxValues_TisCustomAttributeNamedArgument_t94157543_m2789115353_MethodInfo_var; extern const MethodInfo* Array_AsReadOnly_TisCustomAttributeNamedArgument_t94157543_m2935638619_MethodInfo_var; extern const uint32_t CustomAttributeData__ctor_m1358286409_MetadataUsageId; extern const uint32_t CustomAttributeData_GetCustomAttributes_m4124612360_MetadataUsageId; extern const uint32_t CustomAttributeData_GetCustomAttributes_m2421330738_MetadataUsageId; extern const uint32_t CustomAttributeData_GetCustomAttributes_m119332220_MetadataUsageId; extern const uint32_t CustomAttributeData_GetCustomAttributes_m3258419955_MetadataUsageId; extern Il2CppClass* IList_1_t2039138515_il2cpp_TypeInfo_var; extern Il2CppClass* ICollection_1_t2450273219_il2cpp_TypeInfo_var; extern Il2CppClass* ICollection_1_t1046232848_il2cpp_TypeInfo_var; extern Il2CppClass* IList_1_t635098144_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral372029431; extern Il2CppCodeGenString* _stringLiteral372029318; extern Il2CppCodeGenString* _stringLiteral811305474; extern Il2CppCodeGenString* _stringLiteral522332260; extern const uint32_t CustomAttributeData_ToString_m1673522836_MetadataUsageId; extern Il2CppClass* CustomAttributeData_t3093286891_il2cpp_TypeInfo_var; extern Il2CppClass* CustomAttributeTypedArgument_t1498197914_il2cpp_TypeInfo_var; extern Il2CppClass* CustomAttributeNamedArgument_t94157543_il2cpp_TypeInfo_var; extern const uint32_t CustomAttributeData_Equals_m909425978_MetadataUsageId; extern const uint32_t CustomAttributeData_GetHashCode_m3989739430_MetadataUsageId; struct CustomAttributeTypedArgument_t1498197914_marshaled_pinvoke; struct CustomAttributeTypedArgument_t1498197914;; struct CustomAttributeTypedArgument_t1498197914_marshaled_pinvoke;; struct CustomAttributeTypedArgument_t1498197914_marshaled_com; struct CustomAttributeTypedArgument_t1498197914_marshaled_com;; extern Il2CppCodeGenString* _stringLiteral507810557; extern const uint32_t CustomAttributeNamedArgument_ToString_m804774956_MetadataUsageId; extern const uint32_t CustomAttributeNamedArgument_Equals_m2691468532_MetadataUsageId; extern const Il2CppType* String_t_0_0_0_var; extern const Il2CppType* Type_t_0_0_0_var; extern Il2CppCodeGenString* _stringLiteral372029312; extern Il2CppCodeGenString* _stringLiteral1002073185; extern Il2CppCodeGenString* _stringLiteral372029317; extern const uint32_t CustomAttributeTypedArgument_ToString_m1091739553_MetadataUsageId; extern const uint32_t CustomAttributeTypedArgument_Equals_m1555989603_MetadataUsageId; extern const uint32_t AssemblyBuilder_GetModulesInternal_m3379844831_MetadataUsageId; extern const uint32_t AssemblyBuilder_GetTypes_m2527954992_MetadataUsageId; extern Il2CppClass* NotSupportedException_t1793819818_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral4087454587; extern const uint32_t AssemblyBuilder_not_supported_m383946865_MetadataUsageId; extern const Il2CppType* Il2CppArray_0_0_0_var; extern const uint32_t ByRefType_get_BaseType_m3405859119_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral372029308; extern const uint32_t ByRefType_FormatName_m3716172668_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral912151980; extern const uint32_t ByRefType_MakeByRefType_m2150335175_MetadataUsageId; extern Il2CppClass* ModuleBuilder_t4156028127_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral1262676163; extern Il2CppCodeGenString* _stringLiteral3462160554; extern const uint32_t ConstructorBuilder__ctor_m2001998159_MetadataUsageId; extern Il2CppClass* ParameterInfoU5BU5D_t2275869610_il2cpp_TypeInfo_var; extern Il2CppClass* ParameterInfo_t2249040075_il2cpp_TypeInfo_var; extern const uint32_t ConstructorBuilder_GetParametersInternal_m3775796783_MetadataUsageId; extern const uint32_t ConstructorBuilder_get_Name_m134603075_MetadataUsageId; extern const uint32_t ConstructorBuilder_GetCustomAttributes_m1931712364_MetadataUsageId; extern const uint32_t ConstructorBuilder_GetCustomAttributes_m1698596385_MetadataUsageId; extern Il2CppClass* ILGenerator_t99948092_il2cpp_TypeInfo_var; extern const uint32_t ConstructorBuilder_GetILGenerator_m1731893569_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2307484441; extern Il2CppCodeGenString* _stringLiteral522332250; extern const uint32_t ConstructorBuilder_ToString_m347700767_MetadataUsageId; extern Il2CppClass* InvalidOperationException_t721527559_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral2470364202; extern Il2CppCodeGenString* _stringLiteral2747925653; extern const uint32_t ConstructorBuilder_fixup_m836985654_MetadataUsageId; extern Il2CppClass* AssemblyBuilder_t1646117627_il2cpp_TypeInfo_var; extern const uint32_t ConstructorBuilder_get_IsCompilerContext_m2796899803_MetadataUsageId; extern const uint32_t ConstructorBuilder_not_supported_m3687319507_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2499557300; extern const uint32_t ConstructorBuilder_not_created_m2150488017_MetadataUsageId; extern const uint32_t DerivedType__ctor_m4154637955_MetadataUsageId; extern const uint32_t DerivedType_GetInterface_m834770656_MetadataUsageId; extern const uint32_t DerivedType_GetInterfaces_m2710649328_MetadataUsageId; extern const uint32_t DerivedType_GetEvent_m2165020195_MetadataUsageId; extern const uint32_t DerivedType_GetField_m3960169619_MetadataUsageId; extern const uint32_t DerivedType_GetFields_m2946331416_MetadataUsageId; extern const uint32_t DerivedType_GetMethodImpl_m2649456432_MetadataUsageId; extern const uint32_t DerivedType_GetMethods_m165266904_MetadataUsageId; extern const uint32_t DerivedType_GetProperties_m3645894013_MetadataUsageId; extern const uint32_t DerivedType_GetPropertyImpl_m1383673951_MetadataUsageId; extern const uint32_t DerivedType_GetConstructorImpl_m129806456_MetadataUsageId; extern const uint32_t DerivedType_GetConstructors_m3174158156_MetadataUsageId; extern const uint32_t DerivedType_InvokeMember_m4149586013_MetadataUsageId; extern const uint32_t DerivedType_MakeGenericType_m742223168_MetadataUsageId; extern Il2CppClass* ByRefType_t1587086384_il2cpp_TypeInfo_var; extern const uint32_t DerivedType_MakeByRefType_m1445183672_MetadataUsageId; extern const uint32_t DerivedType_get_AssemblyQualifiedName_m2010127631_MetadataUsageId; extern const uint32_t DerivedType_get_TypeHandle_m1486870245_MetadataUsageId; extern const uint32_t DerivedType_IsDefined_m555719351_MetadataUsageId; extern const uint32_t DerivedType_GetCustomAttributes_m731216224_MetadataUsageId; extern const uint32_t DerivedType_GetCustomAttributes_m4010730569_MetadataUsageId; extern const uint32_t EnumBuilder_MakeByRefType_m3504630835_MetadataUsageId; extern const uint32_t EnumBuilder_CreateNotSupportedException_m62763134_MetadataUsageId; extern const uint32_t FieldBuilder_GetCustomAttributes_m1557425540_MetadataUsageId; extern const uint32_t FieldBuilder_GetCustomAttributes_m291168515_MetadataUsageId; extern const uint32_t FieldBuilder_CreateNotSupportedException_m3999938861_MetadataUsageId; extern const uint32_t GenericTypeParameterBuilder_IsSubclassOf_m563999142_MetadataUsageId; extern const uint32_t GenericTypeParameterBuilder_GetAttributeFlagsImpl_m3338182267_MetadataUsageId; extern const uint32_t GenericTypeParameterBuilder_GetGenericArguments_m277381309_MetadataUsageId; extern const uint32_t GenericTypeParameterBuilder_GetGenericTypeDefinition_m2936287336_MetadataUsageId; extern const uint32_t GenericTypeParameterBuilder_not_supported_m3784909043_MetadataUsageId; extern const uint32_t GenericTypeParameterBuilder_MakeByRefType_m4279657370_MetadataUsageId; extern Il2CppClass* ILTokenInfoU5BU5D_t4103159791_il2cpp_TypeInfo_var; extern const uint32_t ILGenerator__ctor_m3365621387_MetadataUsageId; extern const Il2CppType* Void_t1841601450_0_0_0_var; extern const uint32_t ILGenerator__cctor_m3943061018_MetadataUsageId; extern const uint32_t ILGenerator_add_token_fixup_m3261621911_MetadataUsageId; extern const uint32_t ILGenerator_make_room_m373147874_MetadataUsageId; extern Il2CppClass* TokenGenerator_t4150817334_il2cpp_TypeInfo_var; extern const uint32_t ILGenerator_Emit_m116557729_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2950669223; extern const uint32_t ILGenerator_label_fixup_m1325994348_MetadataUsageId; extern const uint32_t MethodBuilder_get_ContainsGenericParameters_m138212064_MetadataUsageId; extern const uint32_t MethodBuilder_GetParameters_m3436317083_MetadataUsageId; extern const uint32_t MethodBuilder_GetCustomAttributes_m923430117_MetadataUsageId; extern const uint32_t MethodBuilder_GetCustomAttributes_m454145582_MetadataUsageId; extern Il2CppClass* TypeLoadException_t723359155_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral3019672120; extern const uint32_t MethodBuilder_check_override_m3042345804_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral1027522002; extern const uint32_t MethodBuilder_fixup_m4217981161_MetadataUsageId; extern Il2CppClass* StringU5BU5D_t1642385972_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral1403619109; extern Il2CppCodeGenString* _stringLiteral2874782298; extern Il2CppCodeGenString* _stringLiteral372029425; extern const uint32_t MethodBuilder_ToString_m2051053888_MetadataUsageId; extern const uint32_t MethodBuilder_NotSupported_m1885110731_MetadataUsageId; extern const uint32_t MethodBuilder_GetGenericArguments_m948618404_MetadataUsageId; extern Il2CppClass* MethodToken_t3991686330_il2cpp_TypeInfo_var; extern const uint32_t MethodToken__cctor_m2172944774_MetadataUsageId; extern const uint32_t MethodToken_Equals_m533761838_MetadataUsageId; extern Il2CppClass* CharU5BU5D_t1328083999_il2cpp_TypeInfo_var; extern const uint32_t ModuleBuilder__cctor_m2985766025_MetadataUsageId; extern Il2CppClass* Int32U5BU5D_t3030399641_il2cpp_TypeInfo_var; extern const uint32_t ModuleBuilder_get_next_table_index_m1552645388_MetadataUsageId; extern const uint32_t ModuleBuilder_GetTypes_m93550753_MetadataUsageId; extern const uint32_t ModuleBuilder_GetToken_m4190668737_MetadataUsageId; extern Il2CppClass* ModuleBuilderTokenGenerator_t578872653_il2cpp_TypeInfo_var; extern const uint32_t ModuleBuilder_GetTokenGenerator_m4006065550_MetadataUsageId; extern Il2CppClass* OpCode_t2247480392_il2cpp_TypeInfo_var; extern const uint32_t OpCode_Equals_m3738130494_MetadataUsageId; extern Il2CppClass* OpCodeNames_t1907134268_il2cpp_TypeInfo_var; extern const uint32_t OpCode_get_Name_m3225695398_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral1502598669; extern Il2CppCodeGenString* _stringLiteral1185218007; extern Il2CppCodeGenString* _stringLiteral2751713072; extern Il2CppCodeGenString* _stringLiteral2751713071; extern Il2CppCodeGenString* _stringLiteral2751713070; extern Il2CppCodeGenString* _stringLiteral2751713069; extern Il2CppCodeGenString* _stringLiteral264743190; extern Il2CppCodeGenString* _stringLiteral264743191; extern Il2CppCodeGenString* _stringLiteral264743188; extern Il2CppCodeGenString* _stringLiteral264743189; extern Il2CppCodeGenString* _stringLiteral1784784505; extern Il2CppCodeGenString* _stringLiteral1784784504; extern Il2CppCodeGenString* _stringLiteral1784784507; extern Il2CppCodeGenString* _stringLiteral1784784506; extern Il2CppCodeGenString* _stringLiteral2751713005; extern Il2CppCodeGenString* _stringLiteral1100455270; extern Il2CppCodeGenString* _stringLiteral4049510564; extern Il2CppCodeGenString* _stringLiteral264743253; extern Il2CppCodeGenString* _stringLiteral2638390804; extern Il2CppCodeGenString* _stringLiteral1784784442; extern Il2CppCodeGenString* _stringLiteral3082303075; extern Il2CppCodeGenString* _stringLiteral1962649898; extern Il2CppCodeGenString* _stringLiteral980025156; extern Il2CppCodeGenString* _stringLiteral3708908511; extern Il2CppCodeGenString* _stringLiteral2142824570; extern Il2CppCodeGenString* _stringLiteral576740629; extern Il2CppCodeGenString* _stringLiteral2949393624; extern Il2CppCodeGenString* _stringLiteral1383309683; extern Il2CppCodeGenString* _stringLiteral4112193038; extern Il2CppCodeGenString* _stringLiteral2546109097; extern Il2CppCodeGenString* _stringLiteral1336255516; extern Il2CppCodeGenString* _stringLiteral3426583509; extern Il2CppCodeGenString* _stringLiteral3869444298; extern Il2CppCodeGenString* _stringLiteral1900075830; extern Il2CppCodeGenString* _stringLiteral3869444319; extern Il2CppCodeGenString* _stringLiteral1900075851; extern Il2CppCodeGenString* _stringLiteral2309167265; extern Il2CppCodeGenString* _stringLiteral1502598839; extern Il2CppCodeGenString* _stringLiteral2665398215; extern Il2CppCodeGenString* _stringLiteral405904562; extern Il2CppCodeGenString* _stringLiteral593459723; extern Il2CppCodeGenString* _stringLiteral3021628803; extern Il2CppCodeGenString* _stringLiteral2872924125; extern Il2CppCodeGenString* _stringLiteral4155532722; extern Il2CppCodeGenString* _stringLiteral580173191; extern Il2CppCodeGenString* _stringLiteral4249871051; extern Il2CppCodeGenString* _stringLiteral2562826957; extern Il2CppCodeGenString* _stringLiteral2562827420; extern Il2CppCodeGenString* _stringLiteral492701940; extern Il2CppCodeGenString* _stringLiteral492702403; extern Il2CppCodeGenString* _stringLiteral1177873969; extern Il2CppCodeGenString* _stringLiteral1949211150; extern Il2CppCodeGenString* _stringLiteral1949226429; extern Il2CppCodeGenString* _stringLiteral2931642683; extern Il2CppCodeGenString* _stringLiteral2931657962; extern Il2CppCodeGenString* _stringLiteral381169818; extern Il2CppCodeGenString* _stringLiteral3919028385; extern Il2CppCodeGenString* _stringLiteral1197692486; extern Il2CppCodeGenString* _stringLiteral3021628310; extern Il2CppCodeGenString* _stringLiteral1858828876; extern Il2CppCodeGenString* _stringLiteral1858828893; extern Il2CppCodeGenString* _stringLiteral4231481871; extern Il2CppCodeGenString* _stringLiteral4231481888; extern Il2CppCodeGenString* _stringLiteral1023736718; extern Il2CppCodeGenString* _stringLiteral1168705793; extern Il2CppCodeGenString* _stringLiteral1168706256; extern Il2CppCodeGenString* _stringLiteral3187195076; extern Il2CppCodeGenString* _stringLiteral3187195539; extern Il2CppCodeGenString* _stringLiteral2446678658; extern Il2CppCodeGenString* _stringLiteral1126264221; extern Il2CppCodeGenString* _stringLiteral1126264225; extern Il2CppCodeGenString* _stringLiteral1529548748; extern Il2CppCodeGenString* _stringLiteral1529548752; extern Il2CppCodeGenString* _stringLiteral366749334; extern Il2CppCodeGenString* _stringLiteral366749338; extern Il2CppCodeGenString* _stringLiteral2336117802; extern Il2CppCodeGenString* _stringLiteral3255745202; extern Il2CppCodeGenString* _stringLiteral366749343; extern Il2CppCodeGenString* _stringLiteral2336117811; extern Il2CppCodeGenString* _stringLiteral448491076; extern Il2CppCodeGenString* _stringLiteral3365436115; extern Il2CppCodeGenString* _stringLiteral1151034034; extern Il2CppCodeGenString* _stringLiteral1554318561; extern Il2CppCodeGenString* _stringLiteral391519147; extern Il2CppCodeGenString* _stringLiteral2360887615; extern Il2CppCodeGenString* _stringLiteral391519138; extern Il2CppCodeGenString* _stringLiteral2360887606; extern Il2CppCodeGenString* _stringLiteral292744773; extern Il2CppCodeGenString* _stringLiteral2309168132; extern Il2CppCodeGenString* _stringLiteral2309167540; extern Il2CppCodeGenString* _stringLiteral339798803; extern Il2CppCodeGenString* _stringLiteral3236305790; extern Il2CppCodeGenString* _stringLiteral3021628826; extern Il2CppCodeGenString* _stringLiteral3332181807; extern Il2CppCodeGenString* _stringLiteral3068682295; extern Il2CppCodeGenString* _stringLiteral381169821; extern Il2CppCodeGenString* _stringLiteral1502599105; extern Il2CppCodeGenString* _stringLiteral1905883611; extern Il2CppCodeGenString* _stringLiteral1905883589; extern Il2CppCodeGenString* _stringLiteral3155263474; extern Il2CppCodeGenString* _stringLiteral3021628428; extern Il2CppCodeGenString* _stringLiteral1502598673; extern Il2CppCodeGenString* _stringLiteral762051712; extern Il2CppCodeGenString* _stringLiteral762051709; extern Il2CppCodeGenString* _stringLiteral762051707; extern Il2CppCodeGenString* _stringLiteral762051719; extern Il2CppCodeGenString* _stringLiteral2684366008; extern Il2CppCodeGenString* _stringLiteral2684366020; extern Il2CppCodeGenString* _stringLiteral3443880895; extern Il2CppCodeGenString* _stringLiteral3443880907; extern Il2CppCodeGenString* _stringLiteral119238135; extern Il2CppCodeGenString* _stringLiteral2710897270; extern Il2CppCodeGenString* _stringLiteral4182611163; extern Il2CppCodeGenString* _stringLiteral2307351665; extern Il2CppCodeGenString* _stringLiteral2148391703; extern Il2CppCodeGenString* _stringLiteral807095503; extern Il2CppCodeGenString* _stringLiteral1729362418; extern Il2CppCodeGenString* _stringLiteral2993908237; extern Il2CppCodeGenString* _stringLiteral2979673950; extern Il2CppCodeGenString* _stringLiteral2697347422; extern Il2CppCodeGenString* _stringLiteral2663581612; extern Il2CppCodeGenString* _stringLiteral1408556295; extern Il2CppCodeGenString* _stringLiteral627234437; extern Il2CppCodeGenString* _stringLiteral1563015653; extern Il2CppCodeGenString* _stringLiteral3457282118; extern Il2CppCodeGenString* _stringLiteral3082391656; extern Il2CppCodeGenString* _stringLiteral2146264690; extern Il2CppCodeGenString* _stringLiteral330911302; extern Il2CppCodeGenString* _stringLiteral330911141; extern Il2CppCodeGenString* _stringLiteral330910955; extern Il2CppCodeGenString* _stringLiteral330910815; extern Il2CppCodeGenString* _stringLiteral3202370362; extern Il2CppCodeGenString* _stringLiteral3202370201; extern Il2CppCodeGenString* _stringLiteral3202370015; extern Il2CppCodeGenString* _stringLiteral3202369875; extern Il2CppCodeGenString* _stringLiteral1778729099; extern Il2CppCodeGenString* _stringLiteral339994567; extern Il2CppCodeGenString* _stringLiteral1502598545; extern Il2CppCodeGenString* _stringLiteral2477512525; extern Il2CppCodeGenString* _stringLiteral1453727839; extern Il2CppCodeGenString* _stringLiteral1689674280; extern Il2CppCodeGenString* _stringLiteral2559449315; extern Il2CppCodeGenString* _stringLiteral4172587423; extern Il2CppCodeGenString* _stringLiteral2559449314; extern Il2CppCodeGenString* _stringLiteral4172587422; extern Il2CppCodeGenString* _stringLiteral2559449312; extern Il2CppCodeGenString* _stringLiteral4172587420; extern Il2CppCodeGenString* _stringLiteral2559449324; extern Il2CppCodeGenString* _stringLiteral178545620; extern Il2CppCodeGenString* _stringLiteral3769302893; extern Il2CppCodeGenString* _stringLiteral3769302905; extern Il2CppCodeGenString* _stringLiteral1684498374; extern Il2CppCodeGenString* _stringLiteral3073335381; extern Il2CppCodeGenString* _stringLiteral1180572518; extern Il2CppCodeGenString* _stringLiteral1180572519; extern Il2CppCodeGenString* _stringLiteral1180572521; extern Il2CppCodeGenString* _stringLiteral1180572509; extern Il2CppCodeGenString* _stringLiteral3815347542; extern Il2CppCodeGenString* _stringLiteral3815347530; extern Il2CppCodeGenString* _stringLiteral2501047121; extern Il2CppCodeGenString* _stringLiteral4090385577; extern Il2CppCodeGenString* _stringLiteral1314794950; extern Il2CppCodeGenString* _stringLiteral1002339398; extern Il2CppCodeGenString* _stringLiteral782255611; extern Il2CppCodeGenString* _stringLiteral4176545519; extern Il2CppCodeGenString* _stringLiteral782255608; extern Il2CppCodeGenString* _stringLiteral4176545516; extern Il2CppCodeGenString* _stringLiteral782255606; extern Il2CppCodeGenString* _stringLiteral4176545514; extern Il2CppCodeGenString* _stringLiteral782255602; extern Il2CppCodeGenString* _stringLiteral4176545510; extern Il2CppCodeGenString* _stringLiteral3401875426; extern Il2CppCodeGenString* _stringLiteral3514721169; extern Il2CppCodeGenString* _stringLiteral1157131249; extern Il2CppCodeGenString* _stringLiteral3161666159; extern Il2CppCodeGenString* _stringLiteral3443880897; extern Il2CppCodeGenString* _stringLiteral3443880900; extern Il2CppCodeGenString* _stringLiteral3162669967; extern Il2CppCodeGenString* _stringLiteral3715361322; extern Il2CppCodeGenString* _stringLiteral2814683934; extern Il2CppCodeGenString* _stringLiteral4076537830; extern Il2CppCodeGenString* _stringLiteral2716565177; extern Il2CppCodeGenString* _stringLiteral2807062197; extern Il2CppCodeGenString* _stringLiteral3530008064; extern Il2CppCodeGenString* _stringLiteral2807702533; extern Il2CppCodeGenString* _stringLiteral3551139248; extern Il2CppCodeGenString* _stringLiteral876476942; extern Il2CppCodeGenString* _stringLiteral2448513723; extern Il2CppCodeGenString* _stringLiteral3753663670; extern Il2CppCodeGenString* _stringLiteral480825959; extern Il2CppCodeGenString* _stringLiteral1549531859; extern Il2CppCodeGenString* _stringLiteral88067259; extern Il2CppCodeGenString* _stringLiteral88067260; extern Il2CppCodeGenString* _stringLiteral88067257; extern Il2CppCodeGenString* _stringLiteral88067258; extern Il2CppCodeGenString* _stringLiteral88067255; extern Il2CppCodeGenString* _stringLiteral88067256; extern Il2CppCodeGenString* _stringLiteral88067253; extern Il2CppCodeGenString* _stringLiteral1884584617; extern Il2CppCodeGenString* _stringLiteral47382726; extern Il2CppCodeGenString* _stringLiteral3021628343; extern Il2CppCodeGenString* _stringLiteral1858828924; extern Il2CppCodeGenString* _stringLiteral1168707281; extern Il2CppCodeGenString* _stringLiteral4231481919; extern Il2CppCodeGenString* _stringLiteral3187196564; extern Il2CppCodeGenString* _stringLiteral2307351242; extern Il2CppCodeGenString* _stringLiteral1933872749; extern Il2CppCodeGenString* _stringLiteral3470150638; extern Il2CppCodeGenString* _stringLiteral3660249737; extern Il2CppCodeGenString* _stringLiteral2858725215; extern Il2CppCodeGenString* _stringLiteral4229665356; extern Il2CppCodeGenString* _stringLiteral3236762065; extern Il2CppCodeGenString* _stringLiteral2193318831; extern Il2CppCodeGenString* _stringLiteral4185878269; extern Il2CppCodeGenString* _stringLiteral2034147359; extern Il2CppCodeGenString* _stringLiteral3098091945; extern Il2CppCodeGenString* _stringLiteral1186066636; extern Il2CppCodeGenString* _stringLiteral593465470; extern Il2CppCodeGenString* _stringLiteral3094106929; extern Il2CppCodeGenString* _stringLiteral2255081476; extern Il2CppCodeGenString* _stringLiteral1548097516; extern Il2CppCodeGenString* _stringLiteral318169515; extern Il2CppCodeGenString* _stringLiteral2819848329; extern Il2CppCodeGenString* _stringLiteral365513102; extern Il2CppCodeGenString* _stringLiteral4255559471; extern Il2CppCodeGenString* _stringLiteral3626041882; extern const uint32_t OpCodeNames__cctor_m2437275178_MetadataUsageId; extern Il2CppClass* OpCodes_t3494785031_il2cpp_TypeInfo_var; extern const uint32_t OpCodes__cctor_m939885911_MetadataUsageId; extern const uint32_t PropertyBuilder_not_supported_m143748788_MetadataUsageId; extern const uint32_t TypeBuilder_get_AssemblyQualifiedName_m2097258567_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral700545517; extern const uint32_t TypeBuilder_get_UnderlyingSystemType_m392404521_MetadataUsageId; extern Il2CppClass* MethodBaseU5BU5D_t2597254495_il2cpp_TypeInfo_var; extern const uint32_t TypeBuilder_GetConstructorImpl_m4192168686_MetadataUsageId; extern const uint32_t TypeBuilder_IsDefined_m3186251655_MetadataUsageId; extern Il2CppClass* ConstructorBuilder_t700974433_il2cpp_TypeInfo_var; extern Il2CppClass* ConstructorBuilderU5BU5D_t775814140_il2cpp_TypeInfo_var; extern const uint32_t TypeBuilder_DefineConstructor_m2972481149_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2507326364; extern const uint32_t TypeBuilder_DefineDefaultConstructor_m2225828699_MetadataUsageId; extern const uint32_t TypeBuilder_has_ctor_method_m3449702467_MetadataUsageId; extern Il2CppClass* TypeBuilder_t3308873219_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral216645436; extern Il2CppCodeGenString* _stringLiteral2411675321; extern Il2CppCodeGenString* _stringLiteral2625238862; extern Il2CppCodeGenString* _stringLiteral2961462794; extern Il2CppCodeGenString* _stringLiteral159398136; extern Il2CppCodeGenString* _stringLiteral959906687; extern const uint32_t TypeBuilder_CreateType_m4126056124_MetadataUsageId; extern const uint32_t TypeBuilder_GetConstructors_m774120094_MetadataUsageId; extern Il2CppClass* ConstructorInfoU5BU5D_t1996683371_il2cpp_TypeInfo_var; extern const uint32_t TypeBuilder_GetConstructorsInternal_m2426192231_MetadataUsageId; extern const uint32_t TypeBuilder_GetElementType_m3707448372_MetadataUsageId; extern const uint32_t TypeBuilder_GetField_m2112455315_MetadataUsageId; extern Il2CppClass* FieldInfoU5BU5D_t125053523_il2cpp_TypeInfo_var; extern const uint32_t TypeBuilder_GetFields_m3875401338_MetadataUsageId; extern const uint32_t TypeBuilder_GetInterfaces_m1818658502_MetadataUsageId; extern Il2CppClass* MethodInfoU5BU5D_t152480188_il2cpp_TypeInfo_var; extern const uint32_t TypeBuilder_GetMethodsByName_m229541072_MetadataUsageId; extern Il2CppClass* MethodInfo_t_il2cpp_TypeInfo_var; extern const uint32_t TypeBuilder_GetMethodImpl_m1443640538_MetadataUsageId; extern Il2CppClass* PropertyInfoU5BU5D_t1736152084_il2cpp_TypeInfo_var; extern const uint32_t TypeBuilder_GetProperties_m2211539685_MetadataUsageId; extern const Il2CppType* ValueType_t3507792607_0_0_0_var; extern const uint32_t TypeBuilder_IsValueTypeImpl_m1499671481_MetadataUsageId; extern const uint32_t TypeBuilder_MakeByRefType_m2042877922_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral3528128599; extern const uint32_t TypeBuilder_SetParent_m387557893_MetadataUsageId; extern const uint32_t TypeBuilder_not_supported_m3178173643_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2822774848; extern const uint32_t TypeBuilder_check_not_created_m2785532739_MetadataUsageId; extern const uint32_t TypeBuilder_IsAssignableTo_m3210661829_MetadataUsageId; extern const uint32_t TypeBuilder_GetGenericArguments_m3241780469_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2633815678; extern const uint32_t TypeBuilder_GetGenericTypeDefinition_m3813000816_MetadataUsageId; extern Il2CppClass* MarshalAsAttribute_t2900773360_il2cpp_TypeInfo_var; extern const uint32_t UnmanagedMarshal_ToMarshalAsAttribute_m3695569337_MetadataUsageId; extern Il2CppClass* IntPtr_t_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral382420726; extern const uint32_t FieldInfo_GetFieldFromHandle_m1587354836_MetadataUsageId; extern Il2CppClass* SystemException_t3877406272_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral3975950849; extern const uint32_t FieldInfo_GetFieldOffset_m375239709_MetadataUsageId; extern Il2CppClass* NonSerializedAttribute_t399263003_il2cpp_TypeInfo_var; extern Il2CppClass* FieldOffsetAttribute_t1553145711_il2cpp_TypeInfo_var; extern const uint32_t FieldInfo_GetPseudoCustomAttributes_m2500972355_MetadataUsageId; extern Il2CppClass* SerializationException_t753258759_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral3484720401; extern Il2CppCodeGenString* _stringLiteral2809705325; extern Il2CppCodeGenString* _stringLiteral2328219947; extern Il2CppCodeGenString* _stringLiteral3902976916; extern Il2CppCodeGenString* _stringLiteral1068945792; extern const uint32_t MemberInfoSerializationHolder__ctor_m1297860825_MetadataUsageId; extern const Il2CppType* MemberInfoSerializationHolder_t2799051170_0_0_0_var; extern const Il2CppType* TypeU5BU5D_t1664964607_0_0_0_var; extern Il2CppCodeGenString* _stringLiteral3962342765; extern const uint32_t MemberInfoSerializationHolder_Serialize_m4243060728_MetadataUsageId; extern const uint32_t MemberInfoSerializationHolder_GetObjectData_m1760456120_MetadataUsageId; extern Il2CppClass* MemberTypes_t3343038963_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral948459439; extern Il2CppCodeGenString* _stringLiteral3230290608; extern Il2CppCodeGenString* _stringLiteral2962078205; extern Il2CppCodeGenString* _stringLiteral2138058808; extern Il2CppCodeGenString* _stringLiteral3237053035; extern Il2CppCodeGenString* _stringLiteral2011492163; extern const uint32_t MemberInfoSerializationHolder_GetRealObject_m3643310964_MetadataUsageId; extern const uint32_t MethodBase_GetMethodFromHandleNoGenericCheck_m4274264088_MetadataUsageId; extern const uint32_t MethodBase_GetMethodFromIntPtr_m1014299957_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral1596710604; extern const uint32_t MethodBase_GetMethodFromHandle_m3983882276_MetadataUsageId; extern Il2CppClass* MethodBuilder_t644187984_il2cpp_TypeInfo_var; extern Il2CppClass* Exception_t1927440687_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral4028768107; extern const uint32_t MethodBase_get_next_table_index_m3185673846_MetadataUsageId; extern const uint32_t MethodBase_GetGenericArguments_m1277035033_MetadataUsageId; extern const uint32_t MethodInfo_MakeGenericMethod_m3327556920_MetadataUsageId; extern const uint32_t MethodInfo_GetGenericArguments_m3393347888_MetadataUsageId; extern Il2CppClass* Missing_t1033855606_il2cpp_TypeInfo_var; extern const uint32_t Missing__cctor_m1775889133_MetadataUsageId; extern Il2CppClass* TypeFilter_t2905709404_il2cpp_TypeInfo_var; extern Il2CppClass* Module_t4282841206_il2cpp_TypeInfo_var; extern const MethodInfo* Module_filter_by_type_name_m2283758100_MethodInfo_var; extern const MethodInfo* Module_filter_by_type_name_ignore_case_m3574895736_MethodInfo_var; extern const uint32_t Module__cctor_m2698817211_MetadataUsageId; extern const uint32_t Module_GetCustomAttributes_m3581287913_MetadataUsageId; extern const uint32_t Module_GetObjectData_m3106234990_MetadataUsageId; extern const uint32_t Module_IsDefined_m3561426235_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral372029320; extern const uint32_t Module_filter_by_type_name_m2283758100_MetadataUsageId; extern const uint32_t Module_filter_by_type_name_ignore_case_m3574895736_MetadataUsageId; extern const uint32_t MonoCMethod__ctor_m2473049889_MetadataUsageId; extern Il2CppClass* MemberAccessException_t2005094827_il2cpp_TypeInfo_var; extern Il2CppClass* MethodAccessException_t4093255254_il2cpp_TypeInfo_var; extern Il2CppClass* TargetInvocationException_t4098620458_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral3569083427; extern Il2CppCodeGenString* _stringLiteral404785397; extern Il2CppCodeGenString* _stringLiteral2903444890; extern Il2CppCodeGenString* _stringLiteral1065211720; extern Il2CppCodeGenString* _stringLiteral1582284496; extern const uint32_t MonoCMethod_Invoke_m264177196_MetadataUsageId; extern const uint32_t MonoCMethod_IsDefined_m3686883242_MetadataUsageId; extern const uint32_t MonoCMethod_GetCustomAttributes_m2886701175_MetadataUsageId; extern const uint32_t MonoCMethod_GetCustomAttributes_m1110360782_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral35761088; extern Il2CppCodeGenString* _stringLiteral3422253728; extern const uint32_t MonoCMethod_ToString_m607787036_MetadataUsageId; extern const uint32_t MonoEvent_ToString_m386956596_MetadataUsageId; extern const uint32_t MonoEvent_IsDefined_m3151861274_MetadataUsageId; extern const uint32_t MonoEvent_GetCustomAttributes_m2349471159_MetadataUsageId; extern const uint32_t MonoEvent_GetCustomAttributes_m3899596098_MetadataUsageId; extern const uint32_t MonoField_IsDefined_m1871511958_MetadataUsageId; extern const uint32_t MonoField_GetCustomAttributes_m4168545977_MetadataUsageId; extern const uint32_t MonoField_GetCustomAttributes_m1051163738_MetadataUsageId; extern Il2CppClass* TargetException_t1572104820_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral2752958494; extern Il2CppCodeGenString* _stringLiteral3735664915; extern Il2CppCodeGenString* _stringLiteral1099314147; extern const uint32_t MonoField_GetValue_m1386935585_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2512070489; extern const uint32_t MonoField_ToString_m517029212_MetadataUsageId; extern Il2CppClass* FieldAccessException_t1797813379_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral4043003486; extern Il2CppCodeGenString* _stringLiteral2614084089; extern Il2CppCodeGenString* _stringLiteral3234870220; extern Il2CppCodeGenString* _stringLiteral696029875; extern const uint32_t MonoField_SetValue_m1849281384_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2139378969; extern const uint32_t MonoField_CheckGeneric_m1527550038_MetadataUsageId; extern const uint32_t MonoGenericCMethod__ctor_m2520666358_MetadataUsageId; extern const uint32_t MonoGenericMethod__ctor_m2255621499_MetadataUsageId; extern const uint32_t MonoMethod_GetParameters_m1240674378_MetadataUsageId; extern Il2CppClass* ThreadAbortException_t1150575753_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral68020717; extern const uint32_t MonoMethod_Invoke_m3376991795_MetadataUsageId; extern const uint32_t MonoMethod_IsDefined_m2322670981_MetadataUsageId; extern const uint32_t MonoMethod_GetCustomAttributes_m2493833930_MetadataUsageId; extern const uint32_t MonoMethod_GetCustomAttributes_m3212448303_MetadataUsageId; extern Il2CppClass* PreserveSigAttribute_t1564965109_il2cpp_TypeInfo_var; extern const uint32_t MonoMethod_GetPseudoCustomAttributes_m466965107_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral372029314; extern Il2CppCodeGenString* _stringLiteral1271078008; extern Il2CppCodeGenString* _stringLiteral1623555996; extern const uint32_t MonoMethod_ToString_m1014895917_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral56518380; extern Il2CppCodeGenString* _stringLiteral2401257820; extern const uint32_t MonoMethod_MakeGenericMethod_m3628255919_MetadataUsageId; extern const uint32_t MonoProperty_GetAccessors_m3704698731_MetadataUsageId; extern const uint32_t MonoProperty_GetIndexParameters_m832800404_MetadataUsageId; extern const uint32_t MonoProperty_IsDefined_m2473061021_MetadataUsageId; extern const uint32_t MonoProperty_GetCustomAttributes_m1497967922_MetadataUsageId; extern const uint32_t MonoProperty_GetCustomAttributes_m1756234231_MetadataUsageId; extern const Il2CppType* StaticGetter_1_t2308823731_0_0_0_var; extern const Il2CppType* Getter_2_t3970651952_0_0_0_var; extern const Il2CppType* MonoProperty_t_0_0_0_var; extern const Il2CppType* GetterAdapter_t1423755509_0_0_0_var; extern Il2CppClass* GetterAdapter_t1423755509_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral984599999; extern Il2CppCodeGenString* _stringLiteral3063456723; extern const uint32_t MonoProperty_CreateGetterDelegate_m2961258839_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral3303126324; extern Il2CppCodeGenString* _stringLiteral372029307; extern const uint32_t MonoProperty_GetValue_m2150318626_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral449389896; extern const uint32_t MonoProperty_SetValue_m1423050605_MetadataUsageId; extern const uint32_t MonoProperty_ToString_m1379465861_MetadataUsageId; extern const uint32_t MonoProperty_GetOptionalCustomModifiers_m3827844355_MetadataUsageId; extern const uint32_t MonoProperty_GetRequiredCustomModifiers_m576853384_MetadataUsageId; extern const uint32_t ParameterInfo_ToString_m1722229694_MetadataUsageId; extern const uint32_t ParameterInfo_GetCustomAttributes_m2985072480_MetadataUsageId; extern const uint32_t ParameterInfo_IsDefined_m2412925144_MetadataUsageId; extern Il2CppClass* InAttribute_t1394050551_il2cpp_TypeInfo_var; extern Il2CppClass* OptionalAttribute_t827982902_il2cpp_TypeInfo_var; extern Il2CppClass* OutAttribute_t1539424546_il2cpp_TypeInfo_var; extern const uint32_t ParameterInfo_GetPseudoCustomAttributes_m2952359394_MetadataUsageId; extern Il2CppClass* BooleanU5BU5D_t3568034315_il2cpp_TypeInfo_var; extern const uint32_t ParameterModifier_t1820634920_pinvoke_FromNativeMethodDefinition_MetadataUsageId; extern const uint32_t ParameterModifier_t1820634920_com_FromNativeMethodDefinition_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral506242180; extern const uint32_t Pointer_System_Runtime_Serialization_ISerializable_GetObjectData_m4103721774_MetadataUsageId; extern const uint32_t PropertyInfo_GetOptionalCustomModifiers_m747937176_MetadataUsageId; extern const uint32_t PropertyInfo_GetRequiredCustomModifiers_m2291294773_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral3721378849; extern Il2CppCodeGenString* _stringLiteral3423086453; extern Il2CppCodeGenString* _stringLiteral2645312083; extern Il2CppCodeGenString* _stringLiteral622693823; extern const uint32_t StrongNameKeyPair__ctor_m1022407102_MetadataUsageId; extern const uint32_t StrongNameKeyPair_System_Runtime_Serialization_ISerializable_GetObjectData_m1693082120_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral3413494879; extern const uint32_t TargetException__ctor_m104994274_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral2114161008; extern const uint32_t TargetInvocationException__ctor_m1059845570_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral212474851; extern const uint32_t TargetParameterCountException__ctor_m1256521036_MetadataUsageId; extern Il2CppClass* EventArgs_t3289624707_il2cpp_TypeInfo_var; extern const uint32_t ResolveEventArgs__ctor_m1927258464_MetadataUsageId; // System.Object[] struct ObjectU5BU5D_t3614634134 : public Il2CppArray { public: ALIGN_FIELD (8) Il2CppObject * m_Items[1]; public: inline Il2CppObject * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Il2CppObject ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Il2CppObject * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline Il2CppObject * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Il2CppObject ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Il2CppObject * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Type[] struct TypeU5BU5D_t1664964607 : public Il2CppArray { public: ALIGN_FIELD (8) Type_t * m_Items[1]; public: inline Type_t * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Type_t ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Type_t * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline Type_t * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Type_t ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Type_t * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.Module[] struct ModuleU5BU5D_t3593287923 : public Il2CppArray { public: ALIGN_FIELD (8) Module_t4282841206 * m_Items[1]; public: inline Module_t4282841206 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Module_t4282841206 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Module_t4282841206 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline Module_t4282841206 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Module_t4282841206 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Module_t4282841206 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Byte[] struct ByteU5BU5D_t3397334013 : public Il2CppArray { public: ALIGN_FIELD (8) uint8_t m_Items[1]; public: inline uint8_t GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline uint8_t* GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, uint8_t value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline uint8_t GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline uint8_t* GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, uint8_t value) { m_Items[index] = value; } }; // System.Reflection.ParameterInfo[] struct ParameterInfoU5BU5D_t2275869610 : public Il2CppArray { public: ALIGN_FIELD (8) ParameterInfo_t2249040075 * m_Items[1]; public: inline ParameterInfo_t2249040075 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline ParameterInfo_t2249040075 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, ParameterInfo_t2249040075 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline ParameterInfo_t2249040075 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline ParameterInfo_t2249040075 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, ParameterInfo_t2249040075 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.MethodBase[] struct MethodBaseU5BU5D_t2597254495 : public Il2CppArray { public: ALIGN_FIELD (8) MethodBase_t904190842 * m_Items[1]; public: inline MethodBase_t904190842 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline MethodBase_t904190842 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, MethodBase_t904190842 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline MethodBase_t904190842 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline MethodBase_t904190842 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, MethodBase_t904190842 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.ParameterModifier[] struct ParameterModifierU5BU5D_t963192633 : public Il2CppArray { public: ALIGN_FIELD (8) ParameterModifier_t1820634920 m_Items[1]; public: inline ParameterModifier_t1820634920 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline ParameterModifier_t1820634920 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, ParameterModifier_t1820634920 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline ParameterModifier_t1820634920 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline ParameterModifier_t1820634920 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, ParameterModifier_t1820634920 value) { m_Items[index] = value; } }; // System.String[] struct StringU5BU5D_t1642385972 : public Il2CppArray { public: ALIGN_FIELD (8) String_t* m_Items[1]; public: inline String_t* GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline String_t** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, String_t* value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline String_t* GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline String_t** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, String_t* value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.PropertyInfo[] struct PropertyInfoU5BU5D_t1736152084 : public Il2CppArray { public: ALIGN_FIELD (8) PropertyInfo_t * m_Items[1]; public: inline PropertyInfo_t * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline PropertyInfo_t ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, PropertyInfo_t * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline PropertyInfo_t * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline PropertyInfo_t ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, PropertyInfo_t * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.CustomAttributeTypedArgument[] struct CustomAttributeTypedArgumentU5BU5D_t1075686591 : public Il2CppArray { public: ALIGN_FIELD (8) CustomAttributeTypedArgument_t1498197914 m_Items[1]; public: inline CustomAttributeTypedArgument_t1498197914 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline CustomAttributeTypedArgument_t1498197914 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, CustomAttributeTypedArgument_t1498197914 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline CustomAttributeTypedArgument_t1498197914 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline CustomAttributeTypedArgument_t1498197914 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, CustomAttributeTypedArgument_t1498197914 value) { m_Items[index] = value; } }; // System.Reflection.CustomAttributeNamedArgument[] struct CustomAttributeNamedArgumentU5BU5D_t3304067486 : public Il2CppArray { public: ALIGN_FIELD (8) CustomAttributeNamedArgument_t94157543 m_Items[1]; public: inline CustomAttributeNamedArgument_t94157543 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline CustomAttributeNamedArgument_t94157543 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, CustomAttributeNamedArgument_t94157543 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline CustomAttributeNamedArgument_t94157543 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline CustomAttributeNamedArgument_t94157543 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, CustomAttributeNamedArgument_t94157543 value) { m_Items[index] = value; } }; // System.Reflection.Emit.ModuleBuilder[] struct ModuleBuilderU5BU5D_t3642333382 : public Il2CppArray { public: ALIGN_FIELD (8) ModuleBuilder_t4156028127 * m_Items[1]; public: inline ModuleBuilder_t4156028127 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline ModuleBuilder_t4156028127 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, ModuleBuilder_t4156028127 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline ModuleBuilder_t4156028127 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline ModuleBuilder_t4156028127 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, ModuleBuilder_t4156028127 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Type[][] struct TypeU5BU5DU5BU5D_t2318378278 : public Il2CppArray { public: ALIGN_FIELD (8) TypeU5BU5D_t1664964607* m_Items[1]; public: inline TypeU5BU5D_t1664964607* GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline TypeU5BU5D_t1664964607** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, TypeU5BU5D_t1664964607* value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline TypeU5BU5D_t1664964607* GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline TypeU5BU5D_t1664964607** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, TypeU5BU5D_t1664964607* value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.Emit.ParameterBuilder[] struct ParameterBuilderU5BU5D_t2122994367 : public Il2CppArray { public: ALIGN_FIELD (8) ParameterBuilder_t3344728474 * m_Items[1]; public: inline ParameterBuilder_t3344728474 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline ParameterBuilder_t3344728474 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, ParameterBuilder_t3344728474 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline ParameterBuilder_t3344728474 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline ParameterBuilder_t3344728474 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, ParameterBuilder_t3344728474 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.FieldInfo[] struct FieldInfoU5BU5D_t125053523 : public Il2CppArray { public: ALIGN_FIELD (8) FieldInfo_t * m_Items[1]; public: inline FieldInfo_t * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline FieldInfo_t ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, FieldInfo_t * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline FieldInfo_t * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline FieldInfo_t ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, FieldInfo_t * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.MethodInfo[] struct MethodInfoU5BU5D_t152480188 : public Il2CppArray { public: ALIGN_FIELD (8) MethodInfo_t * m_Items[1]; public: inline MethodInfo_t * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline MethodInfo_t ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, MethodInfo_t * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline MethodInfo_t * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline MethodInfo_t ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, MethodInfo_t * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.ConstructorInfo[] struct ConstructorInfoU5BU5D_t1996683371 : public Il2CppArray { public: ALIGN_FIELD (8) ConstructorInfo_t2851816542 * m_Items[1]; public: inline ConstructorInfo_t2851816542 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline ConstructorInfo_t2851816542 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, ConstructorInfo_t2851816542 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline ConstructorInfo_t2851816542 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline ConstructorInfo_t2851816542 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, ConstructorInfo_t2851816542 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.Emit.ILTokenInfo[] struct ILTokenInfoU5BU5D_t4103159791 : public Il2CppArray { public: ALIGN_FIELD (8) ILTokenInfo_t149559338 m_Items[1]; public: inline ILTokenInfo_t149559338 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline ILTokenInfo_t149559338 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, ILTokenInfo_t149559338 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline ILTokenInfo_t149559338 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline ILTokenInfo_t149559338 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, ILTokenInfo_t149559338 value) { m_Items[index] = value; } }; // System.Reflection.Emit.ILGenerator/LabelData[] struct LabelDataU5BU5D_t4181946617 : public Il2CppArray { public: ALIGN_FIELD (8) LabelData_t3712112744 m_Items[1]; public: inline LabelData_t3712112744 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline LabelData_t3712112744 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, LabelData_t3712112744 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline LabelData_t3712112744 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline LabelData_t3712112744 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, LabelData_t3712112744 value) { m_Items[index] = value; } }; // System.Reflection.Emit.ILGenerator/LabelFixup[] struct LabelFixupU5BU5D_t2807174223 : public Il2CppArray { public: ALIGN_FIELD (8) LabelFixup_t4090909514 m_Items[1]; public: inline LabelFixup_t4090909514 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline LabelFixup_t4090909514 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, LabelFixup_t4090909514 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline LabelFixup_t4090909514 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline LabelFixup_t4090909514 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, LabelFixup_t4090909514 value) { m_Items[index] = value; } }; // System.Reflection.Emit.GenericTypeParameterBuilder[] struct GenericTypeParameterBuilderU5BU5D_t358971386 : public Il2CppArray { public: ALIGN_FIELD (8) GenericTypeParameterBuilder_t1370236603 * m_Items[1]; public: inline GenericTypeParameterBuilder_t1370236603 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline GenericTypeParameterBuilder_t1370236603 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, GenericTypeParameterBuilder_t1370236603 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline GenericTypeParameterBuilder_t1370236603 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline GenericTypeParameterBuilder_t1370236603 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, GenericTypeParameterBuilder_t1370236603 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Char[] struct CharU5BU5D_t1328083999 : public Il2CppArray { public: ALIGN_FIELD (8) Il2CppChar m_Items[1]; public: inline Il2CppChar GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Il2CppChar* GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Il2CppChar value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline Il2CppChar GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Il2CppChar* GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Il2CppChar value) { m_Items[index] = value; } }; // System.Int32[] struct Int32U5BU5D_t3030399641 : public Il2CppArray { public: ALIGN_FIELD (8) int32_t m_Items[1]; public: inline int32_t GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline int32_t* GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, int32_t value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline int32_t GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline int32_t* GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, int32_t value) { m_Items[index] = value; } }; // System.Reflection.Emit.TypeBuilder[] struct TypeBuilderU5BU5D_t4254476946 : public Il2CppArray { public: ALIGN_FIELD (8) TypeBuilder_t3308873219 * m_Items[1]; public: inline TypeBuilder_t3308873219 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline TypeBuilder_t3308873219 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, TypeBuilder_t3308873219 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline TypeBuilder_t3308873219 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline TypeBuilder_t3308873219 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, TypeBuilder_t3308873219 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.Emit.ConstructorBuilder[] struct ConstructorBuilderU5BU5D_t775814140 : public Il2CppArray { public: ALIGN_FIELD (8) ConstructorBuilder_t700974433 * m_Items[1]; public: inline ConstructorBuilder_t700974433 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline ConstructorBuilder_t700974433 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, ConstructorBuilder_t700974433 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline ConstructorBuilder_t700974433 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline ConstructorBuilder_t700974433 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, ConstructorBuilder_t700974433 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.Emit.MethodBuilder[] struct MethodBuilderU5BU5D_t4238041457 : public Il2CppArray { public: ALIGN_FIELD (8) MethodBuilder_t644187984 * m_Items[1]; public: inline MethodBuilder_t644187984 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline MethodBuilder_t644187984 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, MethodBuilder_t644187984 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline MethodBuilder_t644187984 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline MethodBuilder_t644187984 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, MethodBuilder_t644187984 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.Emit.FieldBuilder[] struct FieldBuilderU5BU5D_t867683112 : public Il2CppArray { public: ALIGN_FIELD (8) FieldBuilder_t2784804005 * m_Items[1]; public: inline FieldBuilder_t2784804005 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline FieldBuilder_t2784804005 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, FieldBuilder_t2784804005 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline FieldBuilder_t2784804005 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline FieldBuilder_t2784804005 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, FieldBuilder_t2784804005 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Reflection.Emit.PropertyBuilder[] struct PropertyBuilderU5BU5D_t988886841 : public Il2CppArray { public: ALIGN_FIELD (8) PropertyBuilder_t3694255912 * m_Items[1]; public: inline PropertyBuilder_t3694255912 * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline PropertyBuilder_t3694255912 ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, PropertyBuilder_t3694255912 * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline PropertyBuilder_t3694255912 * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline PropertyBuilder_t3694255912 ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, PropertyBuilder_t3694255912 * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // System.Boolean[] struct BooleanU5BU5D_t3568034315 : public Il2CppArray { public: ALIGN_FIELD (8) bool m_Items[1]; public: inline bool GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline bool* GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, bool value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline bool GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline bool* GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, bool value) { m_Items[index] = value; } }; extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_pinvoke(const CustomAttributeTypedArgument_t1498197914& unmarshaled, CustomAttributeTypedArgument_t1498197914_marshaled_pinvoke& marshaled); extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_pinvoke_back(const CustomAttributeTypedArgument_t1498197914_marshaled_pinvoke& marshaled, CustomAttributeTypedArgument_t1498197914& unmarshaled); extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_pinvoke_cleanup(CustomAttributeTypedArgument_t1498197914_marshaled_pinvoke& marshaled); extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_com(const CustomAttributeTypedArgument_t1498197914& unmarshaled, CustomAttributeTypedArgument_t1498197914_marshaled_com& marshaled); extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_com_back(const CustomAttributeTypedArgument_t1498197914_marshaled_com& marshaled, CustomAttributeTypedArgument_t1498197914& unmarshaled); extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_com_cleanup(CustomAttributeTypedArgument_t1498197914_marshaled_com& marshaled); // System.Int32 System.Array::IndexOf<System.Object>(!!0[],!!0) extern "C" int32_t Array_IndexOf_TisIl2CppObject_m2032877681_gshared (Il2CppObject * __this /* static, unused */, ObjectU5BU5D_t3614634134* p0, Il2CppObject * p1, const MethodInfo* method); // !!0[] System.Reflection.CustomAttributeData::UnboxValues<System.Reflection.CustomAttributeTypedArgument>(System.Object[]) extern "C" CustomAttributeTypedArgumentU5BU5D_t1075686591* CustomAttributeData_UnboxValues_TisCustomAttributeTypedArgument_t1498197914_m2561215702_gshared (Il2CppObject * __this /* static, unused */, ObjectU5BU5D_t3614634134* p0, const MethodInfo* method); // System.Collections.ObjectModel.ReadOnlyCollection`1<!!0> System.Array::AsReadOnly<System.Reflection.CustomAttributeTypedArgument>(!!0[]) extern "C" ReadOnlyCollection_1_t1683983606 * Array_AsReadOnly_TisCustomAttributeTypedArgument_t1498197914_m2855930084_gshared (Il2CppObject * __this /* static, unused */, CustomAttributeTypedArgumentU5BU5D_t1075686591* p0, const MethodInfo* method); // !!0[] System.Reflection.CustomAttributeData::UnboxValues<System.Reflection.CustomAttributeNamedArgument>(System.Object[]) extern "C" CustomAttributeNamedArgumentU5BU5D_t3304067486* CustomAttributeData_UnboxValues_TisCustomAttributeNamedArgument_t94157543_m2789115353_gshared (Il2CppObject * __this /* static, unused */, ObjectU5BU5D_t3614634134* p0, const MethodInfo* method); // System.Collections.ObjectModel.ReadOnlyCollection`1<!!0> System.Array::AsReadOnly<System.Reflection.CustomAttributeNamedArgument>(!!0[]) extern "C" ReadOnlyCollection_1_t279943235 * Array_AsReadOnly_TisCustomAttributeNamedArgument_t94157543_m2935638619_gshared (Il2CppObject * __this /* static, unused */, CustomAttributeNamedArgumentU5BU5D_t3304067486* p0, const MethodInfo* method); // System.String Locale::GetText(System.String) extern "C" String_t* Locale_GetText_m1954433032 (Il2CppObject * __this /* static, unused */, String_t* ___msg0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.InvalidOperationException::.ctor(System.String) extern "C" void InvalidOperationException__ctor_m2801133788 (InvalidOperationException_t721527559 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.InvalidOperationException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void InvalidOperationException__ctor_m1817189395 (InvalidOperationException_t721527559 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Runtime.Serialization.SerializationInfo::GetString(System.String) extern "C" String_t* SerializationInfo_GetString_m547109409 (SerializationInfo_t228987430 * __this, String_t* ___name0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Exception::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void Exception_GetObjectData_m2653827630 (Exception_t1927440687 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.Serialization.SerializationInfo::AddValue(System.String,System.Object) extern "C" void SerializationInfo_AddValue_m1740888931 (SerializationInfo_t228987430 * __this, String_t* ___name0, Il2CppObject * ___value1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Attribute::.ctor() extern "C" void Attribute__ctor_m1730479323 (Attribute_t542643598 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Object::.ctor() extern "C" void Object__ctor_m2551263788 (Il2CppObject * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Version::op_Equality(System.Version,System.Version) extern "C" bool Version_op_Equality_m24249905 (Il2CppObject * __this /* static, unused */, Version_t1755874712 * ___v10, Version_t1755874712 * ___v21, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.ArgumentNullException::.ctor(System.String) extern "C" void ArgumentNullException__ctor_m3380712306 (ArgumentNullException_t628810857 * __this, String_t* ___paramName0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.OperatingSystem::.ctor(System.PlatformID,System.Version) extern "C" void OperatingSystem__ctor_m988315539 (OperatingSystem_t290860502 * __this, int32_t ___platform0, Version_t1755874712 * ___version1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Version::ToString() extern "C" String_t* Version_ToString_m18049552 (Version_t1755874712 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Concat(System.String,System.String,System.String) extern "C" String_t* String_Concat_m612901809 (Il2CppObject * __this /* static, unused */, String_t* ___str00, String_t* ___str11, String_t* ___str22, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.StringComparer::.ctor() extern "C" void StringComparer__ctor_m2275216983 (StringComparer_t1574862926 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.String::CompareOrdinalCaseInsensitiveUnchecked(System.String,System.Int32,System.Int32,System.String,System.Int32,System.Int32) extern "C" int32_t String_CompareOrdinalCaseInsensitiveUnchecked_m2002640463 (Il2CppObject * __this /* static, unused */, String_t* ___strA0, int32_t ___indexA1, int32_t ___lenA2, String_t* ___strB3, int32_t ___indexB4, int32_t ___lenB5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.String::CompareOrdinalUnchecked(System.String,System.Int32,System.Int32,System.String,System.Int32,System.Int32) extern "C" int32_t String_CompareOrdinalUnchecked_m3787381712 (Il2CppObject * __this /* static, unused */, String_t* ___strA0, int32_t ___indexA1, int32_t ___lenA2, String_t* ___strB3, int32_t ___indexB4, int32_t ___lenB5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.OrdinalComparer::Compare(System.String,System.String) extern "C" int32_t OrdinalComparer_Compare_m2856814274 (OrdinalComparer_t1018219584 * __this, String_t* ___x0, String_t* ___y1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.String::op_Equality(System.String,System.String) extern "C" bool String_op_Equality_m1790663636 (Il2CppObject * __this /* static, unused */, String_t* ___a0, String_t* ___b1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.String::GetCaseInsensitiveHashCode() extern "C" int32_t String_GetCaseInsensitiveHashCode_m74381984 (String_t* __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.String::GetHashCode() extern "C" int32_t String_GetHashCode_m931956593 (String_t* __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.SystemException::.ctor(System.String) extern "C" void SystemException__ctor_m4001391027 (SystemException_t3877406272 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Exception::set_HResult(System.Int32) extern "C" void Exception_set_HResult_m2376998645 (Exception_t1927440687 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.SystemException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void SystemException__ctor_m2688248668 (SystemException_t3877406272 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.ArithmeticException::.ctor(System.String) extern "C" void ArithmeticException__ctor_m4208398840 (ArithmeticException_t3261462543 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.ArithmeticException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void ArithmeticException__ctor_m104771799 (ArithmeticException_t3261462543 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.NotSupportedException::.ctor(System.String) extern "C" void NotSupportedException__ctor_m836173213 (NotSupportedException_t1793819818 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.NotSupportedException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void NotSupportedException__ctor_m422639464 (NotSupportedException_t1793819818 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Assembly/ResolveEventHolder::.ctor() extern "C" void ResolveEventHolder__ctor_m2004627747 (ResolveEventHolder_t1761494505 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Assembly::get_code_base(System.Boolean) extern "C" String_t* Assembly_get_code_base_m3637877060 (Assembly_t4268412390 * __this, bool ___escaped0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Assembly::get_location() extern "C" String_t* Assembly_get_location_m2976332497 (Assembly_t4268412390 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.MonoCustomAttrs::IsDefined(System.Reflection.ICustomAttributeProvider,System.Type,System.Boolean) extern "C" bool MonoCustomAttrs_IsDefined_m3820363041 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___obj0, Type_t * ___attributeType1, bool ___inherit2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object[] System.MonoCustomAttrs::GetCustomAttributes(System.Reflection.ICustomAttributeProvider,System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoCustomAttrs_GetCustomAttributes_m939426263 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___obj0, Type_t * ___attributeType1, bool ___inherit2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Assembly::GetType(System.String,System.Boolean,System.Boolean) extern "C" Type_t * Assembly_GetType_m2765594712 (Assembly_t4268412390 * __this, String_t* ___name0, bool ___throwOnError1, bool ___ignoreCase2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.String::get_Length() extern "C" int32_t String_get_Length_m1606060069 (String_t* __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.ArgumentException::.ctor(System.String,System.String) extern "C" void ArgumentException__ctor_m544251339 (ArgumentException_t3259014390 * __this, String_t* ___message0, String_t* ___paramName1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Assembly::InternalGetType(System.Reflection.Module,System.String,System.Boolean,System.Boolean) extern "C" Type_t * Assembly_InternalGetType_m1990879055 (Assembly_t4268412390 * __this, Module_t4282841206 * ___module0, String_t* ___name1, bool ___throwOnError2, bool ___ignoreCase3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Security.SecurityManager::get_SecurityEnabled() extern "C" bool SecurityManager_get_SecurityEnabled_m51574294 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Assembly::GetCodeBase(System.Boolean) extern "C" String_t* Assembly_GetCodeBase_m2735209720 (Assembly_t4268412390 * __this, bool ___escaped0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.AssemblyName::.ctor() extern "C" void AssemblyName__ctor_m2505746587 (AssemblyName_t894705941 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Assembly::FillName(System.Reflection.Assembly,System.Reflection.AssemblyName) extern "C" void Assembly_FillName_m1934025015 (Il2CppObject * __this /* static, unused */, Assembly_t4268412390 * ___ass0, AssemblyName_t894705941 * ___aname1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Assembly::get_fullname() extern "C" String_t* Assembly_get_fullname_m3149819070 (Assembly_t4268412390 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.AppDomain System.AppDomain::get_CurrentDomain() extern "C" AppDomain_t2719102437 * AppDomain_get_CurrentDomain_m3432767403 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Assembly System.AppDomain::Load(System.String) extern "C" Assembly_t4268412390 * AppDomain_Load_m3276140461 (AppDomain_t2719102437 * __this, String_t* ___assemblyString0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.ArgumentException::.ctor(System.String) extern "C" void ArgumentException__ctor_m3739475201 (ArgumentException_t3259014390 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Module[] System.Reflection.Assembly::GetModules(System.Boolean) extern "C" ModuleU5BU5D_t3593287923* Assembly_GetModules_m2242070953 (Assembly_t4268412390 * __this, bool ___getResourceModules0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Module::get_ScopeName() extern "C" String_t* Module_get_ScopeName_m207704721 (Module_t4282841206 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.ArrayList::.ctor(System.Int32) extern "C" void ArrayList__ctor_m1467563650 (ArrayList_t4252133567 * __this, int32_t ___capacity0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Module::IsResource() extern "C" bool Module_IsResource_m663979284 (Module_t4282841206 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Type::GetTypeFromHandle(System.RuntimeTypeHandle) extern "C" Type_t * Type_GetTypeFromHandle_m432505302 (Il2CppObject * __this /* static, unused */, RuntimeTypeHandle_t2330101084 ___handle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object System.Runtime.Serialization.SerializationInfo::GetValue(System.String,System.Type) extern "C" Il2CppObject * SerializationInfo_GetValue_m1127314592 (SerializationInfo_t228987430 * __this, String_t* ___name0, Type_t * ___type1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Runtime.Serialization.SerializationInfo::GetInt32(System.String) extern "C" int32_t SerializationInfo_GetInt32_m4039439501 (SerializationInfo_t228987430 * __this, String_t* ___name0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Globalization.CultureInfo::.ctor(System.Int32) extern "C" void CultureInfo__ctor_m3417484387 (CultureInfo_t3500843524 * __this, int32_t ___culture0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Text.StringBuilder::.ctor() extern "C" void StringBuilder__ctor_m3946851802 (StringBuilder_t1221177846 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Text.StringBuilder System.Text.StringBuilder::Append(System.String) extern "C" StringBuilder_t1221177846 * StringBuilder_Append_m3636508479 (StringBuilder_t1221177846 * __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Version System.Reflection.AssemblyName::get_Version() extern "C" Version_t1755874712 * AssemblyName_get_Version_m3495645648 (AssemblyName_t894705941 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Version::op_Inequality(System.Version,System.Version) extern "C" bool Version_op_Inequality_m828629926 (Il2CppObject * __this /* static, unused */, Version_t1755874712 * ___v10, Version_t1755874712 * ___v21, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Globalization.CultureInfo System.Globalization.CultureInfo::get_InvariantCulture() extern "C" CultureInfo_t3500843524 * CultureInfo_get_InvariantCulture_m398972276 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Byte[] System.Reflection.AssemblyName::InternalGetPublicKeyToken() extern "C" ByteU5BU5D_t3397334013* AssemblyName_InternalGetPublicKeyToken_m3706025887 (AssemblyName_t894705941 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Byte::ToString(System.String) extern "C" String_t* Byte_ToString_m1309661918 (uint8_t* __this, String_t* ___format0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.AssemblyNameFlags System.Reflection.AssemblyName::get_Flags() extern "C" int32_t AssemblyName_get_Flags_m1290091392 (AssemblyName_t894705941 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Text.StringBuilder::ToString() extern "C" String_t* StringBuilder_ToString_m1507807375 (StringBuilder_t1221177846 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Version::get_Major() extern "C" int32_t Version_get_Major_m3385239713 (Version_t1755874712 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Version::get_Minor() extern "C" int32_t Version_get_Minor_m3449134197 (Version_t1755874712 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Version::get_Build() extern "C" int32_t Version_get_Build_m4207539494 (Version_t1755874712 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Version::get_Revision() extern "C" int32_t Version_get_Revision_m654005649 (Version_t1755874712 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.AssemblyName::get_FullName() extern "C" String_t* AssemblyName_get_FullName_m1606421515 (AssemblyName_t894705941 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Object::ToString() extern "C" String_t* Object_ToString_m853381981 (Il2CppObject * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Security.Cryptography.RSA Mono.Security.Cryptography.CryptoConvert::FromCapiPublicKeyBlob(System.Byte[],System.Int32) extern "C" RSA_t3719518354 * CryptoConvert_FromCapiPublicKeyBlob_m812595523 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___blob0, int32_t ___offset1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Security.Cryptography.RSA Mono.Security.Cryptography.CryptoConvert::FromCapiPublicKeyBlob(System.Byte[]) extern "C" RSA_t3719518354 * CryptoConvert_FromCapiPublicKeyBlob_m547807126 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___blob0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.AssemblyName::get_IsPublicKeyValid() extern "C" bool AssemblyName_get_IsPublicKeyValid_m188320564 (AssemblyName_t894705941 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Security.SecurityException::.ctor(System.String) extern "C" void SecurityException__ctor_m1484114982 (SecurityException_t887327375 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Byte[] System.Reflection.AssemblyName::ComputePublicKeyToken() extern "C" ByteU5BU5D_t3397334013* AssemblyName_ComputePublicKeyToken_m2254215863 (AssemblyName_t894705941 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Security.Cryptography.SHA1 System.Security.Cryptography.SHA1::Create() extern "C" SHA1_t3336793149 * SHA1_Create_m139442991 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Byte[] System.Security.Cryptography.HashAlgorithm::ComputeHash(System.Byte[]) extern "C" ByteU5BU5D_t3397334013* HashAlgorithm_ComputeHash_m3637856778 (HashAlgorithm_t2624936259 * __this, ByteU5BU5D_t3397334013* ___buffer0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Array::Copy(System.Array,System.Int32,System.Array,System.Int32,System.Int32) extern "C" void Array_Copy_m3808317496 (Il2CppObject * __this /* static, unused */, Il2CppArray * ___sourceArray0, int32_t ___sourceIndex1, Il2CppArray * ___destinationArray2, int32_t ___destinationIndex3, int32_t ___length4, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Array::Reverse(System.Array,System.Int32,System.Int32) extern "C" void Array_Reverse_m3433347928 (Il2CppObject * __this /* static, unused */, Il2CppArray * ___array0, int32_t ___index1, int32_t ___length2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.Serialization.SerializationInfo::AddValue(System.String,System.Int32) extern "C" void SerializationInfo_AddValue_m902275108 (SerializationInfo_t228987430 * __this, String_t* ___name0, int32_t ___value1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.AssemblyName::set_Version(System.Version) extern "C" void AssemblyName_set_Version_m1012722441 (AssemblyName_t894705941 * __this, Version_t1755874712 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Binder/Default::.ctor() extern "C" void Default__ctor_m172834064 (Default_t3956931304 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.TargetParameterCountException::.ctor() extern "C" void TargetParameterCountException__ctor_m1256521036 (TargetParameterCountException_t1554451430 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Binder::GetDerivedLevel(System.Type) extern "C" int32_t Binder_GetDerivedLevel_m1809808744 (Il2CppObject * __this /* static, unused */, Type_t * ___type0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.AmbiguousMatchException::.ctor() extern "C" void AmbiguousMatchException__ctor_m2088048346 (AmbiguousMatchException_t1406414556 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Binder::.ctor() extern "C" void Binder__ctor_m1361613966 (Binder_t3404612058 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Object::GetType() extern "C" Type_t * Object_GetType_m191970594 (Il2CppObject * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodBase System.Reflection.Binder/Default::SelectMethod(System.Reflection.BindingFlags,System.Reflection.MethodBase[],System.Type[],System.Reflection.ParameterModifier[],System.Boolean) extern "C" MethodBase_t904190842 * Default_SelectMethod_m3081239996 (Default_t3956931304 * __this, int32_t ___bindingAttr0, MethodBaseU5BU5D_t2597254495* ___match1, TypeU5BU5D_t1664964607* ___types2, ParameterModifierU5BU5D_t963192633* ___modifiers3, bool ___allowByRefMatch4, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Binder/Default::ReorderParameters(System.String[],System.Object[]&,System.Reflection.MethodBase) extern "C" void Default_ReorderParameters_m1877749093 (Default_t3956931304 * __this, StringU5BU5D_t1642385972* ___names0, ObjectU5BU5D_t3614634134** ___args1, MethodBase_t904190842 * ___selected2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Array::Copy(System.Array,System.Array,System.Int32) extern "C" void Array_Copy_m2363740072 (Il2CppObject * __this /* static, unused */, Il2CppArray * ___sourceArray0, Il2CppArray * ___destinationArray1, int32_t ___length2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsArray() extern "C" bool Type_get_IsArray_m811277129 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Binder/Default::IsArrayAssignable(System.Type,System.Type) extern "C" bool Default_IsArrayAssignable_m3862319150 (Il2CppObject * __this /* static, unused */, Type_t * ___object_type0, Type_t * ___target_type1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsByRef() extern "C" bool Type_get_IsByRef_m3523465500 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Binder/Default::check_type(System.Type,System.Type) extern "C" bool Default_check_type_m2363631305 (Il2CppObject * __this /* static, unused */, Type_t * ___from0, Type_t * ___to1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsEnum() extern "C" bool Type_get_IsEnum_m313908919 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object System.Enum::ToObject(System.Type,System.Object) extern "C" Il2CppObject * Enum_ToObject_m2460371738 (Il2CppObject * __this /* static, unused */, Type_t * ___enumType0, Il2CppObject * ___value1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsPointer() extern "C" bool Type_get_IsPointer_m3832342327 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object System.Convert::ChangeType(System.Object,System.Type) extern "C" Il2CppObject * Convert_ChangeType_m1630780412 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___value0, Type_t * ___conversionType1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsInterface() extern "C" bool Type_get_IsInterface_m3583817465 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Enum::GetUnderlyingType(System.Type) extern "C" Type_t * Enum_GetUnderlyingType_m3513899012 (Il2CppObject * __this /* static, unused */, Type_t * ___enumType0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.TypeCode System.Type::GetTypeCode(System.Type) extern "C" int32_t Type_GetTypeCode_m1044483454 (Il2CppObject * __this /* static, unused */, Type_t * ___type0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsValueType() extern "C" bool Type_get_IsValueType_m1733572463 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Attribute::IsDefined(System.Reflection.ParameterInfo,System.Type) extern "C" bool Attribute_IsDefined_m2186700650 (Il2CppObject * __this /* static, unused */, ParameterInfo_t2249040075 * ___element0, Type_t * ___attributeType1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Binder/Default::check_arguments(System.Type[],System.Reflection.ParameterInfo[],System.Boolean) extern "C" bool Default_check_arguments_m3406020270 (Il2CppObject * __this /* static, unused */, TypeU5BU5D_t1664964607* ___types0, ParameterInfoU5BU5D_t2275869610* ___args1, bool ___allowByRefMatch2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodBase System.Reflection.Binder/Default::GetBetterMethod(System.Reflection.MethodBase,System.Reflection.MethodBase,System.Type[]) extern "C" MethodBase_t904190842 * Default_GetBetterMethod_m4255740863 (Default_t3956931304 * __this, MethodBase_t904190842 * ___m10, MethodBase_t904190842 * ___m21, TypeU5BU5D_t1664964607* ___types2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Binder/Default::CompareCloserType(System.Type,System.Type) extern "C" int32_t Default_CompareCloserType_m1367126249 (Default_t3956931304 * __this, Type_t * ___t10, Type_t * ___t21, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_HasElementType() extern "C" bool Type_get_HasElementType_m3319917896 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Array::IndexOf<System.Type>(!!0[],!!0) #define Array_IndexOf_TisType_t_m4216821136(__this /* static, unused */, p0, p1, method) (( int32_t (*) (Il2CppObject * /* static, unused */, TypeU5BU5D_t1664964607*, Type_t *, const MethodInfo*))Array_IndexOf_TisIl2CppObject_m2032877681_gshared)(__this /* static, unused */, p0, p1, method) // System.Int32 System.Reflection.Binder/Default::check_arguments_with_score(System.Type[],System.Reflection.ParameterInfo[]) extern "C" int32_t Default_check_arguments_with_score_m1714931543 (Il2CppObject * __this /* static, unused */, TypeU5BU5D_t1664964607* ___types0, ParameterInfoU5BU5D_t2275869610* ___args1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Binder/Default::check_type_with_score(System.Type,System.Type) extern "C" int32_t Default_check_type_with_score_m58148013 (Il2CppObject * __this /* static, unused */, Type_t * ___from0, Type_t * ___to1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MethodBase::.ctor() extern "C" void MethodBase__ctor_m3951051358 (MethodBase_t904190842 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !!0[] System.Reflection.CustomAttributeData::UnboxValues<System.Reflection.CustomAttributeTypedArgument>(System.Object[]) #define CustomAttributeData_UnboxValues_TisCustomAttributeTypedArgument_t1498197914_m2561215702(__this /* static, unused */, p0, method) (( CustomAttributeTypedArgumentU5BU5D_t1075686591* (*) (Il2CppObject * /* static, unused */, ObjectU5BU5D_t3614634134*, const MethodInfo*))CustomAttributeData_UnboxValues_TisCustomAttributeTypedArgument_t1498197914_m2561215702_gshared)(__this /* static, unused */, p0, method) // System.Collections.ObjectModel.ReadOnlyCollection`1<!!0> System.Array::AsReadOnly<System.Reflection.CustomAttributeTypedArgument>(!!0[]) #define Array_AsReadOnly_TisCustomAttributeTypedArgument_t1498197914_m2855930084(__this /* static, unused */, p0, method) (( ReadOnlyCollection_1_t1683983606 * (*) (Il2CppObject * /* static, unused */, CustomAttributeTypedArgumentU5BU5D_t1075686591*, const MethodInfo*))Array_AsReadOnly_TisCustomAttributeTypedArgument_t1498197914_m2855930084_gshared)(__this /* static, unused */, p0, method) // !!0[] System.Reflection.CustomAttributeData::UnboxValues<System.Reflection.CustomAttributeNamedArgument>(System.Object[]) #define CustomAttributeData_UnboxValues_TisCustomAttributeNamedArgument_t94157543_m2789115353(__this /* static, unused */, p0, method) (( CustomAttributeNamedArgumentU5BU5D_t3304067486* (*) (Il2CppObject * /* static, unused */, ObjectU5BU5D_t3614634134*, const MethodInfo*))CustomAttributeData_UnboxValues_TisCustomAttributeNamedArgument_t94157543_m2789115353_gshared)(__this /* static, unused */, p0, method) // System.Collections.ObjectModel.ReadOnlyCollection`1<!!0> System.Array::AsReadOnly<System.Reflection.CustomAttributeNamedArgument>(!!0[]) #define Array_AsReadOnly_TisCustomAttributeNamedArgument_t94157543_m2935638619(__this /* static, unused */, p0, method) (( ReadOnlyCollection_1_t279943235 * (*) (Il2CppObject * /* static, unused */, CustomAttributeNamedArgumentU5BU5D_t3304067486*, const MethodInfo*))Array_AsReadOnly_TisCustomAttributeNamedArgument_t94157543_m2935638619_gshared)(__this /* static, unused */, p0, method) // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeData> System.MonoCustomAttrs::GetCustomAttributesData(System.Reflection.ICustomAttributeProvider) extern "C" Il2CppObject* MonoCustomAttrs_GetCustomAttributesData_m550893105 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___obj0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.CustomAttributeTypedArgument::ToString() extern "C" String_t* CustomAttributeTypedArgument_ToString_m1091739553 (CustomAttributeTypedArgument_t1498197914 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.CustomAttributeNamedArgument::ToString() extern "C" String_t* CustomAttributeNamedArgument_ToString_m804774956 (CustomAttributeNamedArgument_t94157543 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Text.StringBuilder System.Text.StringBuilder::AppendFormat(System.String,System.Object[]) extern "C" StringBuilder_t1221177846 * StringBuilder_AppendFormat_m1879616656 (StringBuilder_t1221177846 * __this, String_t* ___format0, ObjectU5BU5D_t3614634134* ___args1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.CustomAttributeTypedArgument::Equals(System.Object) extern "C" bool CustomAttributeTypedArgument_Equals_m1555989603 (CustomAttributeTypedArgument_t1498197914 * __this, Il2CppObject * ___obj0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.CustomAttributeNamedArgument::Equals(System.Object) extern "C" bool CustomAttributeNamedArgument_Equals_m2691468532 (CustomAttributeNamedArgument_t94157543 * __this, Il2CppObject * ___obj0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.CustomAttributeTypedArgument::GetHashCode() extern "C" int32_t CustomAttributeTypedArgument_GetHashCode_m999147081 (CustomAttributeTypedArgument_t1498197914 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.CustomAttributeNamedArgument::GetHashCode() extern "C" int32_t CustomAttributeNamedArgument_GetHashCode_m3715408876 (CustomAttributeNamedArgument_t94157543 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Concat(System.String,System.String,System.String,System.String) extern "C" String_t* String_Concat_m1561703559 (Il2CppObject * __this /* static, unused */, String_t* ___str00, String_t* ___str11, String_t* ___str22, String_t* ___str33, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Exception System.Reflection.Emit.AssemblyBuilder::not_supported() extern "C" Exception_t1927440687 * AssemblyBuilder_not_supported_m383946865 (AssemblyBuilder_t1646117627 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object System.Array::Clone() extern "C" Il2CppObject * Array_Clone_m768574314 (Il2CppArray * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.AssemblyName System.Reflection.Assembly::UnprotectedGetName() extern "C" AssemblyName_t894705941 * Assembly_UnprotectedGetName_m3014607408 (Assembly_t4268412390 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Byte[] Mono.Security.StrongName::get_PublicKey() extern "C" ByteU5BU5D_t3397334013* StrongName_get_PublicKey_m3777577320 (StrongName_t117835354 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.AssemblyName::SetPublicKey(System.Byte[]) extern "C" void AssemblyName_SetPublicKey_m1491402438 (AssemblyName_t894705941 * __this, ByteU5BU5D_t3397334013* ___publicKey0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Byte[] Mono.Security.StrongName::get_PublicKeyToken() extern "C" ByteU5BU5D_t3397334013* StrongName_get_PublicKeyToken_m1968460885 (StrongName_t117835354 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.AssemblyName::SetPublicKeyToken(System.Byte[]) extern "C" void AssemblyName_SetPublicKeyToken_m3032035167 (AssemblyName_t894705941 * __this, ByteU5BU5D_t3397334013* ___publicKeyToken0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.DerivedType::.ctor(System.Type) extern "C" void DerivedType__ctor_m4154637955 (DerivedType_t1016359113 * __this, Type_t * ___elementType0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Concat(System.String,System.String) extern "C" String_t* String_Concat_m2596409543 (Il2CppObject * __this /* static, unused */, String_t* ___str00, String_t* ___str11, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.ConstructorInfo::.ctor() extern "C" void ConstructorInfo__ctor_m3847352284 (ConstructorInfo_t2851816542 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.ConstructorBuilder::get_next_table_index(System.Object,System.Int32,System.Boolean) extern "C" int32_t ConstructorBuilder_get_next_table_index_m932085784 (ConstructorBuilder_t700974433 * __this, Il2CppObject * ___obj0, int32_t ___table1, bool ___inc2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Module System.Reflection.Emit.TypeBuilder::get_Module() extern "C" Module_t4282841206 * TypeBuilder_get_Module_m1668298460 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.MethodToken System.Reflection.Emit.ConstructorBuilder::GetToken() extern "C" MethodToken_t3991686330 ConstructorBuilder_GetToken_m3945412419 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.MethodToken::get_Token() extern "C" int32_t MethodToken_get_Token_m3846227497 (MethodToken_t3991686330 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ModuleBuilder::RegisterToken(System.Object,System.Int32) extern "C" void ModuleBuilder_RegisterToken_m1388342515 (ModuleBuilder_t4156028127 * __this, Il2CppObject * ___obj0, int32_t ___token1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.TypeBuilder::get_is_created() extern "C" bool TypeBuilder_get_is_created_m736553860 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.ConstructorBuilder::get_IsCompilerContext() extern "C" bool ConstructorBuilder_get_IsCompilerContext_m2796899803 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Exception System.Reflection.Emit.ConstructorBuilder::not_created() extern "C" Exception_t1927440687 * ConstructorBuilder_not_created_m2150488017 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.ParameterInfo[] System.Reflection.Emit.ConstructorBuilder::GetParametersInternal() extern "C" ParameterInfoU5BU5D_t2275869610* ConstructorBuilder_GetParametersInternal_m3775796783 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.ParameterInfo::.ctor(System.Reflection.Emit.ParameterBuilder,System.Type,System.Reflection.MemberInfo,System.Int32) extern "C" void ParameterInfo__ctor_m2149157062 (ParameterInfo_t2249040075 * __this, ParameterBuilder_t3344728474 * ___pb0, Type_t * ___type1, MemberInfo_t * ___member2, int32_t ___position3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Exception System.Reflection.Emit.ConstructorBuilder::not_supported() extern "C" Exception_t1927440687 * ConstructorBuilder_not_supported_m3687319507 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object[] System.MonoCustomAttrs::GetCustomAttributes(System.Reflection.ICustomAttributeProvider,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoCustomAttrs_GetCustomAttributes_m3069779582 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___obj0, bool ___inherit1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.ILGenerator System.Reflection.Emit.ConstructorBuilder::GetILGenerator(System.Int32) extern "C" ILGenerator_t99948092 * ConstructorBuilder_GetILGenerator_m1731893569 (ConstructorBuilder_t700974433 * __this, int32_t ___streamSize0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.TokenGenerator System.Reflection.Emit.ModuleBuilder::GetTokenGenerator() extern "C" Il2CppObject * ModuleBuilder_GetTokenGenerator_m4006065550 (ModuleBuilder_t4156028127 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ILGenerator::.ctor(System.Reflection.Module,System.Reflection.Emit.TokenGenerator,System.Int32) extern "C" void ILGenerator__ctor_m3365621387 (ILGenerator_t99948092 * __this, Module_t4282841206 * ___m0, Il2CppObject * ___token_gen1, int32_t ___size2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.MethodToken::.ctor(System.Int32) extern "C" void MethodToken__ctor_m3671357474 (MethodToken_t3991686330 * __this, int32_t ___val0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Module System.Reflection.MemberInfo::get_Module() extern "C" Module_t4282841206 * MemberInfo_get_Module_m3957426656 (MemberInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Emit.TypeBuilder::get_Name() extern "C" String_t* TypeBuilder_get_Name_m170882803 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.ILGenerator::Mono_GetCurrentOffset(System.Reflection.Emit.ILGenerator) extern "C" int32_t ILGenerator_Mono_GetCurrentOffset_m3553856682 (Il2CppObject * __this /* static, unused */, ILGenerator_t99948092 * ___ig0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Emit.ConstructorBuilder::get_Name() extern "C" String_t* ConstructorBuilder_get_Name_m134603075 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ILGenerator::label_fixup() extern "C" void ILGenerator_label_fixup_m1325994348 (ILGenerator_t99948092 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.TypeBuilder::get_next_table_index(System.Object,System.Int32,System.Boolean) extern "C" int32_t TypeBuilder_get_next_table_index_m1415870184 (TypeBuilder_t3308873219 * __this, Il2CppObject * ___obj0, int32_t ___table1, bool ___inc2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.TypeBuilder System.Reflection.Emit.ConstructorBuilder::get_TypeBuilder() extern "C" TypeBuilder_t3308873219 * ConstructorBuilder_get_TypeBuilder_m3442952231 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Assembly System.Reflection.Module::get_Assembly() extern "C" Assembly_t4268412390 * Module_get_Assembly_m3690289982 (Module_t4282841206 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.AssemblyBuilder::get_IsCompilerContext() extern "C" bool AssemblyBuilder_get_IsCompilerContext_m2864230005 (AssemblyBuilder_t1646117627 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Type::.ctor() extern "C" void Type__ctor_m882675131 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.NotSupportedException::.ctor() extern "C" void NotSupportedException__ctor_m3232764727 (NotSupportedException_t1793819818 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.TypeAttributes System.Type::get_Attributes() extern "C" int32_t Type_get_Attributes_m967681955 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ByRefType::.ctor(System.Type) extern "C" void ByRefType__ctor_m2068210324 (ByRefType_t1587086384 * __this, Type_t * ___elementType0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.DerivedType::create_unmanaged_type(System.Type) extern "C" void DerivedType_create_unmanaged_type_m3164160613 (Il2CppObject * __this /* static, unused */, Type_t * ___type0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Assembly System.Reflection.Emit.TypeBuilder::get_Assembly() extern "C" Assembly_t4268412390 * TypeBuilder_get_Assembly_m492491492 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Emit.TypeBuilder::get_AssemblyQualifiedName() extern "C" String_t* TypeBuilder_get_AssemblyQualifiedName_m2097258567 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.TypeBuilder::get_BaseType() extern "C" Type_t * TypeBuilder_get_BaseType_m4088672180 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.TypeBuilder::get_DeclaringType() extern "C" Type_t * TypeBuilder_get_DeclaringType_m3236598700 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Emit.TypeBuilder::get_FullName() extern "C" String_t* TypeBuilder_get_FullName_m1626507516 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Emit.TypeBuilder::get_Namespace() extern "C" String_t* TypeBuilder_get_Namespace_m3562783599 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.TypeBuilder::get_ReflectedType() extern "C" Type_t * TypeBuilder_get_ReflectedType_m2504081059 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.RuntimeTypeHandle System.Reflection.Emit.TypeBuilder::get_TypeHandle() extern "C" RuntimeTypeHandle_t2330101084 TypeBuilder_get_TypeHandle_m922348781 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.ConstructorInfo System.Type::GetConstructor(System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" ConstructorInfo_t2851816542 * Type_GetConstructor_m835344477 (Type_t * __this, int32_t ___bindingAttr0, Binder_t3404612058 * ___binder1, int32_t ___callConvention2, TypeU5BU5D_t1664964607* ___types3, ParameterModifierU5BU5D_t963192633* ___modifiers4, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.ConstructorInfo[] System.Reflection.Emit.TypeBuilder::GetConstructors(System.Reflection.BindingFlags) extern "C" ConstructorInfoU5BU5D_t1996683371* TypeBuilder_GetConstructors_m774120094 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object[] System.Reflection.Emit.TypeBuilder::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* TypeBuilder_GetCustomAttributes_m1637538574 (TypeBuilder_t3308873219 * __this, bool ___inherit0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object[] System.Reflection.Emit.TypeBuilder::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* TypeBuilder_GetCustomAttributes_m2702632361 (TypeBuilder_t3308873219 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.TypeBuilder::GetElementType() extern "C" Type_t * TypeBuilder_GetElementType_m3707448372 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.EventInfo System.Reflection.Emit.TypeBuilder::GetEvent(System.String,System.Reflection.BindingFlags) extern "C" EventInfo_t * TypeBuilder_GetEvent_m3876348075 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.FieldInfo System.Reflection.Emit.TypeBuilder::GetField(System.String,System.Reflection.BindingFlags) extern "C" FieldInfo_t * TypeBuilder_GetField_m2112455315 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.FieldInfo[] System.Reflection.Emit.TypeBuilder::GetFields(System.Reflection.BindingFlags) extern "C" FieldInfoU5BU5D_t125053523* TypeBuilder_GetFields_m3875401338 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.TypeBuilder::GetInterface(System.String,System.Boolean) extern "C" Type_t * TypeBuilder_GetInterface_m1082564294 (TypeBuilder_t3308873219 * __this, String_t* ___name0, bool ___ignoreCase1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type[] System.Reflection.Emit.TypeBuilder::GetInterfaces() extern "C" TypeU5BU5D_t1664964607* TypeBuilder_GetInterfaces_m1818658502 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodInfo System.Type::GetMethod(System.String,System.Reflection.BindingFlags) extern "C" MethodInfo_t * Type_GetMethod_m475234662 (Type_t * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodInfo System.Type::GetMethod(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" MethodInfo_t * Type_GetMethod_m3650909507 (Type_t * __this, String_t* ___name0, int32_t ___bindingAttr1, Binder_t3404612058 * ___binder2, int32_t ___callConvention3, TypeU5BU5D_t1664964607* ___types4, ParameterModifierU5BU5D_t963192633* ___modifiers5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodInfo[] System.Reflection.Emit.TypeBuilder::GetMethods(System.Reflection.BindingFlags) extern "C" MethodInfoU5BU5D_t152480188* TypeBuilder_GetMethods_m4196862738 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.PropertyInfo[] System.Reflection.Emit.TypeBuilder::GetProperties(System.Reflection.BindingFlags) extern "C" PropertyInfoU5BU5D_t1736152084* TypeBuilder_GetProperties_m2211539685 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Exception System.Reflection.Emit.EnumBuilder::CreateNotSupportedException() extern "C" Exception_t1927440687 * EnumBuilder_CreateNotSupportedException_m62763134 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object System.Reflection.Emit.TypeBuilder::InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]) extern "C" Il2CppObject * TypeBuilder_InvokeMember_m1992906893 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, Il2CppObject * ___target3, ObjectU5BU5D_t3614634134* ___args4, ParameterModifierU5BU5D_t963192633* ___modifiers5, CultureInfo_t3500843524 * ___culture6, StringU5BU5D_t1642385972* ___namedParameters7, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.TypeBuilder::IsDefined(System.Type,System.Boolean) extern "C" bool TypeBuilder_IsDefined_m3186251655 (TypeBuilder_t3308873219 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Exception System.Reflection.Emit.FieldBuilder::CreateNotSupportedException() extern "C" Exception_t1927440687 * FieldBuilder_CreateNotSupportedException_m3999938861 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Exception System.Reflection.Emit.GenericTypeParameterBuilder::not_supported() extern "C" Exception_t1927440687 * GenericTypeParameterBuilder_not_supported_m3784909043 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::get_BaseType() extern "C" Type_t * GenericTypeParameterBuilder_get_BaseType_m101683868 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.MethodBuilder::get_DeclaringType() extern "C" Type_t * MethodBuilder_get_DeclaringType_m2734207591 (MethodBuilder_t644187984 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::get_DeclaringType() extern "C" Type_t * GenericTypeParameterBuilder_get_DeclaringType_m1652924692 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.InvalidOperationException::.ctor() extern "C" void InvalidOperationException__ctor_m102359810 (InvalidOperationException_t721527559 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::Equals(System.Object) extern "C" bool Type_Equals_m1272005660 (Type_t * __this, Il2CppObject * ___o0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Type::GetHashCode() extern "C" int32_t Type_GetHashCode_m1150382148 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Type::MakeGenericType(System.Type[]) extern "C" Type_t * Type_MakeGenericType_m2765875033 (Type_t * __this, TypeU5BU5D_t1664964607* ___typeArguments0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Array::CopyTo(System.Array,System.Int32) extern "C" void Array_CopyTo_m4061033315 (Il2CppArray * __this, Il2CppArray * ___array0, int32_t ___index1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.OpCode::get_Size() extern "C" int32_t OpCode_get_Size_m481593949 (OpCode_t2247480392 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.StackBehaviour System.Reflection.Emit.OpCode::get_StackBehaviourPush() extern "C" int32_t OpCode_get_StackBehaviourPush_m1922356444 (OpCode_t2247480392 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.StackBehaviour System.Reflection.Emit.OpCode::get_StackBehaviourPop() extern "C" int32_t OpCode_get_StackBehaviourPop_m3787015663 (OpCode_t2247480392 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ILGenerator::make_room(System.Int32) extern "C" void ILGenerator_make_room_m373147874 (ILGenerator_t99948092 * __this, int32_t ___nbytes0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ILGenerator::ll_emit(System.Reflection.Emit.OpCode) extern "C" void ILGenerator_ll_emit_m2087647272 (ILGenerator_t99948092 * __this, OpCode_t2247480392 ___opcode0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ILGenerator::add_token_fixup(System.Reflection.MemberInfo) extern "C" void ILGenerator_add_token_fixup_m3261621911 (ILGenerator_t99948092 * __this, MemberInfo_t * ___mi0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ILGenerator::emit_int(System.Int32) extern "C" void ILGenerator_emit_int_m1061022647 (ILGenerator_t99948092 * __this, int32_t ___val0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Exception System.Reflection.Emit.MethodBuilder::NotSupported() extern "C" Exception_t1927440687 * MethodBuilder_NotSupported_m1885110731 (MethodBuilder_t644187984 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.MethodBase::get_IsVirtual() extern "C" bool MethodBase_get_IsVirtual_m1107721718 (MethodBase_t904190842 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Format(System.String,System.Object,System.Object) extern "C" String_t* String_Format_m1811873526 (Il2CppObject * __this /* static, unused */, String_t* ___format0, Il2CppObject * ___arg01, Il2CppObject * ___arg12, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.TypeLoadException::.ctor(System.String) extern "C" void TypeLoadException__ctor_m1903359728 (TypeLoadException_t723359155 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Emit.MethodBuilder::get_Name() extern "C" String_t* MethodBuilder_get_Name_m845253610 (MethodBuilder_t644187984 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Concat(System.String[]) extern "C" String_t* String_Concat_m626692867 (Il2CppObject * __this /* static, unused */, StringU5BU5D_t1642385972* ___values0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Object::Equals(System.Object) extern "C" bool Object_Equals_m753388391 (Il2CppObject * __this, Il2CppObject * ___obj0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.MethodToken::Equals(System.Object) extern "C" bool MethodToken_Equals_m533761838 (MethodToken_t3991686330 * __this, Il2CppObject * ___obj0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.MethodToken::GetHashCode() extern "C" int32_t MethodToken_GetHashCode_m1405492030 (MethodToken_t3991686330 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.TypeBuilder::CreateType() extern "C" Type_t * TypeBuilder_CreateType_m4126056124 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.ModuleBuilder::getToken(System.Reflection.Emit.ModuleBuilder,System.Object) extern "C" int32_t ModuleBuilder_getToken_m972612049 (Il2CppObject * __this /* static, unused */, ModuleBuilder_t4156028127 * ___mb0, Il2CppObject * ___obj1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ModuleBuilderTokenGenerator::.ctor(System.Reflection.Emit.ModuleBuilder) extern "C" void ModuleBuilderTokenGenerator__ctor_m1041652642 (ModuleBuilderTokenGenerator_t578872653 * __this, ModuleBuilder_t4156028127 * ___mb0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.ModuleBuilder::GetToken(System.Reflection.MemberInfo) extern "C" int32_t ModuleBuilder_GetToken_m4190668737 (ModuleBuilder_t4156028127 * __this, MemberInfo_t * ___member0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.OpCode::.ctor(System.Int32,System.Int32) extern "C" void OpCode__ctor_m3329993003 (OpCode_t2247480392 * __this, int32_t ___p0, int32_t ___q1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Emit.OpCode::get_Name() extern "C" String_t* OpCode_get_Name_m3225695398 (OpCode_t2247480392 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.OpCode::GetHashCode() extern "C" int32_t OpCode_GetHashCode_m2974727122 (OpCode_t2247480392 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.OpCode::Equals(System.Object) extern "C" bool OpCode_Equals_m3738130494 (OpCode_t2247480392 * __this, Il2CppObject * ___obj0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.Emit.OpCode::ToString() extern "C" String_t* OpCode_ToString_m854294924 (OpCode_t2247480392 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Exception System.Reflection.Emit.PropertyBuilder::not_supported() extern "C" Exception_t1927440687 * PropertyBuilder_not_supported_m143748788 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.TypeBuilder::get_IsCompilerContext() extern "C" bool TypeBuilder_get_IsCompilerContext_m3623403919 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.TypeBuilder::check_created() extern "C" void TypeBuilder_check_created_m2929267877 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.CallingConventions System.Reflection.Emit.ConstructorBuilder::get_CallingConvention() extern "C" int32_t ConstructorBuilder_get_CallingConvention_m443074051 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Binder System.Reflection.Binder::get_DefaultBinder() extern "C" Binder_t3404612058 * Binder_get_DefaultBinder_m965620943 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.ConstructorBuilder System.Reflection.Emit.TypeBuilder::DefineConstructor(System.Reflection.MethodAttributes,System.Reflection.CallingConventions,System.Type[],System.Type[][],System.Type[][]) extern "C" ConstructorBuilder_t700974433 * TypeBuilder_DefineConstructor_m2972481149 (TypeBuilder_t3308873219 * __this, int32_t ___attributes0, int32_t ___callingConvention1, TypeU5BU5D_t1664964607* ___parameterTypes2, TypeU5BU5DU5BU5D_t2318378278* ___requiredCustomModifiers3, TypeU5BU5DU5BU5D_t2318378278* ___optionalCustomModifiers4, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.TypeBuilder::check_not_created() extern "C" void TypeBuilder_check_not_created_m2785532739 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ConstructorBuilder::.ctor(System.Reflection.Emit.TypeBuilder,System.Reflection.MethodAttributes,System.Reflection.CallingConventions,System.Type[],System.Type[][],System.Type[][]) extern "C" void ConstructorBuilder__ctor_m2001998159 (ConstructorBuilder_t700974433 * __this, TypeBuilder_t3308873219 * ___tb0, int32_t ___attributes1, int32_t ___callingConvention2, TypeU5BU5D_t1664964607* ___parameterTypes3, TypeU5BU5DU5BU5D_t2318378278* ___paramModReq4, TypeU5BU5DU5BU5D_t2318378278* ___paramModOpt5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.ConstructorInfo System.Type::GetConstructor(System.Reflection.BindingFlags,System.Reflection.Binder,System.Type[],System.Reflection.ParameterModifier[]) extern "C" ConstructorInfo_t2851816542 * Type_GetConstructor_m663514781 (Type_t * __this, int32_t ___bindingAttr0, Binder_t3404612058 * ___binder1, TypeU5BU5D_t1664964607* ___types2, ParameterModifierU5BU5D_t963192633* ___modifiers3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.ConstructorBuilder System.Reflection.Emit.TypeBuilder::DefineConstructor(System.Reflection.MethodAttributes,System.Reflection.CallingConventions,System.Type[]) extern "C" ConstructorBuilder_t700974433 * TypeBuilder_DefineConstructor_m3431248509 (TypeBuilder_t3308873219 * __this, int32_t ___attributes0, int32_t ___callingConvention1, TypeU5BU5D_t1664964607* ___parameterTypes2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.ILGenerator System.Reflection.Emit.ConstructorBuilder::GetILGenerator() extern "C" ILGenerator_t99948092 * ConstructorBuilder_GetILGenerator_m1407935730 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodAttributes System.Reflection.Emit.MethodBuilder::get_Attributes() extern "C" int32_t MethodBuilder_get_Attributes_m3678061338 (MethodBuilder_t644187984 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.String::op_Inequality(System.String,System.String) extern "C" bool String_op_Inequality_m304203149 (Il2CppObject * __this /* static, unused */, String_t* ___a0, String_t* ___b1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.TypeBuilder::SetParent(System.Type) extern "C" void TypeBuilder_SetParent_m387557893 (TypeBuilder_t3308873219 * __this, Type_t * ___parent0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.TypeBuilder::create_generic_class() extern "C" void TypeBuilder_create_generic_class_m986834171 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.FieldBuilder::get_FieldType() extern "C" Type_t * FieldBuilder_get_FieldType_m2267463269 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.FieldInfo::get_IsStatic() extern "C" bool FieldInfo_get_IsStatic_m1411173225 (FieldInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.TypeBuilder::is_nested_in(System.Type) extern "C" bool TypeBuilder_is_nested_in_m3557898035 (TypeBuilder_t3308873219 * __this, Type_t * ___t0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Assembly System.AppDomain::DoTypeResolve(System.Object) extern "C" Assembly_t4268412390 * AppDomain_DoTypeResolve_m381738210 (AppDomain_t2719102437 * __this, Il2CppObject * ___name_or_tb0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsSealed() extern "C" bool Type_get_IsSealed_m2380985836 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Concat(System.Object[]) extern "C" String_t* String_Concat_m3881798623 (Il2CppObject * __this /* static, unused */, ObjectU5BU5D_t3614634134* ___args0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsAbstract() extern "C" bool Type_get_IsAbstract_m2532060002 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.MethodBase::get_IsAbstract() extern "C" bool MethodBase_get_IsAbstract_m3521819231 (MethodBase_t904190842 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Concat(System.Object,System.Object) extern "C" String_t* String_Concat_m56707527 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___arg00, Il2CppObject * ___arg11, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.MethodBuilder::check_override() extern "C" void MethodBuilder_check_override_m3042345804 (MethodBuilder_t644187984 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.MethodBuilder::fixup() extern "C" void MethodBuilder_fixup_m4217981161 (MethodBuilder_t644187984 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.TypeAttributes System.Reflection.Emit.TypeBuilder::GetAttributeFlagsImpl() extern "C" int32_t TypeBuilder_GetAttributeFlagsImpl_m2593449699 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.TypeBuilder::has_ctor_method() extern "C" bool TypeBuilder_has_ctor_method_m3449702467 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.ConstructorBuilder System.Reflection.Emit.TypeBuilder::DefineDefaultConstructor(System.Reflection.MethodAttributes) extern "C" ConstructorBuilder_t700974433 * TypeBuilder_DefineDefaultConstructor_m2225828699 (TypeBuilder_t3308873219 * __this, int32_t ___attributes0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.ConstructorBuilder::fixup() extern "C" void ConstructorBuilder_fixup_m836985654 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.Emit.TypeBuilder::create_runtime_class(System.Reflection.Emit.TypeBuilder) extern "C" Type_t * TypeBuilder_create_runtime_class_m2719530260 (TypeBuilder_t3308873219 * __this, TypeBuilder_t3308873219 * ___tb0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.ConstructorInfo[] System.Reflection.Emit.TypeBuilder::GetConstructorsInternal(System.Reflection.BindingFlags) extern "C" ConstructorInfoU5BU5D_t1996683371* TypeBuilder_GetConstructorsInternal_m2426192231 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.ArrayList::.ctor() extern "C" void ArrayList__ctor_m4012174379 (ArrayList_t4252133567 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodAttributes System.Reflection.Emit.ConstructorBuilder::get_Attributes() extern "C" int32_t ConstructorBuilder_get_Attributes_m2137353707 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.MethodBase::get_IsStatic() extern "C" bool MethodBase_get_IsStatic_m1015686807 (MethodBase_t904190842 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.String::Compare(System.String,System.String,System.Boolean) extern "C" int32_t String_Compare_m2851607672 (Il2CppObject * __this /* static, unused */, String_t* ___strA0, String_t* ___strB1, bool ___ignoreCase2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodInfo[] System.Reflection.Emit.TypeBuilder::GetMethodsByName(System.String,System.Reflection.BindingFlags,System.Boolean,System.Type) extern "C" MethodInfoU5BU5D_t152480188* TypeBuilder_GetMethodsByName_m229541072 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___bindingAttr1, bool ___ignoreCase2, Type_t * ___reflected_type3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodBase System.Reflection.Binder::FindMostDerivedMatch(System.Reflection.MethodBase[]) extern "C" MethodBase_t904190842 * Binder_FindMostDerivedMatch_m2621831847 (Il2CppObject * __this /* static, unused */, MethodBaseU5BU5D_t2597254495* ___match0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Exception System.Reflection.Emit.TypeBuilder::not_supported() extern "C" Exception_t1927440687 * TypeBuilder_not_supported_m3178173643 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::type_is_subtype_of(System.Type,System.Type,System.Boolean) extern "C" bool Type_type_is_subtype_of_m312896768 (Il2CppObject * __this /* static, unused */, Type_t * ___a0, Type_t * ___b1, bool ___check_interfaces2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Emit.TypeBuilder::setup_internal_class(System.Reflection.Emit.TypeBuilder) extern "C" void TypeBuilder_setup_internal_class_m235812026 (TypeBuilder_t3308873219 * __this, TypeBuilder_t3308873219 * ___tb0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.ModuleBuilder::get_next_table_index(System.Object,System.Int32,System.Boolean) extern "C" int32_t ModuleBuilder_get_next_table_index_m1552645388 (ModuleBuilder_t4156028127 * __this, Il2CppObject * ___obj0, int32_t ___table1, bool ___inc2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::IsAssignableFrom(System.Type) extern "C" bool Type_IsAssignableFrom_m907986231 (Type_t * __this, Type_t * ___c0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::IsSubclassOf(System.Type) extern "C" bool Type_IsSubclassOf_m2450899481 (Type_t * __this, Type_t * ___c0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Emit.TypeBuilder::get_IsGenericTypeDefinition() extern "C" bool TypeBuilder_get_IsGenericTypeDefinition_m1652226431 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.InteropServices.MarshalAsAttribute::.ctor(System.Runtime.InteropServices.UnmanagedType) extern "C" void MarshalAsAttribute__ctor_m1892084128 (MarshalAsAttribute_t2900773360 * __this, int32_t ___unmanagedType0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MemberInfo::.ctor() extern "C" void MemberInfo__ctor_m2808577188 (MemberInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.EventInfo/AddEventAdapter::Invoke(System.Object,System.Delegate) extern "C" void AddEventAdapter_Invoke_m3970567975 (AddEventAdapter_t1766862959 * __this, Il2CppObject * ____this0, Delegate_t3022476291 * ___dele1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.IntPtr System.RuntimeFieldHandle::get_Value() extern "C" IntPtr_t RuntimeFieldHandle_get_Value_m3963757144 (RuntimeFieldHandle_t2331729674 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.IntPtr::op_Equality(System.IntPtr,System.IntPtr) extern "C" bool IntPtr_op_Equality_m1573482188 (Il2CppObject * __this /* static, unused */, IntPtr_t ___value10, IntPtr_t ___value21, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.FieldInfo System.Reflection.FieldInfo::internal_from_handle_type(System.IntPtr,System.IntPtr) extern "C" FieldInfo_t * FieldInfo_internal_from_handle_type_m3419926447 (Il2CppObject * __this /* static, unused */, IntPtr_t ___field_handle0, IntPtr_t ___type_handle1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Emit.UnmanagedMarshal System.Reflection.FieldInfo::GetUnmanagedMarshal() extern "C" UnmanagedMarshal_t4270021860 * FieldInfo_GetUnmanagedMarshal_m3869098058 (FieldInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.FieldInfo::get_IsNotSerialized() extern "C" bool FieldInfo_get_IsNotSerialized_m2322769148 (FieldInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsExplicitLayout() extern "C" bool Type_get_IsExplicitLayout_m1489853866 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.NonSerializedAttribute::.ctor() extern "C" void NonSerializedAttribute__ctor_m1638643584 (NonSerializedAttribute_t399263003 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.InteropServices.FieldOffsetAttribute::.ctor(System.Int32) extern "C" void FieldOffsetAttribute__ctor_m3347191262 (FieldOffsetAttribute_t1553145711 * __this, int32_t ___offset0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Runtime.InteropServices.MarshalAsAttribute System.Reflection.Emit.UnmanagedMarshal::ToMarshalAsAttribute() extern "C" MarshalAsAttribute_t2900773360 * UnmanagedMarshal_ToMarshalAsAttribute_m3695569337 (UnmanagedMarshal_t4270021860 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.MemberFilter::Invoke(System.Reflection.MemberInfo,System.Object) extern "C" bool MemberFilter_Invoke_m2927312774 (MemberFilter_t3405857066 * __this, MemberInfo_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.Assembly System.Reflection.Assembly::Load(System.String) extern "C" Assembly_t4268412390 * Assembly_Load_m902205655 (Il2CppObject * __this /* static, unused */, String_t* ___assemblyString0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MemberInfoSerializationHolder::Serialize(System.Runtime.Serialization.SerializationInfo,System.String,System.Type,System.String,System.Reflection.MemberTypes,System.Type[]) extern "C" void MemberInfoSerializationHolder_Serialize_m4243060728 (Il2CppObject * __this /* static, unused */, SerializationInfo_t228987430 * ___info0, String_t* ___name1, Type_t * ___klass2, String_t* ___signature3, int32_t ___type4, TypeU5BU5D_t1664964607* ___genericArguments5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.Serialization.SerializationInfo::SetType(System.Type) extern "C" void SerializationInfo_SetType_m499725474 (SerializationInfo_t228987430 * __this, Type_t * ___type0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.Serialization.SerializationInfo::AddValue(System.String,System.Object,System.Type) extern "C" void SerializationInfo_AddValue_m1781549036 (SerializationInfo_t228987430 * __this, String_t* ___name0, Il2CppObject * ___value1, Type_t * ___type2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.String::Equals(System.String) extern "C" bool String_Equals_m2633592423 (String_t* __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.Serialization.SerializationException::.ctor(System.String) extern "C" void SerializationException__ctor_m1019897788 (SerializationException_t753258759 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.PropertyInfo System.Type::GetProperty(System.String,System.Reflection.BindingFlags) extern "C" PropertyInfo_t * Type_GetProperty_m1510204374 (Type_t * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Format(System.String,System.Object) extern "C" String_t* String_Format_m2024975688 (Il2CppObject * __this /* static, unused */, String_t* ___format0, Il2CppObject * ___arg01, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.IntPtr System.RuntimeMethodHandle::get_Value() extern "C" IntPtr_t RuntimeMethodHandle_get_Value_m333629197 (RuntimeMethodHandle_t894824333 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodBase System.Reflection.MethodBase::GetMethodFromIntPtr(System.IntPtr,System.IntPtr) extern "C" MethodBase_t904190842 * MethodBase_GetMethodFromIntPtr_m1014299957 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, IntPtr_t ___declaringType1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodBase System.Reflection.MethodBase::GetMethodFromHandleInternalType(System.IntPtr,System.IntPtr) extern "C" MethodBase_t904190842 * MethodBase_GetMethodFromHandleInternalType_m570034609 (Il2CppObject * __this /* static, unused */, IntPtr_t ___method_handle0, IntPtr_t ___type_handle1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Reflection.Emit.MethodBuilder::get_next_table_index(System.Object,System.Int32,System.Boolean) extern "C" int32_t MethodBuilder_get_next_table_index_m683309027 (MethodBuilder_t644187984 * __this, Il2CppObject * ___obj0, int32_t ___table1, bool ___inc2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Exception::.ctor(System.String) extern "C" void Exception__ctor_m485833136 (Exception_t1927440687 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.Missing::.ctor() extern "C" void Missing__ctor_m4227264620 (Missing_t1033855606 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.TypeFilter::.ctor(System.Object,System.IntPtr) extern "C" void TypeFilter__ctor_m1798016172 (TypeFilter_t2905709404 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.UnitySerializationHolder::GetModuleData(System.Reflection.Module,System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void UnitySerializationHolder_GetModuleData_m2945403213 (Il2CppObject * __this /* static, unused */, Module_t4282841206 * ___instance0, SerializationInfo_t228987430 * ___info1, StreamingContext_t1417235061 ___ctx2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type[] System.Reflection.Module::InternalGetTypes() extern "C" TypeU5BU5D_t1664964607* Module_InternalGetTypes_m4286760634 (Module_t4282841206 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.String::EndsWith(System.String) extern "C" bool String_EndsWith_m568509976 (String_t* __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Substring(System.Int32,System.Int32) extern "C" String_t* String_Substring_m12482732 (String_t* __this, int32_t ___startIndex0, int32_t ___length1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.String::StartsWith(System.String) extern "C" bool String_StartsWith_m1841920685 (String_t* __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::ToLower() extern "C" String_t* String_ToLower_m2994460523 (String_t* __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.ParameterInfo[] System.Reflection.MonoMethodInfo::GetParametersInfo(System.IntPtr,System.Reflection.MemberInfo) extern "C" ParameterInfoU5BU5D_t2275869610* MonoMethodInfo_GetParametersInfo_m3456861922 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, MemberInfo_t * ___member1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.TargetParameterCountException::.ctor(System.String) extern "C" void TargetParameterCountException__ctor_m2760108938 (TargetParameterCountException_t1554451430 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.Binder::ConvertArgs(System.Reflection.Binder,System.Object[],System.Reflection.ParameterInfo[],System.Globalization.CultureInfo) extern "C" bool Binder_ConvertArgs_m2999223281 (Il2CppObject * __this /* static, unused */, Binder_t3404612058 * ___binder0, ObjectU5BU5D_t3614634134* ___args1, ParameterInfoU5BU5D_t2275869610* ___pinfo2, CultureInfo_t3500843524 * ___culture3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Concat(System.Object,System.Object,System.Object) extern "C" String_t* String_Concat_m2000667605 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___arg00, Il2CppObject * ___arg11, Il2CppObject * ___arg22, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.MemberAccessException::.ctor(System.String) extern "C" void MemberAccessException__ctor_m111743236 (MemberAccessException_t2005094827 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object System.Reflection.MonoCMethod::InternalInvoke(System.Object,System.Object[],System.Exception&) extern "C" Il2CppObject * MonoCMethod_InternalInvoke_m2816771359 (MonoCMethod_t611352247 * __this, Il2CppObject * ___obj0, ObjectU5BU5D_t3614634134* ___parameters1, Exception_t1927440687 ** ___exc2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.TargetInvocationException::.ctor(System.Exception) extern "C" void TargetInvocationException__ctor_m1059845570 (TargetInvocationException_t4098620458 * __this, Exception_t1927440687 * ___inner0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.RuntimeMethodHandle::.ctor(System.IntPtr) extern "C" void RuntimeMethodHandle__ctor_m1162528746 (RuntimeMethodHandle_t894824333 * __this, IntPtr_t ___v0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodAttributes System.Reflection.MonoMethodInfo::GetAttributes(System.IntPtr) extern "C" int32_t MonoMethodInfo_GetAttributes_m2535493430 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.CallingConventions System.Reflection.MonoMethodInfo::GetCallingConvention(System.IntPtr) extern "C" int32_t MonoMethodInfo_GetCallingConvention_m3095860872 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.MonoMethodInfo::GetDeclaringType(System.IntPtr) extern "C" Type_t * MonoMethodInfo_GetDeclaringType_m4186531677 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.MonoMethod::get_name(System.Reflection.MethodBase) extern "C" String_t* MonoMethod_get_name_m1503581873 (Il2CppObject * __this /* static, unused */, MethodBase_t904190842 * ___method0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MemberInfoSerializationHolder::Serialize(System.Runtime.Serialization.SerializationInfo,System.String,System.Type,System.String,System.Reflection.MemberTypes) extern "C" void MemberInfoSerializationHolder_Serialize_m1949812823 (Il2CppObject * __this /* static, unused */, SerializationInfo_t228987430 * ___info0, String_t* ___name1, Type_t * ___klass2, String_t* ___signature3, int32_t ___type4, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.EventInfo::.ctor() extern "C" void EventInfo__ctor_m1190141300 (EventInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MonoEventInfo System.Reflection.MonoEventInfo::GetEventInfo(System.Reflection.MonoEvent) extern "C" MonoEventInfo_t2190036573 MonoEventInfo_GetEventInfo_m2331957186 (Il2CppObject * __this /* static, unused */, MonoEvent_t * ___ev0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.MethodBase::get_IsPublic() extern "C" bool MethodBase_get_IsPublic_m479656180 (MethodBase_t904190842 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.EventInfo::get_EventHandlerType() extern "C" Type_t * EventInfo_get_EventHandlerType_m2787680849 (EventInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.MonoEvent::get_Name() extern "C" String_t* MonoEvent_get_Name_m2796714646 (MonoEvent_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.MonoEvent::get_ReflectedType() extern "C" Type_t * MonoEvent_get_ReflectedType_m434281898 (MonoEvent_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Reflection.MonoEvent::ToString() extern "C" String_t* MonoEvent_ToString_m386956596 (MonoEvent_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MonoEventInfo::get_event_info(System.Reflection.MonoEvent,System.Reflection.MonoEventInfo&) extern "C" void MonoEventInfo_get_event_info_m781402243 (Il2CppObject * __this /* static, unused */, MonoEvent_t * ___ev0, MonoEventInfo_t2190036573 * ___info1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.FieldInfo::.ctor() extern "C" void FieldInfo__ctor_m1952545900 (FieldInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.MonoField::GetParentType(System.Boolean) extern "C" Type_t * MonoField_GetParentType_m2074626828 (MonoField_t * __this, bool ___declaring0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.TargetException::.ctor(System.String) extern "C" void TargetException__ctor_m3228808416 (TargetException_t1572104820 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Format(System.String,System.Object,System.Object,System.Object) extern "C" String_t* String_Format_m4262916296 (Il2CppObject * __this /* static, unused */, String_t* ___format0, Il2CppObject * ___arg01, Il2CppObject * ___arg12, Il2CppObject * ___arg23, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.FieldInfo::get_IsLiteral() extern "C" bool FieldInfo_get_IsLiteral_m267898096 (FieldInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MonoField::CheckGeneric() extern "C" void MonoField_CheckGeneric_m1527550038 (MonoField_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object System.Reflection.MonoField::GetValueInternal(System.Object) extern "C" Il2CppObject * MonoField_GetValueInternal_m1909282050 (MonoField_t * __this, Il2CppObject * ___obj0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.FieldAccessException::.ctor(System.String) extern "C" void FieldAccessException__ctor_m3893881490 (FieldAccessException_t1797813379 * __this, String_t* ___message0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MonoField::SetValueInternal(System.Reflection.FieldInfo,System.Object,System.Object) extern "C" void MonoField_SetValueInternal_m762249951 (Il2CppObject * __this /* static, unused */, FieldInfo_t * ___fi0, Il2CppObject * ___obj1, Il2CppObject * ___value2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MonoCMethod::.ctor() extern "C" void MonoCMethod__ctor_m2473049889 (MonoCMethod_t611352247 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MonoMethod::.ctor() extern "C" void MonoMethod__ctor_m4091684020 (MonoMethod_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MethodInfo::.ctor() extern "C" void MethodInfo__ctor_m1853540423 (MethodInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MonoMethod System.Reflection.MonoMethod::get_base_definition(System.Reflection.MonoMethod) extern "C" MonoMethod_t * MonoMethod_get_base_definition_m1625237055 (Il2CppObject * __this /* static, unused */, MonoMethod_t * ___method0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type System.Reflection.MonoMethodInfo::GetReturnType(System.IntPtr) extern "C" Type_t * MonoMethodInfo_GetReturnType_m2864247130 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object System.Reflection.MonoMethod::InternalInvoke(System.Object,System.Object[],System.Exception&) extern "C" Il2CppObject * MonoMethod_InternalInvoke_m4055929538 (MonoMethod_t * __this, Il2CppObject * ___obj0, ObjectU5BU5D_t3614634134* ___parameters1, Exception_t1927440687 ** ___exc2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MonoMethodInfo System.Reflection.MonoMethodInfo::GetMethodInfo(System.IntPtr) extern "C" MonoMethodInfo_t3646562144 MonoMethodInfo_GetMethodInfo_m3298558752 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.InteropServices.PreserveSigAttribute::.ctor() extern "C" void PreserveSigAttribute__ctor_m3423226067 (PreserveSigAttribute_t1564965109 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Runtime.InteropServices.DllImportAttribute System.Reflection.MonoMethod::GetDllImportAttribute(System.IntPtr) extern "C" DllImportAttribute_t3000813225 * MonoMethod_GetDllImportAttribute_m2757463479 (Il2CppObject * __this /* static, unused */, IntPtr_t ___mhandle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsClass() extern "C" bool Type_get_IsClass_m2968663946 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsPrimitive() extern "C" bool Type_get_IsPrimitive_m1522841565 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Type::get_IsNested() extern "C" bool Type_get_IsNested_m3671396733 (Type_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.MonoMethod::ShouldPrintFullName(System.Type) extern "C" bool MonoMethod_ShouldPrintFullName_m2343680861 (Il2CppObject * __this /* static, unused */, Type_t * ___type0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.ArgumentNullException::.ctor() extern "C" void ArgumentNullException__ctor_m911049464 (ArgumentNullException_t628810857 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodInfo System.Reflection.MonoMethod::MakeGenericMethod_impl(System.Type[]) extern "C" MethodInfo_t * MonoMethod_MakeGenericMethod_impl_m2063853616 (MonoMethod_t * __this, TypeU5BU5D_t1664964607* ___types0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MonoMethodInfo::get_method_info(System.IntPtr,System.Reflection.MonoMethodInfo&) extern "C" void MonoMethodInfo_get_method_info_m3630911979 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, MonoMethodInfo_t3646562144 * ___info1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.ParameterInfo[] System.Reflection.MonoMethodInfo::get_parameter_info(System.IntPtr,System.Reflection.MemberInfo) extern "C" ParameterInfoU5BU5D_t2275869610* MonoMethodInfo_get_parameter_info_m3554140855 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, MemberInfo_t * ___member1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.PropertyInfo::.ctor() extern "C" void PropertyInfo__ctor_m1808219471 (PropertyInfo_t * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MonoPropertyInfo::get_property_info(System.Reflection.MonoProperty,System.Reflection.MonoPropertyInfo&,System.Reflection.PInfo) extern "C" void MonoPropertyInfo_get_property_info_m556498347 (Il2CppObject * __this /* static, unused */, MonoProperty_t * ___prop0, MonoPropertyInfo_t486106184 * ___info1, int32_t ___req_info2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.MonoProperty::CachePropertyInfo(System.Reflection.PInfo) extern "C" void MonoProperty_CachePropertyInfo_m1437316683 (MonoProperty_t * __this, int32_t ___flags0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Reflection.ParameterInfo::.ctor(System.Reflection.ParameterInfo,System.Reflection.MemberInfo) extern "C" void ParameterInfo__ctor_m3204994840 (ParameterInfo_t2249040075 * __this, ParameterInfo_t2249040075 * ___pinfo0, MemberInfo_t * ___member1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Delegate System.Delegate::CreateDelegate(System.Type,System.Reflection.MethodInfo,System.Boolean) extern "C" Delegate_t3022476291 * Delegate_CreateDelegate_m3813023227 (Il2CppObject * __this /* static, unused */, Type_t * ___type0, MethodInfo_t * ___method1, bool ___throwOnBindFailure2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.MethodAccessException::.ctor() extern "C" void MethodAccessException__ctor_m3450464547 (MethodAccessException_t4093255254 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Delegate System.Delegate::CreateDelegate(System.Type,System.Object,System.Reflection.MethodInfo,System.Boolean) extern "C" Delegate_t3022476291 * Delegate_CreateDelegate_m3052767705 (Il2CppObject * __this /* static, unused */, Type_t * ___type0, Il2CppObject * ___firstArgument1, MethodInfo_t * ___method2, bool ___throwOnBindFailure3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Type[] System.Reflection.MonoPropertyInfo::GetTypeModifiers(System.Reflection.MonoProperty,System.Boolean) extern "C" TypeU5BU5D_t1664964607* MonoPropertyInfo_GetTypeModifiers_m184537257 (Il2CppObject * __this /* static, unused */, MonoProperty_t * ___prop0, bool ___optional1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Object System.Reflection.MonoProperty/GetterAdapter::Invoke(System.Object) extern "C" Il2CppObject * GetterAdapter_Invoke_m2777461448 (GetterAdapter_t1423755509 * __this, Il2CppObject * ____this0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.ParameterInfo::get_IsRetval() extern "C" bool ParameterInfo_get_IsRetval_m1881464570 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.ParameterInfo::get_IsIn() extern "C" bool ParameterInfo_get_IsIn_m1357865245 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.ParameterInfo::get_IsOut() extern "C" bool ParameterInfo_get_IsOut_m3097675062 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.ParameterInfo::get_IsOptional() extern "C" bool ParameterInfo_get_IsOptional_m2877290948 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.InteropServices.InAttribute::.ctor() extern "C" void InAttribute__ctor_m1401060713 (InAttribute_t1394050551 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.InteropServices.OptionalAttribute::.ctor() extern "C" void OptionalAttribute__ctor_m1739107582 (OptionalAttribute_t827982902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.InteropServices.OutAttribute::.ctor() extern "C" void OutAttribute__ctor_m1447235100 (OutAttribute_t1539424546 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Runtime.Serialization.SerializationInfo::GetBoolean(System.String) extern "C" bool SerializationInfo_GetBoolean_m3573708305 (SerializationInfo_t228987430 * __this, String_t* ___name0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Runtime.Serialization.SerializationInfo::AddValue(System.String,System.Boolean) extern "C" void SerializationInfo_AddValue_m1192926088 (SerializationInfo_t228987430 * __this, String_t* ___name0, bool ___value1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Exception::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void Exception__ctor_m3836998015 (Exception_t1927440687 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Exception::.ctor(System.String,System.Exception) extern "C" void Exception__ctor_m2453009240 (Exception_t1927440687 * __this, String_t* ___message0, Exception_t1927440687 * ___innerException1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Reflection.TypeFilter::Invoke(System.Type,System.Object) extern "C" bool TypeFilter_Invoke_m2156848151 (TypeFilter_t2905709404 * __this, Type_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.EventArgs::.ctor() extern "C" void EventArgs__ctor_m3696060910 (EventArgs_t3289624707 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void System.ObjectDisposedException::.ctor(System.String) extern "C" void ObjectDisposedException__ctor_m3156784572 (ObjectDisposedException_t2695136451 * __this, String_t* ___objectName0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ObjectDisposedException__ctor_m3156784572_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = Locale_GetText_m1954433032(NULL /*static, unused*/, _stringLiteral678640696, /*hidden argument*/NULL); InvalidOperationException__ctor_m2801133788(__this, L_0, /*hidden argument*/NULL); String_t* L_1 = ___objectName0; __this->set_obj_name_12(L_1); String_t* L_2 = Locale_GetText_m1954433032(NULL /*static, unused*/, _stringLiteral678640696, /*hidden argument*/NULL); __this->set_msg_13(L_2); return; } } // System.Void System.ObjectDisposedException::.ctor(System.String,System.String) extern "C" void ObjectDisposedException__ctor_m2844841908 (ObjectDisposedException_t2695136451 * __this, String_t* ___objectName0, String_t* ___message1, const MethodInfo* method) { { String_t* L_0 = ___message1; InvalidOperationException__ctor_m2801133788(__this, L_0, /*hidden argument*/NULL); String_t* L_1 = ___objectName0; __this->set_obj_name_12(L_1); String_t* L_2 = ___message1; __this->set_msg_13(L_2); return; } } // System.Void System.ObjectDisposedException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void ObjectDisposedException__ctor_m2122181801 (ObjectDisposedException_t2695136451 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ObjectDisposedException__ctor_m2122181801_MetadataUsageId); s_Il2CppMethodInitialized = true; } { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___context1; InvalidOperationException__ctor_m1817189395(__this, L_0, L_1, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_2 = ___info0; NullCheck(L_2); String_t* L_3 = SerializationInfo_GetString_m547109409(L_2, _stringLiteral163988570, /*hidden argument*/NULL); __this->set_obj_name_12(L_3); return; } } // System.String System.ObjectDisposedException::get_Message() extern "C" String_t* ObjectDisposedException_get_Message_m3704234053 (ObjectDisposedException_t2695136451 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_msg_13(); return L_0; } } // System.Void System.ObjectDisposedException::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void ObjectDisposedException_GetObjectData_m10776306 (ObjectDisposedException_t2695136451 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ObjectDisposedException_GetObjectData_m10776306_MetadataUsageId); s_Il2CppMethodInitialized = true; } { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___context1; Exception_GetObjectData_m2653827630(__this, L_0, L_1, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_2 = ___info0; String_t* L_3 = __this->get_obj_name_12(); NullCheck(L_2); SerializationInfo_AddValue_m1740888931(L_2, _stringLiteral163988570, L_3, /*hidden argument*/NULL); return; } } // System.Void System.ObsoleteAttribute::.ctor() extern "C" void ObsoleteAttribute__ctor_m842106750 (ObsoleteAttribute_t3878847927 * __this, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); return; } } // System.Void System.ObsoleteAttribute::.ctor(System.String) extern "C" void ObsoleteAttribute__ctor_m2711473620 (ObsoleteAttribute_t3878847927 * __this, String_t* ___message0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___message0; __this->set__message_0(L_0); return; } } // System.Void System.ObsoleteAttribute::.ctor(System.String,System.Boolean) extern "C" void ObsoleteAttribute__ctor_m834417715 (ObsoleteAttribute_t3878847927 * __this, String_t* ___message0, bool ___error1, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___message0; __this->set__message_0(L_0); bool L_1 = ___error1; __this->set__error_1(L_1); return; } } // System.Void System.OperatingSystem::.ctor(System.PlatformID,System.Version) extern "C" void OperatingSystem__ctor_m988315539 (OperatingSystem_t290860502 * __this, int32_t ___platform0, Version_t1755874712 * ___version1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OperatingSystem__ctor_m988315539_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_0 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2(); __this->set__servicePack_2(L_0); Object__ctor_m2551263788(__this, /*hidden argument*/NULL); Version_t1755874712 * L_1 = ___version1; bool L_2 = Version_op_Equality_m24249905(NULL /*static, unused*/, L_1, (Version_t1755874712 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0028; } } { ArgumentNullException_t628810857 * L_3 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m3380712306(L_3, _stringLiteral3617362, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_3); } IL_0028: { int32_t L_4 = ___platform0; __this->set__platform_0(L_4); Version_t1755874712 * L_5 = ___version1; __this->set__version_1(L_5); return; } } // System.PlatformID System.OperatingSystem::get_Platform() extern "C" int32_t OperatingSystem_get_Platform_m2260343279 (OperatingSystem_t290860502 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get__platform_0(); return L_0; } } // System.Object System.OperatingSystem::Clone() extern "C" Il2CppObject * OperatingSystem_Clone_m1943707477 (OperatingSystem_t290860502 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OperatingSystem_Clone_m1943707477_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t L_0 = __this->get__platform_0(); Version_t1755874712 * L_1 = __this->get__version_1(); OperatingSystem_t290860502 * L_2 = (OperatingSystem_t290860502 *)il2cpp_codegen_object_new(OperatingSystem_t290860502_il2cpp_TypeInfo_var); OperatingSystem__ctor_m988315539(L_2, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Void System.OperatingSystem::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void OperatingSystem_GetObjectData_m2276196875 (OperatingSystem_t290860502 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OperatingSystem_GetObjectData_m2276196875_MetadataUsageId); s_Il2CppMethodInitialized = true; } { SerializationInfo_t228987430 * L_0 = ___info0; int32_t L_1 = __this->get__platform_0(); int32_t L_2 = L_1; Il2CppObject * L_3 = Box(PlatformID_t1006634368_il2cpp_TypeInfo_var, &L_2); NullCheck(L_0); SerializationInfo_AddValue_m1740888931(L_0, _stringLiteral1328223296, L_3, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_4 = ___info0; Version_t1755874712 * L_5 = __this->get__version_1(); NullCheck(L_4); SerializationInfo_AddValue_m1740888931(L_4, _stringLiteral3024392673, L_5, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_6 = ___info0; String_t* L_7 = __this->get__servicePack_2(); NullCheck(L_6); SerializationInfo_AddValue_m1740888931(L_6, _stringLiteral1310822435, L_7, /*hidden argument*/NULL); return; } } // System.String System.OperatingSystem::ToString() extern "C" String_t* OperatingSystem_ToString_m2365121878 (OperatingSystem_t290860502 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OperatingSystem_ToString_m2365121878_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* V_0 = NULL; int32_t V_1 = 0; { int32_t L_0 = __this->get__platform_0(); V_1 = L_0; int32_t L_1 = V_1; switch (L_1) { case 0: { goto IL_0044; } case 1: { goto IL_004f; } case 2: { goto IL_0039; } case 3: { goto IL_005a; } case 4: { goto IL_0065; } case 5: { goto IL_0070; } case 6: { goto IL_007b; } } } { int32_t L_2 = V_1; if ((((int32_t)L_2) == ((int32_t)((int32_t)128)))) { goto IL_0065; } } { goto IL_0086; } IL_0039: { V_0 = _stringLiteral75811245; goto IL_0096; } IL_0044: { V_0 = _stringLiteral2342136926; goto IL_0096; } IL_004f: { V_0 = _stringLiteral2024976688; goto IL_0096; } IL_005a: { V_0 = _stringLiteral2092233885; goto IL_0096; } IL_0065: { V_0 = _stringLiteral513568856; goto IL_0096; } IL_0070: { V_0 = _stringLiteral2308534349; goto IL_0096; } IL_007b: { V_0 = _stringLiteral1690816384; goto IL_0096; } IL_0086: { String_t* L_3 = Locale_GetText_m1954433032(NULL /*static, unused*/, _stringLiteral2860987442, /*hidden argument*/NULL); V_0 = L_3; goto IL_0096; } IL_0096: { String_t* L_4 = V_0; Version_t1755874712 * L_5 = __this->get__version_1(); NullCheck(L_5); String_t* L_6 = Version_ToString_m18049552(L_5, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_7 = String_Concat_m612901809(NULL /*static, unused*/, L_4, _stringLiteral372029310, L_6, /*hidden argument*/NULL); return L_7; } } // System.Void System.OrdinalComparer::.ctor(System.Boolean) extern "C" void OrdinalComparer__ctor_m2952942058 (OrdinalComparer_t1018219584 * __this, bool ___ignoreCase0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OrdinalComparer__ctor_m2952942058_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(StringComparer_t1574862926_il2cpp_TypeInfo_var); StringComparer__ctor_m2275216983(__this, /*hidden argument*/NULL); bool L_0 = ___ignoreCase0; __this->set__ignoreCase_4(L_0); return; } } // System.Int32 System.OrdinalComparer::Compare(System.String,System.String) extern "C" int32_t OrdinalComparer_Compare_m2856814274 (OrdinalComparer_t1018219584 * __this, String_t* ___x0, String_t* ___y1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OrdinalComparer_Compare_m2856814274_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = __this->get__ignoreCase_4(); if (!L_0) { goto IL_001f; } } { String_t* L_1 = ___x0; String_t* L_2 = ___y1; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); int32_t L_3 = String_CompareOrdinalCaseInsensitiveUnchecked_m2002640463(NULL /*static, unused*/, L_1, 0, ((int32_t)2147483647LL), L_2, 0, ((int32_t)2147483647LL), /*hidden argument*/NULL); return L_3; } IL_001f: { String_t* L_4 = ___x0; String_t* L_5 = ___y1; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); int32_t L_6 = String_CompareOrdinalUnchecked_m3787381712(NULL /*static, unused*/, L_4, 0, ((int32_t)2147483647LL), L_5, 0, ((int32_t)2147483647LL), /*hidden argument*/NULL); return L_6; } } // System.Boolean System.OrdinalComparer::Equals(System.String,System.String) extern "C" bool OrdinalComparer_Equals_m2808470040 (OrdinalComparer_t1018219584 * __this, String_t* ___x0, String_t* ___y1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OrdinalComparer_Equals_m2808470040_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = __this->get__ignoreCase_4(); if (!L_0) { goto IL_0017; } } { String_t* L_1 = ___x0; String_t* L_2 = ___y1; int32_t L_3 = OrdinalComparer_Compare_m2856814274(__this, L_1, L_2, /*hidden argument*/NULL); return (bool)((((int32_t)L_3) == ((int32_t)0))? 1 : 0); } IL_0017: { String_t* L_4 = ___x0; String_t* L_5 = ___y1; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_6 = String_op_Equality_m1790663636(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); return L_6; } } // System.Int32 System.OrdinalComparer::GetHashCode(System.String) extern "C" int32_t OrdinalComparer_GetHashCode_m3400975772 (OrdinalComparer_t1018219584 * __this, String_t* ___s0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OrdinalComparer_GetHashCode_m3400975772_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = ___s0; if (L_0) { goto IL_0011; } } { ArgumentNullException_t628810857 * L_1 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m3380712306(L_1, _stringLiteral372029391, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0011: { bool L_2 = __this->get__ignoreCase_4(); if (!L_2) { goto IL_0023; } } { String_t* L_3 = ___s0; NullCheck(L_3); int32_t L_4 = String_GetCaseInsensitiveHashCode_m74381984(L_3, /*hidden argument*/NULL); return L_4; } IL_0023: { String_t* L_5 = ___s0; NullCheck(L_5); int32_t L_6 = String_GetHashCode_m931956593(L_5, /*hidden argument*/NULL); return L_6; } } // System.Void System.OutOfMemoryException::.ctor() extern "C" void OutOfMemoryException__ctor_m1340150080 (OutOfMemoryException_t1181064283 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OutOfMemoryException__ctor_m1340150080_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = Locale_GetText_m1954433032(NULL /*static, unused*/, _stringLiteral2159712404, /*hidden argument*/NULL); SystemException__ctor_m4001391027(__this, L_0, /*hidden argument*/NULL); Exception_set_HResult_m2376998645(__this, ((int32_t)-2147024882), /*hidden argument*/NULL); return; } } // System.Void System.OutOfMemoryException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void OutOfMemoryException__ctor_m1932883273 (OutOfMemoryException_t1181064283 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___context1; SystemException__ctor_m2688248668(__this, L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void System.OverflowException::.ctor() extern "C" void OverflowException__ctor_m2564269836 (OverflowException_t1075868493 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OverflowException__ctor_m2564269836_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = Locale_GetText_m1954433032(NULL /*static, unused*/, _stringLiteral1124468381, /*hidden argument*/NULL); ArithmeticException__ctor_m4208398840(__this, L_0, /*hidden argument*/NULL); Exception_set_HResult_m2376998645(__this, ((int32_t)-2146233066), /*hidden argument*/NULL); return; } } // System.Void System.OverflowException::.ctor(System.String) extern "C" void OverflowException__ctor_m3249894750 (OverflowException_t1075868493 * __this, String_t* ___message0, const MethodInfo* method) { { String_t* L_0 = ___message0; ArithmeticException__ctor_m4208398840(__this, L_0, /*hidden argument*/NULL); Exception_set_HResult_m2376998645(__this, ((int32_t)-2146233066), /*hidden argument*/NULL); return; } } // System.Void System.OverflowException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void OverflowException__ctor_m2230275335 (OverflowException_t1075868493 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___context1; ArithmeticException__ctor_m104771799(__this, L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void System.ParamArrayAttribute::.ctor() extern "C" void ParamArrayAttribute__ctor_m2215984741 (ParamArrayAttribute_t2144993728 * __this, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); return; } } // System.Void System.PlatformNotSupportedException::.ctor() extern "C" void PlatformNotSupportedException__ctor_m782561872 (PlatformNotSupportedException_t3778770305 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (PlatformNotSupportedException__ctor_m782561872_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = Locale_GetText_m1954433032(NULL /*static, unused*/, _stringLiteral3018961310, /*hidden argument*/NULL); NotSupportedException__ctor_m836173213(__this, L_0, /*hidden argument*/NULL); Exception_set_HResult_m2376998645(__this, ((int32_t)-2146233031), /*hidden argument*/NULL); return; } } // System.Void System.PlatformNotSupportedException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void PlatformNotSupportedException__ctor_m3301654967 (PlatformNotSupportedException_t3778770305 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___context1; NotSupportedException__ctor_m422639464(__this, L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void System.RankException::.ctor() extern "C" void RankException__ctor_m2119191472 (RankException_t1539875949 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RankException__ctor_m2119191472_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = Locale_GetText_m1954433032(NULL /*static, unused*/, _stringLiteral3468799055, /*hidden argument*/NULL); SystemException__ctor_m4001391027(__this, L_0, /*hidden argument*/NULL); Exception_set_HResult_m2376998645(__this, ((int32_t)-2146233065), /*hidden argument*/NULL); return; } } // System.Void System.RankException::.ctor(System.String) extern "C" void RankException__ctor_m998508686 (RankException_t1539875949 * __this, String_t* ___message0, const MethodInfo* method) { { String_t* L_0 = ___message0; SystemException__ctor_m4001391027(__this, L_0, /*hidden argument*/NULL); Exception_set_HResult_m2376998645(__this, ((int32_t)-2146233065), /*hidden argument*/NULL); return; } } // System.Void System.RankException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void RankException__ctor_m800781665 (RankException_t1539875949 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___context1; SystemException__ctor_m2688248668(__this, L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.AmbiguousMatchException::.ctor() extern "C" void AmbiguousMatchException__ctor_m2088048346 (AmbiguousMatchException_t1406414556 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AmbiguousMatchException__ctor_m2088048346_MetadataUsageId); s_Il2CppMethodInitialized = true; } { SystemException__ctor_m4001391027(__this, _stringLiteral2591063177, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.AmbiguousMatchException::.ctor(System.String) extern "C" void AmbiguousMatchException__ctor_m3811079160 (AmbiguousMatchException_t1406414556 * __this, String_t* ___message0, const MethodInfo* method) { { String_t* L_0 = ___message0; SystemException__ctor_m4001391027(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.AmbiguousMatchException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void AmbiguousMatchException__ctor_m3001998225 (AmbiguousMatchException_t1406414556 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___context1; SystemException__ctor_m2688248668(__this, L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.Assembly::.ctor() extern "C" void Assembly__ctor_m1050192922 (Assembly_t4268412390 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly__ctor_m1050192922_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); ResolveEventHolder_t1761494505 * L_0 = (ResolveEventHolder_t1761494505 *)il2cpp_codegen_object_new(ResolveEventHolder_t1761494505_il2cpp_TypeInfo_var); ResolveEventHolder__ctor_m2004627747(L_0, /*hidden argument*/NULL); __this->set_resolve_event_holder_1(L_0); return; } } // System.String System.Reflection.Assembly::get_code_base(System.Boolean) extern "C" String_t* Assembly_get_code_base_m3637877060 (Assembly_t4268412390 * __this, bool ___escaped0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef String_t* (*Assembly_get_code_base_m3637877060_ftn) (Assembly_t4268412390 *, bool); return ((Assembly_get_code_base_m3637877060_ftn)mscorlib::System::Reflection::Assembly::get_code_base) (__this, ___escaped0); } // System.String System.Reflection.Assembly::get_fullname() extern "C" String_t* Assembly_get_fullname_m3149819070 (Assembly_t4268412390 * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef String_t* (*Assembly_get_fullname_m3149819070_ftn) (Assembly_t4268412390 *); return ((Assembly_get_fullname_m3149819070_ftn)mscorlib::System::Reflection::Assembly::get_fullname) (__this); } // System.String System.Reflection.Assembly::get_location() extern "C" String_t* Assembly_get_location_m2976332497 (Assembly_t4268412390 * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef String_t* (*Assembly_get_location_m2976332497_ftn) (Assembly_t4268412390 *); return ((Assembly_get_location_m2976332497_ftn)mscorlib::System::Reflection::Assembly::get_location) (__this); } // System.String System.Reflection.Assembly::GetCodeBase(System.Boolean) extern "C" String_t* Assembly_GetCodeBase_m2735209720 (Assembly_t4268412390 * __this, bool ___escaped0, const MethodInfo* method) { String_t* V_0 = NULL; { bool L_0 = ___escaped0; String_t* L_1 = Assembly_get_code_base_m3637877060(__this, L_0, /*hidden argument*/NULL); V_0 = L_1; String_t* L_2 = V_0; return L_2; } } // System.String System.Reflection.Assembly::get_FullName() extern "C" String_t* Assembly_get_FullName_m1064037566 (Assembly_t4268412390 * __this, const MethodInfo* method) { { String_t* L_0 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Reflection.Assembly::ToString() */, __this); return L_0; } } // System.String System.Reflection.Assembly::get_Location() extern "C" String_t* Assembly_get_Location_m3981013809 (Assembly_t4268412390 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly_get_Location_m3981013809_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* V_0 = NULL; { bool L_0 = __this->get_fromByteArray_8(); if (!L_0) { goto IL_0011; } } { IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_1 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2(); return L_1; } IL_0011: { String_t* L_2 = Assembly_get_location_m2976332497(__this, /*hidden argument*/NULL); V_0 = L_2; String_t* L_3 = V_0; return L_3; } } // System.Boolean System.Reflection.Assembly::IsDefined(System.Type,System.Boolean) extern "C" bool Assembly_IsDefined_m2841897391 (Assembly_t4268412390 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly_IsDefined_m2841897391_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); bool L_2 = MonoCustomAttrs_IsDefined_m3820363041(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Object[] System.Reflection.Assembly::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* Assembly_GetCustomAttributes_m95309865 (Assembly_t4268412390 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly_GetCustomAttributes_m95309865_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_2 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.IntPtr System.Reflection.Assembly::GetManifestResourceInternal(System.String,System.Int32&,System.Reflection.Module&) extern "C" IntPtr_t Assembly_GetManifestResourceInternal_m2581727816 (Assembly_t4268412390 * __this, String_t* ___name0, int32_t* ___size1, Module_t4282841206 ** ___module2, const MethodInfo* method) { using namespace il2cpp::icalls; typedef IntPtr_t (*Assembly_GetManifestResourceInternal_m2581727816_ftn) (Assembly_t4268412390 *, String_t*, int32_t*, Module_t4282841206 **); return ((Assembly_GetManifestResourceInternal_m2581727816_ftn)mscorlib::System::Reflection::Assembly::GetManifestResourceInternal) (__this, ___name0, ___size1, ___module2); } // System.Type[] System.Reflection.Assembly::GetTypes(System.Boolean) extern "C" TypeU5BU5D_t1664964607* Assembly_GetTypes_m1317253146 (Assembly_t4268412390 * __this, bool ___exportedOnly0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef TypeU5BU5D_t1664964607* (*Assembly_GetTypes_m1317253146_ftn) (Assembly_t4268412390 *, bool); return ((Assembly_GetTypes_m1317253146_ftn)mscorlib::System::Reflection::Assembly::GetTypes) (__this, ___exportedOnly0); } // System.Type[] System.Reflection.Assembly::GetTypes() extern "C" TypeU5BU5D_t1664964607* Assembly_GetTypes_m382057419 (Assembly_t4268412390 * __this, const MethodInfo* method) { { TypeU5BU5D_t1664964607* L_0 = VirtFuncInvoker1< TypeU5BU5D_t1664964607*, bool >::Invoke(10 /* System.Type[] System.Reflection.Assembly::GetTypes(System.Boolean) */, __this, (bool)0); return L_0; } } // System.Type System.Reflection.Assembly::GetType(System.String,System.Boolean) extern "C" Type_t * Assembly_GetType_m2805031155 (Assembly_t4268412390 * __this, String_t* ___name0, bool ___throwOnError1, const MethodInfo* method) { { String_t* L_0 = ___name0; bool L_1 = ___throwOnError1; Type_t * L_2 = Assembly_GetType_m2765594712(__this, L_0, L_1, (bool)0, /*hidden argument*/NULL); return L_2; } } // System.Type System.Reflection.Assembly::GetType(System.String) extern "C" Type_t * Assembly_GetType_m2378249586 (Assembly_t4268412390 * __this, String_t* ___name0, const MethodInfo* method) { { String_t* L_0 = ___name0; Type_t * L_1 = Assembly_GetType_m2765594712(__this, L_0, (bool)0, (bool)0, /*hidden argument*/NULL); return L_1; } } // System.Type System.Reflection.Assembly::InternalGetType(System.Reflection.Module,System.String,System.Boolean,System.Boolean) extern "C" Type_t * Assembly_InternalGetType_m1990879055 (Assembly_t4268412390 * __this, Module_t4282841206 * ___module0, String_t* ___name1, bool ___throwOnError2, bool ___ignoreCase3, const MethodInfo* method) { using namespace il2cpp::icalls; typedef Type_t * (*Assembly_InternalGetType_m1990879055_ftn) (Assembly_t4268412390 *, Module_t4282841206 *, String_t*, bool, bool); return ((Assembly_InternalGetType_m1990879055_ftn)mscorlib::System::Reflection::Assembly::InternalGetType) (__this, ___module0, ___name1, ___throwOnError2, ___ignoreCase3); } // System.Type System.Reflection.Assembly::GetType(System.String,System.Boolean,System.Boolean) extern "C" Type_t * Assembly_GetType_m2765594712 (Assembly_t4268412390 * __this, String_t* ___name0, bool ___throwOnError1, bool ___ignoreCase2, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly_GetType_m2765594712_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = ___name0; if (L_0) { goto IL_000d; } } { String_t* L_1 = ___name0; ArgumentNullException_t628810857 * L_2 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m3380712306(L_2, L_1, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_2); } IL_000d: { String_t* L_3 = ___name0; NullCheck(L_3); int32_t L_4 = String_get_Length_m1606060069(L_3, /*hidden argument*/NULL); if (L_4) { goto IL_0028; } } { ArgumentException_t3259014390 * L_5 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m544251339(L_5, _stringLiteral2328218955, _stringLiteral345660856, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_5); } IL_0028: { String_t* L_6 = ___name0; bool L_7 = ___throwOnError1; bool L_8 = ___ignoreCase2; Type_t * L_9 = Assembly_InternalGetType_m1990879055(__this, (Module_t4282841206 *)NULL, L_6, L_7, L_8, /*hidden argument*/NULL); return L_9; } } // System.Void System.Reflection.Assembly::FillName(System.Reflection.Assembly,System.Reflection.AssemblyName) extern "C" void Assembly_FillName_m1934025015 (Il2CppObject * __this /* static, unused */, Assembly_t4268412390 * ___ass0, AssemblyName_t894705941 * ___aname1, const MethodInfo* method) { using namespace il2cpp::icalls; typedef void (*Assembly_FillName_m1934025015_ftn) (Assembly_t4268412390 *, AssemblyName_t894705941 *); ((Assembly_FillName_m1934025015_ftn)mscorlib::System::Reflection::Assembly::FillName) (___ass0, ___aname1); } // System.Reflection.AssemblyName System.Reflection.Assembly::GetName(System.Boolean) extern "C" AssemblyName_t894705941 * Assembly_GetName_m3984565618 (Assembly_t4268412390 * __this, bool ___copiedName0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly_GetName_m3984565618_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(SecurityManager_t3191249573_il2cpp_TypeInfo_var); bool L_0 = SecurityManager_get_SecurityEnabled_m51574294(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_0) { goto IL_0012; } } { Assembly_GetCodeBase_m2735209720(__this, (bool)1, /*hidden argument*/NULL); } IL_0012: { AssemblyName_t894705941 * L_1 = VirtFuncInvoker0< AssemblyName_t894705941 * >::Invoke(17 /* System.Reflection.AssemblyName System.Reflection.Assembly::UnprotectedGetName() */, __this); return L_1; } } // System.Reflection.AssemblyName System.Reflection.Assembly::GetName() extern "C" AssemblyName_t894705941 * Assembly_GetName_m790410837 (Assembly_t4268412390 * __this, const MethodInfo* method) { { AssemblyName_t894705941 * L_0 = VirtFuncInvoker1< AssemblyName_t894705941 *, bool >::Invoke(15 /* System.Reflection.AssemblyName System.Reflection.Assembly::GetName(System.Boolean) */, __this, (bool)0); return L_0; } } // System.Reflection.AssemblyName System.Reflection.Assembly::UnprotectedGetName() extern "C" AssemblyName_t894705941 * Assembly_UnprotectedGetName_m3014607408 (Assembly_t4268412390 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly_UnprotectedGetName_m3014607408_MetadataUsageId); s_Il2CppMethodInitialized = true; } AssemblyName_t894705941 * V_0 = NULL; { AssemblyName_t894705941 * L_0 = (AssemblyName_t894705941 *)il2cpp_codegen_object_new(AssemblyName_t894705941_il2cpp_TypeInfo_var); AssemblyName__ctor_m2505746587(L_0, /*hidden argument*/NULL); V_0 = L_0; AssemblyName_t894705941 * L_1 = V_0; Assembly_FillName_m1934025015(NULL /*static, unused*/, __this, L_1, /*hidden argument*/NULL); AssemblyName_t894705941 * L_2 = V_0; return L_2; } } // System.String System.Reflection.Assembly::ToString() extern "C" String_t* Assembly_ToString_m3970658759 (Assembly_t4268412390 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_assemblyName_9(); if (!L_0) { goto IL_0012; } } { String_t* L_1 = __this->get_assemblyName_9(); return L_1; } IL_0012: { String_t* L_2 = Assembly_get_fullname_m3149819070(__this, /*hidden argument*/NULL); __this->set_assemblyName_9(L_2); String_t* L_3 = __this->get_assemblyName_9(); return L_3; } } // System.Reflection.Assembly System.Reflection.Assembly::Load(System.String) extern "C" Assembly_t4268412390 * Assembly_Load_m902205655 (Il2CppObject * __this /* static, unused */, String_t* ___assemblyString0, const MethodInfo* method) { { AppDomain_t2719102437 * L_0 = AppDomain_get_CurrentDomain_m3432767403(NULL /*static, unused*/, /*hidden argument*/NULL); String_t* L_1 = ___assemblyString0; NullCheck(L_0); Assembly_t4268412390 * L_2 = AppDomain_Load_m3276140461(L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Reflection.Module System.Reflection.Assembly::GetModule(System.String) extern "C" Module_t4282841206 * Assembly_GetModule_m2064378601 (Assembly_t4268412390 * __this, String_t* ___name0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly_GetModule_m2064378601_MetadataUsageId); s_Il2CppMethodInitialized = true; } ModuleU5BU5D_t3593287923* V_0 = NULL; Module_t4282841206 * V_1 = NULL; ModuleU5BU5D_t3593287923* V_2 = NULL; int32_t V_3 = 0; { String_t* L_0 = ___name0; if (L_0) { goto IL_0011; } } { ArgumentNullException_t628810857 * L_1 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m3380712306(L_1, _stringLiteral2328218955, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0011: { String_t* L_2 = ___name0; NullCheck(L_2); int32_t L_3 = String_get_Length_m1606060069(L_2, /*hidden argument*/NULL); if (L_3) { goto IL_0027; } } { ArgumentException_t3259014390 * L_4 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_4, _stringLiteral3246678936, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4); } IL_0027: { ModuleU5BU5D_t3593287923* L_5 = Assembly_GetModules_m2242070953(__this, (bool)1, /*hidden argument*/NULL); V_0 = L_5; ModuleU5BU5D_t3593287923* L_6 = V_0; V_2 = L_6; V_3 = 0; goto IL_0053; } IL_0038: { ModuleU5BU5D_t3593287923* L_7 = V_2; int32_t L_8 = V_3; NullCheck(L_7); int32_t L_9 = L_8; Module_t4282841206 * L_10 = (L_7)->GetAt(static_cast<il2cpp_array_size_t>(L_9)); V_1 = L_10; Module_t4282841206 * L_11 = V_1; NullCheck(L_11); String_t* L_12 = Module_get_ScopeName_m207704721(L_11, /*hidden argument*/NULL); String_t* L_13 = ___name0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_14 = String_op_Equality_m1790663636(NULL /*static, unused*/, L_12, L_13, /*hidden argument*/NULL); if (!L_14) { goto IL_004f; } } { Module_t4282841206 * L_15 = V_1; return L_15; } IL_004f: { int32_t L_16 = V_3; V_3 = ((int32_t)((int32_t)L_16+(int32_t)1)); } IL_0053: { int32_t L_17 = V_3; ModuleU5BU5D_t3593287923* L_18 = V_2; NullCheck(L_18); if ((((int32_t)L_17) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_18)->max_length))))))) { goto IL_0038; } } { return (Module_t4282841206 *)NULL; } } // System.Reflection.Module[] System.Reflection.Assembly::GetModulesInternal() extern "C" ModuleU5BU5D_t3593287923* Assembly_GetModulesInternal_m666827793 (Assembly_t4268412390 * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef ModuleU5BU5D_t3593287923* (*Assembly_GetModulesInternal_m666827793_ftn) (Assembly_t4268412390 *); return ((Assembly_GetModulesInternal_m666827793_ftn)mscorlib::System::Reflection::Assembly::GetModulesInternal) (__this); } // System.Reflection.Module[] System.Reflection.Assembly::GetModules(System.Boolean) extern "C" ModuleU5BU5D_t3593287923* Assembly_GetModules_m2242070953 (Assembly_t4268412390 * __this, bool ___getResourceModules0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly_GetModules_m2242070953_MetadataUsageId); s_Il2CppMethodInitialized = true; } ModuleU5BU5D_t3593287923* V_0 = NULL; ArrayList_t4252133567 * V_1 = NULL; Module_t4282841206 * V_2 = NULL; ModuleU5BU5D_t3593287923* V_3 = NULL; int32_t V_4 = 0; { ModuleU5BU5D_t3593287923* L_0 = VirtFuncInvoker0< ModuleU5BU5D_t3593287923* >::Invoke(19 /* System.Reflection.Module[] System.Reflection.Assembly::GetModulesInternal() */, __this); V_0 = L_0; bool L_1 = ___getResourceModules0; if (L_1) { goto IL_005e; } } { ModuleU5BU5D_t3593287923* L_2 = V_0; NullCheck(L_2); ArrayList_t4252133567 * L_3 = (ArrayList_t4252133567 *)il2cpp_codegen_object_new(ArrayList_t4252133567_il2cpp_TypeInfo_var); ArrayList__ctor_m1467563650(L_3, (((int32_t)((int32_t)(((Il2CppArray *)L_2)->max_length)))), /*hidden argument*/NULL); V_1 = L_3; ModuleU5BU5D_t3593287923* L_4 = V_0; V_3 = L_4; V_4 = 0; goto IL_003e; } IL_0020: { ModuleU5BU5D_t3593287923* L_5 = V_3; int32_t L_6 = V_4; NullCheck(L_5); int32_t L_7 = L_6; Module_t4282841206 * L_8 = (L_5)->GetAt(static_cast<il2cpp_array_size_t>(L_7)); V_2 = L_8; Module_t4282841206 * L_9 = V_2; NullCheck(L_9); bool L_10 = Module_IsResource_m663979284(L_9, /*hidden argument*/NULL); if (L_10) { goto IL_0038; } } { ArrayList_t4252133567 * L_11 = V_1; Module_t4282841206 * L_12 = V_2; NullCheck(L_11); VirtFuncInvoker1< int32_t, Il2CppObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_11, L_12); } IL_0038: { int32_t L_13 = V_4; V_4 = ((int32_t)((int32_t)L_13+(int32_t)1)); } IL_003e: { int32_t L_14 = V_4; ModuleU5BU5D_t3593287923* L_15 = V_3; NullCheck(L_15); if ((((int32_t)L_14) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_15)->max_length))))))) { goto IL_0020; } } { ArrayList_t4252133567 * L_16 = V_1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_17 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Module_t4282841206_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_16); Il2CppArray * L_18 = VirtFuncInvoker1< Il2CppArray *, Type_t * >::Invoke(48 /* System.Array System.Collections.ArrayList::ToArray(System.Type) */, L_16, L_17); return ((ModuleU5BU5D_t3593287923*)Castclass(L_18, ModuleU5BU5D_t3593287923_il2cpp_TypeInfo_var)); } IL_005e: { ModuleU5BU5D_t3593287923* L_19 = V_0; return L_19; } } // System.Reflection.Assembly System.Reflection.Assembly::GetExecutingAssembly() extern "C" Assembly_t4268412390 * Assembly_GetExecutingAssembly_m776016337 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Assembly_GetExecutingAssembly_m776016337_MetadataUsageId); s_Il2CppMethodInitialized = true; } return il2cpp_codegen_get_executing_assembly(Assembly_GetExecutingAssembly_m776016337_MethodInfo_var); } // System.Void System.Reflection.Assembly/ResolveEventHolder::.ctor() extern "C" void ResolveEventHolder__ctor_m2004627747 (ResolveEventHolder_t1761494505 * __this, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.AssemblyCompanyAttribute::.ctor(System.String) extern "C" void AssemblyCompanyAttribute__ctor_m1217508649 (AssemblyCompanyAttribute_t2851673381 * __this, String_t* ___company0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___company0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.AssemblyConfigurationAttribute::.ctor(System.String) extern "C" void AssemblyConfigurationAttribute__ctor_m2611941870 (AssemblyConfigurationAttribute_t1678917172 * __this, String_t* ___configuration0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___configuration0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.AssemblyCopyrightAttribute::.ctor(System.String) extern "C" void AssemblyCopyrightAttribute__ctor_m2712202383 (AssemblyCopyrightAttribute_t177123295 * __this, String_t* ___copyright0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___copyright0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.AssemblyDefaultAliasAttribute::.ctor(System.String) extern "C" void AssemblyDefaultAliasAttribute__ctor_m746891723 (AssemblyDefaultAliasAttribute_t1774139159 * __this, String_t* ___defaultAlias0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___defaultAlias0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.AssemblyDelaySignAttribute::.ctor(System.Boolean) extern "C" void AssemblyDelaySignAttribute__ctor_m793760213 (AssemblyDelaySignAttribute_t2705758496 * __this, bool ___delaySign0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); bool L_0 = ___delaySign0; __this->set_delay_0(L_0); return; } } // System.Void System.Reflection.AssemblyDescriptionAttribute::.ctor(System.String) extern "C" void AssemblyDescriptionAttribute__ctor_m3307088082 (AssemblyDescriptionAttribute_t1018387888 * __this, String_t* ___description0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___description0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.AssemblyFileVersionAttribute::.ctor(System.String) extern "C" void AssemblyFileVersionAttribute__ctor_m2026149866 (AssemblyFileVersionAttribute_t2897687916 * __this, String_t* ___version0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyFileVersionAttribute__ctor_m2026149866_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___version0; if (L_0) { goto IL_0017; } } { ArgumentNullException_t628810857 * L_1 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m3380712306(L_1, _stringLiteral3617362, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0017: { String_t* L_2 = ___version0; __this->set_name_0(L_2); return; } } // System.Void System.Reflection.AssemblyInformationalVersionAttribute::.ctor(System.String) extern "C" void AssemblyInformationalVersionAttribute__ctor_m376831533 (AssemblyInformationalVersionAttribute_t3037389657 * __this, String_t* ___informationalVersion0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___informationalVersion0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.AssemblyKeyFileAttribute::.ctor(System.String) extern "C" void AssemblyKeyFileAttribute__ctor_m1072556611 (AssemblyKeyFileAttribute_t605245443 * __this, String_t* ___keyFile0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___keyFile0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.AssemblyName::.ctor() extern "C" void AssemblyName__ctor_m2505746587 (AssemblyName_t894705941 * __this, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); __this->set_versioncompat_12(1); return; } } // System.Void System.Reflection.AssemblyName::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void AssemblyName__ctor_m609734316 (AssemblyName_t894705941 * __this, SerializationInfo_t228987430 * ___si0, StreamingContext_t1417235061 ___sc1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyName__ctor_m609734316_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_0 = ___si0; NullCheck(L_0); String_t* L_1 = SerializationInfo_GetString_m547109409(L_0, _stringLiteral594030812, /*hidden argument*/NULL); __this->set_name_0(L_1); SerializationInfo_t228987430 * L_2 = ___si0; NullCheck(L_2); String_t* L_3 = SerializationInfo_GetString_m547109409(L_2, _stringLiteral1952199827, /*hidden argument*/NULL); __this->set_codebase_1(L_3); SerializationInfo_t228987430 * L_4 = ___si0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_5 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Version_t1755874712_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_4); Il2CppObject * L_6 = SerializationInfo_GetValue_m1127314592(L_4, _stringLiteral1734555969, L_5, /*hidden argument*/NULL); __this->set_version_13(((Version_t1755874712 *)CastclassSealed(L_6, Version_t1755874712_il2cpp_TypeInfo_var))); SerializationInfo_t228987430 * L_7 = ___si0; Type_t * L_8 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(ByteU5BU5D_t3397334013_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_7); Il2CppObject * L_9 = SerializationInfo_GetValue_m1127314592(L_7, _stringLiteral2167127169, L_8, /*hidden argument*/NULL); __this->set_publicKey_10(((ByteU5BU5D_t3397334013*)Castclass(L_9, ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var))); SerializationInfo_t228987430 * L_10 = ___si0; Type_t * L_11 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(ByteU5BU5D_t3397334013_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_10); Il2CppObject * L_12 = SerializationInfo_GetValue_m1127314592(L_10, _stringLiteral2837183762, L_11, /*hidden argument*/NULL); __this->set_keyToken_11(((ByteU5BU5D_t3397334013*)Castclass(L_12, ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var))); SerializationInfo_t228987430 * L_13 = ___si0; Type_t * L_14 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(AssemblyHashAlgorithm_t4147282775_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_13); Il2CppObject * L_15 = SerializationInfo_GetValue_m1127314592(L_13, _stringLiteral3684797936, L_14, /*hidden argument*/NULL); __this->set_hashalg_8(((*(int32_t*)((int32_t*)UnBox(L_15, Int32_t2071877448_il2cpp_TypeInfo_var))))); SerializationInfo_t228987430 * L_16 = ___si0; Type_t * L_17 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(StrongNameKeyPair_t4090869089_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_16); Il2CppObject * L_18 = SerializationInfo_GetValue_m1127314592(L_16, _stringLiteral2448232678, L_17, /*hidden argument*/NULL); __this->set_keypair_9(((StrongNameKeyPair_t4090869089 *)CastclassClass(L_18, StrongNameKeyPair_t4090869089_il2cpp_TypeInfo_var))); SerializationInfo_t228987430 * L_19 = ___si0; Type_t * L_20 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(AssemblyVersionCompatibility_t1223556284_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_19); Il2CppObject * L_21 = SerializationInfo_GetValue_m1127314592(L_19, _stringLiteral1836058351, L_20, /*hidden argument*/NULL); __this->set_versioncompat_12(((*(int32_t*)((int32_t*)UnBox(L_21, Int32_t2071877448_il2cpp_TypeInfo_var))))); SerializationInfo_t228987430 * L_22 = ___si0; Type_t * L_23 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(AssemblyNameFlags_t1794031440_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_22); Il2CppObject * L_24 = SerializationInfo_GetValue_m1127314592(L_22, _stringLiteral180760614, L_23, /*hidden argument*/NULL); __this->set_flags_7(((*(int32_t*)((int32_t*)UnBox(L_24, Int32_t2071877448_il2cpp_TypeInfo_var))))); SerializationInfo_t228987430 * L_25 = ___si0; NullCheck(L_25); int32_t L_26 = SerializationInfo_GetInt32_m4039439501(L_25, _stringLiteral3706305741, /*hidden argument*/NULL); V_0 = L_26; int32_t L_27 = V_0; if ((((int32_t)L_27) == ((int32_t)(-1)))) { goto IL_0127; } } { int32_t L_28 = V_0; CultureInfo_t3500843524 * L_29 = (CultureInfo_t3500843524 *)il2cpp_codegen_object_new(CultureInfo_t3500843524_il2cpp_TypeInfo_var); CultureInfo__ctor_m3417484387(L_29, L_28, /*hidden argument*/NULL); __this->set_cultureinfo_6(L_29); } IL_0127: { return; } } // System.String System.Reflection.AssemblyName::get_Name() extern "C" String_t* AssemblyName_get_Name_m1815759940 (AssemblyName_t894705941 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_0(); return L_0; } } // System.Reflection.AssemblyNameFlags System.Reflection.AssemblyName::get_Flags() extern "C" int32_t AssemblyName_get_Flags_m1290091392 (AssemblyName_t894705941 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_flags_7(); return L_0; } } // System.String System.Reflection.AssemblyName::get_FullName() extern "C" String_t* AssemblyName_get_FullName_m1606421515 (AssemblyName_t894705941 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyName_get_FullName_m1606421515_MetadataUsageId); s_Il2CppMethodInitialized = true; } StringBuilder_t1221177846 * V_0 = NULL; ByteU5BU5D_t3397334013* V_1 = NULL; int32_t V_2 = 0; { String_t* L_0 = __this->get_name_0(); if (L_0) { goto IL_0011; } } { IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_1 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2(); return L_1; } IL_0011: { StringBuilder_t1221177846 * L_2 = (StringBuilder_t1221177846 *)il2cpp_codegen_object_new(StringBuilder_t1221177846_il2cpp_TypeInfo_var); StringBuilder__ctor_m3946851802(L_2, /*hidden argument*/NULL); V_0 = L_2; StringBuilder_t1221177846 * L_3 = V_0; String_t* L_4 = __this->get_name_0(); NullCheck(L_3); StringBuilder_Append_m3636508479(L_3, L_4, /*hidden argument*/NULL); Version_t1755874712 * L_5 = AssemblyName_get_Version_m3495645648(__this, /*hidden argument*/NULL); bool L_6 = Version_op_Inequality_m828629926(NULL /*static, unused*/, L_5, (Version_t1755874712 *)NULL, /*hidden argument*/NULL); if (!L_6) { goto IL_0053; } } { StringBuilder_t1221177846 * L_7 = V_0; NullCheck(L_7); StringBuilder_Append_m3636508479(L_7, _stringLiteral3774245231, /*hidden argument*/NULL); StringBuilder_t1221177846 * L_8 = V_0; Version_t1755874712 * L_9 = AssemblyName_get_Version_m3495645648(__this, /*hidden argument*/NULL); NullCheck(L_9); String_t* L_10 = Version_ToString_m18049552(L_9, /*hidden argument*/NULL); NullCheck(L_8); StringBuilder_Append_m3636508479(L_8, L_10, /*hidden argument*/NULL); } IL_0053: { CultureInfo_t3500843524 * L_11 = __this->get_cultureinfo_6(); if (!L_11) { goto IL_00a7; } } { StringBuilder_t1221177846 * L_12 = V_0; NullCheck(L_12); StringBuilder_Append_m3636508479(L_12, _stringLiteral1256080173, /*hidden argument*/NULL); CultureInfo_t3500843524 * L_13 = __this->get_cultureinfo_6(); NullCheck(L_13); int32_t L_14 = VirtFuncInvoker0< int32_t >::Invoke(6 /* System.Int32 System.Globalization.CultureInfo::get_LCID() */, L_13); IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t3500843524_il2cpp_TypeInfo_var); CultureInfo_t3500843524 * L_15 = CultureInfo_get_InvariantCulture_m398972276(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_15); int32_t L_16 = VirtFuncInvoker0< int32_t >::Invoke(6 /* System.Int32 System.Globalization.CultureInfo::get_LCID() */, L_15); if ((!(((uint32_t)L_14) == ((uint32_t)L_16)))) { goto IL_0095; } } { StringBuilder_t1221177846 * L_17 = V_0; NullCheck(L_17); StringBuilder_Append_m3636508479(L_17, _stringLiteral3350611209, /*hidden argument*/NULL); goto IL_00a7; } IL_0095: { StringBuilder_t1221177846 * L_18 = V_0; CultureInfo_t3500843524 * L_19 = __this->get_cultureinfo_6(); NullCheck(L_19); String_t* L_20 = VirtFuncInvoker0< String_t* >::Invoke(7 /* System.String System.Globalization.CultureInfo::get_Name() */, L_19); NullCheck(L_18); StringBuilder_Append_m3636508479(L_18, L_20, /*hidden argument*/NULL); } IL_00a7: { ByteU5BU5D_t3397334013* L_21 = AssemblyName_InternalGetPublicKeyToken_m3706025887(__this, /*hidden argument*/NULL); V_1 = L_21; ByteU5BU5D_t3397334013* L_22 = V_1; if (!L_22) { goto IL_0105; } } { ByteU5BU5D_t3397334013* L_23 = V_1; NullCheck(L_23); if ((((int32_t)((int32_t)(((Il2CppArray *)L_23)->max_length))))) { goto IL_00cd; } } { StringBuilder_t1221177846 * L_24 = V_0; NullCheck(L_24); StringBuilder_Append_m3636508479(L_24, _stringLiteral3574561019, /*hidden argument*/NULL); goto IL_0105; } IL_00cd: { StringBuilder_t1221177846 * L_25 = V_0; NullCheck(L_25); StringBuilder_Append_m3636508479(L_25, _stringLiteral1653664622, /*hidden argument*/NULL); V_2 = 0; goto IL_00fc; } IL_00e0: { StringBuilder_t1221177846 * L_26 = V_0; ByteU5BU5D_t3397334013* L_27 = V_1; int32_t L_28 = V_2; NullCheck(L_27); String_t* L_29 = Byte_ToString_m1309661918(((L_27)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_28))), _stringLiteral3231012720, /*hidden argument*/NULL); NullCheck(L_26); StringBuilder_Append_m3636508479(L_26, L_29, /*hidden argument*/NULL); int32_t L_30 = V_2; V_2 = ((int32_t)((int32_t)L_30+(int32_t)1)); } IL_00fc: { int32_t L_31 = V_2; ByteU5BU5D_t3397334013* L_32 = V_1; NullCheck(L_32); if ((((int32_t)L_31) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_32)->max_length))))))) { goto IL_00e0; } } IL_0105: { int32_t L_33 = AssemblyName_get_Flags_m1290091392(__this, /*hidden argument*/NULL); if (!((int32_t)((int32_t)L_33&(int32_t)((int32_t)256)))) { goto IL_0122; } } { StringBuilder_t1221177846 * L_34 = V_0; NullCheck(L_34); StringBuilder_Append_m3636508479(L_34, _stringLiteral130462888, /*hidden argument*/NULL); } IL_0122: { StringBuilder_t1221177846 * L_35 = V_0; NullCheck(L_35); String_t* L_36 = StringBuilder_ToString_m1507807375(L_35, /*hidden argument*/NULL); return L_36; } } // System.Version System.Reflection.AssemblyName::get_Version() extern "C" Version_t1755874712 * AssemblyName_get_Version_m3495645648 (AssemblyName_t894705941 * __this, const MethodInfo* method) { { Version_t1755874712 * L_0 = __this->get_version_13(); return L_0; } } // System.Void System.Reflection.AssemblyName::set_Version(System.Version) extern "C" void AssemblyName_set_Version_m1012722441 (AssemblyName_t894705941 * __this, Version_t1755874712 * ___value0, const MethodInfo* method) { int32_t V_0 = 0; { Version_t1755874712 * L_0 = ___value0; __this->set_version_13(L_0); Version_t1755874712 * L_1 = ___value0; bool L_2 = Version_op_Equality_m24249905(NULL /*static, unused*/, L_1, (Version_t1755874712 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_003a; } } { int32_t L_3 = 0; V_0 = L_3; __this->set_revision_5(L_3); int32_t L_4 = V_0; int32_t L_5 = L_4; V_0 = L_5; __this->set_build_4(L_5); int32_t L_6 = V_0; int32_t L_7 = L_6; V_0 = L_7; __this->set_minor_3(L_7); int32_t L_8 = V_0; __this->set_major_2(L_8); goto IL_006a; } IL_003a: { Version_t1755874712 * L_9 = ___value0; NullCheck(L_9); int32_t L_10 = Version_get_Major_m3385239713(L_9, /*hidden argument*/NULL); __this->set_major_2(L_10); Version_t1755874712 * L_11 = ___value0; NullCheck(L_11); int32_t L_12 = Version_get_Minor_m3449134197(L_11, /*hidden argument*/NULL); __this->set_minor_3(L_12); Version_t1755874712 * L_13 = ___value0; NullCheck(L_13); int32_t L_14 = Version_get_Build_m4207539494(L_13, /*hidden argument*/NULL); __this->set_build_4(L_14); Version_t1755874712 * L_15 = ___value0; NullCheck(L_15); int32_t L_16 = Version_get_Revision_m654005649(L_15, /*hidden argument*/NULL); __this->set_revision_5(L_16); } IL_006a: { return; } } // System.String System.Reflection.AssemblyName::ToString() extern "C" String_t* AssemblyName_ToString_m354334942 (AssemblyName_t894705941 * __this, const MethodInfo* method) { String_t* V_0 = NULL; String_t* G_B3_0 = NULL; { String_t* L_0 = AssemblyName_get_FullName_m1606421515(__this, /*hidden argument*/NULL); V_0 = L_0; String_t* L_1 = V_0; if (!L_1) { goto IL_0013; } } { String_t* L_2 = V_0; G_B3_0 = L_2; goto IL_0019; } IL_0013: { String_t* L_3 = Object_ToString_m853381981(__this, /*hidden argument*/NULL); G_B3_0 = L_3; } IL_0019: { return G_B3_0; } } // System.Boolean System.Reflection.AssemblyName::get_IsPublicKeyValid() extern "C" bool AssemblyName_get_IsPublicKeyValid_m188320564 (AssemblyName_t894705941 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyName_get_IsPublicKeyValid_m188320564_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; uint8_t V_2 = 0x0; bool V_3 = false; Exception_t1927440687 * __last_unhandled_exception = 0; NO_UNUSED_WARNING (__last_unhandled_exception); Exception_t1927440687 * __exception_local = 0; NO_UNUSED_WARNING (__exception_local); int32_t __leave_target = 0; NO_UNUSED_WARNING (__leave_target); { ByteU5BU5D_t3397334013* L_0 = __this->get_publicKey_10(); NullCheck(L_0); if ((!(((uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_0)->max_length))))) == ((uint32_t)((int32_t)16))))) { goto IL_003e; } } { V_0 = 0; V_1 = 0; goto IL_0027; } IL_0018: { int32_t L_1 = V_1; ByteU5BU5D_t3397334013* L_2 = __this->get_publicKey_10(); int32_t L_3 = V_0; int32_t L_4 = L_3; V_0 = ((int32_t)((int32_t)L_4+(int32_t)1)); NullCheck(L_2); int32_t L_5 = L_4; uint8_t L_6 = (L_2)->GetAt(static_cast<il2cpp_array_size_t>(L_5)); V_1 = ((int32_t)((int32_t)L_1+(int32_t)L_6)); } IL_0027: { int32_t L_7 = V_0; ByteU5BU5D_t3397334013* L_8 = __this->get_publicKey_10(); NullCheck(L_8); if ((((int32_t)L_7) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_8)->max_length))))))) { goto IL_0018; } } { int32_t L_9 = V_1; if ((!(((uint32_t)L_9) == ((uint32_t)4)))) { goto IL_003e; } } { return (bool)1; } IL_003e: { ByteU5BU5D_t3397334013* L_10 = __this->get_publicKey_10(); NullCheck(L_10); int32_t L_11 = 0; uint8_t L_12 = (L_10)->GetAt(static_cast<il2cpp_array_size_t>(L_11)); V_2 = L_12; uint8_t L_13 = V_2; if ((((int32_t)L_13) == ((int32_t)6))) { goto IL_00a4; } } { uint8_t L_14 = V_2; if ((((int32_t)L_14) == ((int32_t)7))) { goto IL_00c7; } } { uint8_t L_15 = V_2; if ((((int32_t)L_15) == ((int32_t)0))) { goto IL_0061; } } { goto IL_00cc; } IL_0061: { ByteU5BU5D_t3397334013* L_16 = __this->get_publicKey_10(); NullCheck(L_16); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_16)->max_length))))) <= ((int32_t)((int32_t)12)))) { goto IL_009f; } } { ByteU5BU5D_t3397334013* L_17 = __this->get_publicKey_10(); NullCheck(L_17); int32_t L_18 = ((int32_t)12); uint8_t L_19 = (L_17)->GetAt(static_cast<il2cpp_array_size_t>(L_18)); if ((!(((uint32_t)L_19) == ((uint32_t)6)))) { goto IL_009f; } } IL_007f: try { // begin try (depth: 1) { ByteU5BU5D_t3397334013* L_20 = __this->get_publicKey_10(); CryptoConvert_FromCapiPublicKeyBlob_m812595523(NULL /*static, unused*/, L_20, ((int32_t)12), /*hidden argument*/NULL); V_3 = (bool)1; goto IL_00ce; } IL_0094: { ; // IL_0094: leave IL_009f } } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __exception_local = (Exception_t1927440687 *)e.ex; if(il2cpp_codegen_class_is_assignable_from (CryptographicException_t3349726436_il2cpp_TypeInfo_var, e.ex->klass)) goto CATCH_0099; throw e; } CATCH_0099: { // begin catch(System.Security.Cryptography.CryptographicException) goto IL_009f; } // end catch (depth: 1) IL_009f: { goto IL_00cc; } IL_00a4: try { // begin try (depth: 1) { ByteU5BU5D_t3397334013* L_21 = __this->get_publicKey_10(); CryptoConvert_FromCapiPublicKeyBlob_m547807126(NULL /*static, unused*/, L_21, /*hidden argument*/NULL); V_3 = (bool)1; goto IL_00ce; } IL_00b7: { ; // IL_00b7: leave IL_00c2 } } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __exception_local = (Exception_t1927440687 *)e.ex; if(il2cpp_codegen_class_is_assignable_from (CryptographicException_t3349726436_il2cpp_TypeInfo_var, e.ex->klass)) goto CATCH_00bc; throw e; } CATCH_00bc: { // begin catch(System.Security.Cryptography.CryptographicException) goto IL_00c2; } // end catch (depth: 1) IL_00c2: { goto IL_00cc; } IL_00c7: { goto IL_00cc; } IL_00cc: { return (bool)0; } IL_00ce: { bool L_22 = V_3; return L_22; } } // System.Byte[] System.Reflection.AssemblyName::InternalGetPublicKeyToken() extern "C" ByteU5BU5D_t3397334013* AssemblyName_InternalGetPublicKeyToken_m3706025887 (AssemblyName_t894705941 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyName_InternalGetPublicKeyToken_m3706025887_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ByteU5BU5D_t3397334013* L_0 = __this->get_keyToken_11(); if (!L_0) { goto IL_0012; } } { ByteU5BU5D_t3397334013* L_1 = __this->get_keyToken_11(); return L_1; } IL_0012: { ByteU5BU5D_t3397334013* L_2 = __this->get_publicKey_10(); if (L_2) { goto IL_001f; } } { return (ByteU5BU5D_t3397334013*)NULL; } IL_001f: { ByteU5BU5D_t3397334013* L_3 = __this->get_publicKey_10(); NullCheck(L_3); if ((((int32_t)((int32_t)(((Il2CppArray *)L_3)->max_length))))) { goto IL_0033; } } { return ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)0)); } IL_0033: { bool L_4 = AssemblyName_get_IsPublicKeyValid_m188320564(__this, /*hidden argument*/NULL); if (L_4) { goto IL_0049; } } { SecurityException_t887327375 * L_5 = (SecurityException_t887327375 *)il2cpp_codegen_object_new(SecurityException_t887327375_il2cpp_TypeInfo_var); SecurityException__ctor_m1484114982(L_5, _stringLiteral2662378774, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_5); } IL_0049: { ByteU5BU5D_t3397334013* L_6 = AssemblyName_ComputePublicKeyToken_m2254215863(__this, /*hidden argument*/NULL); return L_6; } } // System.Byte[] System.Reflection.AssemblyName::ComputePublicKeyToken() extern "C" ByteU5BU5D_t3397334013* AssemblyName_ComputePublicKeyToken_m2254215863 (AssemblyName_t894705941 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyName_ComputePublicKeyToken_m2254215863_MetadataUsageId); s_Il2CppMethodInitialized = true; } HashAlgorithm_t2624936259 * V_0 = NULL; ByteU5BU5D_t3397334013* V_1 = NULL; ByteU5BU5D_t3397334013* V_2 = NULL; { SHA1_t3336793149 * L_0 = SHA1_Create_m139442991(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_0; HashAlgorithm_t2624936259 * L_1 = V_0; ByteU5BU5D_t3397334013* L_2 = __this->get_publicKey_10(); NullCheck(L_1); ByteU5BU5D_t3397334013* L_3 = HashAlgorithm_ComputeHash_m3637856778(L_1, L_2, /*hidden argument*/NULL); V_1 = L_3; V_2 = ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)8)); ByteU5BU5D_t3397334013* L_4 = V_1; ByteU5BU5D_t3397334013* L_5 = V_1; NullCheck(L_5); ByteU5BU5D_t3397334013* L_6 = V_2; Array_Copy_m3808317496(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_4, ((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_5)->max_length))))-(int32_t)8)), (Il2CppArray *)(Il2CppArray *)L_6, 0, 8, /*hidden argument*/NULL); ByteU5BU5D_t3397334013* L_7 = V_2; Array_Reverse_m3433347928(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_7, 0, 8, /*hidden argument*/NULL); ByteU5BU5D_t3397334013* L_8 = V_2; return L_8; } } // System.Void System.Reflection.AssemblyName::SetPublicKey(System.Byte[]) extern "C" void AssemblyName_SetPublicKey_m1491402438 (AssemblyName_t894705941 * __this, ByteU5BU5D_t3397334013* ___publicKey0, const MethodInfo* method) { { ByteU5BU5D_t3397334013* L_0 = ___publicKey0; if (L_0) { goto IL_0019; } } { int32_t L_1 = __this->get_flags_7(); __this->set_flags_7(((int32_t)((int32_t)L_1^(int32_t)1))); goto IL_0027; } IL_0019: { int32_t L_2 = __this->get_flags_7(); __this->set_flags_7(((int32_t)((int32_t)L_2|(int32_t)1))); } IL_0027: { ByteU5BU5D_t3397334013* L_3 = ___publicKey0; __this->set_publicKey_10(L_3); return; } } // System.Void System.Reflection.AssemblyName::SetPublicKeyToken(System.Byte[]) extern "C" void AssemblyName_SetPublicKeyToken_m3032035167 (AssemblyName_t894705941 * __this, ByteU5BU5D_t3397334013* ___publicKeyToken0, const MethodInfo* method) { { ByteU5BU5D_t3397334013* L_0 = ___publicKeyToken0; __this->set_keyToken_11(L_0); return; } } // System.Void System.Reflection.AssemblyName::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void AssemblyName_GetObjectData_m1221677827 (AssemblyName_t894705941 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyName_GetObjectData_m1221677827_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* G_B4_0 = NULL; SerializationInfo_t228987430 * G_B4_1 = NULL; String_t* G_B3_0 = NULL; SerializationInfo_t228987430 * G_B3_1 = NULL; int32_t G_B5_0 = 0; String_t* G_B5_1 = NULL; SerializationInfo_t228987430 * G_B5_2 = NULL; { SerializationInfo_t228987430 * L_0 = ___info0; if (L_0) { goto IL_0011; } } { ArgumentNullException_t628810857 * L_1 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m3380712306(L_1, _stringLiteral2792112382, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0011: { SerializationInfo_t228987430 * L_2 = ___info0; String_t* L_3 = __this->get_name_0(); NullCheck(L_2); SerializationInfo_AddValue_m1740888931(L_2, _stringLiteral594030812, L_3, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_4 = ___info0; ByteU5BU5D_t3397334013* L_5 = __this->get_publicKey_10(); NullCheck(L_4); SerializationInfo_AddValue_m1740888931(L_4, _stringLiteral2167127169, (Il2CppObject *)(Il2CppObject *)L_5, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_6 = ___info0; ByteU5BU5D_t3397334013* L_7 = __this->get_keyToken_11(); NullCheck(L_6); SerializationInfo_AddValue_m1740888931(L_6, _stringLiteral2837183762, (Il2CppObject *)(Il2CppObject *)L_7, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_8 = ___info0; CultureInfo_t3500843524 * L_9 = __this->get_cultureinfo_6(); G_B3_0 = _stringLiteral3706305741; G_B3_1 = L_8; if (!L_9) { G_B4_0 = _stringLiteral3706305741; G_B4_1 = L_8; goto IL_0065; } } { CultureInfo_t3500843524 * L_10 = __this->get_cultureinfo_6(); NullCheck(L_10); int32_t L_11 = VirtFuncInvoker0< int32_t >::Invoke(6 /* System.Int32 System.Globalization.CultureInfo::get_LCID() */, L_10); G_B5_0 = L_11; G_B5_1 = G_B3_0; G_B5_2 = G_B3_1; goto IL_0066; } IL_0065: { G_B5_0 = (-1); G_B5_1 = G_B4_0; G_B5_2 = G_B4_1; } IL_0066: { NullCheck(G_B5_2); SerializationInfo_AddValue_m902275108(G_B5_2, G_B5_1, G_B5_0, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_12 = ___info0; String_t* L_13 = __this->get_codebase_1(); NullCheck(L_12); SerializationInfo_AddValue_m1740888931(L_12, _stringLiteral1952199827, L_13, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_14 = ___info0; Version_t1755874712 * L_15 = AssemblyName_get_Version_m3495645648(__this, /*hidden argument*/NULL); NullCheck(L_14); SerializationInfo_AddValue_m1740888931(L_14, _stringLiteral1734555969, L_15, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_16 = ___info0; int32_t L_17 = __this->get_hashalg_8(); int32_t L_18 = L_17; Il2CppObject * L_19 = Box(AssemblyHashAlgorithm_t4147282775_il2cpp_TypeInfo_var, &L_18); NullCheck(L_16); SerializationInfo_AddValue_m1740888931(L_16, _stringLiteral3684797936, L_19, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_20 = ___info0; int32_t L_21 = ((int32_t)0); Il2CppObject * L_22 = Box(AssemblyHashAlgorithm_t4147282775_il2cpp_TypeInfo_var, &L_21); NullCheck(L_20); SerializationInfo_AddValue_m1740888931(L_20, _stringLiteral416540412, L_22, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_23 = ___info0; StrongNameKeyPair_t4090869089 * L_24 = __this->get_keypair_9(); NullCheck(L_23); SerializationInfo_AddValue_m1740888931(L_23, _stringLiteral2448232678, L_24, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_25 = ___info0; int32_t L_26 = __this->get_versioncompat_12(); int32_t L_27 = L_26; Il2CppObject * L_28 = Box(AssemblyVersionCompatibility_t1223556284_il2cpp_TypeInfo_var, &L_27); NullCheck(L_25); SerializationInfo_AddValue_m1740888931(L_25, _stringLiteral1836058351, L_28, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_29 = ___info0; int32_t L_30 = __this->get_flags_7(); int32_t L_31 = L_30; Il2CppObject * L_32 = Box(AssemblyNameFlags_t1794031440_il2cpp_TypeInfo_var, &L_31); NullCheck(L_29); SerializationInfo_AddValue_m1740888931(L_29, _stringLiteral180760614, L_32, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_33 = ___info0; NullCheck(L_33); SerializationInfo_AddValue_m1740888931(L_33, _stringLiteral556236101, NULL, /*hidden argument*/NULL); return; } } // System.Object System.Reflection.AssemblyName::Clone() extern "C" Il2CppObject * AssemblyName_Clone_m3390118349 (AssemblyName_t894705941 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyName_Clone_m3390118349_MetadataUsageId); s_Il2CppMethodInitialized = true; } AssemblyName_t894705941 * V_0 = NULL; { AssemblyName_t894705941 * L_0 = (AssemblyName_t894705941 *)il2cpp_codegen_object_new(AssemblyName_t894705941_il2cpp_TypeInfo_var); AssemblyName__ctor_m2505746587(L_0, /*hidden argument*/NULL); V_0 = L_0; AssemblyName_t894705941 * L_1 = V_0; String_t* L_2 = __this->get_name_0(); NullCheck(L_1); L_1->set_name_0(L_2); AssemblyName_t894705941 * L_3 = V_0; String_t* L_4 = __this->get_codebase_1(); NullCheck(L_3); L_3->set_codebase_1(L_4); AssemblyName_t894705941 * L_5 = V_0; int32_t L_6 = __this->get_major_2(); NullCheck(L_5); L_5->set_major_2(L_6); AssemblyName_t894705941 * L_7 = V_0; int32_t L_8 = __this->get_minor_3(); NullCheck(L_7); L_7->set_minor_3(L_8); AssemblyName_t894705941 * L_9 = V_0; int32_t L_10 = __this->get_build_4(); NullCheck(L_9); L_9->set_build_4(L_10); AssemblyName_t894705941 * L_11 = V_0; int32_t L_12 = __this->get_revision_5(); NullCheck(L_11); L_11->set_revision_5(L_12); AssemblyName_t894705941 * L_13 = V_0; Version_t1755874712 * L_14 = __this->get_version_13(); NullCheck(L_13); L_13->set_version_13(L_14); AssemblyName_t894705941 * L_15 = V_0; CultureInfo_t3500843524 * L_16 = __this->get_cultureinfo_6(); NullCheck(L_15); L_15->set_cultureinfo_6(L_16); AssemblyName_t894705941 * L_17 = V_0; int32_t L_18 = __this->get_flags_7(); NullCheck(L_17); L_17->set_flags_7(L_18); AssemblyName_t894705941 * L_19 = V_0; int32_t L_20 = __this->get_hashalg_8(); NullCheck(L_19); L_19->set_hashalg_8(L_20); AssemblyName_t894705941 * L_21 = V_0; StrongNameKeyPair_t4090869089 * L_22 = __this->get_keypair_9(); NullCheck(L_21); L_21->set_keypair_9(L_22); AssemblyName_t894705941 * L_23 = V_0; ByteU5BU5D_t3397334013* L_24 = __this->get_publicKey_10(); NullCheck(L_23); L_23->set_publicKey_10(L_24); AssemblyName_t894705941 * L_25 = V_0; ByteU5BU5D_t3397334013* L_26 = __this->get_keyToken_11(); NullCheck(L_25); L_25->set_keyToken_11(L_26); AssemblyName_t894705941 * L_27 = V_0; int32_t L_28 = __this->get_versioncompat_12(); NullCheck(L_27); L_27->set_versioncompat_12(L_28); AssemblyName_t894705941 * L_29 = V_0; return L_29; } } // System.Void System.Reflection.AssemblyName::OnDeserialization(System.Object) extern "C" void AssemblyName_OnDeserialization_m2683521459 (AssemblyName_t894705941 * __this, Il2CppObject * ___sender0, const MethodInfo* method) { { Version_t1755874712 * L_0 = __this->get_version_13(); AssemblyName_set_Version_m1012722441(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.AssemblyProductAttribute::.ctor(System.String) extern "C" void AssemblyProductAttribute__ctor_m1807437213 (AssemblyProductAttribute_t1523443169 * __this, String_t* ___product0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___product0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.AssemblyTitleAttribute::.ctor(System.String) extern "C" void AssemblyTitleAttribute__ctor_m1696431446 (AssemblyTitleAttribute_t92945912 * __this, String_t* ___title0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___title0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.AssemblyTrademarkAttribute::.ctor(System.String) extern "C" void AssemblyTrademarkAttribute__ctor_m4184045333 (AssemblyTrademarkAttribute_t3740556705 * __this, String_t* ___trademark0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___trademark0; __this->set_name_0(L_0); return; } } // System.Void System.Reflection.Binder::.ctor() extern "C" void Binder__ctor_m1361613966 (Binder_t3404612058 * __this, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.Binder::.cctor() extern "C" void Binder__cctor_m3736115807 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Binder__cctor_m3736115807_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Default_t3956931304 * L_0 = (Default_t3956931304 *)il2cpp_codegen_object_new(Default_t3956931304_il2cpp_TypeInfo_var); Default__ctor_m172834064(L_0, /*hidden argument*/NULL); ((Binder_t3404612058_StaticFields*)Binder_t3404612058_il2cpp_TypeInfo_var->static_fields)->set_default_binder_0(L_0); return; } } // System.Reflection.Binder System.Reflection.Binder::get_DefaultBinder() extern "C" Binder_t3404612058 * Binder_get_DefaultBinder_m965620943 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Binder_get_DefaultBinder_m965620943_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); Binder_t3404612058 * L_0 = ((Binder_t3404612058_StaticFields*)Binder_t3404612058_il2cpp_TypeInfo_var->static_fields)->get_default_binder_0(); return L_0; } } // System.Boolean System.Reflection.Binder::ConvertArgs(System.Reflection.Binder,System.Object[],System.Reflection.ParameterInfo[],System.Globalization.CultureInfo) extern "C" bool Binder_ConvertArgs_m2999223281 (Il2CppObject * __this /* static, unused */, Binder_t3404612058 * ___binder0, ObjectU5BU5D_t3614634134* ___args1, ParameterInfoU5BU5D_t2275869610* ___pinfo2, CultureInfo_t3500843524 * ___culture3, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Binder_ConvertArgs_m2999223281_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; Il2CppObject * V_1 = NULL; { ObjectU5BU5D_t3614634134* L_0 = ___args1; if (L_0) { goto IL_0016; } } { ParameterInfoU5BU5D_t2275869610* L_1 = ___pinfo2; NullCheck(L_1); if ((((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length))))) { goto IL_0010; } } { return (bool)1; } IL_0010: { TargetParameterCountException_t1554451430 * L_2 = (TargetParameterCountException_t1554451430 *)il2cpp_codegen_object_new(TargetParameterCountException_t1554451430_il2cpp_TypeInfo_var); TargetParameterCountException__ctor_m1256521036(L_2, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_2); } IL_0016: { ParameterInfoU5BU5D_t2275869610* L_3 = ___pinfo2; NullCheck(L_3); ObjectU5BU5D_t3614634134* L_4 = ___args1; NullCheck(L_4); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_3)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_4)->max_length))))))) { goto IL_0027; } } { TargetParameterCountException_t1554451430 * L_5 = (TargetParameterCountException_t1554451430 *)il2cpp_codegen_object_new(TargetParameterCountException_t1554451430_il2cpp_TypeInfo_var); TargetParameterCountException__ctor_m1256521036(L_5, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_5); } IL_0027: { V_0 = 0; goto IL_0059; } IL_002e: { Binder_t3404612058 * L_6 = ___binder0; ObjectU5BU5D_t3614634134* L_7 = ___args1; int32_t L_8 = V_0; NullCheck(L_7); int32_t L_9 = L_8; Il2CppObject * L_10 = (L_7)->GetAt(static_cast<il2cpp_array_size_t>(L_9)); ParameterInfoU5BU5D_t2275869610* L_11 = ___pinfo2; int32_t L_12 = V_0; NullCheck(L_11); int32_t L_13 = L_12; ParameterInfo_t2249040075 * L_14 = (L_11)->GetAt(static_cast<il2cpp_array_size_t>(L_13)); NullCheck(L_14); Type_t * L_15 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_14); CultureInfo_t3500843524 * L_16 = ___culture3; NullCheck(L_6); Il2CppObject * L_17 = VirtFuncInvoker3< Il2CppObject *, Il2CppObject *, Type_t *, CultureInfo_t3500843524 * >::Invoke(5 /* System.Object System.Reflection.Binder::ChangeType(System.Object,System.Type,System.Globalization.CultureInfo) */, L_6, L_10, L_15, L_16); V_1 = L_17; Il2CppObject * L_18 = V_1; if (L_18) { goto IL_0051; } } { ObjectU5BU5D_t3614634134* L_19 = ___args1; int32_t L_20 = V_0; NullCheck(L_19); int32_t L_21 = L_20; Il2CppObject * L_22 = (L_19)->GetAt(static_cast<il2cpp_array_size_t>(L_21)); if (!L_22) { goto IL_0051; } } { return (bool)0; } IL_0051: { ObjectU5BU5D_t3614634134* L_23 = ___args1; int32_t L_24 = V_0; Il2CppObject * L_25 = V_1; NullCheck(L_23); ArrayElementTypeCheck (L_23, L_25); (L_23)->SetAt(static_cast<il2cpp_array_size_t>(L_24), (Il2CppObject *)L_25); int32_t L_26 = V_0; V_0 = ((int32_t)((int32_t)L_26+(int32_t)1)); } IL_0059: { int32_t L_27 = V_0; ObjectU5BU5D_t3614634134* L_28 = ___args1; NullCheck(L_28); if ((((int32_t)L_27) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_28)->max_length))))))) { goto IL_002e; } } { return (bool)1; } } // System.Int32 System.Reflection.Binder::GetDerivedLevel(System.Type) extern "C" int32_t Binder_GetDerivedLevel_m1809808744 (Il2CppObject * __this /* static, unused */, Type_t * ___type0, const MethodInfo* method) { Type_t * V_0 = NULL; int32_t V_1 = 0; { Type_t * L_0 = ___type0; V_0 = L_0; V_1 = 1; goto IL_0014; } IL_0009: { int32_t L_1 = V_1; V_1 = ((int32_t)((int32_t)L_1+(int32_t)1)); Type_t * L_2 = V_0; NullCheck(L_2); Type_t * L_3 = VirtFuncInvoker0< Type_t * >::Invoke(17 /* System.Type System.Type::get_BaseType() */, L_2); V_0 = L_3; } IL_0014: { Type_t * L_4 = V_0; NullCheck(L_4); Type_t * L_5 = VirtFuncInvoker0< Type_t * >::Invoke(17 /* System.Type System.Type::get_BaseType() */, L_4); if (L_5) { goto IL_0009; } } { int32_t L_6 = V_1; return L_6; } } // System.Reflection.MethodBase System.Reflection.Binder::FindMostDerivedMatch(System.Reflection.MethodBase[]) extern "C" MethodBase_t904190842 * Binder_FindMostDerivedMatch_m2621831847 (Il2CppObject * __this /* static, unused */, MethodBaseU5BU5D_t2597254495* ___match0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Binder_FindMostDerivedMatch_m2621831847_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; int32_t V_2 = 0; int32_t V_3 = 0; MethodBase_t904190842 * V_4 = NULL; int32_t V_5 = 0; ParameterInfoU5BU5D_t2275869610* V_6 = NULL; ParameterInfoU5BU5D_t2275869610* V_7 = NULL; bool V_8 = false; int32_t V_9 = 0; { V_0 = 0; V_1 = (-1); MethodBaseU5BU5D_t2597254495* L_0 = ___match0; NullCheck(L_0); V_2 = (((int32_t)((int32_t)(((Il2CppArray *)L_0)->max_length)))); V_3 = 0; goto IL_00ba; } IL_000f: { MethodBaseU5BU5D_t2597254495* L_1 = ___match0; int32_t L_2 = V_3; NullCheck(L_1); int32_t L_3 = L_2; MethodBase_t904190842 * L_4 = (L_1)->GetAt(static_cast<il2cpp_array_size_t>(L_3)); V_4 = L_4; MethodBase_t904190842 * L_5 = V_4; NullCheck(L_5); Type_t * L_6 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, L_5); IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); int32_t L_7 = Binder_GetDerivedLevel_m1809808744(NULL /*static, unused*/, L_6, /*hidden argument*/NULL); V_5 = L_7; int32_t L_8 = V_5; int32_t L_9 = V_0; if ((!(((uint32_t)L_8) == ((uint32_t)L_9)))) { goto IL_0030; } } { AmbiguousMatchException_t1406414556 * L_10 = (AmbiguousMatchException_t1406414556 *)il2cpp_codegen_object_new(AmbiguousMatchException_t1406414556_il2cpp_TypeInfo_var); AmbiguousMatchException__ctor_m2088048346(L_10, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_10); } IL_0030: { int32_t L_11 = V_1; if ((((int32_t)L_11) < ((int32_t)0))) { goto IL_00a9; } } { MethodBase_t904190842 * L_12 = V_4; NullCheck(L_12); ParameterInfoU5BU5D_t2275869610* L_13 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_12); V_6 = L_13; MethodBaseU5BU5D_t2597254495* L_14 = ___match0; int32_t L_15 = V_1; NullCheck(L_14); int32_t L_16 = L_15; MethodBase_t904190842 * L_17 = (L_14)->GetAt(static_cast<il2cpp_array_size_t>(L_16)); NullCheck(L_17); ParameterInfoU5BU5D_t2275869610* L_18 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_17); V_7 = L_18; V_8 = (bool)1; ParameterInfoU5BU5D_t2275869610* L_19 = V_6; NullCheck(L_19); ParameterInfoU5BU5D_t2275869610* L_20 = V_7; NullCheck(L_20); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_19)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_20)->max_length))))))) { goto IL_0062; } } { V_8 = (bool)0; goto IL_009c; } IL_0062: { V_9 = 0; goto IL_0091; } IL_006a: { ParameterInfoU5BU5D_t2275869610* L_21 = V_6; int32_t L_22 = V_9; NullCheck(L_21); int32_t L_23 = L_22; ParameterInfo_t2249040075 * L_24 = (L_21)->GetAt(static_cast<il2cpp_array_size_t>(L_23)); NullCheck(L_24); Type_t * L_25 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_24); ParameterInfoU5BU5D_t2275869610* L_26 = V_7; int32_t L_27 = V_9; NullCheck(L_26); int32_t L_28 = L_27; ParameterInfo_t2249040075 * L_29 = (L_26)->GetAt(static_cast<il2cpp_array_size_t>(L_28)); NullCheck(L_29); Type_t * L_30 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_29); if ((((Il2CppObject*)(Type_t *)L_25) == ((Il2CppObject*)(Type_t *)L_30))) { goto IL_008b; } } { V_8 = (bool)0; goto IL_009c; } IL_008b: { int32_t L_31 = V_9; V_9 = ((int32_t)((int32_t)L_31+(int32_t)1)); } IL_0091: { int32_t L_32 = V_9; ParameterInfoU5BU5D_t2275869610* L_33 = V_6; NullCheck(L_33); if ((((int32_t)L_32) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_33)->max_length))))))) { goto IL_006a; } } IL_009c: { bool L_34 = V_8; if (L_34) { goto IL_00a9; } } { AmbiguousMatchException_t1406414556 * L_35 = (AmbiguousMatchException_t1406414556 *)il2cpp_codegen_object_new(AmbiguousMatchException_t1406414556_il2cpp_TypeInfo_var); AmbiguousMatchException__ctor_m2088048346(L_35, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_35); } IL_00a9: { int32_t L_36 = V_5; int32_t L_37 = V_0; if ((((int32_t)L_36) <= ((int32_t)L_37))) { goto IL_00b6; } } { int32_t L_38 = V_5; V_0 = L_38; int32_t L_39 = V_3; V_1 = L_39; } IL_00b6: { int32_t L_40 = V_3; V_3 = ((int32_t)((int32_t)L_40+(int32_t)1)); } IL_00ba: { int32_t L_41 = V_3; int32_t L_42 = V_2; if ((((int32_t)L_41) < ((int32_t)L_42))) { goto IL_000f; } } { MethodBaseU5BU5D_t2597254495* L_43 = ___match0; int32_t L_44 = V_1; NullCheck(L_43); int32_t L_45 = L_44; MethodBase_t904190842 * L_46 = (L_43)->GetAt(static_cast<il2cpp_array_size_t>(L_45)); return L_46; } } // System.Void System.Reflection.Binder/Default::.ctor() extern "C" void Default__ctor_m172834064 (Default_t3956931304 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default__ctor_m172834064_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); Binder__ctor_m1361613966(__this, /*hidden argument*/NULL); return; } } // System.Reflection.MethodBase System.Reflection.Binder/Default::BindToMethod(System.Reflection.BindingFlags,System.Reflection.MethodBase[],System.Object[]&,System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[],System.Object&) extern "C" MethodBase_t904190842 * Default_BindToMethod_m1132635736 (Default_t3956931304 * __this, int32_t ___bindingAttr0, MethodBaseU5BU5D_t2597254495* ___match1, ObjectU5BU5D_t3614634134** ___args2, ParameterModifierU5BU5D_t963192633* ___modifiers3, CultureInfo_t3500843524 * ___culture4, StringU5BU5D_t1642385972* ___names5, Il2CppObject ** ___state6, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default_BindToMethod_m1132635736_MetadataUsageId); s_Il2CppMethodInitialized = true; } TypeU5BU5D_t1664964607* V_0 = NULL; int32_t V_1 = 0; MethodBase_t904190842 * V_2 = NULL; { ObjectU5BU5D_t3614634134** L_0 = ___args2; if ((*((ObjectU5BU5D_t3614634134**)L_0))) { goto IL_0012; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_1 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); V_0 = L_1; goto IL_0046; } IL_0012: { ObjectU5BU5D_t3614634134** L_2 = ___args2; NullCheck((*((ObjectU5BU5D_t3614634134**)L_2))); V_0 = ((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)(*((ObjectU5BU5D_t3614634134**)L_2)))->max_length)))))); V_1 = 0; goto IL_003c; } IL_0023: { ObjectU5BU5D_t3614634134** L_3 = ___args2; int32_t L_4 = V_1; NullCheck((*((ObjectU5BU5D_t3614634134**)L_3))); int32_t L_5 = L_4; Il2CppObject * L_6 = ((*((ObjectU5BU5D_t3614634134**)L_3)))->GetAt(static_cast<il2cpp_array_size_t>(L_5)); if (!L_6) { goto IL_0038; } } { TypeU5BU5D_t1664964607* L_7 = V_0; int32_t L_8 = V_1; ObjectU5BU5D_t3614634134** L_9 = ___args2; int32_t L_10 = V_1; NullCheck((*((ObjectU5BU5D_t3614634134**)L_9))); int32_t L_11 = L_10; Il2CppObject * L_12 = ((*((ObjectU5BU5D_t3614634134**)L_9)))->GetAt(static_cast<il2cpp_array_size_t>(L_11)); NullCheck(L_12); Type_t * L_13 = Object_GetType_m191970594(L_12, /*hidden argument*/NULL); NullCheck(L_7); ArrayElementTypeCheck (L_7, L_13); (L_7)->SetAt(static_cast<il2cpp_array_size_t>(L_8), (Type_t *)L_13); } IL_0038: { int32_t L_14 = V_1; V_1 = ((int32_t)((int32_t)L_14+(int32_t)1)); } IL_003c: { int32_t L_15 = V_1; ObjectU5BU5D_t3614634134** L_16 = ___args2; NullCheck((*((ObjectU5BU5D_t3614634134**)L_16))); if ((((int32_t)L_15) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)(*((ObjectU5BU5D_t3614634134**)L_16)))->max_length))))))) { goto IL_0023; } } IL_0046: { int32_t L_17 = ___bindingAttr0; MethodBaseU5BU5D_t2597254495* L_18 = ___match1; TypeU5BU5D_t1664964607* L_19 = V_0; ParameterModifierU5BU5D_t963192633* L_20 = ___modifiers3; MethodBase_t904190842 * L_21 = Default_SelectMethod_m3081239996(__this, L_17, L_18, L_19, L_20, (bool)1, /*hidden argument*/NULL); V_2 = L_21; Il2CppObject ** L_22 = ___state6; *((Il2CppObject **)(L_22)) = (Il2CppObject *)NULL; Il2CppCodeGenWriteBarrier((Il2CppObject **)(L_22), (Il2CppObject *)NULL); StringU5BU5D_t1642385972* L_23 = ___names5; if (!L_23) { goto IL_0068; } } { StringU5BU5D_t1642385972* L_24 = ___names5; ObjectU5BU5D_t3614634134** L_25 = ___args2; MethodBase_t904190842 * L_26 = V_2; Default_ReorderParameters_m1877749093(__this, L_24, L_25, L_26, /*hidden argument*/NULL); } IL_0068: { MethodBase_t904190842 * L_27 = V_2; return L_27; } } // System.Void System.Reflection.Binder/Default::ReorderParameters(System.String[],System.Object[]&,System.Reflection.MethodBase) extern "C" void Default_ReorderParameters_m1877749093 (Default_t3956931304 * __this, StringU5BU5D_t1642385972* ___names0, ObjectU5BU5D_t3614634134** ___args1, MethodBase_t904190842 * ___selected2, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default_ReorderParameters_m1877749093_MetadataUsageId); s_Il2CppMethodInitialized = true; } ObjectU5BU5D_t3614634134* V_0 = NULL; ParameterInfoU5BU5D_t2275869610* V_1 = NULL; int32_t V_2 = 0; int32_t V_3 = 0; { ObjectU5BU5D_t3614634134** L_0 = ___args1; NullCheck((*((ObjectU5BU5D_t3614634134**)L_0))); V_0 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)(*((ObjectU5BU5D_t3614634134**)L_0)))->max_length)))))); ObjectU5BU5D_t3614634134** L_1 = ___args1; ObjectU5BU5D_t3614634134* L_2 = V_0; ObjectU5BU5D_t3614634134** L_3 = ___args1; NullCheck((*((ObjectU5BU5D_t3614634134**)L_3))); Array_Copy_m2363740072(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)(*((ObjectU5BU5D_t3614634134**)L_1)), (Il2CppArray *)(Il2CppArray *)L_2, (((int32_t)((int32_t)(((Il2CppArray *)(*((ObjectU5BU5D_t3614634134**)L_3)))->max_length)))), /*hidden argument*/NULL); MethodBase_t904190842 * L_4 = ___selected2; NullCheck(L_4); ParameterInfoU5BU5D_t2275869610* L_5 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_4); V_1 = L_5; V_2 = 0; goto IL_005d; } IL_0024: { V_3 = 0; goto IL_0050; } IL_002b: { StringU5BU5D_t1642385972* L_6 = ___names0; int32_t L_7 = V_2; NullCheck(L_6); int32_t L_8 = L_7; String_t* L_9 = (L_6)->GetAt(static_cast<il2cpp_array_size_t>(L_8)); ParameterInfoU5BU5D_t2275869610* L_10 = V_1; int32_t L_11 = V_3; NullCheck(L_10); int32_t L_12 = L_11; ParameterInfo_t2249040075 * L_13 = (L_10)->GetAt(static_cast<il2cpp_array_size_t>(L_12)); NullCheck(L_13); String_t* L_14 = VirtFuncInvoker0< String_t* >::Invoke(9 /* System.String System.Reflection.ParameterInfo::get_Name() */, L_13); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_15 = String_op_Equality_m1790663636(NULL /*static, unused*/, L_9, L_14, /*hidden argument*/NULL); if (!L_15) { goto IL_004c; } } { ObjectU5BU5D_t3614634134* L_16 = V_0; int32_t L_17 = V_3; ObjectU5BU5D_t3614634134** L_18 = ___args1; int32_t L_19 = V_2; NullCheck((*((ObjectU5BU5D_t3614634134**)L_18))); int32_t L_20 = L_19; Il2CppObject * L_21 = ((*((ObjectU5BU5D_t3614634134**)L_18)))->GetAt(static_cast<il2cpp_array_size_t>(L_20)); NullCheck(L_16); ArrayElementTypeCheck (L_16, L_21); (L_16)->SetAt(static_cast<il2cpp_array_size_t>(L_17), (Il2CppObject *)L_21); goto IL_0059; } IL_004c: { int32_t L_22 = V_3; V_3 = ((int32_t)((int32_t)L_22+(int32_t)1)); } IL_0050: { int32_t L_23 = V_3; ParameterInfoU5BU5D_t2275869610* L_24 = V_1; NullCheck(L_24); if ((((int32_t)L_23) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_24)->max_length))))))) { goto IL_002b; } } IL_0059: { int32_t L_25 = V_2; V_2 = ((int32_t)((int32_t)L_25+(int32_t)1)); } IL_005d: { int32_t L_26 = V_2; StringU5BU5D_t1642385972* L_27 = ___names0; NullCheck(L_27); if ((((int32_t)L_26) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_27)->max_length))))))) { goto IL_0024; } } { ObjectU5BU5D_t3614634134* L_28 = V_0; ObjectU5BU5D_t3614634134** L_29 = ___args1; ObjectU5BU5D_t3614634134** L_30 = ___args1; NullCheck((*((ObjectU5BU5D_t3614634134**)L_30))); Array_Copy_m2363740072(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_28, (Il2CppArray *)(Il2CppArray *)(*((ObjectU5BU5D_t3614634134**)L_29)), (((int32_t)((int32_t)(((Il2CppArray *)(*((ObjectU5BU5D_t3614634134**)L_30)))->max_length)))), /*hidden argument*/NULL); return; } } // System.Boolean System.Reflection.Binder/Default::IsArrayAssignable(System.Type,System.Type) extern "C" bool Default_IsArrayAssignable_m3862319150 (Il2CppObject * __this /* static, unused */, Type_t * ___object_type0, Type_t * ___target_type1, const MethodInfo* method) { { Type_t * L_0 = ___object_type0; NullCheck(L_0); bool L_1 = Type_get_IsArray_m811277129(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0028; } } { Type_t * L_2 = ___target_type1; NullCheck(L_2); bool L_3 = Type_get_IsArray_m811277129(L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_0028; } } { Type_t * L_4 = ___object_type0; NullCheck(L_4); Type_t * L_5 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_4); Type_t * L_6 = ___target_type1; NullCheck(L_6); Type_t * L_7 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_6); bool L_8 = Default_IsArrayAssignable_m3862319150(NULL /*static, unused*/, L_5, L_7, /*hidden argument*/NULL); return L_8; } IL_0028: { Type_t * L_9 = ___target_type1; Type_t * L_10 = ___object_type0; NullCheck(L_9); bool L_11 = VirtFuncInvoker1< bool, Type_t * >::Invoke(42 /* System.Boolean System.Type::IsAssignableFrom(System.Type) */, L_9, L_10); if (!L_11) { goto IL_0036; } } { return (bool)1; } IL_0036: { return (bool)0; } } // System.Object System.Reflection.Binder/Default::ChangeType(System.Object,System.Type,System.Globalization.CultureInfo) extern "C" Il2CppObject * Default_ChangeType_m3142518280 (Default_t3956931304 * __this, Il2CppObject * ___value0, Type_t * ___type1, CultureInfo_t3500843524 * ___culture2, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default_ChangeType_m3142518280_MetadataUsageId); s_Il2CppMethodInitialized = true; } Type_t * V_0 = NULL; { Il2CppObject * L_0 = ___value0; if (L_0) { goto IL_0008; } } { return NULL; } IL_0008: { Il2CppObject * L_1 = ___value0; NullCheck(L_1); Type_t * L_2 = Object_GetType_m191970594(L_1, /*hidden argument*/NULL); V_0 = L_2; Type_t * L_3 = ___type1; NullCheck(L_3); bool L_4 = Type_get_IsByRef_m3523465500(L_3, /*hidden argument*/NULL); if (!L_4) { goto IL_0022; } } { Type_t * L_5 = ___type1; NullCheck(L_5); Type_t * L_6 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_5); ___type1 = L_6; } IL_0022: { Type_t * L_7 = V_0; Type_t * L_8 = ___type1; if ((((Il2CppObject*)(Type_t *)L_7) == ((Il2CppObject*)(Type_t *)L_8))) { goto IL_0035; } } { Type_t * L_9 = ___type1; Il2CppObject * L_10 = ___value0; NullCheck(L_9); bool L_11 = VirtFuncInvoker1< bool, Il2CppObject * >::Invoke(43 /* System.Boolean System.Type::IsInstanceOfType(System.Object) */, L_9, L_10); if (!L_11) { goto IL_0037; } } IL_0035: { Il2CppObject * L_12 = ___value0; return L_12; } IL_0037: { Type_t * L_13 = V_0; NullCheck(L_13); bool L_14 = Type_get_IsArray_m811277129(L_13, /*hidden argument*/NULL); if (!L_14) { goto IL_0065; } } { Type_t * L_15 = ___type1; NullCheck(L_15); bool L_16 = Type_get_IsArray_m811277129(L_15, /*hidden argument*/NULL); if (!L_16) { goto IL_0065; } } { Type_t * L_17 = V_0; NullCheck(L_17); Type_t * L_18 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_17); Type_t * L_19 = ___type1; NullCheck(L_19); Type_t * L_20 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_19); bool L_21 = Default_IsArrayAssignable_m3862319150(NULL /*static, unused*/, L_18, L_20, /*hidden argument*/NULL); if (!L_21) { goto IL_0065; } } { Il2CppObject * L_22 = ___value0; return L_22; } IL_0065: { Type_t * L_23 = V_0; Type_t * L_24 = ___type1; bool L_25 = Default_check_type_m2363631305(NULL /*static, unused*/, L_23, L_24, /*hidden argument*/NULL); if (!L_25) { goto IL_00f3; } } { Type_t * L_26 = ___type1; NullCheck(L_26); bool L_27 = Type_get_IsEnum_m313908919(L_26, /*hidden argument*/NULL); if (!L_27) { goto IL_0084; } } { Type_t * L_28 = ___type1; Il2CppObject * L_29 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(Enum_t2459695545_il2cpp_TypeInfo_var); Il2CppObject * L_30 = Enum_ToObject_m2460371738(NULL /*static, unused*/, L_28, L_29, /*hidden argument*/NULL); return L_30; } IL_0084: { Type_t * L_31 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_32 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Char_t3454481338_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_31) == ((Il2CppObject*)(Type_t *)L_32)))) { goto IL_00ce; } } { Type_t * L_33 = ___type1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_34 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Double_t4078015681_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_33) == ((Il2CppObject*)(Type_t *)L_34)))) { goto IL_00b1; } } { Il2CppObject * L_35 = ___value0; double L_36 = (((double)((double)((*(Il2CppChar*)((Il2CppChar*)UnBox(L_35, Char_t3454481338_il2cpp_TypeInfo_var))))))); Il2CppObject * L_37 = Box(Double_t4078015681_il2cpp_TypeInfo_var, &L_36); return L_37; } IL_00b1: { Type_t * L_38 = ___type1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_39 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Single_t2076509932_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_38) == ((Il2CppObject*)(Type_t *)L_39)))) { goto IL_00ce; } } { Il2CppObject * L_40 = ___value0; float L_41 = (((float)((float)((*(Il2CppChar*)((Il2CppChar*)UnBox(L_40, Char_t3454481338_il2cpp_TypeInfo_var))))))); Il2CppObject * L_42 = Box(Single_t2076509932_il2cpp_TypeInfo_var, &L_41); return L_42; } IL_00ce: { Type_t * L_43 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_44 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(IntPtr_t_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_43) == ((Il2CppObject*)(Type_t *)L_44)))) { goto IL_00eb; } } { Type_t * L_45 = ___type1; NullCheck(L_45); bool L_46 = Type_get_IsPointer_m3832342327(L_45, /*hidden argument*/NULL); if (!L_46) { goto IL_00eb; } } { Il2CppObject * L_47 = ___value0; return L_47; } IL_00eb: { Il2CppObject * L_48 = ___value0; Type_t * L_49 = ___type1; IL2CPP_RUNTIME_CLASS_INIT(Convert_t2607082565_il2cpp_TypeInfo_var); Il2CppObject * L_50 = Convert_ChangeType_m1630780412(NULL /*static, unused*/, L_48, L_49, /*hidden argument*/NULL); return L_50; } IL_00f3: { return NULL; } } // System.Void System.Reflection.Binder/Default::ReorderArgumentArray(System.Object[]&,System.Object) extern "C" void Default_ReorderArgumentArray_m3980835731 (Default_t3956931304 * __this, ObjectU5BU5D_t3614634134** ___args0, Il2CppObject * ___state1, const MethodInfo* method) { { return; } } // System.Boolean System.Reflection.Binder/Default::check_type(System.Type,System.Type) extern "C" bool Default_check_type_m2363631305 (Il2CppObject * __this /* static, unused */, Type_t * ___from0, Type_t * ___to1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default_check_type_m2363631305_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; int32_t V_2 = 0; int32_t V_3 = 0; int32_t G_B28_0 = 0; int32_t G_B30_0 = 0; int32_t G_B38_0 = 0; int32_t G_B40_0 = 0; int32_t G_B48_0 = 0; int32_t G_B50_0 = 0; int32_t G_B58_0 = 0; int32_t G_B60_0 = 0; int32_t G_B68_0 = 0; int32_t G_B70_0 = 0; int32_t G_B78_0 = 0; int32_t G_B80_0 = 0; int32_t G_B89_0 = 0; int32_t G_B91_0 = 0; int32_t G_B95_0 = 0; { Type_t * L_0 = ___from0; Type_t * L_1 = ___to1; if ((!(((Il2CppObject*)(Type_t *)L_0) == ((Il2CppObject*)(Type_t *)L_1)))) { goto IL_0009; } } { return (bool)1; } IL_0009: { Type_t * L_2 = ___from0; if (L_2) { goto IL_0011; } } { return (bool)1; } IL_0011: { Type_t * L_3 = ___to1; NullCheck(L_3); bool L_4 = Type_get_IsByRef_m3523465500(L_3, /*hidden argument*/NULL); Type_t * L_5 = ___from0; NullCheck(L_5); bool L_6 = Type_get_IsByRef_m3523465500(L_5, /*hidden argument*/NULL); if ((((int32_t)L_4) == ((int32_t)L_6))) { goto IL_0024; } } { return (bool)0; } IL_0024: { Type_t * L_7 = ___to1; NullCheck(L_7); bool L_8 = Type_get_IsInterface_m3583817465(L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_0037; } } { Type_t * L_9 = ___to1; Type_t * L_10 = ___from0; NullCheck(L_9); bool L_11 = VirtFuncInvoker1< bool, Type_t * >::Invoke(42 /* System.Boolean System.Type::IsAssignableFrom(System.Type) */, L_9, L_10); return L_11; } IL_0037: { Type_t * L_12 = ___to1; NullCheck(L_12); bool L_13 = Type_get_IsEnum_m313908919(L_12, /*hidden argument*/NULL); if (!L_13) { goto IL_0053; } } { Type_t * L_14 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Enum_t2459695545_il2cpp_TypeInfo_var); Type_t * L_15 = Enum_GetUnderlyingType_m3513899012(NULL /*static, unused*/, L_14, /*hidden argument*/NULL); ___to1 = L_15; Type_t * L_16 = ___from0; Type_t * L_17 = ___to1; if ((!(((Il2CppObject*)(Type_t *)L_16) == ((Il2CppObject*)(Type_t *)L_17)))) { goto IL_0053; } } { return (bool)1; } IL_0053: { Type_t * L_18 = ___to1; NullCheck(L_18); bool L_19 = VirtFuncInvoker0< bool >::Invoke(83 /* System.Boolean System.Type::get_IsGenericType() */, L_18); if (!L_19) { goto IL_0083; } } { Type_t * L_20 = ___to1; NullCheck(L_20); Type_t * L_21 = VirtFuncInvoker0< Type_t * >::Invoke(82 /* System.Type System.Type::GetGenericTypeDefinition() */, L_20); IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_22 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Nullable_1_t1398937014_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_21) == ((Il2CppObject*)(Type_t *)L_22)))) { goto IL_0083; } } { Type_t * L_23 = ___to1; NullCheck(L_23); TypeU5BU5D_t1664964607* L_24 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(79 /* System.Type[] System.Type::GetGenericArguments() */, L_23); NullCheck(L_24); int32_t L_25 = 0; Type_t * L_26 = (L_24)->GetAt(static_cast<il2cpp_array_size_t>(L_25)); Type_t * L_27 = ___from0; if ((!(((Il2CppObject*)(Type_t *)L_26) == ((Il2CppObject*)(Type_t *)L_27)))) { goto IL_0083; } } { return (bool)1; } IL_0083: { Type_t * L_28 = ___from0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); int32_t L_29 = Type_GetTypeCode_m1044483454(NULL /*static, unused*/, L_28, /*hidden argument*/NULL); V_0 = L_29; Type_t * L_30 = ___to1; int32_t L_31 = Type_GetTypeCode_m1044483454(NULL /*static, unused*/, L_30, /*hidden argument*/NULL); V_1 = L_31; int32_t L_32 = V_0; V_2 = L_32; int32_t L_33 = V_2; switch (((int32_t)((int32_t)L_33-(int32_t)4))) { case 0: { goto IL_00c8; } case 1: { goto IL_016f; } case 2: { goto IL_0103; } case 3: { goto IL_0228; } case 4: { goto IL_01cf; } case 5: { goto IL_02d2; } case 6: { goto IL_0281; } case 7: { goto IL_0323; } case 8: { goto IL_0323; } case 9: { goto IL_036b; } } } { goto IL_0384; } IL_00c8: { int32_t L_34 = V_1; V_3 = L_34; int32_t L_35 = V_3; switch (((int32_t)((int32_t)L_35-(int32_t)8))) { case 0: { goto IL_00f3; } case 1: { goto IL_00f3; } case 2: { goto IL_00f3; } case 3: { goto IL_00f3; } case 4: { goto IL_00f3; } case 5: { goto IL_00f3; } case 6: { goto IL_00f3; } } } { goto IL_00f5; } IL_00f3: { return (bool)1; } IL_00f5: { Type_t * L_36 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_37 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); return (bool)((((Il2CppObject*)(Type_t *)L_36) == ((Il2CppObject*)(Type_t *)L_37))? 1 : 0); } IL_0103: { int32_t L_38 = V_1; V_3 = L_38; int32_t L_39 = V_3; switch (((int32_t)((int32_t)L_39-(int32_t)4))) { case 0: { goto IL_013e; } case 1: { goto IL_0140; } case 2: { goto IL_0140; } case 3: { goto IL_013e; } case 4: { goto IL_013e; } case 5: { goto IL_013e; } case 6: { goto IL_013e; } case 7: { goto IL_013e; } case 8: { goto IL_013e; } case 9: { goto IL_013e; } case 10: { goto IL_013e; } } } { goto IL_0140; } IL_013e: { return (bool)1; } IL_0140: { Type_t * L_40 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_41 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((((Il2CppObject*)(Type_t *)L_40) == ((Il2CppObject*)(Type_t *)L_41))) { goto IL_016d; } } { Type_t * L_42 = ___from0; NullCheck(L_42); bool L_43 = Type_get_IsEnum_m313908919(L_42, /*hidden argument*/NULL); if (!L_43) { goto IL_016a; } } { Type_t * L_44 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_45 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); G_B28_0 = ((((Il2CppObject*)(Type_t *)L_44) == ((Il2CppObject*)(Type_t *)L_45))? 1 : 0); goto IL_016b; } IL_016a: { G_B28_0 = 0; } IL_016b: { G_B30_0 = G_B28_0; goto IL_016e; } IL_016d: { G_B30_0 = 1; } IL_016e: { return (bool)G_B30_0; } IL_016f: { int32_t L_46 = V_1; V_3 = L_46; int32_t L_47 = V_3; switch (((int32_t)((int32_t)L_47-(int32_t)7))) { case 0: { goto IL_019e; } case 1: { goto IL_01a0; } case 2: { goto IL_019e; } case 3: { goto IL_01a0; } case 4: { goto IL_019e; } case 5: { goto IL_01a0; } case 6: { goto IL_019e; } case 7: { goto IL_019e; } } } { goto IL_01a0; } IL_019e: { return (bool)1; } IL_01a0: { Type_t * L_48 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_49 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((((Il2CppObject*)(Type_t *)L_48) == ((Il2CppObject*)(Type_t *)L_49))) { goto IL_01cd; } } { Type_t * L_50 = ___from0; NullCheck(L_50); bool L_51 = Type_get_IsEnum_m313908919(L_50, /*hidden argument*/NULL); if (!L_51) { goto IL_01ca; } } { Type_t * L_52 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_53 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); G_B38_0 = ((((Il2CppObject*)(Type_t *)L_52) == ((Il2CppObject*)(Type_t *)L_53))? 1 : 0); goto IL_01cb; } IL_01ca: { G_B38_0 = 0; } IL_01cb: { G_B40_0 = G_B38_0; goto IL_01ce; } IL_01cd: { G_B40_0 = 1; } IL_01ce: { return (bool)G_B40_0; } IL_01cf: { int32_t L_54 = V_1; V_3 = L_54; int32_t L_55 = V_3; switch (((int32_t)((int32_t)L_55-(int32_t)((int32_t)9)))) { case 0: { goto IL_01f7; } case 1: { goto IL_01f7; } case 2: { goto IL_01f7; } case 3: { goto IL_01f7; } case 4: { goto IL_01f7; } case 5: { goto IL_01f7; } } } { goto IL_01f9; } IL_01f7: { return (bool)1; } IL_01f9: { Type_t * L_56 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_57 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((((Il2CppObject*)(Type_t *)L_56) == ((Il2CppObject*)(Type_t *)L_57))) { goto IL_0226; } } { Type_t * L_58 = ___from0; NullCheck(L_58); bool L_59 = Type_get_IsEnum_m313908919(L_58, /*hidden argument*/NULL); if (!L_59) { goto IL_0223; } } { Type_t * L_60 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_61 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); G_B48_0 = ((((Il2CppObject*)(Type_t *)L_60) == ((Il2CppObject*)(Type_t *)L_61))? 1 : 0); goto IL_0224; } IL_0223: { G_B48_0 = 0; } IL_0224: { G_B50_0 = G_B48_0; goto IL_0227; } IL_0226: { G_B50_0 = 1; } IL_0227: { return (bool)G_B50_0; } IL_0228: { int32_t L_62 = V_1; V_3 = L_62; int32_t L_63 = V_3; switch (((int32_t)((int32_t)L_63-(int32_t)((int32_t)9)))) { case 0: { goto IL_0250; } case 1: { goto IL_0252; } case 2: { goto IL_0250; } case 3: { goto IL_0252; } case 4: { goto IL_0250; } case 5: { goto IL_0250; } } } { goto IL_0252; } IL_0250: { return (bool)1; } IL_0252: { Type_t * L_64 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_65 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((((Il2CppObject*)(Type_t *)L_64) == ((Il2CppObject*)(Type_t *)L_65))) { goto IL_027f; } } { Type_t * L_66 = ___from0; NullCheck(L_66); bool L_67 = Type_get_IsEnum_m313908919(L_66, /*hidden argument*/NULL); if (!L_67) { goto IL_027c; } } { Type_t * L_68 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_69 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); G_B58_0 = ((((Il2CppObject*)(Type_t *)L_68) == ((Il2CppObject*)(Type_t *)L_69))? 1 : 0); goto IL_027d; } IL_027c: { G_B58_0 = 0; } IL_027d: { G_B60_0 = G_B58_0; goto IL_0280; } IL_027f: { G_B60_0 = 1; } IL_0280: { return (bool)G_B60_0; } IL_0281: { int32_t L_70 = V_1; V_3 = L_70; int32_t L_71 = V_3; switch (((int32_t)((int32_t)L_71-(int32_t)((int32_t)11)))) { case 0: { goto IL_02a1; } case 1: { goto IL_02a1; } case 2: { goto IL_02a1; } case 3: { goto IL_02a1; } } } { goto IL_02a3; } IL_02a1: { return (bool)1; } IL_02a3: { Type_t * L_72 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_73 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((((Il2CppObject*)(Type_t *)L_72) == ((Il2CppObject*)(Type_t *)L_73))) { goto IL_02d0; } } { Type_t * L_74 = ___from0; NullCheck(L_74); bool L_75 = Type_get_IsEnum_m313908919(L_74, /*hidden argument*/NULL); if (!L_75) { goto IL_02cd; } } { Type_t * L_76 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_77 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); G_B68_0 = ((((Il2CppObject*)(Type_t *)L_76) == ((Il2CppObject*)(Type_t *)L_77))? 1 : 0); goto IL_02ce; } IL_02cd: { G_B68_0 = 0; } IL_02ce: { G_B70_0 = G_B68_0; goto IL_02d1; } IL_02d0: { G_B70_0 = 1; } IL_02d1: { return (bool)G_B70_0; } IL_02d2: { int32_t L_78 = V_1; V_3 = L_78; int32_t L_79 = V_3; switch (((int32_t)((int32_t)L_79-(int32_t)((int32_t)11)))) { case 0: { goto IL_02f2; } case 1: { goto IL_02f4; } case 2: { goto IL_02f2; } case 3: { goto IL_02f2; } } } { goto IL_02f4; } IL_02f2: { return (bool)1; } IL_02f4: { Type_t * L_80 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_81 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((((Il2CppObject*)(Type_t *)L_80) == ((Il2CppObject*)(Type_t *)L_81))) { goto IL_0321; } } { Type_t * L_82 = ___from0; NullCheck(L_82); bool L_83 = Type_get_IsEnum_m313908919(L_82, /*hidden argument*/NULL); if (!L_83) { goto IL_031e; } } { Type_t * L_84 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_85 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); G_B78_0 = ((((Il2CppObject*)(Type_t *)L_84) == ((Il2CppObject*)(Type_t *)L_85))? 1 : 0); goto IL_031f; } IL_031e: { G_B78_0 = 0; } IL_031f: { G_B80_0 = G_B78_0; goto IL_0322; } IL_0321: { G_B80_0 = 1; } IL_0322: { return (bool)G_B80_0; } IL_0323: { int32_t L_86 = V_1; V_3 = L_86; int32_t L_87 = V_3; if ((((int32_t)L_87) == ((int32_t)((int32_t)13)))) { goto IL_033a; } } { int32_t L_88 = V_3; if ((((int32_t)L_88) == ((int32_t)((int32_t)14)))) { goto IL_033a; } } { goto IL_033c; } IL_033a: { return (bool)1; } IL_033c: { Type_t * L_89 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_90 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((((Il2CppObject*)(Type_t *)L_89) == ((Il2CppObject*)(Type_t *)L_90))) { goto IL_0369; } } { Type_t * L_91 = ___from0; NullCheck(L_91); bool L_92 = Type_get_IsEnum_m313908919(L_91, /*hidden argument*/NULL); if (!L_92) { goto IL_0366; } } { Type_t * L_93 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_94 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); G_B89_0 = ((((Il2CppObject*)(Type_t *)L_93) == ((Il2CppObject*)(Type_t *)L_94))? 1 : 0); goto IL_0367; } IL_0366: { G_B89_0 = 0; } IL_0367: { G_B91_0 = G_B89_0; goto IL_036a; } IL_0369: { G_B91_0 = 1; } IL_036a: { return (bool)G_B91_0; } IL_036b: { int32_t L_95 = V_1; if ((((int32_t)L_95) == ((int32_t)((int32_t)14)))) { goto IL_0382; } } { Type_t * L_96 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_97 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); G_B95_0 = ((((Il2CppObject*)(Type_t *)L_96) == ((Il2CppObject*)(Type_t *)L_97))? 1 : 0); goto IL_0383; } IL_0382: { G_B95_0 = 1; } IL_0383: { return (bool)G_B95_0; } IL_0384: { Type_t * L_98 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_99 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_98) == ((Il2CppObject*)(Type_t *)L_99)))) { goto IL_03a1; } } { Type_t * L_100 = ___from0; NullCheck(L_100); bool L_101 = Type_get_IsValueType_m1733572463(L_100, /*hidden argument*/NULL); if (!L_101) { goto IL_03a1; } } { return (bool)1; } IL_03a1: { Type_t * L_102 = ___to1; NullCheck(L_102); bool L_103 = Type_get_IsPointer_m3832342327(L_102, /*hidden argument*/NULL); if (!L_103) { goto IL_03be; } } { Type_t * L_104 = ___from0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_105 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(IntPtr_t_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_104) == ((Il2CppObject*)(Type_t *)L_105)))) { goto IL_03be; } } { return (bool)1; } IL_03be: { Type_t * L_106 = ___to1; Type_t * L_107 = ___from0; NullCheck(L_106); bool L_108 = VirtFuncInvoker1< bool, Type_t * >::Invoke(42 /* System.Boolean System.Type::IsAssignableFrom(System.Type) */, L_106, L_107); return L_108; } } // System.Boolean System.Reflection.Binder/Default::check_arguments(System.Type[],System.Reflection.ParameterInfo[],System.Boolean) extern "C" bool Default_check_arguments_m3406020270 (Il2CppObject * __this /* static, unused */, TypeU5BU5D_t1664964607* ___types0, ParameterInfoU5BU5D_t2275869610* ___args1, bool ___allowByRefMatch2, const MethodInfo* method) { int32_t V_0 = 0; bool V_1 = false; Type_t * V_2 = NULL; { V_0 = 0; goto IL_0053; } IL_0007: { TypeU5BU5D_t1664964607* L_0 = ___types0; int32_t L_1 = V_0; NullCheck(L_0); int32_t L_2 = L_1; Type_t * L_3 = (L_0)->GetAt(static_cast<il2cpp_array_size_t>(L_2)); ParameterInfoU5BU5D_t2275869610* L_4 = ___args1; int32_t L_5 = V_0; NullCheck(L_4); int32_t L_6 = L_5; ParameterInfo_t2249040075 * L_7 = (L_4)->GetAt(static_cast<il2cpp_array_size_t>(L_6)); NullCheck(L_7); Type_t * L_8 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_7); bool L_9 = Default_check_type_m2363631305(NULL /*static, unused*/, L_3, L_8, /*hidden argument*/NULL); V_1 = L_9; bool L_10 = V_1; if (L_10) { goto IL_0047; } } { bool L_11 = ___allowByRefMatch2; if (!L_11) { goto IL_0047; } } { ParameterInfoU5BU5D_t2275869610* L_12 = ___args1; int32_t L_13 = V_0; NullCheck(L_12); int32_t L_14 = L_13; ParameterInfo_t2249040075 * L_15 = (L_12)->GetAt(static_cast<il2cpp_array_size_t>(L_14)); NullCheck(L_15); Type_t * L_16 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_15); V_2 = L_16; Type_t * L_17 = V_2; NullCheck(L_17); bool L_18 = Type_get_IsByRef_m3523465500(L_17, /*hidden argument*/NULL); if (!L_18) { goto IL_0047; } } { TypeU5BU5D_t1664964607* L_19 = ___types0; int32_t L_20 = V_0; NullCheck(L_19); int32_t L_21 = L_20; Type_t * L_22 = (L_19)->GetAt(static_cast<il2cpp_array_size_t>(L_21)); Type_t * L_23 = V_2; NullCheck(L_23); Type_t * L_24 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_23); bool L_25 = Default_check_type_m2363631305(NULL /*static, unused*/, L_22, L_24, /*hidden argument*/NULL); V_1 = L_25; } IL_0047: { bool L_26 = V_1; if (L_26) { goto IL_004f; } } { return (bool)0; } IL_004f: { int32_t L_27 = V_0; V_0 = ((int32_t)((int32_t)L_27+(int32_t)1)); } IL_0053: { int32_t L_28 = V_0; TypeU5BU5D_t1664964607* L_29 = ___types0; NullCheck(L_29); if ((((int32_t)L_28) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_29)->max_length))))))) { goto IL_0007; } } { return (bool)1; } } // System.Reflection.MethodBase System.Reflection.Binder/Default::SelectMethod(System.Reflection.BindingFlags,System.Reflection.MethodBase[],System.Type[],System.Reflection.ParameterModifier[]) extern "C" MethodBase_t904190842 * Default_SelectMethod_m622251293 (Default_t3956931304 * __this, int32_t ___bindingAttr0, MethodBaseU5BU5D_t2597254495* ___match1, TypeU5BU5D_t1664964607* ___types2, ParameterModifierU5BU5D_t963192633* ___modifiers3, const MethodInfo* method) { { int32_t L_0 = ___bindingAttr0; MethodBaseU5BU5D_t2597254495* L_1 = ___match1; TypeU5BU5D_t1664964607* L_2 = ___types2; ParameterModifierU5BU5D_t963192633* L_3 = ___modifiers3; MethodBase_t904190842 * L_4 = Default_SelectMethod_m3081239996(__this, L_0, L_1, L_2, L_3, (bool)0, /*hidden argument*/NULL); return L_4; } } // System.Reflection.MethodBase System.Reflection.Binder/Default::SelectMethod(System.Reflection.BindingFlags,System.Reflection.MethodBase[],System.Type[],System.Reflection.ParameterModifier[],System.Boolean) extern "C" MethodBase_t904190842 * Default_SelectMethod_m3081239996 (Default_t3956931304 * __this, int32_t ___bindingAttr0, MethodBaseU5BU5D_t2597254495* ___match1, TypeU5BU5D_t1664964607* ___types2, ParameterModifierU5BU5D_t963192633* ___modifiers3, bool ___allowByRefMatch4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default_SelectMethod_m3081239996_MetadataUsageId); s_Il2CppMethodInitialized = true; } MethodBase_t904190842 * V_0 = NULL; int32_t V_1 = 0; int32_t V_2 = 0; ParameterInfoU5BU5D_t2275869610* V_3 = NULL; bool V_4 = false; Type_t * V_5 = NULL; ParameterInfoU5BU5D_t2275869610* V_6 = NULL; MethodBase_t904190842 * V_7 = NULL; ParameterInfoU5BU5D_t2275869610* V_8 = NULL; { MethodBaseU5BU5D_t2597254495* L_0 = ___match1; if (L_0) { goto IL_0011; } } { ArgumentNullException_t628810857 * L_1 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m3380712306(L_1, _stringLiteral3322341559, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0011: { V_1 = 0; goto IL_006b; } IL_0018: { MethodBaseU5BU5D_t2597254495* L_2 = ___match1; int32_t L_3 = V_1; NullCheck(L_2); int32_t L_4 = L_3; MethodBase_t904190842 * L_5 = (L_2)->GetAt(static_cast<il2cpp_array_size_t>(L_4)); V_0 = L_5; MethodBase_t904190842 * L_6 = V_0; NullCheck(L_6); ParameterInfoU5BU5D_t2275869610* L_7 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_6); V_3 = L_7; ParameterInfoU5BU5D_t2275869610* L_8 = V_3; NullCheck(L_8); TypeU5BU5D_t1664964607* L_9 = ___types2; NullCheck(L_9); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_8)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_9)->max_length))))))) { goto IL_0033; } } { goto IL_0067; } IL_0033: { V_2 = 0; goto IL_0053; } IL_003a: { TypeU5BU5D_t1664964607* L_10 = ___types2; int32_t L_11 = V_2; NullCheck(L_10); int32_t L_12 = L_11; Type_t * L_13 = (L_10)->GetAt(static_cast<il2cpp_array_size_t>(L_12)); ParameterInfoU5BU5D_t2275869610* L_14 = V_3; int32_t L_15 = V_2; NullCheck(L_14); int32_t L_16 = L_15; ParameterInfo_t2249040075 * L_17 = (L_14)->GetAt(static_cast<il2cpp_array_size_t>(L_16)); NullCheck(L_17); Type_t * L_18 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_17); if ((((Il2CppObject*)(Type_t *)L_13) == ((Il2CppObject*)(Type_t *)L_18))) { goto IL_004f; } } { goto IL_005c; } IL_004f: { int32_t L_19 = V_2; V_2 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_0053: { int32_t L_20 = V_2; TypeU5BU5D_t1664964607* L_21 = ___types2; NullCheck(L_21); if ((((int32_t)L_20) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_21)->max_length))))))) { goto IL_003a; } } IL_005c: { int32_t L_22 = V_2; TypeU5BU5D_t1664964607* L_23 = ___types2; NullCheck(L_23); if ((!(((uint32_t)L_22) == ((uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_23)->max_length)))))))) { goto IL_0067; } } { MethodBase_t904190842 * L_24 = V_0; return L_24; } IL_0067: { int32_t L_25 = V_1; V_1 = ((int32_t)((int32_t)L_25+(int32_t)1)); } IL_006b: { int32_t L_26 = V_1; MethodBaseU5BU5D_t2597254495* L_27 = ___match1; NullCheck(L_27); if ((((int32_t)L_26) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_27)->max_length))))))) { goto IL_0018; } } { V_4 = (bool)0; V_5 = (Type_t *)NULL; V_1 = 0; goto IL_0147; } IL_0081: { MethodBaseU5BU5D_t2597254495* L_28 = ___match1; int32_t L_29 = V_1; NullCheck(L_28); int32_t L_30 = L_29; MethodBase_t904190842 * L_31 = (L_28)->GetAt(static_cast<il2cpp_array_size_t>(L_30)); V_0 = L_31; MethodBase_t904190842 * L_32 = V_0; NullCheck(L_32); ParameterInfoU5BU5D_t2275869610* L_33 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_32); V_6 = L_33; ParameterInfoU5BU5D_t2275869610* L_34 = V_6; NullCheck(L_34); TypeU5BU5D_t1664964607* L_35 = ___types2; NullCheck(L_35); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_34)->max_length))))) <= ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_35)->max_length))))))) { goto IL_009e; } } { goto IL_0143; } IL_009e: { ParameterInfoU5BU5D_t2275869610* L_36 = V_6; NullCheck(L_36); if ((((int32_t)((int32_t)(((Il2CppArray *)L_36)->max_length))))) { goto IL_00ac; } } { goto IL_0143; } IL_00ac: { ParameterInfoU5BU5D_t2275869610* L_37 = V_6; ParameterInfoU5BU5D_t2275869610* L_38 = V_6; NullCheck(L_38); NullCheck(L_37); int32_t L_39 = ((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_38)->max_length))))-(int32_t)1)); ParameterInfo_t2249040075 * L_40 = (L_37)->GetAt(static_cast<il2cpp_array_size_t>(L_39)); IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_41 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(ParamArrayAttribute_t2144993728_0_0_0_var), /*hidden argument*/NULL); bool L_42 = Attribute_IsDefined_m2186700650(NULL /*static, unused*/, L_40, L_41, /*hidden argument*/NULL); V_4 = L_42; bool L_43 = V_4; if (L_43) { goto IL_00d2; } } { goto IL_0143; } IL_00d2: { ParameterInfoU5BU5D_t2275869610* L_44 = V_6; ParameterInfoU5BU5D_t2275869610* L_45 = V_6; NullCheck(L_45); NullCheck(L_44); int32_t L_46 = ((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_45)->max_length))))-(int32_t)1)); ParameterInfo_t2249040075 * L_47 = (L_44)->GetAt(static_cast<il2cpp_array_size_t>(L_46)); NullCheck(L_47); Type_t * L_48 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_47); NullCheck(L_48); Type_t * L_49 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_48); V_5 = L_49; V_2 = 0; goto IL_012f; } IL_00ee: { int32_t L_50 = V_2; ParameterInfoU5BU5D_t2275869610* L_51 = V_6; NullCheck(L_51); if ((((int32_t)L_50) >= ((int32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_51)->max_length))))-(int32_t)1))))) { goto IL_0110; } } { TypeU5BU5D_t1664964607* L_52 = ___types2; int32_t L_53 = V_2; NullCheck(L_52); int32_t L_54 = L_53; Type_t * L_55 = (L_52)->GetAt(static_cast<il2cpp_array_size_t>(L_54)); ParameterInfoU5BU5D_t2275869610* L_56 = V_6; int32_t L_57 = V_2; NullCheck(L_56); int32_t L_58 = L_57; ParameterInfo_t2249040075 * L_59 = (L_56)->GetAt(static_cast<il2cpp_array_size_t>(L_58)); NullCheck(L_59); Type_t * L_60 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_59); if ((((Il2CppObject*)(Type_t *)L_55) == ((Il2CppObject*)(Type_t *)L_60))) { goto IL_0110; } } { goto IL_0138; } IL_0110: { int32_t L_61 = V_2; ParameterInfoU5BU5D_t2275869610* L_62 = V_6; NullCheck(L_62); if ((((int32_t)L_61) < ((int32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_62)->max_length))))-(int32_t)1))))) { goto IL_012b; } } { TypeU5BU5D_t1664964607* L_63 = ___types2; int32_t L_64 = V_2; NullCheck(L_63); int32_t L_65 = L_64; Type_t * L_66 = (L_63)->GetAt(static_cast<il2cpp_array_size_t>(L_65)); Type_t * L_67 = V_5; if ((((Il2CppObject*)(Type_t *)L_66) == ((Il2CppObject*)(Type_t *)L_67))) { goto IL_012b; } } { goto IL_0138; } IL_012b: { int32_t L_68 = V_2; V_2 = ((int32_t)((int32_t)L_68+(int32_t)1)); } IL_012f: { int32_t L_69 = V_2; TypeU5BU5D_t1664964607* L_70 = ___types2; NullCheck(L_70); if ((((int32_t)L_69) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_70)->max_length))))))) { goto IL_00ee; } } IL_0138: { int32_t L_71 = V_2; TypeU5BU5D_t1664964607* L_72 = ___types2; NullCheck(L_72); if ((!(((uint32_t)L_71) == ((uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_72)->max_length)))))))) { goto IL_0143; } } { MethodBase_t904190842 * L_73 = V_0; return L_73; } IL_0143: { int32_t L_74 = V_1; V_1 = ((int32_t)((int32_t)L_74+(int32_t)1)); } IL_0147: { int32_t L_75 = V_1; MethodBaseU5BU5D_t2597254495* L_76 = ___match1; NullCheck(L_76); if ((((int32_t)L_75) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_76)->max_length))))))) { goto IL_0081; } } { int32_t L_77 = ___bindingAttr0; if (!((int32_t)((int32_t)L_77&(int32_t)((int32_t)65536)))) { goto IL_015e; } } { return (MethodBase_t904190842 *)NULL; } IL_015e: { V_7 = (MethodBase_t904190842 *)NULL; V_1 = 0; goto IL_01b8; } IL_0168: { MethodBaseU5BU5D_t2597254495* L_78 = ___match1; int32_t L_79 = V_1; NullCheck(L_78); int32_t L_80 = L_79; MethodBase_t904190842 * L_81 = (L_78)->GetAt(static_cast<il2cpp_array_size_t>(L_80)); V_0 = L_81; MethodBase_t904190842 * L_82 = V_0; NullCheck(L_82); ParameterInfoU5BU5D_t2275869610* L_83 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_82); V_8 = L_83; ParameterInfoU5BU5D_t2275869610* L_84 = V_8; NullCheck(L_84); TypeU5BU5D_t1664964607* L_85 = ___types2; NullCheck(L_85); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_84)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_85)->max_length))))))) { goto IL_0185; } } { goto IL_01b4; } IL_0185: { TypeU5BU5D_t1664964607* L_86 = ___types2; ParameterInfoU5BU5D_t2275869610* L_87 = V_8; bool L_88 = ___allowByRefMatch4; bool L_89 = Default_check_arguments_m3406020270(NULL /*static, unused*/, L_86, L_87, L_88, /*hidden argument*/NULL); if (L_89) { goto IL_0199; } } { goto IL_01b4; } IL_0199: { MethodBase_t904190842 * L_90 = V_7; if (!L_90) { goto IL_01b1; } } { MethodBase_t904190842 * L_91 = V_7; MethodBase_t904190842 * L_92 = V_0; TypeU5BU5D_t1664964607* L_93 = ___types2; MethodBase_t904190842 * L_94 = Default_GetBetterMethod_m4255740863(__this, L_91, L_92, L_93, /*hidden argument*/NULL); V_7 = L_94; goto IL_01b4; } IL_01b1: { MethodBase_t904190842 * L_95 = V_0; V_7 = L_95; } IL_01b4: { int32_t L_96 = V_1; V_1 = ((int32_t)((int32_t)L_96+(int32_t)1)); } IL_01b8: { int32_t L_97 = V_1; MethodBaseU5BU5D_t2597254495* L_98 = ___match1; NullCheck(L_98); if ((((int32_t)L_97) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_98)->max_length))))))) { goto IL_0168; } } { MethodBase_t904190842 * L_99 = V_7; return L_99; } } // System.Reflection.MethodBase System.Reflection.Binder/Default::GetBetterMethod(System.Reflection.MethodBase,System.Reflection.MethodBase,System.Type[]) extern "C" MethodBase_t904190842 * Default_GetBetterMethod_m4255740863 (Default_t3956931304 * __this, MethodBase_t904190842 * ___m10, MethodBase_t904190842 * ___m21, TypeU5BU5D_t1664964607* ___types2, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default_GetBetterMethod_m4255740863_MetadataUsageId); s_Il2CppMethodInitialized = true; } ParameterInfoU5BU5D_t2275869610* V_0 = NULL; ParameterInfoU5BU5D_t2275869610* V_1 = NULL; int32_t V_2 = 0; int32_t V_3 = 0; int32_t V_4 = 0; Type_t * V_5 = NULL; Type_t * V_6 = NULL; bool V_7 = false; bool V_8 = false; MethodBase_t904190842 * G_B19_0 = NULL; { MethodBase_t904190842 * L_0 = ___m10; NullCheck(L_0); bool L_1 = VirtFuncInvoker0< bool >::Invoke(28 /* System.Boolean System.Reflection.MethodBase::get_IsGenericMethodDefinition() */, L_0); if (!L_1) { goto IL_0018; } } { MethodBase_t904190842 * L_2 = ___m21; NullCheck(L_2); bool L_3 = VirtFuncInvoker0< bool >::Invoke(28 /* System.Boolean System.Reflection.MethodBase::get_IsGenericMethodDefinition() */, L_2); if (L_3) { goto IL_0018; } } { MethodBase_t904190842 * L_4 = ___m21; return L_4; } IL_0018: { MethodBase_t904190842 * L_5 = ___m21; NullCheck(L_5); bool L_6 = VirtFuncInvoker0< bool >::Invoke(28 /* System.Boolean System.Reflection.MethodBase::get_IsGenericMethodDefinition() */, L_5); if (!L_6) { goto IL_0030; } } { MethodBase_t904190842 * L_7 = ___m10; NullCheck(L_7); bool L_8 = VirtFuncInvoker0< bool >::Invoke(28 /* System.Boolean System.Reflection.MethodBase::get_IsGenericMethodDefinition() */, L_7); if (L_8) { goto IL_0030; } } { MethodBase_t904190842 * L_9 = ___m10; return L_9; } IL_0030: { MethodBase_t904190842 * L_10 = ___m10; NullCheck(L_10); ParameterInfoU5BU5D_t2275869610* L_11 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_10); V_0 = L_11; MethodBase_t904190842 * L_12 = ___m21; NullCheck(L_12); ParameterInfoU5BU5D_t2275869610* L_13 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_12); V_1 = L_13; V_2 = 0; V_3 = 0; goto IL_0088; } IL_0047: { ParameterInfoU5BU5D_t2275869610* L_14 = V_0; int32_t L_15 = V_3; NullCheck(L_14); int32_t L_16 = L_15; ParameterInfo_t2249040075 * L_17 = (L_14)->GetAt(static_cast<il2cpp_array_size_t>(L_16)); NullCheck(L_17); Type_t * L_18 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_17); ParameterInfoU5BU5D_t2275869610* L_19 = V_1; int32_t L_20 = V_3; NullCheck(L_19); int32_t L_21 = L_20; ParameterInfo_t2249040075 * L_22 = (L_19)->GetAt(static_cast<il2cpp_array_size_t>(L_21)); NullCheck(L_22); Type_t * L_23 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_22); int32_t L_24 = Default_CompareCloserType_m1367126249(__this, L_18, L_23, /*hidden argument*/NULL); V_4 = L_24; int32_t L_25 = V_4; if (!L_25) { goto IL_007a; } } { int32_t L_26 = V_2; if (!L_26) { goto IL_007a; } } { int32_t L_27 = V_2; int32_t L_28 = V_4; if ((((int32_t)L_27) == ((int32_t)L_28))) { goto IL_007a; } } { AmbiguousMatchException_t1406414556 * L_29 = (AmbiguousMatchException_t1406414556 *)il2cpp_codegen_object_new(AmbiguousMatchException_t1406414556_il2cpp_TypeInfo_var); AmbiguousMatchException__ctor_m2088048346(L_29, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_29); } IL_007a: { int32_t L_30 = V_4; if (!L_30) { goto IL_0084; } } { int32_t L_31 = V_4; V_2 = L_31; } IL_0084: { int32_t L_32 = V_3; V_3 = ((int32_t)((int32_t)L_32+(int32_t)1)); } IL_0088: { int32_t L_33 = V_3; ParameterInfoU5BU5D_t2275869610* L_34 = V_0; NullCheck(L_34); if ((((int32_t)L_33) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_34)->max_length))))))) { goto IL_0047; } } { int32_t L_35 = V_2; if (!L_35) { goto IL_00a6; } } { int32_t L_36 = V_2; if ((((int32_t)L_36) <= ((int32_t)0))) { goto IL_00a4; } } { MethodBase_t904190842 * L_37 = ___m21; G_B19_0 = L_37; goto IL_00a5; } IL_00a4: { MethodBase_t904190842 * L_38 = ___m10; G_B19_0 = L_38; } IL_00a5: { return G_B19_0; } IL_00a6: { MethodBase_t904190842 * L_39 = ___m10; NullCheck(L_39); Type_t * L_40 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, L_39); V_5 = L_40; MethodBase_t904190842 * L_41 = ___m21; NullCheck(L_41); Type_t * L_42 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, L_41); V_6 = L_42; Type_t * L_43 = V_5; Type_t * L_44 = V_6; if ((((Il2CppObject*)(Type_t *)L_43) == ((Il2CppObject*)(Type_t *)L_44))) { goto IL_00df; } } { Type_t * L_45 = V_5; Type_t * L_46 = V_6; NullCheck(L_45); bool L_47 = VirtFuncInvoker1< bool, Type_t * >::Invoke(38 /* System.Boolean System.Type::IsSubclassOf(System.Type) */, L_45, L_46); if (!L_47) { goto IL_00cf; } } { MethodBase_t904190842 * L_48 = ___m10; return L_48; } IL_00cf: { Type_t * L_49 = V_6; Type_t * L_50 = V_5; NullCheck(L_49); bool L_51 = VirtFuncInvoker1< bool, Type_t * >::Invoke(38 /* System.Boolean System.Type::IsSubclassOf(System.Type) */, L_49, L_50); if (!L_51) { goto IL_00df; } } { MethodBase_t904190842 * L_52 = ___m21; return L_52; } IL_00df: { MethodBase_t904190842 * L_53 = ___m10; NullCheck(L_53); int32_t L_54 = VirtFuncInvoker0< int32_t >::Invoke(20 /* System.Reflection.CallingConventions System.Reflection.MethodBase::get_CallingConvention() */, L_53); V_7 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_54&(int32_t)2))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); MethodBase_t904190842 * L_55 = ___m21; NullCheck(L_55); int32_t L_56 = VirtFuncInvoker0< int32_t >::Invoke(20 /* System.Reflection.CallingConventions System.Reflection.MethodBase::get_CallingConvention() */, L_55); V_8 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_56&(int32_t)2))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); bool L_57 = V_7; if (!L_57) { goto IL_010f; } } { bool L_58 = V_8; if (L_58) { goto IL_010f; } } { MethodBase_t904190842 * L_59 = ___m21; return L_59; } IL_010f: { bool L_60 = V_8; if (!L_60) { goto IL_011f; } } { bool L_61 = V_7; if (L_61) { goto IL_011f; } } { MethodBase_t904190842 * L_62 = ___m10; return L_62; } IL_011f: { AmbiguousMatchException_t1406414556 * L_63 = (AmbiguousMatchException_t1406414556 *)il2cpp_codegen_object_new(AmbiguousMatchException_t1406414556_il2cpp_TypeInfo_var); AmbiguousMatchException__ctor_m2088048346(L_63, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_63); } } // System.Int32 System.Reflection.Binder/Default::CompareCloserType(System.Type,System.Type) extern "C" int32_t Default_CompareCloserType_m1367126249 (Default_t3956931304 * __this, Type_t * ___t10, Type_t * ___t21, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default_CompareCloserType_m1367126249_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___t10; Type_t * L_1 = ___t21; if ((!(((Il2CppObject*)(Type_t *)L_0) == ((Il2CppObject*)(Type_t *)L_1)))) { goto IL_0009; } } { return 0; } IL_0009: { Type_t * L_2 = ___t10; NullCheck(L_2); bool L_3 = VirtFuncInvoker0< bool >::Invoke(85 /* System.Boolean System.Type::get_IsGenericParameter() */, L_2); if (!L_3) { goto IL_0021; } } { Type_t * L_4 = ___t21; NullCheck(L_4); bool L_5 = VirtFuncInvoker0< bool >::Invoke(85 /* System.Boolean System.Type::get_IsGenericParameter() */, L_4); if (L_5) { goto IL_0021; } } { return 1; } IL_0021: { Type_t * L_6 = ___t10; NullCheck(L_6); bool L_7 = VirtFuncInvoker0< bool >::Invoke(85 /* System.Boolean System.Type::get_IsGenericParameter() */, L_6); if (L_7) { goto IL_0039; } } { Type_t * L_8 = ___t21; NullCheck(L_8); bool L_9 = VirtFuncInvoker0< bool >::Invoke(85 /* System.Boolean System.Type::get_IsGenericParameter() */, L_8); if (!L_9) { goto IL_0039; } } { return (-1); } IL_0039: { Type_t * L_10 = ___t10; NullCheck(L_10); bool L_11 = Type_get_HasElementType_m3319917896(L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_0062; } } { Type_t * L_12 = ___t21; NullCheck(L_12); bool L_13 = Type_get_HasElementType_m3319917896(L_12, /*hidden argument*/NULL); if (!L_13) { goto IL_0062; } } { Type_t * L_14 = ___t10; NullCheck(L_14); Type_t * L_15 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_14); Type_t * L_16 = ___t21; NullCheck(L_16); Type_t * L_17 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_16); int32_t L_18 = Default_CompareCloserType_m1367126249(__this, L_15, L_17, /*hidden argument*/NULL); return L_18; } IL_0062: { Type_t * L_19 = ___t10; Type_t * L_20 = ___t21; NullCheck(L_19); bool L_21 = VirtFuncInvoker1< bool, Type_t * >::Invoke(38 /* System.Boolean System.Type::IsSubclassOf(System.Type) */, L_19, L_20); if (!L_21) { goto IL_0070; } } { return (-1); } IL_0070: { Type_t * L_22 = ___t21; Type_t * L_23 = ___t10; NullCheck(L_22); bool L_24 = VirtFuncInvoker1< bool, Type_t * >::Invoke(38 /* System.Boolean System.Type::IsSubclassOf(System.Type) */, L_22, L_23); if (!L_24) { goto IL_007e; } } { return 1; } IL_007e: { Type_t * L_25 = ___t10; NullCheck(L_25); bool L_26 = Type_get_IsInterface_m3583817465(L_25, /*hidden argument*/NULL); if (!L_26) { goto IL_009d; } } { Type_t * L_27 = ___t21; NullCheck(L_27); TypeU5BU5D_t1664964607* L_28 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(41 /* System.Type[] System.Type::GetInterfaces() */, L_27); Type_t * L_29 = ___t10; int32_t L_30 = Array_IndexOf_TisType_t_m4216821136(NULL /*static, unused*/, L_28, L_29, /*hidden argument*/Array_IndexOf_TisType_t_m4216821136_MethodInfo_var); if ((((int32_t)L_30) < ((int32_t)0))) { goto IL_009d; } } { return 1; } IL_009d: { Type_t * L_31 = ___t21; NullCheck(L_31); bool L_32 = Type_get_IsInterface_m3583817465(L_31, /*hidden argument*/NULL); if (!L_32) { goto IL_00bc; } } { Type_t * L_33 = ___t10; NullCheck(L_33); TypeU5BU5D_t1664964607* L_34 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(41 /* System.Type[] System.Type::GetInterfaces() */, L_33); Type_t * L_35 = ___t21; int32_t L_36 = Array_IndexOf_TisType_t_m4216821136(NULL /*static, unused*/, L_34, L_35, /*hidden argument*/Array_IndexOf_TisType_t_m4216821136_MethodInfo_var); if ((((int32_t)L_36) < ((int32_t)0))) { goto IL_00bc; } } { return (-1); } IL_00bc: { return 0; } } // System.Reflection.PropertyInfo System.Reflection.Binder/Default::SelectProperty(System.Reflection.BindingFlags,System.Reflection.PropertyInfo[],System.Type,System.Type[],System.Reflection.ParameterModifier[]) extern "C" PropertyInfo_t * Default_SelectProperty_m4154143536 (Default_t3956931304 * __this, int32_t ___bindingAttr0, PropertyInfoU5BU5D_t1736152084* ___match1, Type_t * ___returnType2, TypeU5BU5D_t1664964607* ___indexes3, ParameterModifierU5BU5D_t963192633* ___modifiers4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default_SelectProperty_m4154143536_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t V_1 = 0; PropertyInfo_t * V_2 = NULL; int32_t V_3 = 0; int32_t V_4 = 0; int32_t V_5 = 0; int32_t V_6 = 0; PropertyInfo_t * V_7 = NULL; ParameterInfoU5BU5D_t2275869610* V_8 = NULL; int32_t V_9 = 0; int32_t V_10 = 0; int32_t G_B6_0 = 0; { PropertyInfoU5BU5D_t1736152084* L_0 = ___match1; if (!L_0) { goto IL_000e; } } { PropertyInfoU5BU5D_t1736152084* L_1 = ___match1; NullCheck(L_1); if ((((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length))))) { goto IL_001e; } } IL_000e: { ArgumentException_t3259014390 * L_2 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m544251339(L_2, _stringLiteral2103942763, _stringLiteral3322341559, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_2); } IL_001e: { Type_t * L_3 = ___returnType2; V_0 = (bool)((((int32_t)((((Il2CppObject*)(Type_t *)L_3) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); TypeU5BU5D_t1664964607* L_4 = ___indexes3; if (!L_4) { goto IL_0036; } } { TypeU5BU5D_t1664964607* L_5 = ___indexes3; NullCheck(L_5); G_B6_0 = (((int32_t)((int32_t)(((Il2CppArray *)L_5)->max_length)))); goto IL_0037; } IL_0036: { G_B6_0 = (-1); } IL_0037: { V_1 = G_B6_0; V_2 = (PropertyInfo_t *)NULL; V_4 = ((int32_t)2147483646); V_5 = ((int32_t)2147483647LL); V_6 = 0; PropertyInfoU5BU5D_t1736152084* L_6 = ___match1; NullCheck(L_6); V_3 = ((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_6)->max_length))))-(int32_t)1)); goto IL_0112; } IL_0056: { PropertyInfoU5BU5D_t1736152084* L_7 = ___match1; int32_t L_8 = V_3; NullCheck(L_7); int32_t L_9 = L_8; PropertyInfo_t * L_10 = (L_7)->GetAt(static_cast<il2cpp_array_size_t>(L_9)); V_7 = L_10; PropertyInfo_t * L_11 = V_7; NullCheck(L_11); ParameterInfoU5BU5D_t2275869610* L_12 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(20 /* System.Reflection.ParameterInfo[] System.Reflection.PropertyInfo::GetIndexParameters() */, L_11); V_8 = L_12; int32_t L_13 = V_1; if ((((int32_t)L_13) < ((int32_t)0))) { goto IL_007a; } } { int32_t L_14 = V_1; ParameterInfoU5BU5D_t2275869610* L_15 = V_8; NullCheck(L_15); if ((((int32_t)L_14) == ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_15)->max_length))))))) { goto IL_007a; } } { goto IL_010e; } IL_007a: { bool L_16 = V_0; if (!L_16) { goto IL_0092; } } { PropertyInfo_t * L_17 = V_7; NullCheck(L_17); Type_t * L_18 = VirtFuncInvoker0< Type_t * >::Invoke(17 /* System.Type System.Reflection.PropertyInfo::get_PropertyType() */, L_17); Type_t * L_19 = ___returnType2; if ((((Il2CppObject*)(Type_t *)L_18) == ((Il2CppObject*)(Type_t *)L_19))) { goto IL_0092; } } { goto IL_010e; } IL_0092: { V_9 = ((int32_t)2147483646); int32_t L_20 = V_1; if ((((int32_t)L_20) <= ((int32_t)0))) { goto IL_00b8; } } { TypeU5BU5D_t1664964607* L_21 = ___indexes3; ParameterInfoU5BU5D_t2275869610* L_22 = V_8; int32_t L_23 = Default_check_arguments_with_score_m1714931543(NULL /*static, unused*/, L_21, L_22, /*hidden argument*/NULL); V_9 = L_23; int32_t L_24 = V_9; if ((!(((uint32_t)L_24) == ((uint32_t)(-1))))) { goto IL_00b8; } } { goto IL_010e; } IL_00b8: { PropertyInfo_t * L_25 = V_7; NullCheck(L_25); Type_t * L_26 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, L_25); IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); int32_t L_27 = Binder_GetDerivedLevel_m1809808744(NULL /*static, unused*/, L_26, /*hidden argument*/NULL); V_10 = L_27; PropertyInfo_t * L_28 = V_2; if (!L_28) { goto IL_0103; } } { int32_t L_29 = V_4; int32_t L_30 = V_9; if ((((int32_t)L_29) >= ((int32_t)L_30))) { goto IL_00da; } } { goto IL_010e; } IL_00da: { int32_t L_31 = V_4; int32_t L_32 = V_9; if ((!(((uint32_t)L_31) == ((uint32_t)L_32)))) { goto IL_0103; } } { int32_t L_33 = V_6; int32_t L_34 = V_10; if ((!(((uint32_t)L_33) == ((uint32_t)L_34)))) { goto IL_00f5; } } { int32_t L_35 = V_9; V_5 = L_35; goto IL_010e; } IL_00f5: { int32_t L_36 = V_6; int32_t L_37 = V_10; if ((((int32_t)L_36) <= ((int32_t)L_37))) { goto IL_0103; } } { goto IL_010e; } IL_0103: { PropertyInfo_t * L_38 = V_7; V_2 = L_38; int32_t L_39 = V_9; V_4 = L_39; int32_t L_40 = V_10; V_6 = L_40; } IL_010e: { int32_t L_41 = V_3; V_3 = ((int32_t)((int32_t)L_41-(int32_t)1)); } IL_0112: { int32_t L_42 = V_3; if ((((int32_t)L_42) >= ((int32_t)0))) { goto IL_0056; } } { int32_t L_43 = V_5; int32_t L_44 = V_4; if ((((int32_t)L_43) > ((int32_t)L_44))) { goto IL_0128; } } { AmbiguousMatchException_t1406414556 * L_45 = (AmbiguousMatchException_t1406414556 *)il2cpp_codegen_object_new(AmbiguousMatchException_t1406414556_il2cpp_TypeInfo_var); AmbiguousMatchException__ctor_m2088048346(L_45, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_45); } IL_0128: { PropertyInfo_t * L_46 = V_2; return L_46; } } // System.Int32 System.Reflection.Binder/Default::check_arguments_with_score(System.Type[],System.Reflection.ParameterInfo[]) extern "C" int32_t Default_check_arguments_with_score_m1714931543 (Il2CppObject * __this /* static, unused */, TypeU5BU5D_t1664964607* ___types0, ParameterInfoU5BU5D_t2275869610* ___args1, const MethodInfo* method) { int32_t V_0 = 0; int32_t V_1 = 0; int32_t V_2 = 0; { V_0 = (-1); V_1 = 0; goto IL_0030; } IL_0009: { TypeU5BU5D_t1664964607* L_0 = ___types0; int32_t L_1 = V_1; NullCheck(L_0); int32_t L_2 = L_1; Type_t * L_3 = (L_0)->GetAt(static_cast<il2cpp_array_size_t>(L_2)); ParameterInfoU5BU5D_t2275869610* L_4 = ___args1; int32_t L_5 = V_1; NullCheck(L_4); int32_t L_6 = L_5; ParameterInfo_t2249040075 * L_7 = (L_4)->GetAt(static_cast<il2cpp_array_size_t>(L_6)); NullCheck(L_7); Type_t * L_8 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_7); int32_t L_9 = Default_check_type_with_score_m58148013(NULL /*static, unused*/, L_3, L_8, /*hidden argument*/NULL); V_2 = L_9; int32_t L_10 = V_2; if ((!(((uint32_t)L_10) == ((uint32_t)(-1))))) { goto IL_0023; } } { return (-1); } IL_0023: { int32_t L_11 = V_0; int32_t L_12 = V_2; if ((((int32_t)L_11) >= ((int32_t)L_12))) { goto IL_002c; } } { int32_t L_13 = V_2; V_0 = L_13; } IL_002c: { int32_t L_14 = V_1; V_1 = ((int32_t)((int32_t)L_14+(int32_t)1)); } IL_0030: { int32_t L_15 = V_1; TypeU5BU5D_t1664964607* L_16 = ___types0; NullCheck(L_16); if ((((int32_t)L_15) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_16)->max_length))))))) { goto IL_0009; } } { int32_t L_17 = V_0; return L_17; } } // System.Int32 System.Reflection.Binder/Default::check_type_with_score(System.Type,System.Type) extern "C" int32_t Default_check_type_with_score_m58148013 (Il2CppObject * __this /* static, unused */, Type_t * ___from0, Type_t * ___to1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Default_check_type_with_score_m58148013_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; int32_t V_2 = 0; int32_t V_3 = 0; int32_t G_B4_0 = 0; int32_t G_B23_0 = 0; int32_t G_B31_0 = 0; int32_t G_B39_0 = 0; int32_t G_B47_0 = 0; int32_t G_B55_0 = 0; int32_t G_B63_0 = 0; int32_t G_B72_0 = 0; int32_t G_B76_0 = 0; int32_t G_B80_0 = 0; { Type_t * L_0 = ___from0; if (L_0) { goto IL_0019; } } { Type_t * L_1 = ___to1; NullCheck(L_1); bool L_2 = Type_get_IsValueType_m1733572463(L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0017; } } { G_B4_0 = (-1); goto IL_0018; } IL_0017: { G_B4_0 = 0; } IL_0018: { return G_B4_0; } IL_0019: { Type_t * L_3 = ___from0; Type_t * L_4 = ___to1; if ((!(((Il2CppObject*)(Type_t *)L_3) == ((Il2CppObject*)(Type_t *)L_4)))) { goto IL_0022; } } { return 0; } IL_0022: { Type_t * L_5 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_6 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_5) == ((Il2CppObject*)(Type_t *)L_6)))) { goto IL_0034; } } { return 4; } IL_0034: { Type_t * L_7 = ___from0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); int32_t L_8 = Type_GetTypeCode_m1044483454(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); V_0 = L_8; Type_t * L_9 = ___to1; int32_t L_10 = Type_GetTypeCode_m1044483454(NULL /*static, unused*/, L_9, /*hidden argument*/NULL); V_1 = L_10; int32_t L_11 = V_0; V_2 = L_11; int32_t L_12 = V_2; switch (((int32_t)((int32_t)L_12-(int32_t)4))) { case 0: { goto IL_0079; } case 1: { goto IL_010a; } case 2: { goto IL_00aa; } case 3: { goto IL_01ab; } case 4: { goto IL_015e; } case 5: { goto IL_023d; } case 6: { goto IL_01f8; } case 7: { goto IL_0282; } case 8: { goto IL_0282; } case 9: { goto IL_02be; } } } { goto IL_02ce; } IL_0079: { int32_t L_13 = V_1; V_3 = L_13; int32_t L_14 = V_3; switch (((int32_t)((int32_t)L_14-(int32_t)8))) { case 0: { goto IL_00a4; } case 1: { goto IL_00a6; } case 2: { goto IL_00a6; } case 3: { goto IL_00a6; } case 4: { goto IL_00a6; } case 5: { goto IL_00a6; } case 6: { goto IL_00a6; } } } { goto IL_00a8; } IL_00a4: { return 0; } IL_00a6: { return 2; } IL_00a8: { return (-1); } IL_00aa: { int32_t L_15 = V_1; V_3 = L_15; int32_t L_16 = V_3; switch (((int32_t)((int32_t)L_16-(int32_t)4))) { case 0: { goto IL_00e5; } case 1: { goto IL_00e7; } case 2: { goto IL_00e7; } case 3: { goto IL_00e5; } case 4: { goto IL_00e5; } case 5: { goto IL_00e5; } case 6: { goto IL_00e5; } case 7: { goto IL_00e5; } case 8: { goto IL_00e5; } case 9: { goto IL_00e5; } case 10: { goto IL_00e5; } } } { goto IL_00e7; } IL_00e5: { return 2; } IL_00e7: { Type_t * L_17 = ___from0; NullCheck(L_17); bool L_18 = Type_get_IsEnum_m313908919(L_17, /*hidden argument*/NULL); if (!L_18) { goto IL_0108; } } { Type_t * L_19 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_20 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_19) == ((Il2CppObject*)(Type_t *)L_20)))) { goto IL_0108; } } { G_B23_0 = 1; goto IL_0109; } IL_0108: { G_B23_0 = (-1); } IL_0109: { return G_B23_0; } IL_010a: { int32_t L_21 = V_1; V_3 = L_21; int32_t L_22 = V_3; switch (((int32_t)((int32_t)L_22-(int32_t)7))) { case 0: { goto IL_0139; } case 1: { goto IL_013b; } case 2: { goto IL_0139; } case 3: { goto IL_013b; } case 4: { goto IL_0139; } case 5: { goto IL_013b; } case 6: { goto IL_0139; } case 7: { goto IL_0139; } } } { goto IL_013b; } IL_0139: { return 2; } IL_013b: { Type_t * L_23 = ___from0; NullCheck(L_23); bool L_24 = Type_get_IsEnum_m313908919(L_23, /*hidden argument*/NULL); if (!L_24) { goto IL_015c; } } { Type_t * L_25 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_26 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_25) == ((Il2CppObject*)(Type_t *)L_26)))) { goto IL_015c; } } { G_B31_0 = 1; goto IL_015d; } IL_015c: { G_B31_0 = (-1); } IL_015d: { return G_B31_0; } IL_015e: { int32_t L_27 = V_1; V_3 = L_27; int32_t L_28 = V_3; switch (((int32_t)((int32_t)L_28-(int32_t)((int32_t)9)))) { case 0: { goto IL_0186; } case 1: { goto IL_0186; } case 2: { goto IL_0186; } case 3: { goto IL_0186; } case 4: { goto IL_0186; } case 5: { goto IL_0186; } } } { goto IL_0188; } IL_0186: { return 2; } IL_0188: { Type_t * L_29 = ___from0; NullCheck(L_29); bool L_30 = Type_get_IsEnum_m313908919(L_29, /*hidden argument*/NULL); if (!L_30) { goto IL_01a9; } } { Type_t * L_31 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_32 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_31) == ((Il2CppObject*)(Type_t *)L_32)))) { goto IL_01a9; } } { G_B39_0 = 1; goto IL_01aa; } IL_01a9: { G_B39_0 = (-1); } IL_01aa: { return G_B39_0; } IL_01ab: { int32_t L_33 = V_1; V_3 = L_33; int32_t L_34 = V_3; switch (((int32_t)((int32_t)L_34-(int32_t)((int32_t)9)))) { case 0: { goto IL_01d3; } case 1: { goto IL_01d5; } case 2: { goto IL_01d3; } case 3: { goto IL_01d5; } case 4: { goto IL_01d3; } case 5: { goto IL_01d3; } } } { goto IL_01d5; } IL_01d3: { return 2; } IL_01d5: { Type_t * L_35 = ___from0; NullCheck(L_35); bool L_36 = Type_get_IsEnum_m313908919(L_35, /*hidden argument*/NULL); if (!L_36) { goto IL_01f6; } } { Type_t * L_37 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_38 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_37) == ((Il2CppObject*)(Type_t *)L_38)))) { goto IL_01f6; } } { G_B47_0 = 1; goto IL_01f7; } IL_01f6: { G_B47_0 = (-1); } IL_01f7: { return G_B47_0; } IL_01f8: { int32_t L_39 = V_1; V_3 = L_39; int32_t L_40 = V_3; switch (((int32_t)((int32_t)L_40-(int32_t)((int32_t)11)))) { case 0: { goto IL_0218; } case 1: { goto IL_0218; } case 2: { goto IL_0218; } case 3: { goto IL_0218; } } } { goto IL_021a; } IL_0218: { return 2; } IL_021a: { Type_t * L_41 = ___from0; NullCheck(L_41); bool L_42 = Type_get_IsEnum_m313908919(L_41, /*hidden argument*/NULL); if (!L_42) { goto IL_023b; } } { Type_t * L_43 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_44 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_43) == ((Il2CppObject*)(Type_t *)L_44)))) { goto IL_023b; } } { G_B55_0 = 1; goto IL_023c; } IL_023b: { G_B55_0 = (-1); } IL_023c: { return G_B55_0; } IL_023d: { int32_t L_45 = V_1; V_3 = L_45; int32_t L_46 = V_3; switch (((int32_t)((int32_t)L_46-(int32_t)((int32_t)11)))) { case 0: { goto IL_025d; } case 1: { goto IL_025f; } case 2: { goto IL_025d; } case 3: { goto IL_025d; } } } { goto IL_025f; } IL_025d: { return 2; } IL_025f: { Type_t * L_47 = ___from0; NullCheck(L_47); bool L_48 = Type_get_IsEnum_m313908919(L_47, /*hidden argument*/NULL); if (!L_48) { goto IL_0280; } } { Type_t * L_49 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_50 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_49) == ((Il2CppObject*)(Type_t *)L_50)))) { goto IL_0280; } } { G_B63_0 = 1; goto IL_0281; } IL_0280: { G_B63_0 = (-1); } IL_0281: { return G_B63_0; } IL_0282: { int32_t L_51 = V_1; V_3 = L_51; int32_t L_52 = V_3; if ((((int32_t)L_52) == ((int32_t)((int32_t)13)))) { goto IL_0299; } } { int32_t L_53 = V_3; if ((((int32_t)L_53) == ((int32_t)((int32_t)14)))) { goto IL_0299; } } { goto IL_029b; } IL_0299: { return 2; } IL_029b: { Type_t * L_54 = ___from0; NullCheck(L_54); bool L_55 = Type_get_IsEnum_m313908919(L_54, /*hidden argument*/NULL); if (!L_55) { goto IL_02bc; } } { Type_t * L_56 = ___to1; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_57 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Enum_t2459695545_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_56) == ((Il2CppObject*)(Type_t *)L_57)))) { goto IL_02bc; } } { G_B72_0 = 1; goto IL_02bd; } IL_02bc: { G_B72_0 = (-1); } IL_02bd: { return G_B72_0; } IL_02be: { int32_t L_58 = V_1; if ((!(((uint32_t)L_58) == ((uint32_t)((int32_t)14))))) { goto IL_02cc; } } { G_B76_0 = 2; goto IL_02cd; } IL_02cc: { G_B76_0 = (-1); } IL_02cd: { return G_B76_0; } IL_02ce: { Type_t * L_59 = ___to1; Type_t * L_60 = ___from0; NullCheck(L_59); bool L_61 = VirtFuncInvoker1< bool, Type_t * >::Invoke(42 /* System.Boolean System.Type::IsAssignableFrom(System.Type) */, L_59, L_60); if (!L_61) { goto IL_02e0; } } { G_B80_0 = 3; goto IL_02e1; } IL_02e0: { G_B80_0 = (-1); } IL_02e1: { return G_B80_0; } } // System.Void System.Reflection.ConstructorInfo::.ctor() extern "C" void ConstructorInfo__ctor_m3847352284 (ConstructorInfo_t2851816542 * __this, const MethodInfo* method) { { MethodBase__ctor_m3951051358(__this, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.ConstructorInfo::.cctor() extern "C" void ConstructorInfo__cctor_m2897369343 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorInfo__cctor_m2897369343_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ((ConstructorInfo_t2851816542_StaticFields*)ConstructorInfo_t2851816542_il2cpp_TypeInfo_var->static_fields)->set_ConstructorName_0(_stringLiteral2199879418); ((ConstructorInfo_t2851816542_StaticFields*)ConstructorInfo_t2851816542_il2cpp_TypeInfo_var->static_fields)->set_TypeConstructorName_1(_stringLiteral3705238055); return; } } // System.Reflection.MemberTypes System.Reflection.ConstructorInfo::get_MemberType() extern "C" int32_t ConstructorInfo_get_MemberType_m1879090087 (ConstructorInfo_t2851816542 * __this, const MethodInfo* method) { { return (int32_t)(1); } } // System.Object System.Reflection.ConstructorInfo::Invoke(System.Object[]) extern "C" Il2CppObject * ConstructorInfo_Invoke_m2144827141 (ConstructorInfo_t2851816542 * __this, ObjectU5BU5D_t3614634134* ___parameters0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorInfo_Invoke_m2144827141_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ObjectU5BU5D_t3614634134* L_0 = ___parameters0; if (L_0) { goto IL_000e; } } { ___parameters0 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)0)); } IL_000e: { ObjectU5BU5D_t3614634134* L_1 = ___parameters0; Il2CppObject * L_2 = VirtFuncInvoker4< Il2CppObject *, int32_t, Binder_t3404612058 *, ObjectU5BU5D_t3614634134*, CultureInfo_t3500843524 * >::Invoke(30 /* System.Object System.Reflection.ConstructorInfo::Invoke(System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) */, __this, ((int32_t)512), (Binder_t3404612058 *)NULL, L_1, (CultureInfo_t3500843524 *)NULL); return L_2; } } // System.Void System.Reflection.CustomAttributeData::.ctor(System.Reflection.ConstructorInfo,System.Object[],System.Object[]) extern "C" void CustomAttributeData__ctor_m1358286409 (CustomAttributeData_t3093286891 * __this, ConstructorInfo_t2851816542 * ___ctorInfo0, ObjectU5BU5D_t3614634134* ___ctorArgs1, ObjectU5BU5D_t3614634134* ___namedArgs2, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeData__ctor_m1358286409_MetadataUsageId); s_Il2CppMethodInitialized = true; } CustomAttributeData_t3093286891 * G_B2_0 = NULL; CustomAttributeData_t3093286891 * G_B1_0 = NULL; CustomAttributeTypedArgumentU5BU5D_t1075686591* G_B3_0 = NULL; CustomAttributeData_t3093286891 * G_B3_1 = NULL; CustomAttributeData_t3093286891 * G_B5_0 = NULL; CustomAttributeData_t3093286891 * G_B4_0 = NULL; CustomAttributeNamedArgumentU5BU5D_t3304067486* G_B6_0 = NULL; CustomAttributeData_t3093286891 * G_B6_1 = NULL; { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); ConstructorInfo_t2851816542 * L_0 = ___ctorInfo0; __this->set_ctorInfo_0(L_0); ObjectU5BU5D_t3614634134* L_1 = ___ctorArgs1; G_B1_0 = __this; if (!L_1) { G_B2_0 = __this; goto IL_001f; } } { ObjectU5BU5D_t3614634134* L_2 = ___ctorArgs1; CustomAttributeTypedArgumentU5BU5D_t1075686591* L_3 = CustomAttributeData_UnboxValues_TisCustomAttributeTypedArgument_t1498197914_m2561215702(NULL /*static, unused*/, L_2, /*hidden argument*/CustomAttributeData_UnboxValues_TisCustomAttributeTypedArgument_t1498197914_m2561215702_MethodInfo_var); G_B3_0 = L_3; G_B3_1 = G_B1_0; goto IL_0025; } IL_001f: { G_B3_0 = ((CustomAttributeTypedArgumentU5BU5D_t1075686591*)SZArrayNew(CustomAttributeTypedArgumentU5BU5D_t1075686591_il2cpp_TypeInfo_var, (uint32_t)0)); G_B3_1 = G_B2_0; } IL_0025: { ReadOnlyCollection_1_t1683983606 * L_4 = Array_AsReadOnly_TisCustomAttributeTypedArgument_t1498197914_m2855930084(NULL /*static, unused*/, G_B3_0, /*hidden argument*/Array_AsReadOnly_TisCustomAttributeTypedArgument_t1498197914_m2855930084_MethodInfo_var); NullCheck(G_B3_1); G_B3_1->set_ctorArgs_1(L_4); ObjectU5BU5D_t3614634134* L_5 = ___namedArgs2; G_B4_0 = __this; if (!L_5) { G_B5_0 = __this; goto IL_0041; } } { ObjectU5BU5D_t3614634134* L_6 = ___namedArgs2; CustomAttributeNamedArgumentU5BU5D_t3304067486* L_7 = CustomAttributeData_UnboxValues_TisCustomAttributeNamedArgument_t94157543_m2789115353(NULL /*static, unused*/, L_6, /*hidden argument*/CustomAttributeData_UnboxValues_TisCustomAttributeNamedArgument_t94157543_m2789115353_MethodInfo_var); G_B6_0 = L_7; G_B6_1 = G_B4_0; goto IL_0047; } IL_0041: { G_B6_0 = ((CustomAttributeNamedArgumentU5BU5D_t3304067486*)SZArrayNew(CustomAttributeNamedArgumentU5BU5D_t3304067486_il2cpp_TypeInfo_var, (uint32_t)0)); G_B6_1 = G_B5_0; } IL_0047: { ReadOnlyCollection_1_t279943235 * L_8 = Array_AsReadOnly_TisCustomAttributeNamedArgument_t94157543_m2935638619(NULL /*static, unused*/, G_B6_0, /*hidden argument*/Array_AsReadOnly_TisCustomAttributeNamedArgument_t94157543_m2935638619_MethodInfo_var); NullCheck(G_B6_1); G_B6_1->set_namedArgs_2(L_8); return; } } // System.Reflection.ConstructorInfo System.Reflection.CustomAttributeData::get_Constructor() extern "C" ConstructorInfo_t2851816542 * CustomAttributeData_get_Constructor_m2529070599 (CustomAttributeData_t3093286891 * __this, const MethodInfo* method) { { ConstructorInfo_t2851816542 * L_0 = __this->get_ctorInfo_0(); return L_0; } } // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeTypedArgument> System.Reflection.CustomAttributeData::get_ConstructorArguments() extern "C" Il2CppObject* CustomAttributeData_get_ConstructorArguments_m1625171154 (CustomAttributeData_t3093286891 * __this, const MethodInfo* method) { { Il2CppObject* L_0 = __this->get_ctorArgs_1(); return L_0; } } // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeNamedArgument> System.Reflection.CustomAttributeData::get_NamedArguments() extern "C" Il2CppObject* CustomAttributeData_get_NamedArguments_m708818174 (CustomAttributeData_t3093286891 * __this, const MethodInfo* method) { { Il2CppObject* L_0 = __this->get_namedArgs_2(); return L_0; } } // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeData> System.Reflection.CustomAttributeData::GetCustomAttributes(System.Reflection.Assembly) extern "C" Il2CppObject* CustomAttributeData_GetCustomAttributes_m4124612360 (Il2CppObject * __this /* static, unused */, Assembly_t4268412390 * ___target0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeData_GetCustomAttributes_m4124612360_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Assembly_t4268412390 * L_0 = ___target0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); Il2CppObject* L_1 = MonoCustomAttrs_GetCustomAttributesData_m550893105(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeData> System.Reflection.CustomAttributeData::GetCustomAttributes(System.Reflection.MemberInfo) extern "C" Il2CppObject* CustomAttributeData_GetCustomAttributes_m2421330738 (Il2CppObject * __this /* static, unused */, MemberInfo_t * ___target0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeData_GetCustomAttributes_m2421330738_MetadataUsageId); s_Il2CppMethodInitialized = true; } { MemberInfo_t * L_0 = ___target0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); Il2CppObject* L_1 = MonoCustomAttrs_GetCustomAttributesData_m550893105(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeData> System.Reflection.CustomAttributeData::GetCustomAttributes(System.Reflection.Module) extern "C" Il2CppObject* CustomAttributeData_GetCustomAttributes_m119332220 (Il2CppObject * __this /* static, unused */, Module_t4282841206 * ___target0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeData_GetCustomAttributes_m119332220_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Module_t4282841206 * L_0 = ___target0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); Il2CppObject* L_1 = MonoCustomAttrs_GetCustomAttributesData_m550893105(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.Collections.Generic.IList`1<System.Reflection.CustomAttributeData> System.Reflection.CustomAttributeData::GetCustomAttributes(System.Reflection.ParameterInfo) extern "C" Il2CppObject* CustomAttributeData_GetCustomAttributes_m3258419955 (Il2CppObject * __this /* static, unused */, ParameterInfo_t2249040075 * ___target0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeData_GetCustomAttributes_m3258419955_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ParameterInfo_t2249040075 * L_0 = ___target0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); Il2CppObject* L_1 = MonoCustomAttrs_GetCustomAttributesData_m550893105(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.String System.Reflection.CustomAttributeData::ToString() extern "C" String_t* CustomAttributeData_ToString_m1673522836 (CustomAttributeData_t3093286891 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeData_ToString_m1673522836_MetadataUsageId); s_Il2CppMethodInitialized = true; } StringBuilder_t1221177846 * V_0 = NULL; int32_t V_1 = 0; int32_t V_2 = 0; CustomAttributeTypedArgument_t1498197914 V_3; memset(&V_3, 0, sizeof(V_3)); CustomAttributeNamedArgument_t94157543 V_4; memset(&V_4, 0, sizeof(V_4)); { StringBuilder_t1221177846 * L_0 = (StringBuilder_t1221177846 *)il2cpp_codegen_object_new(StringBuilder_t1221177846_il2cpp_TypeInfo_var); StringBuilder__ctor_m3946851802(L_0, /*hidden argument*/NULL); V_0 = L_0; StringBuilder_t1221177846 * L_1 = V_0; ConstructorInfo_t2851816542 * L_2 = __this->get_ctorInfo_0(); NullCheck(L_2); Type_t * L_3 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, L_2); NullCheck(L_3); String_t* L_4 = VirtFuncInvoker0< String_t* >::Invoke(18 /* System.String System.Type::get_FullName() */, L_3); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_5 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral372029431, L_4, _stringLiteral372029318, /*hidden argument*/NULL); NullCheck(L_1); StringBuilder_Append_m3636508479(L_1, L_5, /*hidden argument*/NULL); V_1 = 0; goto IL_0071; } IL_0033: { StringBuilder_t1221177846 * L_6 = V_0; Il2CppObject* L_7 = __this->get_ctorArgs_1(); int32_t L_8 = V_1; NullCheck(L_7); CustomAttributeTypedArgument_t1498197914 L_9 = InterfaceFuncInvoker1< CustomAttributeTypedArgument_t1498197914 , int32_t >::Invoke(3 /* T System.Collections.Generic.IList`1<System.Reflection.CustomAttributeTypedArgument>::get_Item(System.Int32) */, IList_1_t2039138515_il2cpp_TypeInfo_var, L_7, L_8); V_3 = L_9; String_t* L_10 = CustomAttributeTypedArgument_ToString_m1091739553((&V_3), /*hidden argument*/NULL); NullCheck(L_6); StringBuilder_Append_m3636508479(L_6, L_10, /*hidden argument*/NULL); int32_t L_11 = V_1; Il2CppObject* L_12 = __this->get_ctorArgs_1(); NullCheck(L_12); int32_t L_13 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeTypedArgument>::get_Count() */, ICollection_1_t2450273219_il2cpp_TypeInfo_var, L_12); if ((((int32_t)((int32_t)((int32_t)L_11+(int32_t)1))) >= ((int32_t)L_13))) { goto IL_006d; } } { StringBuilder_t1221177846 * L_14 = V_0; NullCheck(L_14); StringBuilder_Append_m3636508479(L_14, _stringLiteral811305474, /*hidden argument*/NULL); } IL_006d: { int32_t L_15 = V_1; V_1 = ((int32_t)((int32_t)L_15+(int32_t)1)); } IL_0071: { int32_t L_16 = V_1; Il2CppObject* L_17 = __this->get_ctorArgs_1(); NullCheck(L_17); int32_t L_18 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeTypedArgument>::get_Count() */, ICollection_1_t2450273219_il2cpp_TypeInfo_var, L_17); if ((((int32_t)L_16) < ((int32_t)L_18))) { goto IL_0033; } } { Il2CppObject* L_19 = __this->get_namedArgs_2(); NullCheck(L_19); int32_t L_20 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeNamedArgument>::get_Count() */, ICollection_1_t1046232848_il2cpp_TypeInfo_var, L_19); if ((((int32_t)L_20) <= ((int32_t)0))) { goto IL_009f; } } { StringBuilder_t1221177846 * L_21 = V_0; NullCheck(L_21); StringBuilder_Append_m3636508479(L_21, _stringLiteral811305474, /*hidden argument*/NULL); } IL_009f: { V_2 = 0; goto IL_00e5; } IL_00a6: { StringBuilder_t1221177846 * L_22 = V_0; Il2CppObject* L_23 = __this->get_namedArgs_2(); int32_t L_24 = V_2; NullCheck(L_23); CustomAttributeNamedArgument_t94157543 L_25 = InterfaceFuncInvoker1< CustomAttributeNamedArgument_t94157543 , int32_t >::Invoke(3 /* T System.Collections.Generic.IList`1<System.Reflection.CustomAttributeNamedArgument>::get_Item(System.Int32) */, IList_1_t635098144_il2cpp_TypeInfo_var, L_23, L_24); V_4 = L_25; String_t* L_26 = CustomAttributeNamedArgument_ToString_m804774956((&V_4), /*hidden argument*/NULL); NullCheck(L_22); StringBuilder_Append_m3636508479(L_22, L_26, /*hidden argument*/NULL); int32_t L_27 = V_2; Il2CppObject* L_28 = __this->get_namedArgs_2(); NullCheck(L_28); int32_t L_29 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeNamedArgument>::get_Count() */, ICollection_1_t1046232848_il2cpp_TypeInfo_var, L_28); if ((((int32_t)((int32_t)((int32_t)L_27+(int32_t)1))) >= ((int32_t)L_29))) { goto IL_00e1; } } { StringBuilder_t1221177846 * L_30 = V_0; NullCheck(L_30); StringBuilder_Append_m3636508479(L_30, _stringLiteral811305474, /*hidden argument*/NULL); } IL_00e1: { int32_t L_31 = V_2; V_2 = ((int32_t)((int32_t)L_31+(int32_t)1)); } IL_00e5: { int32_t L_32 = V_2; Il2CppObject* L_33 = __this->get_namedArgs_2(); NullCheck(L_33); int32_t L_34 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeNamedArgument>::get_Count() */, ICollection_1_t1046232848_il2cpp_TypeInfo_var, L_33); if ((((int32_t)L_32) < ((int32_t)L_34))) { goto IL_00a6; } } { StringBuilder_t1221177846 * L_35 = V_0; NullCheck(L_35); StringBuilder_AppendFormat_m1879616656(L_35, _stringLiteral522332260, ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)0)), /*hidden argument*/NULL); StringBuilder_t1221177846 * L_36 = V_0; NullCheck(L_36); String_t* L_37 = StringBuilder_ToString_m1507807375(L_36, /*hidden argument*/NULL); return L_37; } } // System.Boolean System.Reflection.CustomAttributeData::Equals(System.Object) extern "C" bool CustomAttributeData_Equals_m909425978 (CustomAttributeData_t3093286891 * __this, Il2CppObject * ___obj0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeData_Equals_m909425978_MetadataUsageId); s_Il2CppMethodInitialized = true; } CustomAttributeData_t3093286891 * V_0 = NULL; int32_t V_1 = 0; int32_t V_2 = 0; bool V_3 = false; int32_t V_4 = 0; CustomAttributeTypedArgument_t1498197914 V_5; memset(&V_5, 0, sizeof(V_5)); CustomAttributeNamedArgument_t94157543 V_6; memset(&V_6, 0, sizeof(V_6)); { Il2CppObject * L_0 = ___obj0; V_0 = ((CustomAttributeData_t3093286891 *)IsInstSealed(L_0, CustomAttributeData_t3093286891_il2cpp_TypeInfo_var)); CustomAttributeData_t3093286891 * L_1 = V_0; if (!L_1) { goto IL_0054; } } { CustomAttributeData_t3093286891 * L_2 = V_0; NullCheck(L_2); ConstructorInfo_t2851816542 * L_3 = L_2->get_ctorInfo_0(); ConstructorInfo_t2851816542 * L_4 = __this->get_ctorInfo_0(); if ((!(((Il2CppObject*)(ConstructorInfo_t2851816542 *)L_3) == ((Il2CppObject*)(ConstructorInfo_t2851816542 *)L_4)))) { goto IL_0054; } } { CustomAttributeData_t3093286891 * L_5 = V_0; NullCheck(L_5); Il2CppObject* L_6 = L_5->get_ctorArgs_1(); NullCheck(L_6); int32_t L_7 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeTypedArgument>::get_Count() */, ICollection_1_t2450273219_il2cpp_TypeInfo_var, L_6); Il2CppObject* L_8 = __this->get_ctorArgs_1(); NullCheck(L_8); int32_t L_9 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeTypedArgument>::get_Count() */, ICollection_1_t2450273219_il2cpp_TypeInfo_var, L_8); if ((!(((uint32_t)L_7) == ((uint32_t)L_9)))) { goto IL_0054; } } { CustomAttributeData_t3093286891 * L_10 = V_0; NullCheck(L_10); Il2CppObject* L_11 = L_10->get_namedArgs_2(); NullCheck(L_11); int32_t L_12 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeNamedArgument>::get_Count() */, ICollection_1_t1046232848_il2cpp_TypeInfo_var, L_11); Il2CppObject* L_13 = __this->get_namedArgs_2(); NullCheck(L_13); int32_t L_14 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeNamedArgument>::get_Count() */, ICollection_1_t1046232848_il2cpp_TypeInfo_var, L_13); if ((((int32_t)L_12) == ((int32_t)L_14))) { goto IL_0056; } } IL_0054: { return (bool)0; } IL_0056: { V_1 = 0; goto IL_008e; } IL_005d: { Il2CppObject* L_15 = __this->get_ctorArgs_1(); int32_t L_16 = V_1; NullCheck(L_15); CustomAttributeTypedArgument_t1498197914 L_17 = InterfaceFuncInvoker1< CustomAttributeTypedArgument_t1498197914 , int32_t >::Invoke(3 /* T System.Collections.Generic.IList`1<System.Reflection.CustomAttributeTypedArgument>::get_Item(System.Int32) */, IList_1_t2039138515_il2cpp_TypeInfo_var, L_15, L_16); V_5 = L_17; CustomAttributeData_t3093286891 * L_18 = V_0; NullCheck(L_18); Il2CppObject* L_19 = L_18->get_ctorArgs_1(); int32_t L_20 = V_1; NullCheck(L_19); CustomAttributeTypedArgument_t1498197914 L_21 = InterfaceFuncInvoker1< CustomAttributeTypedArgument_t1498197914 , int32_t >::Invoke(3 /* T System.Collections.Generic.IList`1<System.Reflection.CustomAttributeTypedArgument>::get_Item(System.Int32) */, IList_1_t2039138515_il2cpp_TypeInfo_var, L_19, L_20); CustomAttributeTypedArgument_t1498197914 L_22 = L_21; Il2CppObject * L_23 = Box(CustomAttributeTypedArgument_t1498197914_il2cpp_TypeInfo_var, &L_22); bool L_24 = CustomAttributeTypedArgument_Equals_m1555989603((&V_5), L_23, /*hidden argument*/NULL); if (!L_24) { goto IL_008a; } } { return (bool)0; } IL_008a: { int32_t L_25 = V_1; V_1 = ((int32_t)((int32_t)L_25+(int32_t)1)); } IL_008e: { int32_t L_26 = V_1; Il2CppObject* L_27 = __this->get_ctorArgs_1(); NullCheck(L_27); int32_t L_28 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeTypedArgument>::get_Count() */, ICollection_1_t2450273219_il2cpp_TypeInfo_var, L_27); if ((((int32_t)L_26) < ((int32_t)L_28))) { goto IL_005d; } } { V_2 = 0; goto IL_0107; } IL_00a6: { V_3 = (bool)0; V_4 = 0; goto IL_00e9; } IL_00b0: { Il2CppObject* L_29 = __this->get_namedArgs_2(); int32_t L_30 = V_2; NullCheck(L_29); CustomAttributeNamedArgument_t94157543 L_31 = InterfaceFuncInvoker1< CustomAttributeNamedArgument_t94157543 , int32_t >::Invoke(3 /* T System.Collections.Generic.IList`1<System.Reflection.CustomAttributeNamedArgument>::get_Item(System.Int32) */, IList_1_t635098144_il2cpp_TypeInfo_var, L_29, L_30); V_6 = L_31; CustomAttributeData_t3093286891 * L_32 = V_0; NullCheck(L_32); Il2CppObject* L_33 = L_32->get_namedArgs_2(); int32_t L_34 = V_4; NullCheck(L_33); CustomAttributeNamedArgument_t94157543 L_35 = InterfaceFuncInvoker1< CustomAttributeNamedArgument_t94157543 , int32_t >::Invoke(3 /* T System.Collections.Generic.IList`1<System.Reflection.CustomAttributeNamedArgument>::get_Item(System.Int32) */, IList_1_t635098144_il2cpp_TypeInfo_var, L_33, L_34); CustomAttributeNamedArgument_t94157543 L_36 = L_35; Il2CppObject * L_37 = Box(CustomAttributeNamedArgument_t94157543_il2cpp_TypeInfo_var, &L_36); bool L_38 = CustomAttributeNamedArgument_Equals_m2691468532((&V_6), L_37, /*hidden argument*/NULL); if (!L_38) { goto IL_00e3; } } { V_3 = (bool)1; goto IL_00fb; } IL_00e3: { int32_t L_39 = V_4; V_4 = ((int32_t)((int32_t)L_39+(int32_t)1)); } IL_00e9: { int32_t L_40 = V_4; CustomAttributeData_t3093286891 * L_41 = V_0; NullCheck(L_41); Il2CppObject* L_42 = L_41->get_namedArgs_2(); NullCheck(L_42); int32_t L_43 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeNamedArgument>::get_Count() */, ICollection_1_t1046232848_il2cpp_TypeInfo_var, L_42); if ((((int32_t)L_40) < ((int32_t)L_43))) { goto IL_00b0; } } IL_00fb: { bool L_44 = V_3; if (L_44) { goto IL_0103; } } { return (bool)0; } IL_0103: { int32_t L_45 = V_2; V_2 = ((int32_t)((int32_t)L_45+(int32_t)1)); } IL_0107: { int32_t L_46 = V_2; Il2CppObject* L_47 = __this->get_namedArgs_2(); NullCheck(L_47); int32_t L_48 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeNamedArgument>::get_Count() */, ICollection_1_t1046232848_il2cpp_TypeInfo_var, L_47); if ((((int32_t)L_46) < ((int32_t)L_48))) { goto IL_00a6; } } { return (bool)1; } } // System.Int32 System.Reflection.CustomAttributeData::GetHashCode() extern "C" int32_t CustomAttributeData_GetHashCode_m3989739430 (CustomAttributeData_t3093286891 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeData_GetHashCode_m3989739430_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; int32_t V_2 = 0; CustomAttributeTypedArgument_t1498197914 V_3; memset(&V_3, 0, sizeof(V_3)); CustomAttributeNamedArgument_t94157543 V_4; memset(&V_4, 0, sizeof(V_4)); { ConstructorInfo_t2851816542 * L_0 = __this->get_ctorInfo_0(); NullCheck(L_0); int32_t L_1 = VirtFuncInvoker0< int32_t >::Invoke(2 /* System.Int32 System.Object::GetHashCode() */, L_0); V_0 = ((int32_t)((int32_t)L_1<<(int32_t)((int32_t)16))); V_1 = 0; goto IL_003f; } IL_0016: { int32_t L_2 = V_0; int32_t L_3 = V_0; Il2CppObject* L_4 = __this->get_ctorArgs_1(); int32_t L_5 = V_1; NullCheck(L_4); CustomAttributeTypedArgument_t1498197914 L_6 = InterfaceFuncInvoker1< CustomAttributeTypedArgument_t1498197914 , int32_t >::Invoke(3 /* T System.Collections.Generic.IList`1<System.Reflection.CustomAttributeTypedArgument>::get_Item(System.Int32) */, IList_1_t2039138515_il2cpp_TypeInfo_var, L_4, L_5); V_3 = L_6; int32_t L_7 = CustomAttributeTypedArgument_GetHashCode_m999147081((&V_3), /*hidden argument*/NULL); int32_t L_8 = V_1; V_0 = ((int32_t)((int32_t)L_2+(int32_t)((int32_t)((int32_t)L_3^(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)7+(int32_t)L_7))<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_8*(int32_t)4))&(int32_t)((int32_t)31)))&(int32_t)((int32_t)31))))))))); int32_t L_9 = V_1; V_1 = ((int32_t)((int32_t)L_9+(int32_t)1)); } IL_003f: { int32_t L_10 = V_1; Il2CppObject* L_11 = __this->get_ctorArgs_1(); NullCheck(L_11); int32_t L_12 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeTypedArgument>::get_Count() */, ICollection_1_t2450273219_il2cpp_TypeInfo_var, L_11); if ((((int32_t)L_10) < ((int32_t)L_12))) { goto IL_0016; } } { V_2 = 0; goto IL_0075; } IL_0057: { int32_t L_13 = V_0; Il2CppObject* L_14 = __this->get_namedArgs_2(); int32_t L_15 = V_2; NullCheck(L_14); CustomAttributeNamedArgument_t94157543 L_16 = InterfaceFuncInvoker1< CustomAttributeNamedArgument_t94157543 , int32_t >::Invoke(3 /* T System.Collections.Generic.IList`1<System.Reflection.CustomAttributeNamedArgument>::get_Item(System.Int32) */, IList_1_t635098144_il2cpp_TypeInfo_var, L_14, L_15); V_4 = L_16; int32_t L_17 = CustomAttributeNamedArgument_GetHashCode_m3715408876((&V_4), /*hidden argument*/NULL); V_0 = ((int32_t)((int32_t)L_13+(int32_t)((int32_t)((int32_t)L_17<<(int32_t)5)))); int32_t L_18 = V_2; V_2 = ((int32_t)((int32_t)L_18+(int32_t)1)); } IL_0075: { int32_t L_19 = V_2; Il2CppObject* L_20 = __this->get_namedArgs_2(); NullCheck(L_20); int32_t L_21 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<System.Reflection.CustomAttributeNamedArgument>::get_Count() */, ICollection_1_t1046232848_il2cpp_TypeInfo_var, L_20); if ((((int32_t)L_19) < ((int32_t)L_21))) { goto IL_0057; } } { int32_t L_22 = V_0; return L_22; } } // Conversion methods for marshalling of: System.Reflection.CustomAttributeNamedArgument extern "C" void CustomAttributeNamedArgument_t94157543_marshal_pinvoke(const CustomAttributeNamedArgument_t94157543& unmarshaled, CustomAttributeNamedArgument_t94157543_marshaled_pinvoke& marshaled) { Il2CppCodeGenException* ___typedArgument_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'typedArgument' of type 'CustomAttributeNamedArgument'."); IL2CPP_RAISE_MANAGED_EXCEPTION(___typedArgument_0Exception); } extern "C" void CustomAttributeNamedArgument_t94157543_marshal_pinvoke_back(const CustomAttributeNamedArgument_t94157543_marshaled_pinvoke& marshaled, CustomAttributeNamedArgument_t94157543& unmarshaled) { Il2CppCodeGenException* ___typedArgument_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'typedArgument' of type 'CustomAttributeNamedArgument'."); IL2CPP_RAISE_MANAGED_EXCEPTION(___typedArgument_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.CustomAttributeNamedArgument extern "C" void CustomAttributeNamedArgument_t94157543_marshal_pinvoke_cleanup(CustomAttributeNamedArgument_t94157543_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: System.Reflection.CustomAttributeNamedArgument extern "C" void CustomAttributeNamedArgument_t94157543_marshal_com(const CustomAttributeNamedArgument_t94157543& unmarshaled, CustomAttributeNamedArgument_t94157543_marshaled_com& marshaled) { Il2CppCodeGenException* ___typedArgument_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'typedArgument' of type 'CustomAttributeNamedArgument'."); IL2CPP_RAISE_MANAGED_EXCEPTION(___typedArgument_0Exception); } extern "C" void CustomAttributeNamedArgument_t94157543_marshal_com_back(const CustomAttributeNamedArgument_t94157543_marshaled_com& marshaled, CustomAttributeNamedArgument_t94157543& unmarshaled) { Il2CppCodeGenException* ___typedArgument_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'typedArgument' of type 'CustomAttributeNamedArgument'."); IL2CPP_RAISE_MANAGED_EXCEPTION(___typedArgument_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.CustomAttributeNamedArgument extern "C" void CustomAttributeNamedArgument_t94157543_marshal_com_cleanup(CustomAttributeNamedArgument_t94157543_marshaled_com& marshaled) { } // System.String System.Reflection.CustomAttributeNamedArgument::ToString() extern "C" String_t* CustomAttributeNamedArgument_ToString_m804774956 (CustomAttributeNamedArgument_t94157543 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeNamedArgument_ToString_m804774956_MetadataUsageId); s_Il2CppMethodInitialized = true; } { MemberInfo_t * L_0 = __this->get_memberInfo_1(); NullCheck(L_0); String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_0); CustomAttributeTypedArgument_t1498197914 * L_2 = __this->get_address_of_typedArgument_0(); String_t* L_3 = CustomAttributeTypedArgument_ToString_m1091739553(L_2, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_4 = String_Concat_m612901809(NULL /*static, unused*/, L_1, _stringLiteral507810557, L_3, /*hidden argument*/NULL); return L_4; } } extern "C" String_t* CustomAttributeNamedArgument_ToString_m804774956_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { CustomAttributeNamedArgument_t94157543 * _thisAdjusted = reinterpret_cast<CustomAttributeNamedArgument_t94157543 *>(__this + 1); return CustomAttributeNamedArgument_ToString_m804774956(_thisAdjusted, method); } // System.Boolean System.Reflection.CustomAttributeNamedArgument::Equals(System.Object) extern "C" bool CustomAttributeNamedArgument_Equals_m2691468532 (CustomAttributeNamedArgument_t94157543 * __this, Il2CppObject * ___obj0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeNamedArgument_Equals_m2691468532_MetadataUsageId); s_Il2CppMethodInitialized = true; } CustomAttributeNamedArgument_t94157543 V_0; memset(&V_0, 0, sizeof(V_0)); int32_t G_B5_0 = 0; { Il2CppObject * L_0 = ___obj0; if (((Il2CppObject *)IsInstSealed(L_0, CustomAttributeNamedArgument_t94157543_il2cpp_TypeInfo_var))) { goto IL_000d; } } { return (bool)0; } IL_000d: { Il2CppObject * L_1 = ___obj0; V_0 = ((*(CustomAttributeNamedArgument_t94157543 *)((CustomAttributeNamedArgument_t94157543 *)UnBox(L_1, CustomAttributeNamedArgument_t94157543_il2cpp_TypeInfo_var)))); MemberInfo_t * L_2 = (&V_0)->get_memberInfo_1(); MemberInfo_t * L_3 = __this->get_memberInfo_1(); if ((!(((Il2CppObject*)(MemberInfo_t *)L_2) == ((Il2CppObject*)(MemberInfo_t *)L_3)))) { goto IL_003f; } } { CustomAttributeTypedArgument_t1498197914 * L_4 = __this->get_address_of_typedArgument_0(); CustomAttributeTypedArgument_t1498197914 L_5 = (&V_0)->get_typedArgument_0(); CustomAttributeTypedArgument_t1498197914 L_6 = L_5; Il2CppObject * L_7 = Box(CustomAttributeTypedArgument_t1498197914_il2cpp_TypeInfo_var, &L_6); bool L_8 = CustomAttributeTypedArgument_Equals_m1555989603(L_4, L_7, /*hidden argument*/NULL); G_B5_0 = ((int32_t)(L_8)); goto IL_0040; } IL_003f: { G_B5_0 = 0; } IL_0040: { return (bool)G_B5_0; } } extern "C" bool CustomAttributeNamedArgument_Equals_m2691468532_AdjustorThunk (Il2CppObject * __this, Il2CppObject * ___obj0, const MethodInfo* method) { CustomAttributeNamedArgument_t94157543 * _thisAdjusted = reinterpret_cast<CustomAttributeNamedArgument_t94157543 *>(__this + 1); return CustomAttributeNamedArgument_Equals_m2691468532(_thisAdjusted, ___obj0, method); } // System.Int32 System.Reflection.CustomAttributeNamedArgument::GetHashCode() extern "C" int32_t CustomAttributeNamedArgument_GetHashCode_m3715408876 (CustomAttributeNamedArgument_t94157543 * __this, const MethodInfo* method) { { MemberInfo_t * L_0 = __this->get_memberInfo_1(); NullCheck(L_0); int32_t L_1 = VirtFuncInvoker0< int32_t >::Invoke(2 /* System.Int32 System.Object::GetHashCode() */, L_0); CustomAttributeTypedArgument_t1498197914 * L_2 = __this->get_address_of_typedArgument_0(); int32_t L_3 = CustomAttributeTypedArgument_GetHashCode_m999147081(L_2, /*hidden argument*/NULL); return ((int32_t)((int32_t)((int32_t)((int32_t)L_1<<(int32_t)((int32_t)16)))+(int32_t)L_3)); } } extern "C" int32_t CustomAttributeNamedArgument_GetHashCode_m3715408876_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { CustomAttributeNamedArgument_t94157543 * _thisAdjusted = reinterpret_cast<CustomAttributeNamedArgument_t94157543 *>(__this + 1); return CustomAttributeNamedArgument_GetHashCode_m3715408876(_thisAdjusted, method); } // Conversion methods for marshalling of: System.Reflection.CustomAttributeTypedArgument extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_pinvoke(const CustomAttributeTypedArgument_t1498197914& unmarshaled, CustomAttributeTypedArgument_t1498197914_marshaled_pinvoke& marshaled) { Il2CppCodeGenException* ___argumentType_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'argumentType' of type 'CustomAttributeTypedArgument': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___argumentType_0Exception); } extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_pinvoke_back(const CustomAttributeTypedArgument_t1498197914_marshaled_pinvoke& marshaled, CustomAttributeTypedArgument_t1498197914& unmarshaled) { Il2CppCodeGenException* ___argumentType_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'argumentType' of type 'CustomAttributeTypedArgument': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___argumentType_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.CustomAttributeTypedArgument extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_pinvoke_cleanup(CustomAttributeTypedArgument_t1498197914_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: System.Reflection.CustomAttributeTypedArgument extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_com(const CustomAttributeTypedArgument_t1498197914& unmarshaled, CustomAttributeTypedArgument_t1498197914_marshaled_com& marshaled) { Il2CppCodeGenException* ___argumentType_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'argumentType' of type 'CustomAttributeTypedArgument': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___argumentType_0Exception); } extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_com_back(const CustomAttributeTypedArgument_t1498197914_marshaled_com& marshaled, CustomAttributeTypedArgument_t1498197914& unmarshaled) { Il2CppCodeGenException* ___argumentType_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'argumentType' of type 'CustomAttributeTypedArgument': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___argumentType_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.CustomAttributeTypedArgument extern "C" void CustomAttributeTypedArgument_t1498197914_marshal_com_cleanup(CustomAttributeTypedArgument_t1498197914_marshaled_com& marshaled) { } // System.String System.Reflection.CustomAttributeTypedArgument::ToString() extern "C" String_t* CustomAttributeTypedArgument_ToString_m1091739553 (CustomAttributeTypedArgument_t1498197914 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeTypedArgument_ToString_m1091739553_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* V_0 = NULL; String_t* G_B3_0 = NULL; { Il2CppObject * L_0 = __this->get_value_1(); if (!L_0) { goto IL_001b; } } { Il2CppObject * L_1 = __this->get_value_1(); NullCheck(L_1); String_t* L_2 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_1); G_B3_0 = L_2; goto IL_0020; } IL_001b: { IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_3 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2(); G_B3_0 = L_3; } IL_0020: { V_0 = G_B3_0; Type_t * L_4 = __this->get_argumentType_0(); IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_5 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(String_t_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_4) == ((Il2CppObject*)(Type_t *)L_5)))) { goto IL_0047; } } { String_t* L_6 = V_0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_7 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral372029312, L_6, _stringLiteral372029312, /*hidden argument*/NULL); return L_7; } IL_0047: { Type_t * L_8 = __this->get_argumentType_0(); IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_9 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Type_t_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_8) == ((Il2CppObject*)(Type_t *)L_9)))) { goto IL_006d; } } { String_t* L_10 = V_0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_11 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral1002073185, L_10, _stringLiteral372029317, /*hidden argument*/NULL); return L_11; } IL_006d: { Type_t * L_12 = __this->get_argumentType_0(); NullCheck(L_12); bool L_13 = Type_get_IsEnum_m313908919(L_12, /*hidden argument*/NULL); if (!L_13) { goto IL_0099; } } { Type_t * L_14 = __this->get_argumentType_0(); NullCheck(L_14); String_t* L_15 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_14); String_t* L_16 = V_0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_17 = String_Concat_m1561703559(NULL /*static, unused*/, _stringLiteral372029318, L_15, _stringLiteral372029317, L_16, /*hidden argument*/NULL); return L_17; } IL_0099: { String_t* L_18 = V_0; return L_18; } } extern "C" String_t* CustomAttributeTypedArgument_ToString_m1091739553_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { CustomAttributeTypedArgument_t1498197914 * _thisAdjusted = reinterpret_cast<CustomAttributeTypedArgument_t1498197914 *>(__this + 1); return CustomAttributeTypedArgument_ToString_m1091739553(_thisAdjusted, method); } // System.Boolean System.Reflection.CustomAttributeTypedArgument::Equals(System.Object) extern "C" bool CustomAttributeTypedArgument_Equals_m1555989603 (CustomAttributeTypedArgument_t1498197914 * __this, Il2CppObject * ___obj0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CustomAttributeTypedArgument_Equals_m1555989603_MetadataUsageId); s_Il2CppMethodInitialized = true; } CustomAttributeTypedArgument_t1498197914 V_0; memset(&V_0, 0, sizeof(V_0)); int32_t G_B6_0 = 0; { Il2CppObject * L_0 = ___obj0; if (((Il2CppObject *)IsInstSealed(L_0, CustomAttributeTypedArgument_t1498197914_il2cpp_TypeInfo_var))) { goto IL_000d; } } { return (bool)0; } IL_000d: { Il2CppObject * L_1 = ___obj0; V_0 = ((*(CustomAttributeTypedArgument_t1498197914 *)((CustomAttributeTypedArgument_t1498197914 *)UnBox(L_1, CustomAttributeTypedArgument_t1498197914_il2cpp_TypeInfo_var)))); Type_t * L_2 = (&V_0)->get_argumentType_0(); Type_t * L_3 = __this->get_argumentType_0(); if ((!(((Il2CppObject*)(Type_t *)L_2) == ((Il2CppObject*)(Type_t *)L_3)))) { goto IL_0048; } } { Il2CppObject * L_4 = __this->get_value_1(); if (!L_4) { goto IL_0048; } } { Il2CppObject * L_5 = __this->get_value_1(); Il2CppObject * L_6 = (&V_0)->get_value_1(); NullCheck(L_5); bool L_7 = VirtFuncInvoker1< bool, Il2CppObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_5, L_6); G_B6_0 = ((int32_t)(L_7)); goto IL_0052; } IL_0048: { Il2CppObject * L_8 = (&V_0)->get_value_1(); G_B6_0 = ((((Il2CppObject*)(Il2CppObject *)L_8) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0); } IL_0052: { return (bool)G_B6_0; } } extern "C" bool CustomAttributeTypedArgument_Equals_m1555989603_AdjustorThunk (Il2CppObject * __this, Il2CppObject * ___obj0, const MethodInfo* method) { CustomAttributeTypedArgument_t1498197914 * _thisAdjusted = reinterpret_cast<CustomAttributeTypedArgument_t1498197914 *>(__this + 1); return CustomAttributeTypedArgument_Equals_m1555989603(_thisAdjusted, ___obj0, method); } // System.Int32 System.Reflection.CustomAttributeTypedArgument::GetHashCode() extern "C" int32_t CustomAttributeTypedArgument_GetHashCode_m999147081 (CustomAttributeTypedArgument_t1498197914 * __this, const MethodInfo* method) { int32_t G_B2_0 = 0; int32_t G_B1_0 = 0; int32_t G_B3_0 = 0; int32_t G_B3_1 = 0; { Type_t * L_0 = __this->get_argumentType_0(); NullCheck(L_0); int32_t L_1 = VirtFuncInvoker0< int32_t >::Invoke(2 /* System.Int32 System.Type::GetHashCode() */, L_0); Il2CppObject * L_2 = __this->get_value_1(); G_B1_0 = ((int32_t)((int32_t)L_1<<(int32_t)((int32_t)16))); if (!L_2) { G_B2_0 = ((int32_t)((int32_t)L_1<<(int32_t)((int32_t)16))); goto IL_0029; } } { Il2CppObject * L_3 = __this->get_value_1(); NullCheck(L_3); int32_t L_4 = VirtFuncInvoker0< int32_t >::Invoke(2 /* System.Int32 System.Object::GetHashCode() */, L_3); G_B3_0 = L_4; G_B3_1 = G_B1_0; goto IL_002a; } IL_0029: { G_B3_0 = 0; G_B3_1 = G_B2_0; } IL_002a: { return ((int32_t)((int32_t)G_B3_1+(int32_t)G_B3_0)); } } extern "C" int32_t CustomAttributeTypedArgument_GetHashCode_m999147081_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { CustomAttributeTypedArgument_t1498197914 * _thisAdjusted = reinterpret_cast<CustomAttributeTypedArgument_t1498197914 *>(__this + 1); return CustomAttributeTypedArgument_GetHashCode_m999147081(_thisAdjusted, method); } // System.Void System.Reflection.DefaultMemberAttribute::.ctor(System.String) extern "C" void DefaultMemberAttribute__ctor_m2234856827 (DefaultMemberAttribute_t889804479 * __this, String_t* ___memberName0, const MethodInfo* method) { { Attribute__ctor_m1730479323(__this, /*hidden argument*/NULL); String_t* L_0 = ___memberName0; __this->set_member_name_0(L_0); return; } } // System.String System.Reflection.DefaultMemberAttribute::get_MemberName() extern "C" String_t* DefaultMemberAttribute_get_MemberName_m1393933516 (DefaultMemberAttribute_t889804479 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_member_name_0(); return L_0; } } // System.String System.Reflection.Emit.AssemblyBuilder::get_Location() extern "C" String_t* AssemblyBuilder_get_Location_m554656855 (AssemblyBuilder_t1646117627 * __this, const MethodInfo* method) { { Exception_t1927440687 * L_0 = AssemblyBuilder_not_supported_m383946865(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.Module[] System.Reflection.Emit.AssemblyBuilder::GetModulesInternal() extern "C" ModuleU5BU5D_t3593287923* AssemblyBuilder_GetModulesInternal_m3379844831 (AssemblyBuilder_t1646117627 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyBuilder_GetModulesInternal_m3379844831_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ModuleBuilderU5BU5D_t3642333382* L_0 = __this->get_modules_10(); if (L_0) { goto IL_0012; } } { return ((ModuleU5BU5D_t3593287923*)SZArrayNew(ModuleU5BU5D_t3593287923_il2cpp_TypeInfo_var, (uint32_t)0)); } IL_0012: { ModuleBuilderU5BU5D_t3642333382* L_1 = __this->get_modules_10(); NullCheck((Il2CppArray *)(Il2CppArray *)L_1); Il2CppObject * L_2 = Array_Clone_m768574314((Il2CppArray *)(Il2CppArray *)L_1, /*hidden argument*/NULL); return ((ModuleU5BU5D_t3593287923*)Castclass(L_2, ModuleU5BU5D_t3593287923_il2cpp_TypeInfo_var)); } } // System.Type[] System.Reflection.Emit.AssemblyBuilder::GetTypes(System.Boolean) extern "C" TypeU5BU5D_t1664964607* AssemblyBuilder_GetTypes_m2527954992 (AssemblyBuilder_t1646117627 * __this, bool ___exportedOnly0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyBuilder_GetTypes_m2527954992_MetadataUsageId); s_Il2CppMethodInitialized = true; } TypeU5BU5D_t1664964607* V_0 = NULL; int32_t V_1 = 0; TypeU5BU5D_t1664964607* V_2 = NULL; TypeU5BU5D_t1664964607* V_3 = NULL; int32_t V_4 = 0; TypeU5BU5D_t1664964607* V_5 = NULL; TypeU5BU5D_t1664964607* V_6 = NULL; TypeU5BU5D_t1664964607* G_B17_0 = NULL; { V_0 = (TypeU5BU5D_t1664964607*)NULL; ModuleBuilderU5BU5D_t3642333382* L_0 = __this->get_modules_10(); if (!L_0) { goto IL_0068; } } { V_1 = 0; goto IL_005a; } IL_0014: { ModuleBuilderU5BU5D_t3642333382* L_1 = __this->get_modules_10(); int32_t L_2 = V_1; NullCheck(L_1); int32_t L_3 = L_2; ModuleBuilder_t4156028127 * L_4 = (L_1)->GetAt(static_cast<il2cpp_array_size_t>(L_3)); NullCheck(L_4); TypeU5BU5D_t1664964607* L_5 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(9 /* System.Type[] System.Reflection.Emit.ModuleBuilder::GetTypes() */, L_4); V_2 = L_5; TypeU5BU5D_t1664964607* L_6 = V_0; if (L_6) { goto IL_002f; } } { TypeU5BU5D_t1664964607* L_7 = V_2; V_0 = L_7; goto IL_0056; } IL_002f: { TypeU5BU5D_t1664964607* L_8 = V_0; NullCheck(L_8); TypeU5BU5D_t1664964607* L_9 = V_2; NullCheck(L_9); V_3 = ((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_8)->max_length))))+(int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_9)->max_length)))))))); TypeU5BU5D_t1664964607* L_10 = V_0; TypeU5BU5D_t1664964607* L_11 = V_3; TypeU5BU5D_t1664964607* L_12 = V_0; NullCheck(L_12); Array_Copy_m3808317496(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_10, 0, (Il2CppArray *)(Il2CppArray *)L_11, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_12)->max_length)))), /*hidden argument*/NULL); TypeU5BU5D_t1664964607* L_13 = V_2; TypeU5BU5D_t1664964607* L_14 = V_3; TypeU5BU5D_t1664964607* L_15 = V_0; NullCheck(L_15); TypeU5BU5D_t1664964607* L_16 = V_2; NullCheck(L_16); Array_Copy_m3808317496(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_13, 0, (Il2CppArray *)(Il2CppArray *)L_14, (((int32_t)((int32_t)(((Il2CppArray *)L_15)->max_length)))), (((int32_t)((int32_t)(((Il2CppArray *)L_16)->max_length)))), /*hidden argument*/NULL); } IL_0056: { int32_t L_17 = V_1; V_1 = ((int32_t)((int32_t)L_17+(int32_t)1)); } IL_005a: { int32_t L_18 = V_1; ModuleBuilderU5BU5D_t3642333382* L_19 = __this->get_modules_10(); NullCheck(L_19); if ((((int32_t)L_18) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_19)->max_length))))))) { goto IL_0014; } } IL_0068: { ModuleU5BU5D_t3593287923* L_20 = __this->get_loaded_modules_11(); if (!L_20) { goto IL_00db; } } { V_4 = 0; goto IL_00cc; } IL_007b: { ModuleU5BU5D_t3593287923* L_21 = __this->get_loaded_modules_11(); int32_t L_22 = V_4; NullCheck(L_21); int32_t L_23 = L_22; Module_t4282841206 * L_24 = (L_21)->GetAt(static_cast<il2cpp_array_size_t>(L_23)); NullCheck(L_24); TypeU5BU5D_t1664964607* L_25 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(9 /* System.Type[] System.Reflection.Module::GetTypes() */, L_24); V_5 = L_25; TypeU5BU5D_t1664964607* L_26 = V_0; if (L_26) { goto IL_0099; } } { TypeU5BU5D_t1664964607* L_27 = V_5; V_0 = L_27; goto IL_00c6; } IL_0099: { TypeU5BU5D_t1664964607* L_28 = V_0; NullCheck(L_28); TypeU5BU5D_t1664964607* L_29 = V_5; NullCheck(L_29); V_6 = ((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_28)->max_length))))+(int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_29)->max_length)))))))); TypeU5BU5D_t1664964607* L_30 = V_0; TypeU5BU5D_t1664964607* L_31 = V_6; TypeU5BU5D_t1664964607* L_32 = V_0; NullCheck(L_32); Array_Copy_m3808317496(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_30, 0, (Il2CppArray *)(Il2CppArray *)L_31, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_32)->max_length)))), /*hidden argument*/NULL); TypeU5BU5D_t1664964607* L_33 = V_5; TypeU5BU5D_t1664964607* L_34 = V_6; TypeU5BU5D_t1664964607* L_35 = V_0; NullCheck(L_35); TypeU5BU5D_t1664964607* L_36 = V_5; NullCheck(L_36); Array_Copy_m3808317496(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_33, 0, (Il2CppArray *)(Il2CppArray *)L_34, (((int32_t)((int32_t)(((Il2CppArray *)L_35)->max_length)))), (((int32_t)((int32_t)(((Il2CppArray *)L_36)->max_length)))), /*hidden argument*/NULL); } IL_00c6: { int32_t L_37 = V_4; V_4 = ((int32_t)((int32_t)L_37+(int32_t)1)); } IL_00cc: { int32_t L_38 = V_4; ModuleU5BU5D_t3593287923* L_39 = __this->get_loaded_modules_11(); NullCheck(L_39); if ((((int32_t)L_38) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_39)->max_length))))))) { goto IL_007b; } } IL_00db: { TypeU5BU5D_t1664964607* L_40 = V_0; if (L_40) { goto IL_00eb; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_41 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); G_B17_0 = L_41; goto IL_00ec; } IL_00eb: { TypeU5BU5D_t1664964607* L_42 = V_0; G_B17_0 = L_42; } IL_00ec: { return G_B17_0; } } // System.Boolean System.Reflection.Emit.AssemblyBuilder::get_IsCompilerContext() extern "C" bool AssemblyBuilder_get_IsCompilerContext_m2864230005 (AssemblyBuilder_t1646117627 * __this, const MethodInfo* method) { { bool L_0 = __this->get_is_compiler_context_16(); return L_0; } } // System.Exception System.Reflection.Emit.AssemblyBuilder::not_supported() extern "C" Exception_t1927440687 * AssemblyBuilder_not_supported_m383946865 (AssemblyBuilder_t1646117627 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (AssemblyBuilder_not_supported_m383946865_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_0, _stringLiteral4087454587, /*hidden argument*/NULL); return L_0; } } // System.Reflection.AssemblyName System.Reflection.Emit.AssemblyBuilder::UnprotectedGetName() extern "C" AssemblyName_t894705941 * AssemblyBuilder_UnprotectedGetName_m2328641134 (AssemblyBuilder_t1646117627 * __this, const MethodInfo* method) { AssemblyName_t894705941 * V_0 = NULL; { AssemblyName_t894705941 * L_0 = Assembly_UnprotectedGetName_m3014607408(__this, /*hidden argument*/NULL); V_0 = L_0; StrongName_t117835354 * L_1 = __this->get_sn_15(); if (!L_1) { goto IL_0034; } } { AssemblyName_t894705941 * L_2 = V_0; StrongName_t117835354 * L_3 = __this->get_sn_15(); NullCheck(L_3); ByteU5BU5D_t3397334013* L_4 = StrongName_get_PublicKey_m3777577320(L_3, /*hidden argument*/NULL); NullCheck(L_2); AssemblyName_SetPublicKey_m1491402438(L_2, L_4, /*hidden argument*/NULL); AssemblyName_t894705941 * L_5 = V_0; StrongName_t117835354 * L_6 = __this->get_sn_15(); NullCheck(L_6); ByteU5BU5D_t3397334013* L_7 = StrongName_get_PublicKeyToken_m1968460885(L_6, /*hidden argument*/NULL); NullCheck(L_5); AssemblyName_SetPublicKeyToken_m3032035167(L_5, L_7, /*hidden argument*/NULL); } IL_0034: { AssemblyName_t894705941 * L_8 = V_0; return L_8; } } // System.Void System.Reflection.Emit.ByRefType::.ctor(System.Type) extern "C" void ByRefType__ctor_m2068210324 (ByRefType_t1587086384 * __this, Type_t * ___elementType0, const MethodInfo* method) { { Type_t * L_0 = ___elementType0; DerivedType__ctor_m4154637955(__this, L_0, /*hidden argument*/NULL); return; } } // System.Boolean System.Reflection.Emit.ByRefType::IsByRefImpl() extern "C" bool ByRefType_IsByRefImpl_m3683903251 (ByRefType_t1587086384 * __this, const MethodInfo* method) { { return (bool)1; } } // System.Type System.Reflection.Emit.ByRefType::get_BaseType() extern "C" Type_t * ByRefType_get_BaseType_m3405859119 (ByRefType_t1587086384 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ByRefType_get_BaseType_m3405859119_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_0 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppArray_0_0_0_var), /*hidden argument*/NULL); return L_0; } } // System.String System.Reflection.Emit.ByRefType::FormatName(System.String) extern "C" String_t* ByRefType_FormatName_m3716172668 (ByRefType_t1587086384 * __this, String_t* ___elementName0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ByRefType_FormatName_m3716172668_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = ___elementName0; if (L_0) { goto IL_0008; } } { return (String_t*)NULL; } IL_0008: { String_t* L_1 = ___elementName0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_2 = String_Concat_m2596409543(NULL /*static, unused*/, L_1, _stringLiteral372029308, /*hidden argument*/NULL); return L_2; } } // System.Type System.Reflection.Emit.ByRefType::MakeByRefType() extern "C" Type_t * ByRefType_MakeByRefType_m2150335175 (ByRefType_t1587086384 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ByRefType_MakeByRefType_m2150335175_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ArgumentException_t3259014390 * L_0 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_0, _stringLiteral912151980, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Void System.Reflection.Emit.ConstructorBuilder::.ctor(System.Reflection.Emit.TypeBuilder,System.Reflection.MethodAttributes,System.Reflection.CallingConventions,System.Type[],System.Type[][],System.Type[][]) extern "C" void ConstructorBuilder__ctor_m2001998159 (ConstructorBuilder_t700974433 * __this, TypeBuilder_t3308873219 * ___tb0, int32_t ___attributes1, int32_t ___callingConvention2, TypeU5BU5D_t1664964607* ___parameterTypes3, TypeU5BU5DU5BU5D_t2318378278* ___paramModReq4, TypeU5BU5DU5BU5D_t2318378278* ___paramModOpt5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder__ctor_m2001998159_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; MethodToken_t3991686330 V_1; memset(&V_1, 0, sizeof(V_1)); { __this->set_init_locals_10((bool)1); IL2CPP_RUNTIME_CLASS_INIT(ConstructorInfo_t2851816542_il2cpp_TypeInfo_var); ConstructorInfo__ctor_m3847352284(__this, /*hidden argument*/NULL); int32_t L_0 = ___attributes1; __this->set_attrs_4(((int32_t)((int32_t)((int32_t)((int32_t)L_0|(int32_t)((int32_t)2048)))|(int32_t)((int32_t)4096)))); int32_t L_1 = ___callingConvention2; __this->set_call_conv_7(L_1); TypeU5BU5D_t1664964607* L_2 = ___parameterTypes3; if (!L_2) { goto IL_007c; } } { V_0 = 0; goto IL_0052; } IL_0035: { TypeU5BU5D_t1664964607* L_3 = ___parameterTypes3; int32_t L_4 = V_0; NullCheck(L_3); int32_t L_5 = L_4; Type_t * L_6 = (L_3)->GetAt(static_cast<il2cpp_array_size_t>(L_5)); if (L_6) { goto IL_004e; } } { ArgumentException_t3259014390 * L_7 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m544251339(L_7, _stringLiteral1262676163, _stringLiteral3462160554, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_7); } IL_004e: { int32_t L_8 = V_0; V_0 = ((int32_t)((int32_t)L_8+(int32_t)1)); } IL_0052: { int32_t L_9 = V_0; TypeU5BU5D_t1664964607* L_10 = ___parameterTypes3; NullCheck(L_10); if ((((int32_t)L_9) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_10)->max_length))))))) { goto IL_0035; } } { TypeU5BU5D_t1664964607* L_11 = ___parameterTypes3; NullCheck(L_11); __this->set_parameters_3(((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_11)->max_length))))))); TypeU5BU5D_t1664964607* L_12 = ___parameterTypes3; TypeU5BU5D_t1664964607* L_13 = __this->get_parameters_3(); TypeU5BU5D_t1664964607* L_14 = ___parameterTypes3; NullCheck(L_14); Array_Copy_m2363740072(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_12, (Il2CppArray *)(Il2CppArray *)L_13, (((int32_t)((int32_t)(((Il2CppArray *)L_14)->max_length)))), /*hidden argument*/NULL); } IL_007c: { TypeBuilder_t3308873219 * L_15 = ___tb0; __this->set_type_8(L_15); TypeU5BU5DU5BU5D_t2318378278* L_16 = ___paramModReq4; __this->set_paramModReq_11(L_16); TypeU5BU5DU5BU5D_t2318378278* L_17 = ___paramModOpt5; __this->set_paramModOpt_12(L_17); int32_t L_18 = ConstructorBuilder_get_next_table_index_m932085784(__this, __this, 6, (bool)1, /*hidden argument*/NULL); __this->set_table_idx_6(L_18); TypeBuilder_t3308873219 * L_19 = ___tb0; NullCheck(L_19); Module_t4282841206 * L_20 = TypeBuilder_get_Module_m1668298460(L_19, /*hidden argument*/NULL); MethodToken_t3991686330 L_21 = ConstructorBuilder_GetToken_m3945412419(__this, /*hidden argument*/NULL); V_1 = L_21; int32_t L_22 = MethodToken_get_Token_m3846227497((&V_1), /*hidden argument*/NULL); NullCheck(((ModuleBuilder_t4156028127 *)CastclassClass(L_20, ModuleBuilder_t4156028127_il2cpp_TypeInfo_var))); ModuleBuilder_RegisterToken_m1388342515(((ModuleBuilder_t4156028127 *)CastclassClass(L_20, ModuleBuilder_t4156028127_il2cpp_TypeInfo_var)), __this, L_22, /*hidden argument*/NULL); return; } } // System.Reflection.CallingConventions System.Reflection.Emit.ConstructorBuilder::get_CallingConvention() extern "C" int32_t ConstructorBuilder_get_CallingConvention_m443074051 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_call_conv_7(); return L_0; } } // System.Reflection.Emit.TypeBuilder System.Reflection.Emit.ConstructorBuilder::get_TypeBuilder() extern "C" TypeBuilder_t3308873219 * ConstructorBuilder_get_TypeBuilder_m3442952231 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_type_8(); return L_0; } } // System.Reflection.ParameterInfo[] System.Reflection.Emit.ConstructorBuilder::GetParameters() extern "C" ParameterInfoU5BU5D_t2275869610* ConstructorBuilder_GetParameters_m3711347282 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_type_8(); NullCheck(L_0); bool L_1 = TypeBuilder_get_is_created_m736553860(L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0022; } } { bool L_2 = ConstructorBuilder_get_IsCompilerContext_m2796899803(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0022; } } { Exception_t1927440687 * L_3 = ConstructorBuilder_not_created_m2150488017(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_3); } IL_0022: { ParameterInfoU5BU5D_t2275869610* L_4 = ConstructorBuilder_GetParametersInternal_m3775796783(__this, /*hidden argument*/NULL); return L_4; } } // System.Reflection.ParameterInfo[] System.Reflection.Emit.ConstructorBuilder::GetParametersInternal() extern "C" ParameterInfoU5BU5D_t2275869610* ConstructorBuilder_GetParametersInternal_m3775796783 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_GetParametersInternal_m3775796783_MetadataUsageId); s_Il2CppMethodInitialized = true; } ParameterInfoU5BU5D_t2275869610* V_0 = NULL; int32_t V_1 = 0; int32_t G_B5_0 = 0; ParameterInfoU5BU5D_t2275869610* G_B5_1 = NULL; int32_t G_B4_0 = 0; ParameterInfoU5BU5D_t2275869610* G_B4_1 = NULL; ParameterBuilder_t3344728474 * G_B6_0 = NULL; int32_t G_B6_1 = 0; ParameterInfoU5BU5D_t2275869610* G_B6_2 = NULL; { TypeU5BU5D_t1664964607* L_0 = __this->get_parameters_3(); if (L_0) { goto IL_0012; } } { return ((ParameterInfoU5BU5D_t2275869610*)SZArrayNew(ParameterInfoU5BU5D_t2275869610_il2cpp_TypeInfo_var, (uint32_t)0)); } IL_0012: { TypeU5BU5D_t1664964607* L_1 = __this->get_parameters_3(); NullCheck(L_1); V_0 = ((ParameterInfoU5BU5D_t2275869610*)SZArrayNew(ParameterInfoU5BU5D_t2275869610_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length)))))); V_1 = 0; goto IL_005a; } IL_0027: { ParameterInfoU5BU5D_t2275869610* L_2 = V_0; int32_t L_3 = V_1; ParameterBuilderU5BU5D_t2122994367* L_4 = __this->get_pinfo_9(); G_B4_0 = L_3; G_B4_1 = L_2; if (L_4) { G_B5_0 = L_3; G_B5_1 = L_2; goto IL_003a; } } { G_B6_0 = ((ParameterBuilder_t3344728474 *)(NULL)); G_B6_1 = G_B4_0; G_B6_2 = G_B4_1; goto IL_0044; } IL_003a: { ParameterBuilderU5BU5D_t2122994367* L_5 = __this->get_pinfo_9(); int32_t L_6 = V_1; NullCheck(L_5); int32_t L_7 = ((int32_t)((int32_t)L_6+(int32_t)1)); ParameterBuilder_t3344728474 * L_8 = (L_5)->GetAt(static_cast<il2cpp_array_size_t>(L_7)); G_B6_0 = L_8; G_B6_1 = G_B5_0; G_B6_2 = G_B5_1; } IL_0044: { TypeU5BU5D_t1664964607* L_9 = __this->get_parameters_3(); int32_t L_10 = V_1; NullCheck(L_9); int32_t L_11 = L_10; Type_t * L_12 = (L_9)->GetAt(static_cast<il2cpp_array_size_t>(L_11)); int32_t L_13 = V_1; ParameterInfo_t2249040075 * L_14 = (ParameterInfo_t2249040075 *)il2cpp_codegen_object_new(ParameterInfo_t2249040075_il2cpp_TypeInfo_var); ParameterInfo__ctor_m2149157062(L_14, G_B6_0, L_12, __this, ((int32_t)((int32_t)L_13+(int32_t)1)), /*hidden argument*/NULL); NullCheck(G_B6_2); ArrayElementTypeCheck (G_B6_2, L_14); (G_B6_2)->SetAt(static_cast<il2cpp_array_size_t>(G_B6_1), (ParameterInfo_t2249040075 *)L_14); int32_t L_15 = V_1; V_1 = ((int32_t)((int32_t)L_15+(int32_t)1)); } IL_005a: { int32_t L_16 = V_1; TypeU5BU5D_t1664964607* L_17 = __this->get_parameters_3(); NullCheck(L_17); if ((((int32_t)L_16) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_17)->max_length))))))) { goto IL_0027; } } { ParameterInfoU5BU5D_t2275869610* L_18 = V_0; return L_18; } } // System.Int32 System.Reflection.Emit.ConstructorBuilder::GetParameterCount() extern "C" int32_t ConstructorBuilder_GetParameterCount_m2862936870 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { TypeU5BU5D_t1664964607* L_0 = __this->get_parameters_3(); if (L_0) { goto IL_000d; } } { return 0; } IL_000d: { TypeU5BU5D_t1664964607* L_1 = __this->get_parameters_3(); NullCheck(L_1); return (((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length)))); } } // System.Object System.Reflection.Emit.ConstructorBuilder::Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" Il2CppObject * ConstructorBuilder_Invoke_m2354062201 (ConstructorBuilder_t700974433 * __this, Il2CppObject * ___obj0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, ObjectU5BU5D_t3614634134* ___parameters3, CultureInfo_t3500843524 * ___culture4, const MethodInfo* method) { { Exception_t1927440687 * L_0 = ConstructorBuilder_not_supported_m3687319507(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object System.Reflection.Emit.ConstructorBuilder::Invoke(System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" Il2CppObject * ConstructorBuilder_Invoke_m2488856091 (ConstructorBuilder_t700974433 * __this, int32_t ___invokeAttr0, Binder_t3404612058 * ___binder1, ObjectU5BU5D_t3614634134* ___parameters2, CultureInfo_t3500843524 * ___culture3, const MethodInfo* method) { { Exception_t1927440687 * L_0 = ConstructorBuilder_not_supported_m3687319507(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.RuntimeMethodHandle System.Reflection.Emit.ConstructorBuilder::get_MethodHandle() extern "C" RuntimeMethodHandle_t894824333 ConstructorBuilder_get_MethodHandle_m977166569 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { Exception_t1927440687 * L_0 = ConstructorBuilder_not_supported_m3687319507(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.MethodAttributes System.Reflection.Emit.ConstructorBuilder::get_Attributes() extern "C" int32_t ConstructorBuilder_get_Attributes_m2137353707 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_attrs_4(); return L_0; } } // System.Type System.Reflection.Emit.ConstructorBuilder::get_ReflectedType() extern "C" Type_t * ConstructorBuilder_get_ReflectedType_m3815261871 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_type_8(); return L_0; } } // System.Type System.Reflection.Emit.ConstructorBuilder::get_DeclaringType() extern "C" Type_t * ConstructorBuilder_get_DeclaringType_m4264602248 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_type_8(); return L_0; } } // System.String System.Reflection.Emit.ConstructorBuilder::get_Name() extern "C" String_t* ConstructorBuilder_get_Name_m134603075 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_get_Name_m134603075_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* G_B3_0 = NULL; { int32_t L_0 = __this->get_attrs_4(); if (!((int32_t)((int32_t)L_0&(int32_t)((int32_t)16)))) { goto IL_0018; } } { IL2CPP_RUNTIME_CLASS_INIT(ConstructorInfo_t2851816542_il2cpp_TypeInfo_var); String_t* L_1 = ((ConstructorInfo_t2851816542_StaticFields*)ConstructorInfo_t2851816542_il2cpp_TypeInfo_var->static_fields)->get_TypeConstructorName_1(); G_B3_0 = L_1; goto IL_001d; } IL_0018: { IL2CPP_RUNTIME_CLASS_INIT(ConstructorInfo_t2851816542_il2cpp_TypeInfo_var); String_t* L_2 = ((ConstructorInfo_t2851816542_StaticFields*)ConstructorInfo_t2851816542_il2cpp_TypeInfo_var->static_fields)->get_ConstructorName_0(); G_B3_0 = L_2; } IL_001d: { return G_B3_0; } } // System.Boolean System.Reflection.Emit.ConstructorBuilder::IsDefined(System.Type,System.Boolean) extern "C" bool ConstructorBuilder_IsDefined_m2369140139 (ConstructorBuilder_t700974433 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = ConstructorBuilder_not_supported_m3687319507(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object[] System.Reflection.Emit.ConstructorBuilder::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* ConstructorBuilder_GetCustomAttributes_m1931712364 (ConstructorBuilder_t700974433 * __this, bool ___inherit0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_GetCustomAttributes_m1931712364_MetadataUsageId); s_Il2CppMethodInitialized = true; } { TypeBuilder_t3308873219 * L_0 = __this->get_type_8(); NullCheck(L_0); bool L_1 = TypeBuilder_get_is_created_m736553860(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0023; } } { bool L_2 = ConstructorBuilder_get_IsCompilerContext_m2796899803(__this, /*hidden argument*/NULL); if (!L_2) { goto IL_0023; } } { bool L_3 = ___inherit0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_4 = MonoCustomAttrs_GetCustomAttributes_m3069779582(NULL /*static, unused*/, __this, L_3, /*hidden argument*/NULL); return L_4; } IL_0023: { Exception_t1927440687 * L_5 = ConstructorBuilder_not_supported_m3687319507(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_5); } } // System.Object[] System.Reflection.Emit.ConstructorBuilder::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* ConstructorBuilder_GetCustomAttributes_m1698596385 (ConstructorBuilder_t700974433 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_GetCustomAttributes_m1698596385_MetadataUsageId); s_Il2CppMethodInitialized = true; } { TypeBuilder_t3308873219 * L_0 = __this->get_type_8(); NullCheck(L_0); bool L_1 = TypeBuilder_get_is_created_m736553860(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0024; } } { bool L_2 = ConstructorBuilder_get_IsCompilerContext_m2796899803(__this, /*hidden argument*/NULL); if (!L_2) { goto IL_0024; } } { Type_t * L_3 = ___attributeType0; bool L_4 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_5 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_3, L_4, /*hidden argument*/NULL); return L_5; } IL_0024: { Exception_t1927440687 * L_6 = ConstructorBuilder_not_supported_m3687319507(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_6); } } // System.Reflection.Emit.ILGenerator System.Reflection.Emit.ConstructorBuilder::GetILGenerator() extern "C" ILGenerator_t99948092 * ConstructorBuilder_GetILGenerator_m1407935730 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { ILGenerator_t99948092 * L_0 = ConstructorBuilder_GetILGenerator_m1731893569(__this, ((int32_t)64), /*hidden argument*/NULL); return L_0; } } // System.Reflection.Emit.ILGenerator System.Reflection.Emit.ConstructorBuilder::GetILGenerator(System.Int32) extern "C" ILGenerator_t99948092 * ConstructorBuilder_GetILGenerator_m1731893569 (ConstructorBuilder_t700974433 * __this, int32_t ___streamSize0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_GetILGenerator_m1731893569_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ILGenerator_t99948092 * L_0 = __this->get_ilgen_2(); if (!L_0) { goto IL_0012; } } { ILGenerator_t99948092 * L_1 = __this->get_ilgen_2(); return L_1; } IL_0012: { TypeBuilder_t3308873219 * L_2 = __this->get_type_8(); NullCheck(L_2); Module_t4282841206 * L_3 = TypeBuilder_get_Module_m1668298460(L_2, /*hidden argument*/NULL); TypeBuilder_t3308873219 * L_4 = __this->get_type_8(); NullCheck(L_4); Module_t4282841206 * L_5 = TypeBuilder_get_Module_m1668298460(L_4, /*hidden argument*/NULL); NullCheck(((ModuleBuilder_t4156028127 *)CastclassClass(L_5, ModuleBuilder_t4156028127_il2cpp_TypeInfo_var))); Il2CppObject * L_6 = ModuleBuilder_GetTokenGenerator_m4006065550(((ModuleBuilder_t4156028127 *)CastclassClass(L_5, ModuleBuilder_t4156028127_il2cpp_TypeInfo_var)), /*hidden argument*/NULL); int32_t L_7 = ___streamSize0; ILGenerator_t99948092 * L_8 = (ILGenerator_t99948092 *)il2cpp_codegen_object_new(ILGenerator_t99948092_il2cpp_TypeInfo_var); ILGenerator__ctor_m3365621387(L_8, L_3, L_6, L_7, /*hidden argument*/NULL); __this->set_ilgen_2(L_8); ILGenerator_t99948092 * L_9 = __this->get_ilgen_2(); return L_9; } } // System.Reflection.Emit.MethodToken System.Reflection.Emit.ConstructorBuilder::GetToken() extern "C" MethodToken_t3991686330 ConstructorBuilder_GetToken_m3945412419 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_table_idx_6(); MethodToken_t3991686330 L_1; memset(&L_1, 0, sizeof(L_1)); MethodToken__ctor_m3671357474(&L_1, ((int32_t)((int32_t)((int32_t)100663296)|(int32_t)L_0)), /*hidden argument*/NULL); return L_1; } } // System.Reflection.Module System.Reflection.Emit.ConstructorBuilder::get_Module() extern "C" Module_t4282841206 * ConstructorBuilder_get_Module_m2159174298 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { { Module_t4282841206 * L_0 = MemberInfo_get_Module_m3957426656(__this, /*hidden argument*/NULL); return L_0; } } // System.String System.Reflection.Emit.ConstructorBuilder::ToString() extern "C" String_t* ConstructorBuilder_ToString_m347700767 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_ToString_m347700767_MetadataUsageId); s_Il2CppMethodInitialized = true; } { TypeBuilder_t3308873219 * L_0 = __this->get_type_8(); NullCheck(L_0); String_t* L_1 = TypeBuilder_get_Name_m170882803(L_0, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_2 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral2307484441, L_1, _stringLiteral522332250, /*hidden argument*/NULL); return L_2; } } // System.Void System.Reflection.Emit.ConstructorBuilder::fixup() extern "C" void ConstructorBuilder_fixup_m836985654 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_fixup_m836985654_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t L_0 = __this->get_attrs_4(); if (((int32_t)((int32_t)L_0&(int32_t)((int32_t)9216)))) { goto IL_0058; } } { int32_t L_1 = __this->get_iattrs_5(); if (((int32_t)((int32_t)L_1&(int32_t)((int32_t)4099)))) { goto IL_0058; } } { ILGenerator_t99948092 * L_2 = __this->get_ilgen_2(); if (!L_2) { goto IL_003d; } } { ILGenerator_t99948092 * L_3 = __this->get_ilgen_2(); IL2CPP_RUNTIME_CLASS_INIT(ILGenerator_t99948092_il2cpp_TypeInfo_var); int32_t L_4 = ILGenerator_Mono_GetCurrentOffset_m3553856682(NULL /*static, unused*/, L_3, /*hidden argument*/NULL); if (L_4) { goto IL_0058; } } IL_003d: { String_t* L_5 = ConstructorBuilder_get_Name_m134603075(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_6 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral2470364202, L_5, _stringLiteral2747925653, /*hidden argument*/NULL); InvalidOperationException_t721527559 * L_7 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m2801133788(L_7, L_6, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_7); } IL_0058: { ILGenerator_t99948092 * L_8 = __this->get_ilgen_2(); if (!L_8) { goto IL_006e; } } { ILGenerator_t99948092 * L_9 = __this->get_ilgen_2(); NullCheck(L_9); ILGenerator_label_fixup_m1325994348(L_9, /*hidden argument*/NULL); } IL_006e: { return; } } // System.Int32 System.Reflection.Emit.ConstructorBuilder::get_next_table_index(System.Object,System.Int32,System.Boolean) extern "C" int32_t ConstructorBuilder_get_next_table_index_m932085784 (ConstructorBuilder_t700974433 * __this, Il2CppObject * ___obj0, int32_t ___table1, bool ___inc2, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_type_8(); Il2CppObject * L_1 = ___obj0; int32_t L_2 = ___table1; bool L_3 = ___inc2; NullCheck(L_0); int32_t L_4 = TypeBuilder_get_next_table_index_m1415870184(L_0, L_1, L_2, L_3, /*hidden argument*/NULL); return L_4; } } // System.Boolean System.Reflection.Emit.ConstructorBuilder::get_IsCompilerContext() extern "C" bool ConstructorBuilder_get_IsCompilerContext_m2796899803 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_get_IsCompilerContext_m2796899803_MetadataUsageId); s_Il2CppMethodInitialized = true; } ModuleBuilder_t4156028127 * V_0 = NULL; AssemblyBuilder_t1646117627 * V_1 = NULL; { TypeBuilder_t3308873219 * L_0 = ConstructorBuilder_get_TypeBuilder_m3442952231(__this, /*hidden argument*/NULL); NullCheck(L_0); Module_t4282841206 * L_1 = TypeBuilder_get_Module_m1668298460(L_0, /*hidden argument*/NULL); V_0 = ((ModuleBuilder_t4156028127 *)CastclassClass(L_1, ModuleBuilder_t4156028127_il2cpp_TypeInfo_var)); ModuleBuilder_t4156028127 * L_2 = V_0; NullCheck(L_2); Assembly_t4268412390 * L_3 = Module_get_Assembly_m3690289982(L_2, /*hidden argument*/NULL); V_1 = ((AssemblyBuilder_t1646117627 *)CastclassSealed(L_3, AssemblyBuilder_t1646117627_il2cpp_TypeInfo_var)); AssemblyBuilder_t1646117627 * L_4 = V_1; NullCheck(L_4); bool L_5 = AssemblyBuilder_get_IsCompilerContext_m2864230005(L_4, /*hidden argument*/NULL); return L_5; } } // System.Exception System.Reflection.Emit.ConstructorBuilder::not_supported() extern "C" Exception_t1927440687 * ConstructorBuilder_not_supported_m3687319507 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_not_supported_m3687319507_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_0, _stringLiteral4087454587, /*hidden argument*/NULL); return L_0; } } // System.Exception System.Reflection.Emit.ConstructorBuilder::not_created() extern "C" Exception_t1927440687 * ConstructorBuilder_not_created_m2150488017 (ConstructorBuilder_t700974433 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ConstructorBuilder_not_created_m2150488017_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_0, _stringLiteral2499557300, /*hidden argument*/NULL); return L_0; } } // System.Void System.Reflection.Emit.DerivedType::.ctor(System.Type) extern "C" void DerivedType__ctor_m4154637955 (DerivedType_t1016359113 * __this, Type_t * ___elementType0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType__ctor_m4154637955_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type__ctor_m882675131(__this, /*hidden argument*/NULL); Type_t * L_0 = ___elementType0; __this->set_elementType_8(L_0); return; } } // System.Void System.Reflection.Emit.DerivedType::create_unmanaged_type(System.Type) extern "C" void DerivedType_create_unmanaged_type_m3164160613 (Il2CppObject * __this /* static, unused */, Type_t * ___type0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef void (*DerivedType_create_unmanaged_type_m3164160613_ftn) (Type_t *); ((DerivedType_create_unmanaged_type_m3164160613_ftn)mscorlib::System::Reflection::Emit::DerivedType::create_unmanaged_type) (___type0); } // System.Type System.Reflection.Emit.DerivedType::GetInterface(System.String,System.Boolean) extern "C" Type_t * DerivedType_GetInterface_m834770656 (DerivedType_t1016359113 * __this, String_t* ___name0, bool ___ignoreCase1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetInterface_m834770656_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type[] System.Reflection.Emit.DerivedType::GetInterfaces() extern "C" TypeU5BU5D_t1664964607* DerivedType_GetInterfaces_m2710649328 (DerivedType_t1016359113 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetInterfaces_m2710649328_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.Emit.DerivedType::GetElementType() extern "C" Type_t * DerivedType_GetElementType_m659905870 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_elementType_8(); return L_0; } } // System.Reflection.EventInfo System.Reflection.Emit.DerivedType::GetEvent(System.String,System.Reflection.BindingFlags) extern "C" EventInfo_t * DerivedType_GetEvent_m2165020195 (DerivedType_t1016359113 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetEvent_m2165020195_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.FieldInfo System.Reflection.Emit.DerivedType::GetField(System.String,System.Reflection.BindingFlags) extern "C" FieldInfo_t * DerivedType_GetField_m3960169619 (DerivedType_t1016359113 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetField_m3960169619_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.FieldInfo[] System.Reflection.Emit.DerivedType::GetFields(System.Reflection.BindingFlags) extern "C" FieldInfoU5BU5D_t125053523* DerivedType_GetFields_m2946331416 (DerivedType_t1016359113 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetFields_m2946331416_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.MethodInfo System.Reflection.Emit.DerivedType::GetMethodImpl(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" MethodInfo_t * DerivedType_GetMethodImpl_m2649456432 (DerivedType_t1016359113 * __this, String_t* ___name0, int32_t ___bindingAttr1, Binder_t3404612058 * ___binder2, int32_t ___callConvention3, TypeU5BU5D_t1664964607* ___types4, ParameterModifierU5BU5D_t963192633* ___modifiers5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetMethodImpl_m2649456432_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.MethodInfo[] System.Reflection.Emit.DerivedType::GetMethods(System.Reflection.BindingFlags) extern "C" MethodInfoU5BU5D_t152480188* DerivedType_GetMethods_m165266904 (DerivedType_t1016359113 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetMethods_m165266904_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.PropertyInfo[] System.Reflection.Emit.DerivedType::GetProperties(System.Reflection.BindingFlags) extern "C" PropertyInfoU5BU5D_t1736152084* DerivedType_GetProperties_m3645894013 (DerivedType_t1016359113 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetProperties_m3645894013_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.PropertyInfo System.Reflection.Emit.DerivedType::GetPropertyImpl(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Type,System.Type[],System.Reflection.ParameterModifier[]) extern "C" PropertyInfo_t * DerivedType_GetPropertyImpl_m1383673951 (DerivedType_t1016359113 * __this, String_t* ___name0, int32_t ___bindingAttr1, Binder_t3404612058 * ___binder2, Type_t * ___returnType3, TypeU5BU5D_t1664964607* ___types4, ParameterModifierU5BU5D_t963192633* ___modifiers5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetPropertyImpl_m1383673951_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.ConstructorInfo System.Reflection.Emit.DerivedType::GetConstructorImpl(System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" ConstructorInfo_t2851816542 * DerivedType_GetConstructorImpl_m129806456 (DerivedType_t1016359113 * __this, int32_t ___bindingAttr0, Binder_t3404612058 * ___binder1, int32_t ___callConvention2, TypeU5BU5D_t1664964607* ___types3, ParameterModifierU5BU5D_t963192633* ___modifiers4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetConstructorImpl_m129806456_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.TypeAttributes System.Reflection.Emit.DerivedType::GetAttributeFlagsImpl() extern "C" int32_t DerivedType_GetAttributeFlagsImpl_m876862795 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_elementType_8(); NullCheck(L_0); int32_t L_1 = Type_get_Attributes_m967681955(L_0, /*hidden argument*/NULL); return L_1; } } // System.Boolean System.Reflection.Emit.DerivedType::HasElementTypeImpl() extern "C" bool DerivedType_HasElementTypeImpl_m919717594 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { return (bool)1; } } // System.Boolean System.Reflection.Emit.DerivedType::IsArrayImpl() extern "C" bool DerivedType_IsArrayImpl_m684825803 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.DerivedType::IsByRefImpl() extern "C" bool DerivedType_IsByRefImpl_m587660994 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.DerivedType::IsPointerImpl() extern "C" bool DerivedType_IsPointerImpl_m411817681 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.DerivedType::IsPrimitiveImpl() extern "C" bool DerivedType_IsPrimitiveImpl_m346837491 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Reflection.ConstructorInfo[] System.Reflection.Emit.DerivedType::GetConstructors(System.Reflection.BindingFlags) extern "C" ConstructorInfoU5BU5D_t1996683371* DerivedType_GetConstructors_m3174158156 (DerivedType_t1016359113 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetConstructors_m3174158156_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object System.Reflection.Emit.DerivedType::InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]) extern "C" Il2CppObject * DerivedType_InvokeMember_m4149586013 (DerivedType_t1016359113 * __this, String_t* ___name0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, Il2CppObject * ___target3, ObjectU5BU5D_t3614634134* ___args4, ParameterModifierU5BU5D_t963192633* ___modifiers5, CultureInfo_t3500843524 * ___culture6, StringU5BU5D_t1642385972* ___namedParameters7, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_InvokeMember_m4149586013_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.DerivedType::IsInstanceOfType(System.Object) extern "C" bool DerivedType_IsInstanceOfType_m1209218194 (DerivedType_t1016359113 * __this, Il2CppObject * ___o0, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.DerivedType::IsAssignableFrom(System.Type) extern "C" bool DerivedType_IsAssignableFrom_m149150570 (DerivedType_t1016359113 * __this, Type_t * ___c0, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.DerivedType::get_ContainsGenericParameters() extern "C" bool DerivedType_get_ContainsGenericParameters_m3700679213 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_elementType_8(); NullCheck(L_0); bool L_1 = VirtFuncInvoker0< bool >::Invoke(80 /* System.Boolean System.Type::get_ContainsGenericParameters() */, L_0); return L_1; } } // System.Type System.Reflection.Emit.DerivedType::MakeGenericType(System.Type[]) extern "C" Type_t * DerivedType_MakeGenericType_m742223168 (DerivedType_t1016359113 * __this, TypeU5BU5D_t1664964607* ___typeArguments0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_MakeGenericType_m742223168_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.Emit.DerivedType::MakeByRefType() extern "C" Type_t * DerivedType_MakeByRefType_m1445183672 (DerivedType_t1016359113 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_MakeByRefType_m1445183672_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ByRefType_t1587086384 * L_0 = (ByRefType_t1587086384 *)il2cpp_codegen_object_new(ByRefType_t1587086384_il2cpp_TypeInfo_var); ByRefType__ctor_m2068210324(L_0, __this, /*hidden argument*/NULL); return L_0; } } // System.String System.Reflection.Emit.DerivedType::ToString() extern "C" String_t* DerivedType_ToString_m747960775 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_elementType_8(); NullCheck(L_0); String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Type::ToString() */, L_0); String_t* L_2 = VirtFuncInvoker1< String_t*, String_t* >::Invoke(87 /* System.String System.Reflection.Emit.DerivedType::FormatName(System.String) */, __this, L_1); return L_2; } } // System.Reflection.Assembly System.Reflection.Emit.DerivedType::get_Assembly() extern "C" Assembly_t4268412390 * DerivedType_get_Assembly_m1990356726 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_elementType_8(); NullCheck(L_0); Assembly_t4268412390 * L_1 = VirtFuncInvoker0< Assembly_t4268412390 * >::Invoke(14 /* System.Reflection.Assembly System.Type::get_Assembly() */, L_0); return L_1; } } // System.String System.Reflection.Emit.DerivedType::get_AssemblyQualifiedName() extern "C" String_t* DerivedType_get_AssemblyQualifiedName_m2010127631 (DerivedType_t1016359113 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_get_AssemblyQualifiedName_m2010127631_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* V_0 = NULL; { Type_t * L_0 = __this->get_elementType_8(); NullCheck(L_0); String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(18 /* System.String System.Type::get_FullName() */, L_0); String_t* L_2 = VirtFuncInvoker1< String_t*, String_t* >::Invoke(87 /* System.String System.Reflection.Emit.DerivedType::FormatName(System.String) */, __this, L_1); V_0 = L_2; String_t* L_3 = V_0; if (L_3) { goto IL_001a; } } { return (String_t*)NULL; } IL_001a: { String_t* L_4 = V_0; Type_t * L_5 = __this->get_elementType_8(); NullCheck(L_5); Assembly_t4268412390 * L_6 = VirtFuncInvoker0< Assembly_t4268412390 * >::Invoke(14 /* System.Reflection.Assembly System.Type::get_Assembly() */, L_5); NullCheck(L_6); String_t* L_7 = VirtFuncInvoker0< String_t* >::Invoke(6 /* System.String System.Reflection.Assembly::get_FullName() */, L_6); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_8 = String_Concat_m612901809(NULL /*static, unused*/, L_4, _stringLiteral811305474, L_7, /*hidden argument*/NULL); return L_8; } } // System.String System.Reflection.Emit.DerivedType::get_FullName() extern "C" String_t* DerivedType_get_FullName_m4188379454 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_elementType_8(); NullCheck(L_0); String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(18 /* System.String System.Type::get_FullName() */, L_0); String_t* L_2 = VirtFuncInvoker1< String_t*, String_t* >::Invoke(87 /* System.String System.Reflection.Emit.DerivedType::FormatName(System.String) */, __this, L_1); return L_2; } } // System.String System.Reflection.Emit.DerivedType::get_Name() extern "C" String_t* DerivedType_get_Name_m1748632995 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_elementType_8(); NullCheck(L_0); String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_0); String_t* L_2 = VirtFuncInvoker1< String_t*, String_t* >::Invoke(87 /* System.String System.Reflection.Emit.DerivedType::FormatName(System.String) */, __this, L_1); return L_2; } } // System.Reflection.Module System.Reflection.Emit.DerivedType::get_Module() extern "C" Module_t4282841206 * DerivedType_get_Module_m2877391270 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_elementType_8(); NullCheck(L_0); Module_t4282841206 * L_1 = VirtFuncInvoker0< Module_t4282841206 * >::Invoke(10 /* System.Reflection.Module System.Type::get_Module() */, L_0); return L_1; } } // System.String System.Reflection.Emit.DerivedType::get_Namespace() extern "C" String_t* DerivedType_get_Namespace_m3902616023 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_elementType_8(); NullCheck(L_0); String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(34 /* System.String System.Type::get_Namespace() */, L_0); return L_1; } } // System.RuntimeTypeHandle System.Reflection.Emit.DerivedType::get_TypeHandle() extern "C" RuntimeTypeHandle_t2330101084 DerivedType_get_TypeHandle_m1486870245 (DerivedType_t1016359113 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_get_TypeHandle_m1486870245_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.Emit.DerivedType::get_UnderlyingSystemType() extern "C" Type_t * DerivedType_get_UnderlyingSystemType_m3904230233 (DerivedType_t1016359113 * __this, const MethodInfo* method) { { DerivedType_create_unmanaged_type_m3164160613(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return __this; } } // System.Boolean System.Reflection.Emit.DerivedType::IsDefined(System.Type,System.Boolean) extern "C" bool DerivedType_IsDefined_m555719351 (DerivedType_t1016359113 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_IsDefined_m555719351_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object[] System.Reflection.Emit.DerivedType::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* DerivedType_GetCustomAttributes_m731216224 (DerivedType_t1016359113 * __this, bool ___inherit0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetCustomAttributes_m731216224_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object[] System.Reflection.Emit.DerivedType::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* DerivedType_GetCustomAttributes_m4010730569 (DerivedType_t1016359113 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (DerivedType_GetCustomAttributes_m4010730569_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.Assembly System.Reflection.Emit.EnumBuilder::get_Assembly() extern "C" Assembly_t4268412390 * EnumBuilder_get_Assembly_m4285228003 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); Assembly_t4268412390 * L_1 = TypeBuilder_get_Assembly_m492491492(L_0, /*hidden argument*/NULL); return L_1; } } // System.String System.Reflection.Emit.EnumBuilder::get_AssemblyQualifiedName() extern "C" String_t* EnumBuilder_get_AssemblyQualifiedName_m3662466844 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); String_t* L_1 = TypeBuilder_get_AssemblyQualifiedName_m2097258567(L_0, /*hidden argument*/NULL); return L_1; } } // System.Type System.Reflection.Emit.EnumBuilder::get_BaseType() extern "C" Type_t * EnumBuilder_get_BaseType_m63295819 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); Type_t * L_1 = TypeBuilder_get_BaseType_m4088672180(L_0, /*hidden argument*/NULL); return L_1; } } // System.Type System.Reflection.Emit.EnumBuilder::get_DeclaringType() extern "C" Type_t * EnumBuilder_get_DeclaringType_m1949466083 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); Type_t * L_1 = TypeBuilder_get_DeclaringType_m3236598700(L_0, /*hidden argument*/NULL); return L_1; } } // System.String System.Reflection.Emit.EnumBuilder::get_FullName() extern "C" String_t* EnumBuilder_get_FullName_m2818393911 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); String_t* L_1 = TypeBuilder_get_FullName_m1626507516(L_0, /*hidden argument*/NULL); return L_1; } } // System.Reflection.Module System.Reflection.Emit.EnumBuilder::get_Module() extern "C" Module_t4282841206 * EnumBuilder_get_Module_m431986379 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); Module_t4282841206 * L_1 = TypeBuilder_get_Module_m1668298460(L_0, /*hidden argument*/NULL); return L_1; } } // System.String System.Reflection.Emit.EnumBuilder::get_Name() extern "C" String_t* EnumBuilder_get_Name_m2088160658 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); String_t* L_1 = TypeBuilder_get_Name_m170882803(L_0, /*hidden argument*/NULL); return L_1; } } // System.String System.Reflection.Emit.EnumBuilder::get_Namespace() extern "C" String_t* EnumBuilder_get_Namespace_m3109232562 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); String_t* L_1 = TypeBuilder_get_Namespace_m3562783599(L_0, /*hidden argument*/NULL); return L_1; } } // System.Type System.Reflection.Emit.EnumBuilder::get_ReflectedType() extern "C" Type_t * EnumBuilder_get_ReflectedType_m2679108928 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); Type_t * L_1 = TypeBuilder_get_ReflectedType_m2504081059(L_0, /*hidden argument*/NULL); return L_1; } } // System.RuntimeTypeHandle System.Reflection.Emit.EnumBuilder::get_TypeHandle() extern "C" RuntimeTypeHandle_t2330101084 EnumBuilder_get_TypeHandle_m724362740 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); RuntimeTypeHandle_t2330101084 L_1 = TypeBuilder_get_TypeHandle_m922348781(L_0, /*hidden argument*/NULL); return L_1; } } // System.Type System.Reflection.Emit.EnumBuilder::get_UnderlyingSystemType() extern "C" Type_t * EnumBuilder_get_UnderlyingSystemType_m1699680520 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get__underlyingType_9(); return L_0; } } // System.Reflection.TypeAttributes System.Reflection.Emit.EnumBuilder::GetAttributeFlagsImpl() extern "C" int32_t EnumBuilder_GetAttributeFlagsImpl_m4263246832 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); int32_t L_1 = L_0->get_attrs_18(); return L_1; } } // System.Reflection.ConstructorInfo System.Reflection.Emit.EnumBuilder::GetConstructorImpl(System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" ConstructorInfo_t2851816542 * EnumBuilder_GetConstructorImpl_m331611313 (EnumBuilder_t2808714468 * __this, int32_t ___bindingAttr0, Binder_t3404612058 * ___binder1, int32_t ___callConvention2, TypeU5BU5D_t1664964607* ___types3, ParameterModifierU5BU5D_t963192633* ___modifiers4, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); int32_t L_1 = ___bindingAttr0; Binder_t3404612058 * L_2 = ___binder1; int32_t L_3 = ___callConvention2; TypeU5BU5D_t1664964607* L_4 = ___types3; ParameterModifierU5BU5D_t963192633* L_5 = ___modifiers4; NullCheck(L_0); ConstructorInfo_t2851816542 * L_6 = Type_GetConstructor_m835344477(L_0, L_1, L_2, L_3, L_4, L_5, /*hidden argument*/NULL); return L_6; } } // System.Reflection.ConstructorInfo[] System.Reflection.Emit.EnumBuilder::GetConstructors(System.Reflection.BindingFlags) extern "C" ConstructorInfoU5BU5D_t1996683371* EnumBuilder_GetConstructors_m3240699827 (EnumBuilder_t2808714468 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); int32_t L_1 = ___bindingAttr0; NullCheck(L_0); ConstructorInfoU5BU5D_t1996683371* L_2 = TypeBuilder_GetConstructors_m774120094(L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Object[] System.Reflection.Emit.EnumBuilder::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* EnumBuilder_GetCustomAttributes_m432109445 (EnumBuilder_t2808714468 * __this, bool ___inherit0, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); bool L_1 = ___inherit0; NullCheck(L_0); ObjectU5BU5D_t3614634134* L_2 = TypeBuilder_GetCustomAttributes_m1637538574(L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Object[] System.Reflection.Emit.EnumBuilder::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* EnumBuilder_GetCustomAttributes_m2001415610 (EnumBuilder_t2808714468 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); Type_t * L_1 = ___attributeType0; bool L_2 = ___inherit1; NullCheck(L_0); ObjectU5BU5D_t3614634134* L_3 = TypeBuilder_GetCustomAttributes_m2702632361(L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } // System.Type System.Reflection.Emit.EnumBuilder::GetElementType() extern "C" Type_t * EnumBuilder_GetElementType_m1228393631 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); Type_t * L_1 = TypeBuilder_GetElementType_m3707448372(L_0, /*hidden argument*/NULL); return L_1; } } // System.Reflection.EventInfo System.Reflection.Emit.EnumBuilder::GetEvent(System.String,System.Reflection.BindingFlags) extern "C" EventInfo_t * EnumBuilder_GetEvent_m3989421960 (EnumBuilder_t2808714468 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); String_t* L_1 = ___name0; int32_t L_2 = ___bindingAttr1; NullCheck(L_0); EventInfo_t * L_3 = TypeBuilder_GetEvent_m3876348075(L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } // System.Reflection.FieldInfo System.Reflection.Emit.EnumBuilder::GetField(System.String,System.Reflection.BindingFlags) extern "C" FieldInfo_t * EnumBuilder_GetField_m1324325036 (EnumBuilder_t2808714468 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); String_t* L_1 = ___name0; int32_t L_2 = ___bindingAttr1; NullCheck(L_0); FieldInfo_t * L_3 = TypeBuilder_GetField_m2112455315(L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } // System.Reflection.FieldInfo[] System.Reflection.Emit.EnumBuilder::GetFields(System.Reflection.BindingFlags) extern "C" FieldInfoU5BU5D_t125053523* EnumBuilder_GetFields_m2003258635 (EnumBuilder_t2808714468 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); int32_t L_1 = ___bindingAttr0; NullCheck(L_0); FieldInfoU5BU5D_t125053523* L_2 = TypeBuilder_GetFields_m3875401338(L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Type System.Reflection.Emit.EnumBuilder::GetInterface(System.String,System.Boolean) extern "C" Type_t * EnumBuilder_GetInterface_m298236665 (EnumBuilder_t2808714468 * __this, String_t* ___name0, bool ___ignoreCase1, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); String_t* L_1 = ___name0; bool L_2 = ___ignoreCase1; NullCheck(L_0); Type_t * L_3 = TypeBuilder_GetInterface_m1082564294(L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } // System.Type[] System.Reflection.Emit.EnumBuilder::GetInterfaces() extern "C" TypeU5BU5D_t1664964607* EnumBuilder_GetInterfaces_m198423261 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); TypeU5BU5D_t1664964607* L_1 = TypeBuilder_GetInterfaces_m1818658502(L_0, /*hidden argument*/NULL); return L_1; } } // System.Reflection.MethodInfo System.Reflection.Emit.EnumBuilder::GetMethodImpl(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" MethodInfo_t * EnumBuilder_GetMethodImpl_m2091516387 (EnumBuilder_t2808714468 * __this, String_t* ___name0, int32_t ___bindingAttr1, Binder_t3404612058 * ___binder2, int32_t ___callConvention3, TypeU5BU5D_t1664964607* ___types4, ParameterModifierU5BU5D_t963192633* ___modifiers5, const MethodInfo* method) { { TypeU5BU5D_t1664964607* L_0 = ___types4; if (L_0) { goto IL_0015; } } { TypeBuilder_t3308873219 * L_1 = __this->get__tb_8(); String_t* L_2 = ___name0; int32_t L_3 = ___bindingAttr1; NullCheck(L_1); MethodInfo_t * L_4 = Type_GetMethod_m475234662(L_1, L_2, L_3, /*hidden argument*/NULL); return L_4; } IL_0015: { TypeBuilder_t3308873219 * L_5 = __this->get__tb_8(); String_t* L_6 = ___name0; int32_t L_7 = ___bindingAttr1; Binder_t3404612058 * L_8 = ___binder2; int32_t L_9 = ___callConvention3; TypeU5BU5D_t1664964607* L_10 = ___types4; ParameterModifierU5BU5D_t963192633* L_11 = ___modifiers5; NullCheck(L_5); MethodInfo_t * L_12 = Type_GetMethod_m3650909507(L_5, L_6, L_7, L_8, L_9, L_10, L_11, /*hidden argument*/NULL); return L_12; } } // System.Reflection.MethodInfo[] System.Reflection.Emit.EnumBuilder::GetMethods(System.Reflection.BindingFlags) extern "C" MethodInfoU5BU5D_t152480188* EnumBuilder_GetMethods_m342174319 (EnumBuilder_t2808714468 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); int32_t L_1 = ___bindingAttr0; NullCheck(L_0); MethodInfoU5BU5D_t152480188* L_2 = TypeBuilder_GetMethods_m4196862738(L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Reflection.PropertyInfo[] System.Reflection.Emit.EnumBuilder::GetProperties(System.Reflection.BindingFlags) extern "C" PropertyInfoU5BU5D_t1736152084* EnumBuilder_GetProperties_m1062826382 (EnumBuilder_t2808714468 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); int32_t L_1 = ___bindingAttr0; NullCheck(L_0); PropertyInfoU5BU5D_t1736152084* L_2 = TypeBuilder_GetProperties_m2211539685(L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Reflection.PropertyInfo System.Reflection.Emit.EnumBuilder::GetPropertyImpl(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Type,System.Type[],System.Reflection.ParameterModifier[]) extern "C" PropertyInfo_t * EnumBuilder_GetPropertyImpl_m2717304076 (EnumBuilder_t2808714468 * __this, String_t* ___name0, int32_t ___bindingAttr1, Binder_t3404612058 * ___binder2, Type_t * ___returnType3, TypeU5BU5D_t1664964607* ___types4, ParameterModifierU5BU5D_t963192633* ___modifiers5, const MethodInfo* method) { { Exception_t1927440687 * L_0 = EnumBuilder_CreateNotSupportedException_m62763134(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.EnumBuilder::HasElementTypeImpl() extern "C" bool EnumBuilder_HasElementTypeImpl_m1414733955 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); NullCheck(L_0); bool L_1 = Type_get_HasElementType_m3319917896(L_0, /*hidden argument*/NULL); return L_1; } } // System.Object System.Reflection.Emit.EnumBuilder::InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]) extern "C" Il2CppObject * EnumBuilder_InvokeMember_m633176706 (EnumBuilder_t2808714468 * __this, String_t* ___name0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, Il2CppObject * ___target3, ObjectU5BU5D_t3614634134* ___args4, ParameterModifierU5BU5D_t963192633* ___modifiers5, CultureInfo_t3500843524 * ___culture6, StringU5BU5D_t1642385972* ___namedParameters7, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); String_t* L_1 = ___name0; int32_t L_2 = ___invokeAttr1; Binder_t3404612058 * L_3 = ___binder2; Il2CppObject * L_4 = ___target3; ObjectU5BU5D_t3614634134* L_5 = ___args4; ParameterModifierU5BU5D_t963192633* L_6 = ___modifiers5; CultureInfo_t3500843524 * L_7 = ___culture6; StringU5BU5D_t1642385972* L_8 = ___namedParameters7; NullCheck(L_0); Il2CppObject * L_9 = TypeBuilder_InvokeMember_m1992906893(L_0, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8, /*hidden argument*/NULL); return L_9; } } // System.Boolean System.Reflection.Emit.EnumBuilder::IsArrayImpl() extern "C" bool EnumBuilder_IsArrayImpl_m3185704898 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.EnumBuilder::IsByRefImpl() extern "C" bool EnumBuilder_IsByRefImpl_m3302439719 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.EnumBuilder::IsPointerImpl() extern "C" bool EnumBuilder_IsPointerImpl_m2768502902 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.EnumBuilder::IsPrimitiveImpl() extern "C" bool EnumBuilder_IsPrimitiveImpl_m3485654502 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.EnumBuilder::IsValueTypeImpl() extern "C" bool EnumBuilder_IsValueTypeImpl_m3635754638 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { { return (bool)1; } } // System.Boolean System.Reflection.Emit.EnumBuilder::IsDefined(System.Type,System.Boolean) extern "C" bool EnumBuilder_IsDefined_m255842204 (EnumBuilder_t2808714468 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get__tb_8(); Type_t * L_1 = ___attributeType0; bool L_2 = ___inherit1; NullCheck(L_0); bool L_3 = TypeBuilder_IsDefined_m3186251655(L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } // System.Type System.Reflection.Emit.EnumBuilder::MakeByRefType() extern "C" Type_t * EnumBuilder_MakeByRefType_m3504630835 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (EnumBuilder_MakeByRefType_m3504630835_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ByRefType_t1587086384 * L_0 = (ByRefType_t1587086384 *)il2cpp_codegen_object_new(ByRefType_t1587086384_il2cpp_TypeInfo_var); ByRefType__ctor_m2068210324(L_0, __this, /*hidden argument*/NULL); return L_0; } } // System.Exception System.Reflection.Emit.EnumBuilder::CreateNotSupportedException() extern "C" Exception_t1927440687 * EnumBuilder_CreateNotSupportedException_m62763134 (EnumBuilder_t2808714468 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (EnumBuilder_CreateNotSupportedException_m62763134_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_0, _stringLiteral4087454587, /*hidden argument*/NULL); return L_0; } } // System.Reflection.FieldAttributes System.Reflection.Emit.FieldBuilder::get_Attributes() extern "C" int32_t FieldBuilder_get_Attributes_m2174064290 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_attrs_0(); return L_0; } } // System.Type System.Reflection.Emit.FieldBuilder::get_DeclaringType() extern "C" Type_t * FieldBuilder_get_DeclaringType_m726107228 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_typeb_3(); return L_0; } } // System.RuntimeFieldHandle System.Reflection.Emit.FieldBuilder::get_FieldHandle() extern "C" RuntimeFieldHandle_t2331729674 FieldBuilder_get_FieldHandle_m1845846823 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { { Exception_t1927440687 * L_0 = FieldBuilder_CreateNotSupportedException_m3999938861(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.Emit.FieldBuilder::get_FieldType() extern "C" Type_t * FieldBuilder_get_FieldType_m2267463269 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_type_1(); return L_0; } } // System.String System.Reflection.Emit.FieldBuilder::get_Name() extern "C" String_t* FieldBuilder_get_Name_m2243491233 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_2(); return L_0; } } // System.Type System.Reflection.Emit.FieldBuilder::get_ReflectedType() extern "C" Type_t * FieldBuilder_get_ReflectedType_m3707619461 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_typeb_3(); return L_0; } } // System.Object[] System.Reflection.Emit.FieldBuilder::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* FieldBuilder_GetCustomAttributes_m1557425540 (FieldBuilder_t2784804005 * __this, bool ___inherit0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (FieldBuilder_GetCustomAttributes_m1557425540_MetadataUsageId); s_Il2CppMethodInitialized = true; } { TypeBuilder_t3308873219 * L_0 = __this->get_typeb_3(); NullCheck(L_0); bool L_1 = TypeBuilder_get_is_created_m736553860(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0018; } } { bool L_2 = ___inherit0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_3 = MonoCustomAttrs_GetCustomAttributes_m3069779582(NULL /*static, unused*/, __this, L_2, /*hidden argument*/NULL); return L_3; } IL_0018: { Exception_t1927440687 * L_4 = FieldBuilder_CreateNotSupportedException_m3999938861(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4); } } // System.Object[] System.Reflection.Emit.FieldBuilder::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* FieldBuilder_GetCustomAttributes_m291168515 (FieldBuilder_t2784804005 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (FieldBuilder_GetCustomAttributes_m291168515_MetadataUsageId); s_Il2CppMethodInitialized = true; } { TypeBuilder_t3308873219 * L_0 = __this->get_typeb_3(); NullCheck(L_0); bool L_1 = TypeBuilder_get_is_created_m736553860(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0019; } } { Type_t * L_2 = ___attributeType0; bool L_3 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_4 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_2, L_3, /*hidden argument*/NULL); return L_4; } IL_0019: { Exception_t1927440687 * L_5 = FieldBuilder_CreateNotSupportedException_m3999938861(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_5); } } // System.Object System.Reflection.Emit.FieldBuilder::GetValue(System.Object) extern "C" Il2CppObject * FieldBuilder_GetValue_m1323554150 (FieldBuilder_t2784804005 * __this, Il2CppObject * ___obj0, const MethodInfo* method) { { Exception_t1927440687 * L_0 = FieldBuilder_CreateNotSupportedException_m3999938861(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.FieldBuilder::IsDefined(System.Type,System.Boolean) extern "C" bool FieldBuilder_IsDefined_m2730324893 (FieldBuilder_t2784804005 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = FieldBuilder_CreateNotSupportedException_m3999938861(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Int32 System.Reflection.Emit.FieldBuilder::GetFieldOffset() extern "C" int32_t FieldBuilder_GetFieldOffset_m618194385 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { { return 0; } } // System.Void System.Reflection.Emit.FieldBuilder::SetValue(System.Object,System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Globalization.CultureInfo) extern "C" void FieldBuilder_SetValue_m3109503557 (FieldBuilder_t2784804005 * __this, Il2CppObject * ___obj0, Il2CppObject * ___val1, int32_t ___invokeAttr2, Binder_t3404612058 * ___binder3, CultureInfo_t3500843524 * ___culture4, const MethodInfo* method) { { Exception_t1927440687 * L_0 = FieldBuilder_CreateNotSupportedException_m3999938861(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.Emit.UnmanagedMarshal System.Reflection.Emit.FieldBuilder::get_UMarshal() extern "C" UnmanagedMarshal_t4270021860 * FieldBuilder_get_UMarshal_m3138919472 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { { UnmanagedMarshal_t4270021860 * L_0 = __this->get_marshal_info_4(); return L_0; } } // System.Exception System.Reflection.Emit.FieldBuilder::CreateNotSupportedException() extern "C" Exception_t1927440687 * FieldBuilder_CreateNotSupportedException_m3999938861 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (FieldBuilder_CreateNotSupportedException_m3999938861_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_0, _stringLiteral4087454587, /*hidden argument*/NULL); return L_0; } } // System.Reflection.Module System.Reflection.Emit.FieldBuilder::get_Module() extern "C" Module_t4282841206 * FieldBuilder_get_Module_m1920701714 (FieldBuilder_t2784804005 * __this, const MethodInfo* method) { { Module_t4282841206 * L_0 = MemberInfo_get_Module_m3957426656(__this, /*hidden argument*/NULL); return L_0; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::IsSubclassOf(System.Type) extern "C" bool GenericTypeParameterBuilder_IsSubclassOf_m563999142 (GenericTypeParameterBuilder_t1370236603 * __this, Type_t * ___c0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (GenericTypeParameterBuilder_IsSubclassOf_m563999142_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t G_B7_0 = 0; { TypeBuilder_t3308873219 * L_0 = __this->get_tbuilder_8(); NullCheck(L_0); Module_t4282841206 * L_1 = TypeBuilder_get_Module_m1668298460(L_0, /*hidden argument*/NULL); NullCheck(((ModuleBuilder_t4156028127 *)CastclassClass(L_1, ModuleBuilder_t4156028127_il2cpp_TypeInfo_var))); AssemblyBuilder_t1646117627 * L_2 = ((ModuleBuilder_t4156028127 *)CastclassClass(L_1, ModuleBuilder_t4156028127_il2cpp_TypeInfo_var))->get_assemblyb_12(); NullCheck(L_2); bool L_3 = AssemblyBuilder_get_IsCompilerContext_m2864230005(L_2, /*hidden argument*/NULL); if (L_3) { goto IL_0026; } } { Exception_t1927440687 * L_4 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4); } IL_0026: { Type_t * L_5 = GenericTypeParameterBuilder_get_BaseType_m101683868(__this, /*hidden argument*/NULL); if (L_5) { goto IL_0033; } } { return (bool)0; } IL_0033: { Type_t * L_6 = GenericTypeParameterBuilder_get_BaseType_m101683868(__this, /*hidden argument*/NULL); Type_t * L_7 = ___c0; if ((((Il2CppObject*)(Type_t *)L_6) == ((Il2CppObject*)(Type_t *)L_7))) { goto IL_004d; } } { Type_t * L_8 = GenericTypeParameterBuilder_get_BaseType_m101683868(__this, /*hidden argument*/NULL); Type_t * L_9 = ___c0; NullCheck(L_8); bool L_10 = VirtFuncInvoker1< bool, Type_t * >::Invoke(38 /* System.Boolean System.Type::IsSubclassOf(System.Type) */, L_8, L_9); G_B7_0 = ((int32_t)(L_10)); goto IL_004e; } IL_004d: { G_B7_0 = 1; } IL_004e: { return (bool)G_B7_0; } } // System.Reflection.TypeAttributes System.Reflection.Emit.GenericTypeParameterBuilder::GetAttributeFlagsImpl() extern "C" int32_t GenericTypeParameterBuilder_GetAttributeFlagsImpl_m3338182267 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (GenericTypeParameterBuilder_GetAttributeFlagsImpl_m3338182267_MetadataUsageId); s_Il2CppMethodInitialized = true; } { TypeBuilder_t3308873219 * L_0 = __this->get_tbuilder_8(); NullCheck(L_0); Module_t4282841206 * L_1 = TypeBuilder_get_Module_m1668298460(L_0, /*hidden argument*/NULL); NullCheck(((ModuleBuilder_t4156028127 *)CastclassClass(L_1, ModuleBuilder_t4156028127_il2cpp_TypeInfo_var))); AssemblyBuilder_t1646117627 * L_2 = ((ModuleBuilder_t4156028127 *)CastclassClass(L_1, ModuleBuilder_t4156028127_il2cpp_TypeInfo_var))->get_assemblyb_12(); NullCheck(L_2); bool L_3 = AssemblyBuilder_get_IsCompilerContext_m2864230005(L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_0021; } } { return (int32_t)(1); } IL_0021: { Exception_t1927440687 * L_4 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4); } } // System.Reflection.ConstructorInfo System.Reflection.Emit.GenericTypeParameterBuilder::GetConstructorImpl(System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" ConstructorInfo_t2851816542 * GenericTypeParameterBuilder_GetConstructorImpl_m2310028502 (GenericTypeParameterBuilder_t1370236603 * __this, int32_t ___bindingAttr0, Binder_t3404612058 * ___binder1, int32_t ___callConvention2, TypeU5BU5D_t1664964607* ___types3, ParameterModifierU5BU5D_t963192633* ___modifiers4, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.ConstructorInfo[] System.Reflection.Emit.GenericTypeParameterBuilder::GetConstructors(System.Reflection.BindingFlags) extern "C" ConstructorInfoU5BU5D_t1996683371* GenericTypeParameterBuilder_GetConstructors_m103067670 (GenericTypeParameterBuilder_t1370236603 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.EventInfo System.Reflection.Emit.GenericTypeParameterBuilder::GetEvent(System.String,System.Reflection.BindingFlags) extern "C" EventInfo_t * GenericTypeParameterBuilder_GetEvent_m4210567427 (GenericTypeParameterBuilder_t1370236603 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.FieldInfo System.Reflection.Emit.GenericTypeParameterBuilder::GetField(System.String,System.Reflection.BindingFlags) extern "C" FieldInfo_t * GenericTypeParameterBuilder_GetField_m1135650395 (GenericTypeParameterBuilder_t1370236603 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.FieldInfo[] System.Reflection.Emit.GenericTypeParameterBuilder::GetFields(System.Reflection.BindingFlags) extern "C" FieldInfoU5BU5D_t125053523* GenericTypeParameterBuilder_GetFields_m1855948450 (GenericTypeParameterBuilder_t1370236603 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::GetInterface(System.String,System.Boolean) extern "C" Type_t * GenericTypeParameterBuilder_GetInterface_m1297973470 (GenericTypeParameterBuilder_t1370236603 * __this, String_t* ___name0, bool ___ignoreCase1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type[] System.Reflection.Emit.GenericTypeParameterBuilder::GetInterfaces() extern "C" TypeU5BU5D_t1664964607* GenericTypeParameterBuilder_GetInterfaces_m922686350 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.MethodInfo[] System.Reflection.Emit.GenericTypeParameterBuilder::GetMethods(System.Reflection.BindingFlags) extern "C" MethodInfoU5BU5D_t152480188* GenericTypeParameterBuilder_GetMethods_m1243855818 (GenericTypeParameterBuilder_t1370236603 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.MethodInfo System.Reflection.Emit.GenericTypeParameterBuilder::GetMethodImpl(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" MethodInfo_t * GenericTypeParameterBuilder_GetMethodImpl_m528545634 (GenericTypeParameterBuilder_t1370236603 * __this, String_t* ___name0, int32_t ___bindingAttr1, Binder_t3404612058 * ___binder2, int32_t ___callConvention3, TypeU5BU5D_t1664964607* ___types4, ParameterModifierU5BU5D_t963192633* ___modifiers5, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.PropertyInfo[] System.Reflection.Emit.GenericTypeParameterBuilder::GetProperties(System.Reflection.BindingFlags) extern "C" PropertyInfoU5BU5D_t1736152084* GenericTypeParameterBuilder_GetProperties_m571906413 (GenericTypeParameterBuilder_t1370236603 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.PropertyInfo System.Reflection.Emit.GenericTypeParameterBuilder::GetPropertyImpl(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Type,System.Type[],System.Reflection.ParameterModifier[]) extern "C" PropertyInfo_t * GenericTypeParameterBuilder_GetPropertyImpl_m3566422383 (GenericTypeParameterBuilder_t1370236603 * __this, String_t* ___name0, int32_t ___bindingAttr1, Binder_t3404612058 * ___binder2, Type_t * ___returnType3, TypeU5BU5D_t1664964607* ___types4, ParameterModifierU5BU5D_t963192633* ___modifiers5, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::HasElementTypeImpl() extern "C" bool GenericTypeParameterBuilder_HasElementTypeImpl_m2592272488 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::IsAssignableFrom(System.Type) extern "C" bool GenericTypeParameterBuilder_IsAssignableFrom_m3874566384 (GenericTypeParameterBuilder_t1370236603 * __this, Type_t * ___c0, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::IsInstanceOfType(System.Object) extern "C" bool GenericTypeParameterBuilder_IsInstanceOfType_m2048682904 (GenericTypeParameterBuilder_t1370236603 * __this, Il2CppObject * ___o0, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::IsArrayImpl() extern "C" bool GenericTypeParameterBuilder_IsArrayImpl_m1786931395 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::IsByRefImpl() extern "C" bool GenericTypeParameterBuilder_IsByRefImpl_m3339093128 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::IsPointerImpl() extern "C" bool GenericTypeParameterBuilder_IsPointerImpl_m4265374617 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::IsPrimitiveImpl() extern "C" bool GenericTypeParameterBuilder_IsPrimitiveImpl_m1198748291 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::IsValueTypeImpl() extern "C" bool GenericTypeParameterBuilder_IsValueTypeImpl_m20800593 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { int32_t G_B3_0 = 0; { Type_t * L_0 = __this->get_base_type_11(); if (!L_0) { goto IL_001b; } } { Type_t * L_1 = __this->get_base_type_11(); NullCheck(L_1); bool L_2 = Type_get_IsValueType_m1733572463(L_1, /*hidden argument*/NULL); G_B3_0 = ((int32_t)(L_2)); goto IL_001c; } IL_001b: { G_B3_0 = 0; } IL_001c: { return (bool)G_B3_0; } } // System.Object System.Reflection.Emit.GenericTypeParameterBuilder::InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]) extern "C" Il2CppObject * GenericTypeParameterBuilder_InvokeMember_m1055646245 (GenericTypeParameterBuilder_t1370236603 * __this, String_t* ___name0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, Il2CppObject * ___target3, ObjectU5BU5D_t3614634134* ___args4, ParameterModifierU5BU5D_t963192633* ___modifiers5, CultureInfo_t3500843524 * ___culture6, StringU5BU5D_t1642385972* ___namedParameters7, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::GetElementType() extern "C" Type_t * GenericTypeParameterBuilder_GetElementType_m2702341452 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::get_UnderlyingSystemType() extern "C" Type_t * GenericTypeParameterBuilder_get_UnderlyingSystemType_m200578513 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return __this; } } // System.Reflection.Assembly System.Reflection.Emit.GenericTypeParameterBuilder::get_Assembly() extern "C" Assembly_t4268412390 * GenericTypeParameterBuilder_get_Assembly_m2103587580 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_tbuilder_8(); NullCheck(L_0); Assembly_t4268412390 * L_1 = TypeBuilder_get_Assembly_m492491492(L_0, /*hidden argument*/NULL); return L_1; } } // System.String System.Reflection.Emit.GenericTypeParameterBuilder::get_AssemblyQualifiedName() extern "C" String_t* GenericTypeParameterBuilder_get_AssemblyQualifiedName_m902593295 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (String_t*)NULL; } } // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::get_BaseType() extern "C" Type_t * GenericTypeParameterBuilder_get_BaseType_m101683868 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_base_type_11(); return L_0; } } // System.String System.Reflection.Emit.GenericTypeParameterBuilder::get_FullName() extern "C" String_t* GenericTypeParameterBuilder_get_FullName_m3508212436 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (String_t*)NULL; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::IsDefined(System.Type,System.Boolean) extern "C" bool GenericTypeParameterBuilder_IsDefined_m1413593919 (GenericTypeParameterBuilder_t1370236603 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object[] System.Reflection.Emit.GenericTypeParameterBuilder::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* GenericTypeParameterBuilder_GetCustomAttributes_m1330155190 (GenericTypeParameterBuilder_t1370236603 * __this, bool ___inherit0, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object[] System.Reflection.Emit.GenericTypeParameterBuilder::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* GenericTypeParameterBuilder_GetCustomAttributes_m3266536625 (GenericTypeParameterBuilder_t1370236603 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.String System.Reflection.Emit.GenericTypeParameterBuilder::get_Name() extern "C" String_t* GenericTypeParameterBuilder_get_Name_m2640162747 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_10(); return L_0; } } // System.String System.Reflection.Emit.GenericTypeParameterBuilder::get_Namespace() extern "C" String_t* GenericTypeParameterBuilder_get_Namespace_m1776615511 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (String_t*)NULL; } } // System.Reflection.Module System.Reflection.Emit.GenericTypeParameterBuilder::get_Module() extern "C" Module_t4282841206 * GenericTypeParameterBuilder_get_Module_m2427847092 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_tbuilder_8(); NullCheck(L_0); Module_t4282841206 * L_1 = TypeBuilder_get_Module_m1668298460(L_0, /*hidden argument*/NULL); return L_1; } } // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::get_DeclaringType() extern "C" Type_t * GenericTypeParameterBuilder_get_DeclaringType_m1652924692 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { Type_t * G_B3_0 = NULL; { MethodBuilder_t644187984 * L_0 = __this->get_mbuilder_9(); if (!L_0) { goto IL_001b; } } { MethodBuilder_t644187984 * L_1 = __this->get_mbuilder_9(); NullCheck(L_1); Type_t * L_2 = MethodBuilder_get_DeclaringType_m2734207591(L_1, /*hidden argument*/NULL); G_B3_0 = L_2; goto IL_0021; } IL_001b: { TypeBuilder_t3308873219 * L_3 = __this->get_tbuilder_8(); G_B3_0 = ((Type_t *)(L_3)); } IL_0021: { return G_B3_0; } } // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::get_ReflectedType() extern "C" Type_t * GenericTypeParameterBuilder_get_ReflectedType_m562256091 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { Type_t * L_0 = GenericTypeParameterBuilder_get_DeclaringType_m1652924692(__this, /*hidden argument*/NULL); return L_0; } } // System.RuntimeTypeHandle System.Reflection.Emit.GenericTypeParameterBuilder::get_TypeHandle() extern "C" RuntimeTypeHandle_t2330101084 GenericTypeParameterBuilder_get_TypeHandle_m3293062357 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { Exception_t1927440687 * L_0 = GenericTypeParameterBuilder_not_supported_m3784909043(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type[] System.Reflection.Emit.GenericTypeParameterBuilder::GetGenericArguments() extern "C" TypeU5BU5D_t1664964607* GenericTypeParameterBuilder_GetGenericArguments_m277381309 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (GenericTypeParameterBuilder_GetGenericArguments_m277381309_MetadataUsageId); s_Il2CppMethodInitialized = true; } { InvalidOperationException_t721527559 * L_0 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m102359810(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::GetGenericTypeDefinition() extern "C" Type_t * GenericTypeParameterBuilder_GetGenericTypeDefinition_m2936287336 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (GenericTypeParameterBuilder_GetGenericTypeDefinition_m2936287336_MetadataUsageId); s_Il2CppMethodInitialized = true; } { InvalidOperationException_t721527559 * L_0 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m102359810(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::get_ContainsGenericParameters() extern "C" bool GenericTypeParameterBuilder_get_ContainsGenericParameters_m1449092549 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (bool)1; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::get_IsGenericParameter() extern "C" bool GenericTypeParameterBuilder_get_IsGenericParameter_m1565478927 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (bool)1; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::get_IsGenericType() extern "C" bool GenericTypeParameterBuilder_get_IsGenericType_m1883522222 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::get_IsGenericTypeDefinition() extern "C" bool GenericTypeParameterBuilder_get_IsGenericTypeDefinition_m2790308279 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Exception System.Reflection.Emit.GenericTypeParameterBuilder::not_supported() extern "C" Exception_t1927440687 * GenericTypeParameterBuilder_not_supported_m3784909043 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (GenericTypeParameterBuilder_not_supported_m3784909043_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); return L_0; } } // System.String System.Reflection.Emit.GenericTypeParameterBuilder::ToString() extern "C" String_t* GenericTypeParameterBuilder_ToString_m4223425511 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_10(); return L_0; } } // System.Boolean System.Reflection.Emit.GenericTypeParameterBuilder::Equals(System.Object) extern "C" bool GenericTypeParameterBuilder_Equals_m2498927509 (GenericTypeParameterBuilder_t1370236603 * __this, Il2CppObject * ___o0, const MethodInfo* method) { { Il2CppObject * L_0 = ___o0; bool L_1 = Type_Equals_m1272005660(__this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Int32 System.Reflection.Emit.GenericTypeParameterBuilder::GetHashCode() extern "C" int32_t GenericTypeParameterBuilder_GetHashCode_m867619899 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { { int32_t L_0 = Type_GetHashCode_m1150382148(__this, /*hidden argument*/NULL); return L_0; } } // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::MakeByRefType() extern "C" Type_t * GenericTypeParameterBuilder_MakeByRefType_m4279657370 (GenericTypeParameterBuilder_t1370236603 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (GenericTypeParameterBuilder_MakeByRefType_m4279657370_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ByRefType_t1587086384 * L_0 = (ByRefType_t1587086384 *)il2cpp_codegen_object_new(ByRefType_t1587086384_il2cpp_TypeInfo_var); ByRefType__ctor_m2068210324(L_0, __this, /*hidden argument*/NULL); return L_0; } } // System.Type System.Reflection.Emit.GenericTypeParameterBuilder::MakeGenericType(System.Type[]) extern "C" Type_t * GenericTypeParameterBuilder_MakeGenericType_m2955814622 (GenericTypeParameterBuilder_t1370236603 * __this, TypeU5BU5D_t1664964607* ___typeArguments0, const MethodInfo* method) { { TypeU5BU5D_t1664964607* L_0 = ___typeArguments0; Type_t * L_1 = Type_MakeGenericType_m2765875033(__this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Void System.Reflection.Emit.ILGenerator::.ctor(System.Reflection.Module,System.Reflection.Emit.TokenGenerator,System.Int32) extern "C" void ILGenerator__ctor_m3365621387 (ILGenerator_t99948092 * __this, Module_t4282841206 * ___m0, Il2CppObject * ___token_gen1, int32_t ___size2, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ILGenerator__ctor_m3365621387_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); int32_t L_0 = ___size2; if ((((int32_t)L_0) >= ((int32_t)0))) { goto IL_0014; } } { ___size2 = ((int32_t)128); } IL_0014: { int32_t L_1 = ___size2; __this->set_code_1(((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_1))); __this->set_token_fixups_6(((ILTokenInfoU5BU5D_t4103159791*)SZArrayNew(ILTokenInfoU5BU5D_t4103159791_il2cpp_TypeInfo_var, (uint32_t)8))); Module_t4282841206 * L_2 = ___m0; __this->set_module_10(L_2); Il2CppObject * L_3 = ___token_gen1; __this->set_token_gen_11(L_3); return; } } // System.Void System.Reflection.Emit.ILGenerator::.cctor() extern "C" void ILGenerator__cctor_m3943061018 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ILGenerator__cctor_m3943061018_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_0 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Void_t1841601450_0_0_0_var), /*hidden argument*/NULL); ((ILGenerator_t99948092_StaticFields*)ILGenerator_t99948092_il2cpp_TypeInfo_var->static_fields)->set_void_type_0(L_0); return; } } // System.Void System.Reflection.Emit.ILGenerator::add_token_fixup(System.Reflection.MemberInfo) extern "C" void ILGenerator_add_token_fixup_m3261621911 (ILGenerator_t99948092 * __this, MemberInfo_t * ___mi0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ILGenerator_add_token_fixup_m3261621911_MetadataUsageId); s_Il2CppMethodInitialized = true; } ILTokenInfoU5BU5D_t4103159791* V_0 = NULL; int32_t V_1 = 0; { int32_t L_0 = __this->get_num_token_fixups_5(); ILTokenInfoU5BU5D_t4103159791* L_1 = __this->get_token_fixups_6(); NullCheck(L_1); if ((!(((uint32_t)L_0) == ((uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length)))))))) { goto IL_0035; } } { int32_t L_2 = __this->get_num_token_fixups_5(); V_0 = ((ILTokenInfoU5BU5D_t4103159791*)SZArrayNew(ILTokenInfoU5BU5D_t4103159791_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)L_2*(int32_t)2)))); ILTokenInfoU5BU5D_t4103159791* L_3 = __this->get_token_fixups_6(); ILTokenInfoU5BU5D_t4103159791* L_4 = V_0; NullCheck((Il2CppArray *)(Il2CppArray *)L_3); Array_CopyTo_m4061033315((Il2CppArray *)(Il2CppArray *)L_3, (Il2CppArray *)(Il2CppArray *)L_4, 0, /*hidden argument*/NULL); ILTokenInfoU5BU5D_t4103159791* L_5 = V_0; __this->set_token_fixups_6(L_5); } IL_0035: { ILTokenInfoU5BU5D_t4103159791* L_6 = __this->get_token_fixups_6(); int32_t L_7 = __this->get_num_token_fixups_5(); NullCheck(L_6); MemberInfo_t * L_8 = ___mi0; ((L_6)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_7)))->set_member_0(L_8); ILTokenInfoU5BU5D_t4103159791* L_9 = __this->get_token_fixups_6(); int32_t L_10 = __this->get_num_token_fixups_5(); int32_t L_11 = L_10; V_1 = L_11; __this->set_num_token_fixups_5(((int32_t)((int32_t)L_11+(int32_t)1))); int32_t L_12 = V_1; NullCheck(L_9); int32_t L_13 = __this->get_code_len_2(); ((L_9)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_12)))->set_code_pos_1(L_13); return; } } // System.Void System.Reflection.Emit.ILGenerator::make_room(System.Int32) extern "C" void ILGenerator_make_room_m373147874 (ILGenerator_t99948092 * __this, int32_t ___nbytes0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ILGenerator_make_room_m373147874_MetadataUsageId); s_Il2CppMethodInitialized = true; } ByteU5BU5D_t3397334013* V_0 = NULL; { int32_t L_0 = __this->get_code_len_2(); int32_t L_1 = ___nbytes0; ByteU5BU5D_t3397334013* L_2 = __this->get_code_1(); NullCheck(L_2); if ((((int32_t)((int32_t)((int32_t)L_0+(int32_t)L_1))) >= ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_2)->max_length))))))) { goto IL_0016; } } { return; } IL_0016: { int32_t L_3 = __this->get_code_len_2(); int32_t L_4 = ___nbytes0; V_0 = ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_3+(int32_t)L_4))*(int32_t)2))+(int32_t)((int32_t)128))))); ByteU5BU5D_t3397334013* L_5 = __this->get_code_1(); ByteU5BU5D_t3397334013* L_6 = V_0; ByteU5BU5D_t3397334013* L_7 = __this->get_code_1(); NullCheck(L_7); Array_Copy_m3808317496(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_5, 0, (Il2CppArray *)(Il2CppArray *)L_6, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_7)->max_length)))), /*hidden argument*/NULL); ByteU5BU5D_t3397334013* L_8 = V_0; __this->set_code_1(L_8); return; } } // System.Void System.Reflection.Emit.ILGenerator::emit_int(System.Int32) extern "C" void ILGenerator_emit_int_m1061022647 (ILGenerator_t99948092 * __this, int32_t ___val0, const MethodInfo* method) { int32_t V_0 = 0; { ByteU5BU5D_t3397334013* L_0 = __this->get_code_1(); int32_t L_1 = __this->get_code_len_2(); int32_t L_2 = L_1; V_0 = L_2; __this->set_code_len_2(((int32_t)((int32_t)L_2+(int32_t)1))); int32_t L_3 = V_0; int32_t L_4 = ___val0; NullCheck(L_0); (L_0)->SetAt(static_cast<il2cpp_array_size_t>(L_3), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_4&(int32_t)((int32_t)255))))))); ByteU5BU5D_t3397334013* L_5 = __this->get_code_1(); int32_t L_6 = __this->get_code_len_2(); int32_t L_7 = L_6; V_0 = L_7; __this->set_code_len_2(((int32_t)((int32_t)L_7+(int32_t)1))); int32_t L_8 = V_0; int32_t L_9 = ___val0; NullCheck(L_5); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(L_8), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_9>>(int32_t)8))&(int32_t)((int32_t)255))))))); ByteU5BU5D_t3397334013* L_10 = __this->get_code_1(); int32_t L_11 = __this->get_code_len_2(); int32_t L_12 = L_11; V_0 = L_12; __this->set_code_len_2(((int32_t)((int32_t)L_12+(int32_t)1))); int32_t L_13 = V_0; int32_t L_14 = ___val0; NullCheck(L_10); (L_10)->SetAt(static_cast<il2cpp_array_size_t>(L_13), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_14>>(int32_t)((int32_t)16)))&(int32_t)((int32_t)255))))))); ByteU5BU5D_t3397334013* L_15 = __this->get_code_1(); int32_t L_16 = __this->get_code_len_2(); int32_t L_17 = L_16; V_0 = L_17; __this->set_code_len_2(((int32_t)((int32_t)L_17+(int32_t)1))); int32_t L_18 = V_0; int32_t L_19 = ___val0; NullCheck(L_15); (L_15)->SetAt(static_cast<il2cpp_array_size_t>(L_18), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_19>>(int32_t)((int32_t)24)))&(int32_t)((int32_t)255))))))); return; } } // System.Void System.Reflection.Emit.ILGenerator::ll_emit(System.Reflection.Emit.OpCode) extern "C" void ILGenerator_ll_emit_m2087647272 (ILGenerator_t99948092 * __this, OpCode_t2247480392 ___opcode0, const MethodInfo* method) { int32_t V_0 = 0; int32_t V_1 = 0; { int32_t L_0 = OpCode_get_Size_m481593949((&___opcode0), /*hidden argument*/NULL); if ((!(((uint32_t)L_0) == ((uint32_t)2)))) { goto IL_002c; } } { ByteU5BU5D_t3397334013* L_1 = __this->get_code_1(); int32_t L_2 = __this->get_code_len_2(); int32_t L_3 = L_2; V_0 = L_3; __this->set_code_len_2(((int32_t)((int32_t)L_3+(int32_t)1))); int32_t L_4 = V_0; uint8_t L_5 = (&___opcode0)->get_op1_0(); NullCheck(L_1); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(L_4), (uint8_t)L_5); } IL_002c: { ByteU5BU5D_t3397334013* L_6 = __this->get_code_1(); int32_t L_7 = __this->get_code_len_2(); int32_t L_8 = L_7; V_0 = L_8; __this->set_code_len_2(((int32_t)((int32_t)L_8+(int32_t)1))); int32_t L_9 = V_0; uint8_t L_10 = (&___opcode0)->get_op2_1(); NullCheck(L_6); (L_6)->SetAt(static_cast<il2cpp_array_size_t>(L_9), (uint8_t)L_10); int32_t L_11 = OpCode_get_StackBehaviourPush_m1922356444((&___opcode0), /*hidden argument*/NULL); V_1 = L_11; int32_t L_12 = V_1; switch (((int32_t)((int32_t)L_12-(int32_t)((int32_t)19)))) { case 0: { goto IL_0085; } case 1: { goto IL_0098; } case 2: { goto IL_0085; } case 3: { goto IL_0085; } case 4: { goto IL_0085; } case 5: { goto IL_0085; } case 6: { goto IL_0085; } case 7: { goto IL_00ab; } case 8: { goto IL_0085; } } } { goto IL_00ab; } IL_0085: { int32_t L_13 = __this->get_cur_stack_4(); __this->set_cur_stack_4(((int32_t)((int32_t)L_13+(int32_t)1))); goto IL_00ab; } IL_0098: { int32_t L_14 = __this->get_cur_stack_4(); __this->set_cur_stack_4(((int32_t)((int32_t)L_14+(int32_t)2))); goto IL_00ab; } IL_00ab: { int32_t L_15 = __this->get_max_stack_3(); int32_t L_16 = __this->get_cur_stack_4(); if ((((int32_t)L_15) >= ((int32_t)L_16))) { goto IL_00c8; } } { int32_t L_17 = __this->get_cur_stack_4(); __this->set_max_stack_3(L_17); } IL_00c8: { int32_t L_18 = OpCode_get_StackBehaviourPop_m3787015663((&___opcode0), /*hidden argument*/NULL); V_1 = L_18; int32_t L_19 = V_1; switch (((int32_t)((int32_t)L_19-(int32_t)1))) { case 0: { goto IL_014a; } case 1: { goto IL_015d; } case 2: { goto IL_014a; } case 3: { goto IL_015d; } case 4: { goto IL_015d; } case 5: { goto IL_015d; } case 6: { goto IL_0170; } case 7: { goto IL_015d; } case 8: { goto IL_015d; } case 9: { goto IL_014a; } case 10: { goto IL_015d; } case 11: { goto IL_015d; } case 12: { goto IL_0170; } case 13: { goto IL_0170; } case 14: { goto IL_0170; } case 15: { goto IL_0170; } case 16: { goto IL_0170; } case 17: { goto IL_0183; } case 18: { goto IL_0183; } case 19: { goto IL_0183; } case 20: { goto IL_0183; } case 21: { goto IL_0183; } case 22: { goto IL_0183; } case 23: { goto IL_0183; } case 24: { goto IL_0183; } case 25: { goto IL_0145; } } } { goto IL_0183; } IL_0145: { goto IL_0183; } IL_014a: { int32_t L_20 = __this->get_cur_stack_4(); __this->set_cur_stack_4(((int32_t)((int32_t)L_20-(int32_t)1))); goto IL_0183; } IL_015d: { int32_t L_21 = __this->get_cur_stack_4(); __this->set_cur_stack_4(((int32_t)((int32_t)L_21-(int32_t)2))); goto IL_0183; } IL_0170: { int32_t L_22 = __this->get_cur_stack_4(); __this->set_cur_stack_4(((int32_t)((int32_t)L_22-(int32_t)3))); goto IL_0183; } IL_0183: { return; } } // System.Void System.Reflection.Emit.ILGenerator::Emit(System.Reflection.Emit.OpCode) extern "C" void ILGenerator_Emit_m531109645 (ILGenerator_t99948092 * __this, OpCode_t2247480392 ___opcode0, const MethodInfo* method) { { ILGenerator_make_room_m373147874(__this, 2, /*hidden argument*/NULL); OpCode_t2247480392 L_0 = ___opcode0; ILGenerator_ll_emit_m2087647272(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.Emit.ILGenerator::Emit(System.Reflection.Emit.OpCode,System.Reflection.ConstructorInfo) extern "C" void ILGenerator_Emit_m116557729 (ILGenerator_t99948092 * __this, OpCode_t2247480392 ___opcode0, ConstructorInfo_t2851816542 * ___con1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ILGenerator_Emit_m116557729_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; { Il2CppObject * L_0 = __this->get_token_gen_11(); ConstructorInfo_t2851816542 * L_1 = ___con1; NullCheck(L_0); int32_t L_2 = InterfaceFuncInvoker1< int32_t, MemberInfo_t * >::Invoke(0 /* System.Int32 System.Reflection.Emit.TokenGenerator::GetToken(System.Reflection.MemberInfo) */, TokenGenerator_t4150817334_il2cpp_TypeInfo_var, L_0, L_1); V_0 = L_2; ILGenerator_make_room_m373147874(__this, 6, /*hidden argument*/NULL); OpCode_t2247480392 L_3 = ___opcode0; ILGenerator_ll_emit_m2087647272(__this, L_3, /*hidden argument*/NULL); ConstructorInfo_t2851816542 * L_4 = ___con1; NullCheck(L_4); Type_t * L_5 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, L_4); NullCheck(L_5); Module_t4282841206 * L_6 = VirtFuncInvoker0< Module_t4282841206 * >::Invoke(10 /* System.Reflection.Module System.Type::get_Module() */, L_5); Module_t4282841206 * L_7 = __this->get_module_10(); if ((!(((Il2CppObject*)(Module_t4282841206 *)L_6) == ((Il2CppObject*)(Module_t4282841206 *)L_7)))) { goto IL_0038; } } { ConstructorInfo_t2851816542 * L_8 = ___con1; ILGenerator_add_token_fixup_m3261621911(__this, L_8, /*hidden argument*/NULL); } IL_0038: { int32_t L_9 = V_0; ILGenerator_emit_int_m1061022647(__this, L_9, /*hidden argument*/NULL); int32_t L_10 = OpCode_get_StackBehaviourPop_m3787015663((&___opcode0), /*hidden argument*/NULL); if ((!(((uint32_t)L_10) == ((uint32_t)((int32_t)26))))) { goto IL_0060; } } { int32_t L_11 = __this->get_cur_stack_4(); ConstructorInfo_t2851816542 * L_12 = ___con1; NullCheck(L_12); int32_t L_13 = VirtFuncInvoker0< int32_t >::Invoke(15 /* System.Int32 System.Reflection.MethodBase::GetParameterCount() */, L_12); __this->set_cur_stack_4(((int32_t)((int32_t)L_11-(int32_t)L_13))); } IL_0060: { return; } } // System.Void System.Reflection.Emit.ILGenerator::label_fixup() extern "C" void ILGenerator_label_fixup_m1325994348 (ILGenerator_t99948092 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ILGenerator_label_fixup_m1325994348_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; int32_t V_2 = 0; { V_0 = 0; goto IL_00e6; } IL_0007: { LabelDataU5BU5D_t4181946617* L_0 = __this->get_labels_7(); LabelFixupU5BU5D_t2807174223* L_1 = __this->get_fixups_8(); int32_t L_2 = V_0; NullCheck(L_1); int32_t L_3 = ((L_1)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_2)))->get_label_idx_2(); NullCheck(L_0); int32_t L_4 = ((L_0)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_3)))->get_addr_0(); if ((((int32_t)L_4) >= ((int32_t)0))) { goto IL_0039; } } { ArgumentException_t3259014390 * L_5 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_5, _stringLiteral2950669223, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_5); } IL_0039: { LabelDataU5BU5D_t4181946617* L_6 = __this->get_labels_7(); LabelFixupU5BU5D_t2807174223* L_7 = __this->get_fixups_8(); int32_t L_8 = V_0; NullCheck(L_7); int32_t L_9 = ((L_7)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_8)))->get_label_idx_2(); NullCheck(L_6); int32_t L_10 = ((L_6)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_9)))->get_addr_0(); LabelFixupU5BU5D_t2807174223* L_11 = __this->get_fixups_8(); int32_t L_12 = V_0; NullCheck(L_11); int32_t L_13 = ((L_11)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_12)))->get_pos_1(); LabelFixupU5BU5D_t2807174223* L_14 = __this->get_fixups_8(); int32_t L_15 = V_0; NullCheck(L_14); int32_t L_16 = ((L_14)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_15)))->get_offset_0(); V_1 = ((int32_t)((int32_t)L_10-(int32_t)((int32_t)((int32_t)L_13+(int32_t)L_16)))); LabelFixupU5BU5D_t2807174223* L_17 = __this->get_fixups_8(); int32_t L_18 = V_0; NullCheck(L_17); int32_t L_19 = ((L_17)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_18)))->get_offset_0(); if ((!(((uint32_t)L_19) == ((uint32_t)1)))) { goto IL_00b6; } } { ByteU5BU5D_t3397334013* L_20 = __this->get_code_1(); LabelFixupU5BU5D_t2807174223* L_21 = __this->get_fixups_8(); int32_t L_22 = V_0; NullCheck(L_21); int32_t L_23 = ((L_21)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_22)))->get_pos_1(); int32_t L_24 = V_1; NullCheck(L_20); (L_20)->SetAt(static_cast<il2cpp_array_size_t>(L_23), (uint8_t)(((int32_t)((uint8_t)(((int8_t)((int8_t)L_24))))))); goto IL_00e2; } IL_00b6: { int32_t L_25 = __this->get_code_len_2(); V_2 = L_25; LabelFixupU5BU5D_t2807174223* L_26 = __this->get_fixups_8(); int32_t L_27 = V_0; NullCheck(L_26); int32_t L_28 = ((L_26)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_27)))->get_pos_1(); __this->set_code_len_2(L_28); int32_t L_29 = V_1; ILGenerator_emit_int_m1061022647(__this, L_29, /*hidden argument*/NULL); int32_t L_30 = V_2; __this->set_code_len_2(L_30); } IL_00e2: { int32_t L_31 = V_0; V_0 = ((int32_t)((int32_t)L_31+(int32_t)1)); } IL_00e6: { int32_t L_32 = V_0; int32_t L_33 = __this->get_num_fixups_9(); if ((((int32_t)L_32) < ((int32_t)L_33))) { goto IL_0007; } } { return; } } // System.Int32 System.Reflection.Emit.ILGenerator::Mono_GetCurrentOffset(System.Reflection.Emit.ILGenerator) extern "C" int32_t ILGenerator_Mono_GetCurrentOffset_m3553856682 (Il2CppObject * __this /* static, unused */, ILGenerator_t99948092 * ___ig0, const MethodInfo* method) { { ILGenerator_t99948092 * L_0 = ___ig0; NullCheck(L_0); int32_t L_1 = L_0->get_code_len_2(); return L_1; } } // Conversion methods for marshalling of: System.Reflection.Emit.ILTokenInfo extern "C" void ILTokenInfo_t149559338_marshal_pinvoke(const ILTokenInfo_t149559338& unmarshaled, ILTokenInfo_t149559338_marshaled_pinvoke& marshaled) { Il2CppCodeGenException* ___member_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'member' of type 'ILTokenInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___member_0Exception); } extern "C" void ILTokenInfo_t149559338_marshal_pinvoke_back(const ILTokenInfo_t149559338_marshaled_pinvoke& marshaled, ILTokenInfo_t149559338& unmarshaled) { Il2CppCodeGenException* ___member_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'member' of type 'ILTokenInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___member_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.Emit.ILTokenInfo extern "C" void ILTokenInfo_t149559338_marshal_pinvoke_cleanup(ILTokenInfo_t149559338_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: System.Reflection.Emit.ILTokenInfo extern "C" void ILTokenInfo_t149559338_marshal_com(const ILTokenInfo_t149559338& unmarshaled, ILTokenInfo_t149559338_marshaled_com& marshaled) { Il2CppCodeGenException* ___member_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'member' of type 'ILTokenInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___member_0Exception); } extern "C" void ILTokenInfo_t149559338_marshal_com_back(const ILTokenInfo_t149559338_marshaled_com& marshaled, ILTokenInfo_t149559338& unmarshaled) { Il2CppCodeGenException* ___member_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'member' of type 'ILTokenInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___member_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.Emit.ILTokenInfo extern "C" void ILTokenInfo_t149559338_marshal_com_cleanup(ILTokenInfo_t149559338_marshaled_com& marshaled) { } // System.Boolean System.Reflection.Emit.MethodBuilder::get_ContainsGenericParameters() extern "C" bool MethodBuilder_get_ContainsGenericParameters_m138212064 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBuilder_get_ContainsGenericParameters_m138212064_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.RuntimeMethodHandle System.Reflection.Emit.MethodBuilder::get_MethodHandle() extern "C" RuntimeMethodHandle_t894824333 MethodBuilder_get_MethodHandle_m3494271250 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { Exception_t1927440687 * L_0 = MethodBuilder_NotSupported_m1885110731(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.Emit.MethodBuilder::get_ReturnType() extern "C" Type_t * MethodBuilder_get_ReturnType_m446668188 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_rtype_0(); return L_0; } } // System.Type System.Reflection.Emit.MethodBuilder::get_ReflectedType() extern "C" Type_t * MethodBuilder_get_ReflectedType_m1320609136 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_type_7(); return L_0; } } // System.Type System.Reflection.Emit.MethodBuilder::get_DeclaringType() extern "C" Type_t * MethodBuilder_get_DeclaringType_m2734207591 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_type_7(); return L_0; } } // System.String System.Reflection.Emit.MethodBuilder::get_Name() extern "C" String_t* MethodBuilder_get_Name_m845253610 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_4(); return L_0; } } // System.Reflection.MethodAttributes System.Reflection.Emit.MethodBuilder::get_Attributes() extern "C" int32_t MethodBuilder_get_Attributes_m3678061338 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_attrs_2(); return L_0; } } // System.Reflection.CallingConventions System.Reflection.Emit.MethodBuilder::get_CallingConvention() extern "C" int32_t MethodBuilder_get_CallingConvention_m3885044904 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_call_conv_10(); return L_0; } } // System.Reflection.MethodInfo System.Reflection.Emit.MethodBuilder::GetBaseDefinition() extern "C" MethodInfo_t * MethodBuilder_GetBaseDefinition_m774166361 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { return __this; } } // System.Reflection.ParameterInfo[] System.Reflection.Emit.MethodBuilder::GetParameters() extern "C" ParameterInfoU5BU5D_t2275869610* MethodBuilder_GetParameters_m3436317083 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBuilder_GetParameters_m3436317083_MetadataUsageId); s_Il2CppMethodInitialized = true; } ParameterInfoU5BU5D_t2275869610* V_0 = NULL; int32_t V_1 = 0; int32_t G_B7_0 = 0; ParameterInfoU5BU5D_t2275869610* G_B7_1 = NULL; int32_t G_B6_0 = 0; ParameterInfoU5BU5D_t2275869610* G_B6_1 = NULL; ParameterBuilder_t3344728474 * G_B8_0 = NULL; int32_t G_B8_1 = 0; ParameterInfoU5BU5D_t2275869610* G_B8_2 = NULL; { TypeBuilder_t3308873219 * L_0 = __this->get_type_7(); NullCheck(L_0); bool L_1 = TypeBuilder_get_is_created_m736553860(L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0017; } } { Exception_t1927440687 * L_2 = MethodBuilder_NotSupported_m1885110731(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_2); } IL_0017: { TypeU5BU5D_t1664964607* L_3 = __this->get_parameters_1(); if (L_3) { goto IL_0024; } } { return (ParameterInfoU5BU5D_t2275869610*)NULL; } IL_0024: { TypeU5BU5D_t1664964607* L_4 = __this->get_parameters_1(); NullCheck(L_4); V_0 = ((ParameterInfoU5BU5D_t2275869610*)SZArrayNew(ParameterInfoU5BU5D_t2275869610_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_4)->max_length)))))); V_1 = 0; goto IL_006c; } IL_0039: { ParameterInfoU5BU5D_t2275869610* L_5 = V_0; int32_t L_6 = V_1; ParameterBuilderU5BU5D_t2122994367* L_7 = __this->get_pinfo_8(); G_B6_0 = L_6; G_B6_1 = L_5; if (L_7) { G_B7_0 = L_6; G_B7_1 = L_5; goto IL_004c; } } { G_B8_0 = ((ParameterBuilder_t3344728474 *)(NULL)); G_B8_1 = G_B6_0; G_B8_2 = G_B6_1; goto IL_0056; } IL_004c: { ParameterBuilderU5BU5D_t2122994367* L_8 = __this->get_pinfo_8(); int32_t L_9 = V_1; NullCheck(L_8); int32_t L_10 = ((int32_t)((int32_t)L_9+(int32_t)1)); ParameterBuilder_t3344728474 * L_11 = (L_8)->GetAt(static_cast<il2cpp_array_size_t>(L_10)); G_B8_0 = L_11; G_B8_1 = G_B7_0; G_B8_2 = G_B7_1; } IL_0056: { TypeU5BU5D_t1664964607* L_12 = __this->get_parameters_1(); int32_t L_13 = V_1; NullCheck(L_12); int32_t L_14 = L_13; Type_t * L_15 = (L_12)->GetAt(static_cast<il2cpp_array_size_t>(L_14)); int32_t L_16 = V_1; ParameterInfo_t2249040075 * L_17 = (ParameterInfo_t2249040075 *)il2cpp_codegen_object_new(ParameterInfo_t2249040075_il2cpp_TypeInfo_var); ParameterInfo__ctor_m2149157062(L_17, G_B8_0, L_15, __this, ((int32_t)((int32_t)L_16+(int32_t)1)), /*hidden argument*/NULL); NullCheck(G_B8_2); ArrayElementTypeCheck (G_B8_2, L_17); (G_B8_2)->SetAt(static_cast<il2cpp_array_size_t>(G_B8_1), (ParameterInfo_t2249040075 *)L_17); int32_t L_18 = V_1; V_1 = ((int32_t)((int32_t)L_18+(int32_t)1)); } IL_006c: { int32_t L_19 = V_1; TypeU5BU5D_t1664964607* L_20 = __this->get_parameters_1(); NullCheck(L_20); if ((((int32_t)L_19) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_20)->max_length))))))) { goto IL_0039; } } { ParameterInfoU5BU5D_t2275869610* L_21 = V_0; return L_21; } } // System.Int32 System.Reflection.Emit.MethodBuilder::GetParameterCount() extern "C" int32_t MethodBuilder_GetParameterCount_m467267889 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { TypeU5BU5D_t1664964607* L_0 = __this->get_parameters_1(); if (L_0) { goto IL_000d; } } { return 0; } IL_000d: { TypeU5BU5D_t1664964607* L_1 = __this->get_parameters_1(); NullCheck(L_1); return (((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length)))); } } // System.Object System.Reflection.Emit.MethodBuilder::Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" Il2CppObject * MethodBuilder_Invoke_m1874904900 (MethodBuilder_t644187984 * __this, Il2CppObject * ___obj0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, ObjectU5BU5D_t3614634134* ___parameters3, CultureInfo_t3500843524 * ___culture4, const MethodInfo* method) { { Exception_t1927440687 * L_0 = MethodBuilder_NotSupported_m1885110731(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.MethodBuilder::IsDefined(System.Type,System.Boolean) extern "C" bool MethodBuilder_IsDefined_m723964180 (MethodBuilder_t644187984 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = MethodBuilder_NotSupported_m1885110731(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object[] System.Reflection.Emit.MethodBuilder::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MethodBuilder_GetCustomAttributes_m923430117 (MethodBuilder_t644187984 * __this, bool ___inherit0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBuilder_GetCustomAttributes_m923430117_MetadataUsageId); s_Il2CppMethodInitialized = true; } { TypeBuilder_t3308873219 * L_0 = __this->get_type_7(); NullCheck(L_0); bool L_1 = TypeBuilder_get_is_created_m736553860(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0018; } } { bool L_2 = ___inherit0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_3 = MonoCustomAttrs_GetCustomAttributes_m3069779582(NULL /*static, unused*/, __this, L_2, /*hidden argument*/NULL); return L_3; } IL_0018: { Exception_t1927440687 * L_4 = MethodBuilder_NotSupported_m1885110731(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4); } } // System.Object[] System.Reflection.Emit.MethodBuilder::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MethodBuilder_GetCustomAttributes_m454145582 (MethodBuilder_t644187984 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBuilder_GetCustomAttributes_m454145582_MetadataUsageId); s_Il2CppMethodInitialized = true; } { TypeBuilder_t3308873219 * L_0 = __this->get_type_7(); NullCheck(L_0); bool L_1 = TypeBuilder_get_is_created_m736553860(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0019; } } { Type_t * L_2 = ___attributeType0; bool L_3 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_4 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_2, L_3, /*hidden argument*/NULL); return L_4; } IL_0019: { Exception_t1927440687 * L_5 = MethodBuilder_NotSupported_m1885110731(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_5); } } // System.Void System.Reflection.Emit.MethodBuilder::check_override() extern "C" void MethodBuilder_check_override_m3042345804 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBuilder_check_override_m3042345804_MetadataUsageId); s_Il2CppMethodInitialized = true; } { MethodInfo_t * L_0 = __this->get_override_method_9(); if (!L_0) { goto IL_0042; } } { MethodInfo_t * L_1 = __this->get_override_method_9(); NullCheck(L_1); bool L_2 = MethodBase_get_IsVirtual_m1107721718(L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0042; } } { bool L_3 = MethodBase_get_IsVirtual_m1107721718(__this, /*hidden argument*/NULL); if (L_3) { goto IL_0042; } } { String_t* L_4 = __this->get_name_4(); MethodInfo_t * L_5 = __this->get_override_method_9(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_6 = String_Format_m1811873526(NULL /*static, unused*/, _stringLiteral3019672120, L_4, L_5, /*hidden argument*/NULL); TypeLoadException_t723359155 * L_7 = (TypeLoadException_t723359155 *)il2cpp_codegen_object_new(TypeLoadException_t723359155_il2cpp_TypeInfo_var); TypeLoadException__ctor_m1903359728(L_7, L_6, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_7); } IL_0042: { return; } } // System.Void System.Reflection.Emit.MethodBuilder::fixup() extern "C" void MethodBuilder_fixup_m4217981161 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBuilder_fixup_m4217981161_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t L_0 = __this->get_attrs_2(); if (((int32_t)((int32_t)L_0&(int32_t)((int32_t)9216)))) { goto IL_0076; } } { int32_t L_1 = __this->get_iattrs_3(); if (((int32_t)((int32_t)L_1&(int32_t)((int32_t)4099)))) { goto IL_0076; } } { ILGenerator_t99948092 * L_2 = __this->get_ilgen_6(); if (!L_2) { goto IL_003d; } } { ILGenerator_t99948092 * L_3 = __this->get_ilgen_6(); IL2CPP_RUNTIME_CLASS_INIT(ILGenerator_t99948092_il2cpp_TypeInfo_var); int32_t L_4 = ILGenerator_Mono_GetCurrentOffset_m3553856682(NULL /*static, unused*/, L_3, /*hidden argument*/NULL); if (L_4) { goto IL_0076; } } IL_003d: { ByteU5BU5D_t3397334013* L_5 = __this->get_code_5(); if (!L_5) { goto IL_0055; } } { ByteU5BU5D_t3397334013* L_6 = __this->get_code_5(); NullCheck(L_6); if ((((int32_t)((int32_t)(((Il2CppArray *)L_6)->max_length))))) { goto IL_0076; } } IL_0055: { Type_t * L_7 = MethodBuilder_get_DeclaringType_m2734207591(__this, /*hidden argument*/NULL); NullCheck(L_7); String_t* L_8 = VirtFuncInvoker0< String_t* >::Invoke(18 /* System.String System.Type::get_FullName() */, L_7); String_t* L_9 = MethodBuilder_get_Name_m845253610(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_10 = String_Format_m1811873526(NULL /*static, unused*/, _stringLiteral1027522002, L_8, L_9, /*hidden argument*/NULL); InvalidOperationException_t721527559 * L_11 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m2801133788(L_11, L_10, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_11); } IL_0076: { ILGenerator_t99948092 * L_12 = __this->get_ilgen_6(); if (!L_12) { goto IL_008c; } } { ILGenerator_t99948092 * L_13 = __this->get_ilgen_6(); NullCheck(L_13); ILGenerator_label_fixup_m1325994348(L_13, /*hidden argument*/NULL); } IL_008c: { return; } } // System.String System.Reflection.Emit.MethodBuilder::ToString() extern "C" String_t* MethodBuilder_ToString_m2051053888 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBuilder_ToString_m2051053888_MetadataUsageId); s_Il2CppMethodInitialized = true; } { StringU5BU5D_t1642385972* L_0 = ((StringU5BU5D_t1642385972*)SZArrayNew(StringU5BU5D_t1642385972_il2cpp_TypeInfo_var, (uint32_t)5)); NullCheck(L_0); ArrayElementTypeCheck (L_0, _stringLiteral1403619109); (L_0)->SetAt(static_cast<il2cpp_array_size_t>(0), (String_t*)_stringLiteral1403619109); StringU5BU5D_t1642385972* L_1 = L_0; TypeBuilder_t3308873219 * L_2 = __this->get_type_7(); NullCheck(L_2); String_t* L_3 = TypeBuilder_get_Name_m170882803(L_2, /*hidden argument*/NULL); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_3); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(1), (String_t*)L_3); StringU5BU5D_t1642385972* L_4 = L_1; NullCheck(L_4); ArrayElementTypeCheck (L_4, _stringLiteral2874782298); (L_4)->SetAt(static_cast<il2cpp_array_size_t>(2), (String_t*)_stringLiteral2874782298); StringU5BU5D_t1642385972* L_5 = L_4; String_t* L_6 = __this->get_name_4(); NullCheck(L_5); ArrayElementTypeCheck (L_5, L_6); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(3), (String_t*)L_6); StringU5BU5D_t1642385972* L_7 = L_5; NullCheck(L_7); ArrayElementTypeCheck (L_7, _stringLiteral372029425); (L_7)->SetAt(static_cast<il2cpp_array_size_t>(4), (String_t*)_stringLiteral372029425); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_8 = String_Concat_m626692867(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); return L_8; } } // System.Boolean System.Reflection.Emit.MethodBuilder::Equals(System.Object) extern "C" bool MethodBuilder_Equals_m1205580640 (MethodBuilder_t644187984 * __this, Il2CppObject * ___obj0, const MethodInfo* method) { { Il2CppObject * L_0 = ___obj0; bool L_1 = Object_Equals_m753388391(__this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Int32 System.Reflection.Emit.MethodBuilder::GetHashCode() extern "C" int32_t MethodBuilder_GetHashCode_m1713271764 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_4(); NullCheck(L_0); int32_t L_1 = String_GetHashCode_m931956593(L_0, /*hidden argument*/NULL); return L_1; } } // System.Int32 System.Reflection.Emit.MethodBuilder::get_next_table_index(System.Object,System.Int32,System.Boolean) extern "C" int32_t MethodBuilder_get_next_table_index_m683309027 (MethodBuilder_t644187984 * __this, Il2CppObject * ___obj0, int32_t ___table1, bool ___inc2, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_type_7(); Il2CppObject * L_1 = ___obj0; int32_t L_2 = ___table1; bool L_3 = ___inc2; NullCheck(L_0); int32_t L_4 = TypeBuilder_get_next_table_index_m1415870184(L_0, L_1, L_2, L_3, /*hidden argument*/NULL); return L_4; } } // System.Exception System.Reflection.Emit.MethodBuilder::NotSupported() extern "C" Exception_t1927440687 * MethodBuilder_NotSupported_m1885110731 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBuilder_NotSupported_m1885110731_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_0, _stringLiteral4087454587, /*hidden argument*/NULL); return L_0; } } // System.Reflection.MethodInfo System.Reflection.Emit.MethodBuilder::MakeGenericMethod(System.Type[]) extern "C" MethodInfo_t * MethodBuilder_MakeGenericMethod_m303913412 (MethodBuilder_t644187984 * __this, TypeU5BU5D_t1664964607* ___typeArguments0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef MethodInfo_t * (*MethodBuilder_MakeGenericMethod_m303913412_ftn) (MethodBuilder_t644187984 *, TypeU5BU5D_t1664964607*); return ((MethodBuilder_MakeGenericMethod_m303913412_ftn)mscorlib::System::Reflection::Emit::MethodBuilder::MakeGenericMethod) (__this, ___typeArguments0); } // System.Boolean System.Reflection.Emit.MethodBuilder::get_IsGenericMethodDefinition() extern "C" bool MethodBuilder_get_IsGenericMethodDefinition_m4284232991 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { GenericTypeParameterBuilderU5BU5D_t358971386* L_0 = __this->get_generic_params_11(); return (bool)((((int32_t)((((Il2CppObject*)(GenericTypeParameterBuilderU5BU5D_t358971386*)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.Emit.MethodBuilder::get_IsGenericMethod() extern "C" bool MethodBuilder_get_IsGenericMethod_m770496854 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { GenericTypeParameterBuilderU5BU5D_t358971386* L_0 = __this->get_generic_params_11(); return (bool)((((int32_t)((((Il2CppObject*)(GenericTypeParameterBuilderU5BU5D_t358971386*)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Type[] System.Reflection.Emit.MethodBuilder::GetGenericArguments() extern "C" TypeU5BU5D_t1664964607* MethodBuilder_GetGenericArguments_m948618404 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBuilder_GetGenericArguments_m948618404_MetadataUsageId); s_Il2CppMethodInitialized = true; } TypeU5BU5D_t1664964607* V_0 = NULL; int32_t V_1 = 0; { GenericTypeParameterBuilderU5BU5D_t358971386* L_0 = __this->get_generic_params_11(); if (L_0) { goto IL_0011; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_1 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); return L_1; } IL_0011: { GenericTypeParameterBuilderU5BU5D_t358971386* L_2 = __this->get_generic_params_11(); NullCheck(L_2); V_0 = ((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_2)->max_length)))))); V_1 = 0; goto IL_0035; } IL_0026: { TypeU5BU5D_t1664964607* L_3 = V_0; int32_t L_4 = V_1; GenericTypeParameterBuilderU5BU5D_t358971386* L_5 = __this->get_generic_params_11(); int32_t L_6 = V_1; NullCheck(L_5); int32_t L_7 = L_6; GenericTypeParameterBuilder_t1370236603 * L_8 = (L_5)->GetAt(static_cast<il2cpp_array_size_t>(L_7)); NullCheck(L_3); ArrayElementTypeCheck (L_3, L_8); (L_3)->SetAt(static_cast<il2cpp_array_size_t>(L_4), (Type_t *)L_8); int32_t L_9 = V_1; V_1 = ((int32_t)((int32_t)L_9+(int32_t)1)); } IL_0035: { int32_t L_10 = V_1; GenericTypeParameterBuilderU5BU5D_t358971386* L_11 = __this->get_generic_params_11(); NullCheck(L_11); if ((((int32_t)L_10) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_11)->max_length))))))) { goto IL_0026; } } { TypeU5BU5D_t1664964607* L_12 = V_0; return L_12; } } // System.Reflection.Module System.Reflection.Emit.MethodBuilder::get_Module() extern "C" Module_t4282841206 * MethodBuilder_get_Module_m2867334479 (MethodBuilder_t644187984 * __this, const MethodInfo* method) { { Module_t4282841206 * L_0 = MemberInfo_get_Module_m3957426656(__this, /*hidden argument*/NULL); return L_0; } } // System.Void System.Reflection.Emit.MethodToken::.ctor(System.Int32) extern "C" void MethodToken__ctor_m3671357474 (MethodToken_t3991686330 * __this, int32_t ___val0, const MethodInfo* method) { { int32_t L_0 = ___val0; __this->set_tokValue_0(L_0); return; } } extern "C" void MethodToken__ctor_m3671357474_AdjustorThunk (Il2CppObject * __this, int32_t ___val0, const MethodInfo* method) { MethodToken_t3991686330 * _thisAdjusted = reinterpret_cast<MethodToken_t3991686330 *>(__this + 1); MethodToken__ctor_m3671357474(_thisAdjusted, ___val0, method); } // System.Void System.Reflection.Emit.MethodToken::.cctor() extern "C" void MethodToken__cctor_m2172944774 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodToken__cctor_m2172944774_MetadataUsageId); s_Il2CppMethodInitialized = true; } MethodToken_t3991686330 V_0; memset(&V_0, 0, sizeof(V_0)); { Initobj (MethodToken_t3991686330_il2cpp_TypeInfo_var, (&V_0)); MethodToken_t3991686330 L_0 = V_0; ((MethodToken_t3991686330_StaticFields*)MethodToken_t3991686330_il2cpp_TypeInfo_var->static_fields)->set_Empty_1(L_0); return; } } // System.Boolean System.Reflection.Emit.MethodToken::Equals(System.Object) extern "C" bool MethodToken_Equals_m533761838 (MethodToken_t3991686330 * __this, Il2CppObject * ___obj0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodToken_Equals_m533761838_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; MethodToken_t3991686330 V_1; memset(&V_1, 0, sizeof(V_1)); { Il2CppObject * L_0 = ___obj0; V_0 = (bool)((!(((Il2CppObject*)(Il2CppObject *)((Il2CppObject *)IsInstSealed(L_0, MethodToken_t3991686330_il2cpp_TypeInfo_var))) <= ((Il2CppObject*)(Il2CppObject *)NULL)))? 1 : 0); bool L_1 = V_0; if (!L_1) { goto IL_0027; } } { Il2CppObject * L_2 = ___obj0; V_1 = ((*(MethodToken_t3991686330 *)((MethodToken_t3991686330 *)UnBox(L_2, MethodToken_t3991686330_il2cpp_TypeInfo_var)))); int32_t L_3 = __this->get_tokValue_0(); int32_t L_4 = (&V_1)->get_tokValue_0(); V_0 = (bool)((((int32_t)L_3) == ((int32_t)L_4))? 1 : 0); } IL_0027: { bool L_5 = V_0; return L_5; } } extern "C" bool MethodToken_Equals_m533761838_AdjustorThunk (Il2CppObject * __this, Il2CppObject * ___obj0, const MethodInfo* method) { MethodToken_t3991686330 * _thisAdjusted = reinterpret_cast<MethodToken_t3991686330 *>(__this + 1); return MethodToken_Equals_m533761838(_thisAdjusted, ___obj0, method); } // System.Int32 System.Reflection.Emit.MethodToken::GetHashCode() extern "C" int32_t MethodToken_GetHashCode_m1405492030 (MethodToken_t3991686330 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_tokValue_0(); return L_0; } } extern "C" int32_t MethodToken_GetHashCode_m1405492030_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { MethodToken_t3991686330 * _thisAdjusted = reinterpret_cast<MethodToken_t3991686330 *>(__this + 1); return MethodToken_GetHashCode_m1405492030(_thisAdjusted, method); } // System.Int32 System.Reflection.Emit.MethodToken::get_Token() extern "C" int32_t MethodToken_get_Token_m3846227497 (MethodToken_t3991686330 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_tokValue_0(); return L_0; } } extern "C" int32_t MethodToken_get_Token_m3846227497_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { MethodToken_t3991686330 * _thisAdjusted = reinterpret_cast<MethodToken_t3991686330 *>(__this + 1); return MethodToken_get_Token_m3846227497(_thisAdjusted, method); } // System.Void System.Reflection.Emit.ModuleBuilder::.cctor() extern "C" void ModuleBuilder__cctor_m2985766025 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ModuleBuilder__cctor_m2985766025_MetadataUsageId); s_Il2CppMethodInitialized = true; } { CharU5BU5D_t1328083999* L_0 = ((CharU5BU5D_t1328083999*)SZArrayNew(CharU5BU5D_t1328083999_il2cpp_TypeInfo_var, (uint32_t)3)); NullCheck(L_0); (L_0)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppChar)((int32_t)38)); CharU5BU5D_t1328083999* L_1 = L_0; NullCheck(L_1); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppChar)((int32_t)91)); CharU5BU5D_t1328083999* L_2 = L_1; NullCheck(L_2); (L_2)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppChar)((int32_t)42)); ((ModuleBuilder_t4156028127_StaticFields*)ModuleBuilder_t4156028127_il2cpp_TypeInfo_var->static_fields)->set_type_modifiers_15(L_2); return; } } // System.Int32 System.Reflection.Emit.ModuleBuilder::get_next_table_index(System.Object,System.Int32,System.Boolean) extern "C" int32_t ModuleBuilder_get_next_table_index_m1552645388 (ModuleBuilder_t4156028127 * __this, Il2CppObject * ___obj0, int32_t ___table1, bool ___inc2, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ModuleBuilder_get_next_table_index_m1552645388_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; { Int32U5BU5D_t3030399641* L_0 = __this->get_table_indexes_13(); if (L_0) { goto IL_003d; } } { __this->set_table_indexes_13(((Int32U5BU5D_t3030399641*)SZArrayNew(Int32U5BU5D_t3030399641_il2cpp_TypeInfo_var, (uint32_t)((int32_t)64)))); V_0 = 0; goto IL_002c; } IL_001f: { Int32U5BU5D_t3030399641* L_1 = __this->get_table_indexes_13(); int32_t L_2 = V_0; NullCheck(L_1); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(L_2), (int32_t)1); int32_t L_3 = V_0; V_0 = ((int32_t)((int32_t)L_3+(int32_t)1)); } IL_002c: { int32_t L_4 = V_0; if ((((int32_t)L_4) < ((int32_t)((int32_t)64)))) { goto IL_001f; } } { Int32U5BU5D_t3030399641* L_5 = __this->get_table_indexes_13(); NullCheck(L_5); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(2), (int32_t)2); } IL_003d: { bool L_6 = ___inc2; if (!L_6) { goto IL_0058; } } { Int32U5BU5D_t3030399641* L_7 = __this->get_table_indexes_13(); int32_t L_8 = ___table1; NullCheck(L_7); int32_t* L_9 = ((L_7)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_8))); int32_t L_10 = (*((int32_t*)L_9)); V_1 = L_10; *((int32_t*)(L_9)) = (int32_t)((int32_t)((int32_t)L_10+(int32_t)1)); int32_t L_11 = V_1; return L_11; } IL_0058: { Int32U5BU5D_t3030399641* L_12 = __this->get_table_indexes_13(); int32_t L_13 = ___table1; NullCheck(L_12); int32_t L_14 = L_13; int32_t L_15 = (L_12)->GetAt(static_cast<il2cpp_array_size_t>(L_14)); return L_15; } } // System.Type[] System.Reflection.Emit.ModuleBuilder::GetTypes() extern "C" TypeU5BU5D_t1664964607* ModuleBuilder_GetTypes_m93550753 (ModuleBuilder_t4156028127 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ModuleBuilder_GetTypes_m93550753_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; TypeU5BU5D_t1664964607* V_1 = NULL; int32_t V_2 = 0; { TypeBuilderU5BU5D_t4254476946* L_0 = __this->get_types_11(); if (L_0) { goto IL_0011; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_1 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); return L_1; } IL_0011: { int32_t L_2 = __this->get_num_types_10(); V_0 = L_2; int32_t L_3 = V_0; V_1 = ((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)L_3)); TypeBuilderU5BU5D_t4254476946* L_4 = __this->get_types_11(); TypeU5BU5D_t1664964607* L_5 = V_1; int32_t L_6 = V_0; Array_Copy_m2363740072(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_4, (Il2CppArray *)(Il2CppArray *)L_5, L_6, /*hidden argument*/NULL); V_2 = 0; goto IL_0059; } IL_0033: { TypeBuilderU5BU5D_t4254476946* L_7 = __this->get_types_11(); int32_t L_8 = V_2; NullCheck(L_7); int32_t L_9 = L_8; TypeBuilder_t3308873219 * L_10 = (L_7)->GetAt(static_cast<il2cpp_array_size_t>(L_9)); NullCheck(L_10); bool L_11 = TypeBuilder_get_is_created_m736553860(L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_0055; } } { TypeU5BU5D_t1664964607* L_12 = V_1; int32_t L_13 = V_2; TypeBuilderU5BU5D_t4254476946* L_14 = __this->get_types_11(); int32_t L_15 = V_2; NullCheck(L_14); int32_t L_16 = L_15; TypeBuilder_t3308873219 * L_17 = (L_14)->GetAt(static_cast<il2cpp_array_size_t>(L_16)); NullCheck(L_17); Type_t * L_18 = TypeBuilder_CreateType_m4126056124(L_17, /*hidden argument*/NULL); NullCheck(L_12); ArrayElementTypeCheck (L_12, L_18); (L_12)->SetAt(static_cast<il2cpp_array_size_t>(L_13), (Type_t *)L_18); } IL_0055: { int32_t L_19 = V_2; V_2 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_0059: { int32_t L_20 = V_2; TypeU5BU5D_t1664964607* L_21 = V_1; NullCheck(L_21); if ((((int32_t)L_20) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_21)->max_length))))))) { goto IL_0033; } } { TypeU5BU5D_t1664964607* L_22 = V_1; return L_22; } } // System.Int32 System.Reflection.Emit.ModuleBuilder::getToken(System.Reflection.Emit.ModuleBuilder,System.Object) extern "C" int32_t ModuleBuilder_getToken_m972612049 (Il2CppObject * __this /* static, unused */, ModuleBuilder_t4156028127 * ___mb0, Il2CppObject * ___obj1, const MethodInfo* method) { using namespace il2cpp::icalls; typedef int32_t (*ModuleBuilder_getToken_m972612049_ftn) (ModuleBuilder_t4156028127 *, Il2CppObject *); return ((ModuleBuilder_getToken_m972612049_ftn)mscorlib::System::Reflection::Emit::ModuleBuilder::getToken) (___mb0, ___obj1); } // System.Int32 System.Reflection.Emit.ModuleBuilder::GetToken(System.Reflection.MemberInfo) extern "C" int32_t ModuleBuilder_GetToken_m4190668737 (ModuleBuilder_t4156028127 * __this, MemberInfo_t * ___member0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ModuleBuilder_GetToken_m4190668737_MetadataUsageId); s_Il2CppMethodInitialized = true; } { MemberInfo_t * L_0 = ___member0; IL2CPP_RUNTIME_CLASS_INIT(ModuleBuilder_t4156028127_il2cpp_TypeInfo_var); int32_t L_1 = ModuleBuilder_getToken_m972612049(NULL /*static, unused*/, __this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Void System.Reflection.Emit.ModuleBuilder::RegisterToken(System.Object,System.Int32) extern "C" void ModuleBuilder_RegisterToken_m1388342515 (ModuleBuilder_t4156028127 * __this, Il2CppObject * ___obj0, int32_t ___token1, const MethodInfo* method) { using namespace il2cpp::icalls; typedef void (*ModuleBuilder_RegisterToken_m1388342515_ftn) (ModuleBuilder_t4156028127 *, Il2CppObject *, int32_t); ((ModuleBuilder_RegisterToken_m1388342515_ftn)mscorlib::System::Reflection::Emit::ModuleBuilder::RegisterToken) (__this, ___obj0, ___token1); } // System.Reflection.Emit.TokenGenerator System.Reflection.Emit.ModuleBuilder::GetTokenGenerator() extern "C" Il2CppObject * ModuleBuilder_GetTokenGenerator_m4006065550 (ModuleBuilder_t4156028127 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ModuleBuilder_GetTokenGenerator_m4006065550_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ModuleBuilderTokenGenerator_t578872653 * L_0 = __this->get_token_gen_14(); if (L_0) { goto IL_0017; } } { ModuleBuilderTokenGenerator_t578872653 * L_1 = (ModuleBuilderTokenGenerator_t578872653 *)il2cpp_codegen_object_new(ModuleBuilderTokenGenerator_t578872653_il2cpp_TypeInfo_var); ModuleBuilderTokenGenerator__ctor_m1041652642(L_1, __this, /*hidden argument*/NULL); __this->set_token_gen_14(L_1); } IL_0017: { ModuleBuilderTokenGenerator_t578872653 * L_2 = __this->get_token_gen_14(); return L_2; } } // System.Void System.Reflection.Emit.ModuleBuilderTokenGenerator::.ctor(System.Reflection.Emit.ModuleBuilder) extern "C" void ModuleBuilderTokenGenerator__ctor_m1041652642 (ModuleBuilderTokenGenerator_t578872653 * __this, ModuleBuilder_t4156028127 * ___mb0, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); ModuleBuilder_t4156028127 * L_0 = ___mb0; __this->set_mb_0(L_0); return; } } // System.Int32 System.Reflection.Emit.ModuleBuilderTokenGenerator::GetToken(System.Reflection.MemberInfo) extern "C" int32_t ModuleBuilderTokenGenerator_GetToken_m3427457873 (ModuleBuilderTokenGenerator_t578872653 * __this, MemberInfo_t * ___member0, const MethodInfo* method) { { ModuleBuilder_t4156028127 * L_0 = __this->get_mb_0(); MemberInfo_t * L_1 = ___member0; NullCheck(L_0); int32_t L_2 = ModuleBuilder_GetToken_m4190668737(L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Void System.Reflection.Emit.OpCode::.ctor(System.Int32,System.Int32) extern "C" void OpCode__ctor_m3329993003 (OpCode_t2247480392 * __this, int32_t ___p0, int32_t ___q1, const MethodInfo* method) { { int32_t L_0 = ___p0; __this->set_op1_0((uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)255))))))); int32_t L_1 = ___p0; __this->set_op2_1((uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_1>>(int32_t)8))&(int32_t)((int32_t)255))))))); int32_t L_2 = ___p0; __this->set_push_2((uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_2>>(int32_t)((int32_t)16)))&(int32_t)((int32_t)255))))))); int32_t L_3 = ___p0; __this->set_pop_3((uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_3>>(int32_t)((int32_t)24)))&(int32_t)((int32_t)255))))))); int32_t L_4 = ___q1; __this->set_size_4((uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_4&(int32_t)((int32_t)255))))))); int32_t L_5 = ___q1; __this->set_type_5((uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_5>>(int32_t)8))&(int32_t)((int32_t)255))))))); int32_t L_6 = ___q1; __this->set_args_6((uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_6>>(int32_t)((int32_t)16)))&(int32_t)((int32_t)255))))))); int32_t L_7 = ___q1; __this->set_flow_7((uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_7>>(int32_t)((int32_t)24)))&(int32_t)((int32_t)255))))))); return; } } extern "C" void OpCode__ctor_m3329993003_AdjustorThunk (Il2CppObject * __this, int32_t ___p0, int32_t ___q1, const MethodInfo* method) { OpCode_t2247480392 * _thisAdjusted = reinterpret_cast<OpCode_t2247480392 *>(__this + 1); OpCode__ctor_m3329993003(_thisAdjusted, ___p0, ___q1, method); } // System.Int32 System.Reflection.Emit.OpCode::GetHashCode() extern "C" int32_t OpCode_GetHashCode_m2974727122 (OpCode_t2247480392 * __this, const MethodInfo* method) { { String_t* L_0 = OpCode_get_Name_m3225695398(__this, /*hidden argument*/NULL); NullCheck(L_0); int32_t L_1 = String_GetHashCode_m931956593(L_0, /*hidden argument*/NULL); return L_1; } } extern "C" int32_t OpCode_GetHashCode_m2974727122_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { OpCode_t2247480392 * _thisAdjusted = reinterpret_cast<OpCode_t2247480392 *>(__this + 1); return OpCode_GetHashCode_m2974727122(_thisAdjusted, method); } // System.Boolean System.Reflection.Emit.OpCode::Equals(System.Object) extern "C" bool OpCode_Equals_m3738130494 (OpCode_t2247480392 * __this, Il2CppObject * ___obj0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OpCode_Equals_m3738130494_MetadataUsageId); s_Il2CppMethodInitialized = true; } OpCode_t2247480392 V_0; memset(&V_0, 0, sizeof(V_0)); int32_t G_B6_0 = 0; { Il2CppObject * L_0 = ___obj0; if (!L_0) { goto IL_0011; } } { Il2CppObject * L_1 = ___obj0; if (((Il2CppObject *)IsInstSealed(L_1, OpCode_t2247480392_il2cpp_TypeInfo_var))) { goto IL_0013; } } IL_0011: { return (bool)0; } IL_0013: { Il2CppObject * L_2 = ___obj0; V_0 = ((*(OpCode_t2247480392 *)((OpCode_t2247480392 *)UnBox(L_2, OpCode_t2247480392_il2cpp_TypeInfo_var)))); uint8_t L_3 = (&V_0)->get_op1_0(); uint8_t L_4 = __this->get_op1_0(); if ((!(((uint32_t)L_3) == ((uint32_t)L_4)))) { goto IL_003d; } } { uint8_t L_5 = (&V_0)->get_op2_1(); uint8_t L_6 = __this->get_op2_1(); G_B6_0 = ((((int32_t)L_5) == ((int32_t)L_6))? 1 : 0); goto IL_003e; } IL_003d: { G_B6_0 = 0; } IL_003e: { return (bool)G_B6_0; } } extern "C" bool OpCode_Equals_m3738130494_AdjustorThunk (Il2CppObject * __this, Il2CppObject * ___obj0, const MethodInfo* method) { OpCode_t2247480392 * _thisAdjusted = reinterpret_cast<OpCode_t2247480392 *>(__this + 1); return OpCode_Equals_m3738130494(_thisAdjusted, ___obj0, method); } // System.String System.Reflection.Emit.OpCode::ToString() extern "C" String_t* OpCode_ToString_m854294924 (OpCode_t2247480392 * __this, const MethodInfo* method) { { String_t* L_0 = OpCode_get_Name_m3225695398(__this, /*hidden argument*/NULL); return L_0; } } extern "C" String_t* OpCode_ToString_m854294924_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { OpCode_t2247480392 * _thisAdjusted = reinterpret_cast<OpCode_t2247480392 *>(__this + 1); return OpCode_ToString_m854294924(_thisAdjusted, method); } // System.String System.Reflection.Emit.OpCode::get_Name() extern "C" String_t* OpCode_get_Name_m3225695398 (OpCode_t2247480392 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OpCode_get_Name_m3225695398_MetadataUsageId); s_Il2CppMethodInitialized = true; } { uint8_t L_0 = __this->get_op1_0(); if ((!(((uint32_t)L_0) == ((uint32_t)((int32_t)255))))) { goto IL_001d; } } { IL2CPP_RUNTIME_CLASS_INIT(OpCodeNames_t1907134268_il2cpp_TypeInfo_var); StringU5BU5D_t1642385972* L_1 = ((OpCodeNames_t1907134268_StaticFields*)OpCodeNames_t1907134268_il2cpp_TypeInfo_var->static_fields)->get_names_0(); uint8_t L_2 = __this->get_op2_1(); NullCheck(L_1); uint8_t L_3 = L_2; String_t* L_4 = (L_1)->GetAt(static_cast<il2cpp_array_size_t>(L_3)); return L_4; } IL_001d: { IL2CPP_RUNTIME_CLASS_INIT(OpCodeNames_t1907134268_il2cpp_TypeInfo_var); StringU5BU5D_t1642385972* L_5 = ((OpCodeNames_t1907134268_StaticFields*)OpCodeNames_t1907134268_il2cpp_TypeInfo_var->static_fields)->get_names_0(); uint8_t L_6 = __this->get_op2_1(); NullCheck(L_5); int32_t L_7 = ((int32_t)((int32_t)((int32_t)256)+(int32_t)L_6)); String_t* L_8 = (L_5)->GetAt(static_cast<il2cpp_array_size_t>(L_7)); return L_8; } } extern "C" String_t* OpCode_get_Name_m3225695398_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { OpCode_t2247480392 * _thisAdjusted = reinterpret_cast<OpCode_t2247480392 *>(__this + 1); return OpCode_get_Name_m3225695398(_thisAdjusted, method); } // System.Int32 System.Reflection.Emit.OpCode::get_Size() extern "C" int32_t OpCode_get_Size_m481593949 (OpCode_t2247480392 * __this, const MethodInfo* method) { { uint8_t L_0 = __this->get_size_4(); return L_0; } } extern "C" int32_t OpCode_get_Size_m481593949_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { OpCode_t2247480392 * _thisAdjusted = reinterpret_cast<OpCode_t2247480392 *>(__this + 1); return OpCode_get_Size_m481593949(_thisAdjusted, method); } // System.Reflection.Emit.StackBehaviour System.Reflection.Emit.OpCode::get_StackBehaviourPop() extern "C" int32_t OpCode_get_StackBehaviourPop_m3787015663 (OpCode_t2247480392 * __this, const MethodInfo* method) { { uint8_t L_0 = __this->get_pop_3(); return (int32_t)(L_0); } } extern "C" int32_t OpCode_get_StackBehaviourPop_m3787015663_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { OpCode_t2247480392 * _thisAdjusted = reinterpret_cast<OpCode_t2247480392 *>(__this + 1); return OpCode_get_StackBehaviourPop_m3787015663(_thisAdjusted, method); } // System.Reflection.Emit.StackBehaviour System.Reflection.Emit.OpCode::get_StackBehaviourPush() extern "C" int32_t OpCode_get_StackBehaviourPush_m1922356444 (OpCode_t2247480392 * __this, const MethodInfo* method) { { uint8_t L_0 = __this->get_push_2(); return (int32_t)(L_0); } } extern "C" int32_t OpCode_get_StackBehaviourPush_m1922356444_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { OpCode_t2247480392 * _thisAdjusted = reinterpret_cast<OpCode_t2247480392 *>(__this + 1); return OpCode_get_StackBehaviourPush_m1922356444(_thisAdjusted, method); } // System.Void System.Reflection.Emit.OpCodeNames::.cctor() extern "C" void OpCodeNames__cctor_m2437275178 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OpCodeNames__cctor_m2437275178_MetadataUsageId); s_Il2CppMethodInitialized = true; } { StringU5BU5D_t1642385972* L_0 = ((StringU5BU5D_t1642385972*)SZArrayNew(StringU5BU5D_t1642385972_il2cpp_TypeInfo_var, (uint32_t)((int32_t)304))); NullCheck(L_0); ArrayElementTypeCheck (L_0, _stringLiteral1502598669); (L_0)->SetAt(static_cast<il2cpp_array_size_t>(0), (String_t*)_stringLiteral1502598669); StringU5BU5D_t1642385972* L_1 = L_0; NullCheck(L_1); ArrayElementTypeCheck (L_1, _stringLiteral1185218007); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(1), (String_t*)_stringLiteral1185218007); StringU5BU5D_t1642385972* L_2 = L_1; NullCheck(L_2); ArrayElementTypeCheck (L_2, _stringLiteral2751713072); (L_2)->SetAt(static_cast<il2cpp_array_size_t>(2), (String_t*)_stringLiteral2751713072); StringU5BU5D_t1642385972* L_3 = L_2; NullCheck(L_3); ArrayElementTypeCheck (L_3, _stringLiteral2751713071); (L_3)->SetAt(static_cast<il2cpp_array_size_t>(3), (String_t*)_stringLiteral2751713071); StringU5BU5D_t1642385972* L_4 = L_3; NullCheck(L_4); ArrayElementTypeCheck (L_4, _stringLiteral2751713070); (L_4)->SetAt(static_cast<il2cpp_array_size_t>(4), (String_t*)_stringLiteral2751713070); StringU5BU5D_t1642385972* L_5 = L_4; NullCheck(L_5); ArrayElementTypeCheck (L_5, _stringLiteral2751713069); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(5), (String_t*)_stringLiteral2751713069); StringU5BU5D_t1642385972* L_6 = L_5; NullCheck(L_6); ArrayElementTypeCheck (L_6, _stringLiteral264743190); (L_6)->SetAt(static_cast<il2cpp_array_size_t>(6), (String_t*)_stringLiteral264743190); StringU5BU5D_t1642385972* L_7 = L_6; NullCheck(L_7); ArrayElementTypeCheck (L_7, _stringLiteral264743191); (L_7)->SetAt(static_cast<il2cpp_array_size_t>(7), (String_t*)_stringLiteral264743191); StringU5BU5D_t1642385972* L_8 = L_7; NullCheck(L_8); ArrayElementTypeCheck (L_8, _stringLiteral264743188); (L_8)->SetAt(static_cast<il2cpp_array_size_t>(8), (String_t*)_stringLiteral264743188); StringU5BU5D_t1642385972* L_9 = L_8; NullCheck(L_9); ArrayElementTypeCheck (L_9, _stringLiteral264743189); (L_9)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)9)), (String_t*)_stringLiteral264743189); StringU5BU5D_t1642385972* L_10 = L_9; NullCheck(L_10); ArrayElementTypeCheck (L_10, _stringLiteral1784784505); (L_10)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)10)), (String_t*)_stringLiteral1784784505); StringU5BU5D_t1642385972* L_11 = L_10; NullCheck(L_11); ArrayElementTypeCheck (L_11, _stringLiteral1784784504); (L_11)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)11)), (String_t*)_stringLiteral1784784504); StringU5BU5D_t1642385972* L_12 = L_11; NullCheck(L_12); ArrayElementTypeCheck (L_12, _stringLiteral1784784507); (L_12)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)12)), (String_t*)_stringLiteral1784784507); StringU5BU5D_t1642385972* L_13 = L_12; NullCheck(L_13); ArrayElementTypeCheck (L_13, _stringLiteral1784784506); (L_13)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)13)), (String_t*)_stringLiteral1784784506); StringU5BU5D_t1642385972* L_14 = L_13; NullCheck(L_14); ArrayElementTypeCheck (L_14, _stringLiteral2751713005); (L_14)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)14)), (String_t*)_stringLiteral2751713005); StringU5BU5D_t1642385972* L_15 = L_14; NullCheck(L_15); ArrayElementTypeCheck (L_15, _stringLiteral1100455270); (L_15)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)15)), (String_t*)_stringLiteral1100455270); StringU5BU5D_t1642385972* L_16 = L_15; NullCheck(L_16); ArrayElementTypeCheck (L_16, _stringLiteral4049510564); (L_16)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)16)), (String_t*)_stringLiteral4049510564); StringU5BU5D_t1642385972* L_17 = L_16; NullCheck(L_17); ArrayElementTypeCheck (L_17, _stringLiteral264743253); (L_17)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)17)), (String_t*)_stringLiteral264743253); StringU5BU5D_t1642385972* L_18 = L_17; NullCheck(L_18); ArrayElementTypeCheck (L_18, _stringLiteral2638390804); (L_18)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)18)), (String_t*)_stringLiteral2638390804); StringU5BU5D_t1642385972* L_19 = L_18; NullCheck(L_19); ArrayElementTypeCheck (L_19, _stringLiteral1784784442); (L_19)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)19)), (String_t*)_stringLiteral1784784442); StringU5BU5D_t1642385972* L_20 = L_19; NullCheck(L_20); ArrayElementTypeCheck (L_20, _stringLiteral3082303075); (L_20)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)20)), (String_t*)_stringLiteral3082303075); StringU5BU5D_t1642385972* L_21 = L_20; NullCheck(L_21); ArrayElementTypeCheck (L_21, _stringLiteral1962649898); (L_21)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)21)), (String_t*)_stringLiteral1962649898); StringU5BU5D_t1642385972* L_22 = L_21; NullCheck(L_22); ArrayElementTypeCheck (L_22, _stringLiteral980025156); (L_22)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)22)), (String_t*)_stringLiteral980025156); StringU5BU5D_t1642385972* L_23 = L_22; NullCheck(L_23); ArrayElementTypeCheck (L_23, _stringLiteral3708908511); (L_23)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)23)), (String_t*)_stringLiteral3708908511); StringU5BU5D_t1642385972* L_24 = L_23; NullCheck(L_24); ArrayElementTypeCheck (L_24, _stringLiteral2142824570); (L_24)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)24)), (String_t*)_stringLiteral2142824570); StringU5BU5D_t1642385972* L_25 = L_24; NullCheck(L_25); ArrayElementTypeCheck (L_25, _stringLiteral576740629); (L_25)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)25)), (String_t*)_stringLiteral576740629); StringU5BU5D_t1642385972* L_26 = L_25; NullCheck(L_26); ArrayElementTypeCheck (L_26, _stringLiteral2949393624); (L_26)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)26)), (String_t*)_stringLiteral2949393624); StringU5BU5D_t1642385972* L_27 = L_26; NullCheck(L_27); ArrayElementTypeCheck (L_27, _stringLiteral1383309683); (L_27)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)27)), (String_t*)_stringLiteral1383309683); StringU5BU5D_t1642385972* L_28 = L_27; NullCheck(L_28); ArrayElementTypeCheck (L_28, _stringLiteral4112193038); (L_28)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)28)), (String_t*)_stringLiteral4112193038); StringU5BU5D_t1642385972* L_29 = L_28; NullCheck(L_29); ArrayElementTypeCheck (L_29, _stringLiteral2546109097); (L_29)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)29)), (String_t*)_stringLiteral2546109097); StringU5BU5D_t1642385972* L_30 = L_29; NullCheck(L_30); ArrayElementTypeCheck (L_30, _stringLiteral1336255516); (L_30)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)30)), (String_t*)_stringLiteral1336255516); StringU5BU5D_t1642385972* L_31 = L_30; NullCheck(L_31); ArrayElementTypeCheck (L_31, _stringLiteral3426583509); (L_31)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)31)), (String_t*)_stringLiteral3426583509); StringU5BU5D_t1642385972* L_32 = L_31; NullCheck(L_32); ArrayElementTypeCheck (L_32, _stringLiteral3869444298); (L_32)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)32)), (String_t*)_stringLiteral3869444298); StringU5BU5D_t1642385972* L_33 = L_32; NullCheck(L_33); ArrayElementTypeCheck (L_33, _stringLiteral1900075830); (L_33)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)33)), (String_t*)_stringLiteral1900075830); StringU5BU5D_t1642385972* L_34 = L_33; NullCheck(L_34); ArrayElementTypeCheck (L_34, _stringLiteral3869444319); (L_34)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)34)), (String_t*)_stringLiteral3869444319); StringU5BU5D_t1642385972* L_35 = L_34; NullCheck(L_35); ArrayElementTypeCheck (L_35, _stringLiteral1900075851); (L_35)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)35)), (String_t*)_stringLiteral1900075851); StringU5BU5D_t1642385972* L_36 = L_35; NullCheck(L_36); ArrayElementTypeCheck (L_36, _stringLiteral2309167265); (L_36)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)37)), (String_t*)_stringLiteral2309167265); StringU5BU5D_t1642385972* L_37 = L_36; NullCheck(L_37); ArrayElementTypeCheck (L_37, _stringLiteral1502598839); (L_37)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)38)), (String_t*)_stringLiteral1502598839); StringU5BU5D_t1642385972* L_38 = L_37; NullCheck(L_38); ArrayElementTypeCheck (L_38, _stringLiteral2665398215); (L_38)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)39)), (String_t*)_stringLiteral2665398215); StringU5BU5D_t1642385972* L_39 = L_38; NullCheck(L_39); ArrayElementTypeCheck (L_39, _stringLiteral405904562); (L_39)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)40)), (String_t*)_stringLiteral405904562); StringU5BU5D_t1642385972* L_40 = L_39; NullCheck(L_40); ArrayElementTypeCheck (L_40, _stringLiteral593459723); (L_40)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)41)), (String_t*)_stringLiteral593459723); StringU5BU5D_t1642385972* L_41 = L_40; NullCheck(L_41); ArrayElementTypeCheck (L_41, _stringLiteral3021628803); (L_41)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)42)), (String_t*)_stringLiteral3021628803); StringU5BU5D_t1642385972* L_42 = L_41; NullCheck(L_42); ArrayElementTypeCheck (L_42, _stringLiteral2872924125); (L_42)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)43)), (String_t*)_stringLiteral2872924125); StringU5BU5D_t1642385972* L_43 = L_42; NullCheck(L_43); ArrayElementTypeCheck (L_43, _stringLiteral4155532722); (L_43)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)44)), (String_t*)_stringLiteral4155532722); StringU5BU5D_t1642385972* L_44 = L_43; NullCheck(L_44); ArrayElementTypeCheck (L_44, _stringLiteral580173191); (L_44)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)45)), (String_t*)_stringLiteral580173191); StringU5BU5D_t1642385972* L_45 = L_44; NullCheck(L_45); ArrayElementTypeCheck (L_45, _stringLiteral4249871051); (L_45)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)46)), (String_t*)_stringLiteral4249871051); StringU5BU5D_t1642385972* L_46 = L_45; NullCheck(L_46); ArrayElementTypeCheck (L_46, _stringLiteral2562826957); (L_46)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)47)), (String_t*)_stringLiteral2562826957); StringU5BU5D_t1642385972* L_47 = L_46; NullCheck(L_47); ArrayElementTypeCheck (L_47, _stringLiteral2562827420); (L_47)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)48)), (String_t*)_stringLiteral2562827420); StringU5BU5D_t1642385972* L_48 = L_47; NullCheck(L_48); ArrayElementTypeCheck (L_48, _stringLiteral492701940); (L_48)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)49)), (String_t*)_stringLiteral492701940); StringU5BU5D_t1642385972* L_49 = L_48; NullCheck(L_49); ArrayElementTypeCheck (L_49, _stringLiteral492702403); (L_49)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)50)), (String_t*)_stringLiteral492702403); StringU5BU5D_t1642385972* L_50 = L_49; NullCheck(L_50); ArrayElementTypeCheck (L_50, _stringLiteral1177873969); (L_50)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)51)), (String_t*)_stringLiteral1177873969); StringU5BU5D_t1642385972* L_51 = L_50; NullCheck(L_51); ArrayElementTypeCheck (L_51, _stringLiteral1949211150); (L_51)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)52)), (String_t*)_stringLiteral1949211150); StringU5BU5D_t1642385972* L_52 = L_51; NullCheck(L_52); ArrayElementTypeCheck (L_52, _stringLiteral1949226429); (L_52)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)53)), (String_t*)_stringLiteral1949226429); StringU5BU5D_t1642385972* L_53 = L_52; NullCheck(L_53); ArrayElementTypeCheck (L_53, _stringLiteral2931642683); (L_53)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)54)), (String_t*)_stringLiteral2931642683); StringU5BU5D_t1642385972* L_54 = L_53; NullCheck(L_54); ArrayElementTypeCheck (L_54, _stringLiteral2931657962); (L_54)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)55)), (String_t*)_stringLiteral2931657962); StringU5BU5D_t1642385972* L_55 = L_54; NullCheck(L_55); ArrayElementTypeCheck (L_55, _stringLiteral381169818); (L_55)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)56)), (String_t*)_stringLiteral381169818); StringU5BU5D_t1642385972* L_56 = L_55; NullCheck(L_56); ArrayElementTypeCheck (L_56, _stringLiteral3919028385); (L_56)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)57)), (String_t*)_stringLiteral3919028385); StringU5BU5D_t1642385972* L_57 = L_56; NullCheck(L_57); ArrayElementTypeCheck (L_57, _stringLiteral1197692486); (L_57)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)58)), (String_t*)_stringLiteral1197692486); StringU5BU5D_t1642385972* L_58 = L_57; NullCheck(L_58); ArrayElementTypeCheck (L_58, _stringLiteral3021628310); (L_58)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)59)), (String_t*)_stringLiteral3021628310); StringU5BU5D_t1642385972* L_59 = L_58; NullCheck(L_59); ArrayElementTypeCheck (L_59, _stringLiteral1858828876); (L_59)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)60)), (String_t*)_stringLiteral1858828876); StringU5BU5D_t1642385972* L_60 = L_59; NullCheck(L_60); ArrayElementTypeCheck (L_60, _stringLiteral1858828893); (L_60)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)61)), (String_t*)_stringLiteral1858828893); StringU5BU5D_t1642385972* L_61 = L_60; NullCheck(L_61); ArrayElementTypeCheck (L_61, _stringLiteral4231481871); (L_61)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)62)), (String_t*)_stringLiteral4231481871); StringU5BU5D_t1642385972* L_62 = L_61; NullCheck(L_62); ArrayElementTypeCheck (L_62, _stringLiteral4231481888); (L_62)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)63)), (String_t*)_stringLiteral4231481888); StringU5BU5D_t1642385972* L_63 = L_62; NullCheck(L_63); ArrayElementTypeCheck (L_63, _stringLiteral1023736718); (L_63)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)64)), (String_t*)_stringLiteral1023736718); StringU5BU5D_t1642385972* L_64 = L_63; NullCheck(L_64); ArrayElementTypeCheck (L_64, _stringLiteral1168705793); (L_64)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)65)), (String_t*)_stringLiteral1168705793); StringU5BU5D_t1642385972* L_65 = L_64; NullCheck(L_65); ArrayElementTypeCheck (L_65, _stringLiteral1168706256); (L_65)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)66)), (String_t*)_stringLiteral1168706256); StringU5BU5D_t1642385972* L_66 = L_65; NullCheck(L_66); ArrayElementTypeCheck (L_66, _stringLiteral3187195076); (L_66)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)67)), (String_t*)_stringLiteral3187195076); StringU5BU5D_t1642385972* L_67 = L_66; NullCheck(L_67); ArrayElementTypeCheck (L_67, _stringLiteral3187195539); (L_67)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)68)), (String_t*)_stringLiteral3187195539); StringU5BU5D_t1642385972* L_68 = L_67; NullCheck(L_68); ArrayElementTypeCheck (L_68, _stringLiteral2446678658); (L_68)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)69)), (String_t*)_stringLiteral2446678658); StringU5BU5D_t1642385972* L_69 = L_68; NullCheck(L_69); ArrayElementTypeCheck (L_69, _stringLiteral1126264221); (L_69)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)70)), (String_t*)_stringLiteral1126264221); StringU5BU5D_t1642385972* L_70 = L_69; NullCheck(L_70); ArrayElementTypeCheck (L_70, _stringLiteral1126264225); (L_70)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)71)), (String_t*)_stringLiteral1126264225); StringU5BU5D_t1642385972* L_71 = L_70; NullCheck(L_71); ArrayElementTypeCheck (L_71, _stringLiteral1529548748); (L_71)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)72)), (String_t*)_stringLiteral1529548748); StringU5BU5D_t1642385972* L_72 = L_71; NullCheck(L_72); ArrayElementTypeCheck (L_72, _stringLiteral1529548752); (L_72)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)73)), (String_t*)_stringLiteral1529548752); StringU5BU5D_t1642385972* L_73 = L_72; NullCheck(L_73); ArrayElementTypeCheck (L_73, _stringLiteral366749334); (L_73)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)74)), (String_t*)_stringLiteral366749334); StringU5BU5D_t1642385972* L_74 = L_73; NullCheck(L_74); ArrayElementTypeCheck (L_74, _stringLiteral366749338); (L_74)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)75)), (String_t*)_stringLiteral366749338); StringU5BU5D_t1642385972* L_75 = L_74; NullCheck(L_75); ArrayElementTypeCheck (L_75, _stringLiteral2336117802); (L_75)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)76)), (String_t*)_stringLiteral2336117802); StringU5BU5D_t1642385972* L_76 = L_75; NullCheck(L_76); ArrayElementTypeCheck (L_76, _stringLiteral3255745202); (L_76)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)77)), (String_t*)_stringLiteral3255745202); StringU5BU5D_t1642385972* L_77 = L_76; NullCheck(L_77); ArrayElementTypeCheck (L_77, _stringLiteral366749343); (L_77)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)78)), (String_t*)_stringLiteral366749343); StringU5BU5D_t1642385972* L_78 = L_77; NullCheck(L_78); ArrayElementTypeCheck (L_78, _stringLiteral2336117811); (L_78)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)79)), (String_t*)_stringLiteral2336117811); StringU5BU5D_t1642385972* L_79 = L_78; NullCheck(L_79); ArrayElementTypeCheck (L_79, _stringLiteral448491076); (L_79)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)80)), (String_t*)_stringLiteral448491076); StringU5BU5D_t1642385972* L_80 = L_79; NullCheck(L_80); ArrayElementTypeCheck (L_80, _stringLiteral3365436115); (L_80)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)81)), (String_t*)_stringLiteral3365436115); StringU5BU5D_t1642385972* L_81 = L_80; NullCheck(L_81); ArrayElementTypeCheck (L_81, _stringLiteral1151034034); (L_81)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)82)), (String_t*)_stringLiteral1151034034); StringU5BU5D_t1642385972* L_82 = L_81; NullCheck(L_82); ArrayElementTypeCheck (L_82, _stringLiteral1554318561); (L_82)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)83)), (String_t*)_stringLiteral1554318561); StringU5BU5D_t1642385972* L_83 = L_82; NullCheck(L_83); ArrayElementTypeCheck (L_83, _stringLiteral391519147); (L_83)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)84)), (String_t*)_stringLiteral391519147); StringU5BU5D_t1642385972* L_84 = L_83; NullCheck(L_84); ArrayElementTypeCheck (L_84, _stringLiteral2360887615); (L_84)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)85)), (String_t*)_stringLiteral2360887615); StringU5BU5D_t1642385972* L_85 = L_84; NullCheck(L_85); ArrayElementTypeCheck (L_85, _stringLiteral391519138); (L_85)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)86)), (String_t*)_stringLiteral391519138); StringU5BU5D_t1642385972* L_86 = L_85; NullCheck(L_86); ArrayElementTypeCheck (L_86, _stringLiteral2360887606); (L_86)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)87)), (String_t*)_stringLiteral2360887606); StringU5BU5D_t1642385972* L_87 = L_86; NullCheck(L_87); ArrayElementTypeCheck (L_87, _stringLiteral292744773); (L_87)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)88)), (String_t*)_stringLiteral292744773); StringU5BU5D_t1642385972* L_88 = L_87; NullCheck(L_88); ArrayElementTypeCheck (L_88, _stringLiteral2309168132); (L_88)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)89)), (String_t*)_stringLiteral2309168132); StringU5BU5D_t1642385972* L_89 = L_88; NullCheck(L_89); ArrayElementTypeCheck (L_89, _stringLiteral2309167540); (L_89)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)90)), (String_t*)_stringLiteral2309167540); StringU5BU5D_t1642385972* L_90 = L_89; NullCheck(L_90); ArrayElementTypeCheck (L_90, _stringLiteral339798803); (L_90)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)91)), (String_t*)_stringLiteral339798803); StringU5BU5D_t1642385972* L_91 = L_90; NullCheck(L_91); ArrayElementTypeCheck (L_91, _stringLiteral3236305790); (L_91)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)92)), (String_t*)_stringLiteral3236305790); StringU5BU5D_t1642385972* L_92 = L_91; NullCheck(L_92); ArrayElementTypeCheck (L_92, _stringLiteral3021628826); (L_92)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)93)), (String_t*)_stringLiteral3021628826); StringU5BU5D_t1642385972* L_93 = L_92; NullCheck(L_93); ArrayElementTypeCheck (L_93, _stringLiteral3332181807); (L_93)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)94)), (String_t*)_stringLiteral3332181807); StringU5BU5D_t1642385972* L_94 = L_93; NullCheck(L_94); ArrayElementTypeCheck (L_94, _stringLiteral3068682295); (L_94)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)95)), (String_t*)_stringLiteral3068682295); StringU5BU5D_t1642385972* L_95 = L_94; NullCheck(L_95); ArrayElementTypeCheck (L_95, _stringLiteral381169821); (L_95)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)96)), (String_t*)_stringLiteral381169821); StringU5BU5D_t1642385972* L_96 = L_95; NullCheck(L_96); ArrayElementTypeCheck (L_96, _stringLiteral1502599105); (L_96)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)97)), (String_t*)_stringLiteral1502599105); StringU5BU5D_t1642385972* L_97 = L_96; NullCheck(L_97); ArrayElementTypeCheck (L_97, _stringLiteral1905883611); (L_97)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)98)), (String_t*)_stringLiteral1905883611); StringU5BU5D_t1642385972* L_98 = L_97; NullCheck(L_98); ArrayElementTypeCheck (L_98, _stringLiteral1905883589); (L_98)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)99)), (String_t*)_stringLiteral1905883589); StringU5BU5D_t1642385972* L_99 = L_98; NullCheck(L_99); ArrayElementTypeCheck (L_99, _stringLiteral3155263474); (L_99)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)100)), (String_t*)_stringLiteral3155263474); StringU5BU5D_t1642385972* L_100 = L_99; NullCheck(L_100); ArrayElementTypeCheck (L_100, _stringLiteral3021628428); (L_100)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)101)), (String_t*)_stringLiteral3021628428); StringU5BU5D_t1642385972* L_101 = L_100; NullCheck(L_101); ArrayElementTypeCheck (L_101, _stringLiteral1502598673); (L_101)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)102)), (String_t*)_stringLiteral1502598673); StringU5BU5D_t1642385972* L_102 = L_101; NullCheck(L_102); ArrayElementTypeCheck (L_102, _stringLiteral762051712); (L_102)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)103)), (String_t*)_stringLiteral762051712); StringU5BU5D_t1642385972* L_103 = L_102; NullCheck(L_103); ArrayElementTypeCheck (L_103, _stringLiteral762051709); (L_103)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)104)), (String_t*)_stringLiteral762051709); StringU5BU5D_t1642385972* L_104 = L_103; NullCheck(L_104); ArrayElementTypeCheck (L_104, _stringLiteral762051707); (L_104)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)105)), (String_t*)_stringLiteral762051707); StringU5BU5D_t1642385972* L_105 = L_104; NullCheck(L_105); ArrayElementTypeCheck (L_105, _stringLiteral762051719); (L_105)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)106)), (String_t*)_stringLiteral762051719); StringU5BU5D_t1642385972* L_106 = L_105; NullCheck(L_106); ArrayElementTypeCheck (L_106, _stringLiteral2684366008); (L_106)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)107)), (String_t*)_stringLiteral2684366008); StringU5BU5D_t1642385972* L_107 = L_106; NullCheck(L_107); ArrayElementTypeCheck (L_107, _stringLiteral2684366020); (L_107)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)108)), (String_t*)_stringLiteral2684366020); StringU5BU5D_t1642385972* L_108 = L_107; NullCheck(L_108); ArrayElementTypeCheck (L_108, _stringLiteral3443880895); (L_108)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)109)), (String_t*)_stringLiteral3443880895); StringU5BU5D_t1642385972* L_109 = L_108; NullCheck(L_109); ArrayElementTypeCheck (L_109, _stringLiteral3443880907); (L_109)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)110)), (String_t*)_stringLiteral3443880907); StringU5BU5D_t1642385972* L_110 = L_109; NullCheck(L_110); ArrayElementTypeCheck (L_110, _stringLiteral119238135); (L_110)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)111)), (String_t*)_stringLiteral119238135); StringU5BU5D_t1642385972* L_111 = L_110; NullCheck(L_111); ArrayElementTypeCheck (L_111, _stringLiteral2710897270); (L_111)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)112)), (String_t*)_stringLiteral2710897270); StringU5BU5D_t1642385972* L_112 = L_111; NullCheck(L_112); ArrayElementTypeCheck (L_112, _stringLiteral4182611163); (L_112)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)113)), (String_t*)_stringLiteral4182611163); StringU5BU5D_t1642385972* L_113 = L_112; NullCheck(L_113); ArrayElementTypeCheck (L_113, _stringLiteral2307351665); (L_113)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)114)), (String_t*)_stringLiteral2307351665); StringU5BU5D_t1642385972* L_114 = L_113; NullCheck(L_114); ArrayElementTypeCheck (L_114, _stringLiteral2148391703); (L_114)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)115)), (String_t*)_stringLiteral2148391703); StringU5BU5D_t1642385972* L_115 = L_114; NullCheck(L_115); ArrayElementTypeCheck (L_115, _stringLiteral807095503); (L_115)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)116)), (String_t*)_stringLiteral807095503); StringU5BU5D_t1642385972* L_116 = L_115; NullCheck(L_116); ArrayElementTypeCheck (L_116, _stringLiteral1729362418); (L_116)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)117)), (String_t*)_stringLiteral1729362418); StringU5BU5D_t1642385972* L_117 = L_116; NullCheck(L_117); ArrayElementTypeCheck (L_117, _stringLiteral2993908237); (L_117)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)118)), (String_t*)_stringLiteral2993908237); StringU5BU5D_t1642385972* L_118 = L_117; NullCheck(L_118); ArrayElementTypeCheck (L_118, _stringLiteral2979673950); (L_118)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)121)), (String_t*)_stringLiteral2979673950); StringU5BU5D_t1642385972* L_119 = L_118; NullCheck(L_119); ArrayElementTypeCheck (L_119, _stringLiteral2697347422); (L_119)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)122)), (String_t*)_stringLiteral2697347422); StringU5BU5D_t1642385972* L_120 = L_119; NullCheck(L_120); ArrayElementTypeCheck (L_120, _stringLiteral2663581612); (L_120)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)123)), (String_t*)_stringLiteral2663581612); StringU5BU5D_t1642385972* L_121 = L_120; NullCheck(L_121); ArrayElementTypeCheck (L_121, _stringLiteral1408556295); (L_121)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)124)), (String_t*)_stringLiteral1408556295); StringU5BU5D_t1642385972* L_122 = L_121; NullCheck(L_122); ArrayElementTypeCheck (L_122, _stringLiteral627234437); (L_122)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)125)), (String_t*)_stringLiteral627234437); StringU5BU5D_t1642385972* L_123 = L_122; NullCheck(L_123); ArrayElementTypeCheck (L_123, _stringLiteral1563015653); (L_123)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)126)), (String_t*)_stringLiteral1563015653); StringU5BU5D_t1642385972* L_124 = L_123; NullCheck(L_124); ArrayElementTypeCheck (L_124, _stringLiteral3457282118); (L_124)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)127)), (String_t*)_stringLiteral3457282118); StringU5BU5D_t1642385972* L_125 = L_124; NullCheck(L_125); ArrayElementTypeCheck (L_125, _stringLiteral3082391656); (L_125)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)128)), (String_t*)_stringLiteral3082391656); StringU5BU5D_t1642385972* L_126 = L_125; NullCheck(L_126); ArrayElementTypeCheck (L_126, _stringLiteral2146264690); (L_126)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)129)), (String_t*)_stringLiteral2146264690); StringU5BU5D_t1642385972* L_127 = L_126; NullCheck(L_127); ArrayElementTypeCheck (L_127, _stringLiteral330911302); (L_127)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)130)), (String_t*)_stringLiteral330911302); StringU5BU5D_t1642385972* L_128 = L_127; NullCheck(L_128); ArrayElementTypeCheck (L_128, _stringLiteral330911141); (L_128)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)131)), (String_t*)_stringLiteral330911141); StringU5BU5D_t1642385972* L_129 = L_128; NullCheck(L_129); ArrayElementTypeCheck (L_129, _stringLiteral330910955); (L_129)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)132)), (String_t*)_stringLiteral330910955); StringU5BU5D_t1642385972* L_130 = L_129; NullCheck(L_130); ArrayElementTypeCheck (L_130, _stringLiteral330910815); (L_130)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)133)), (String_t*)_stringLiteral330910815); StringU5BU5D_t1642385972* L_131 = L_130; NullCheck(L_131); ArrayElementTypeCheck (L_131, _stringLiteral3202370362); (L_131)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)134)), (String_t*)_stringLiteral3202370362); StringU5BU5D_t1642385972* L_132 = L_131; NullCheck(L_132); ArrayElementTypeCheck (L_132, _stringLiteral3202370201); (L_132)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)135)), (String_t*)_stringLiteral3202370201); StringU5BU5D_t1642385972* L_133 = L_132; NullCheck(L_133); ArrayElementTypeCheck (L_133, _stringLiteral3202370015); (L_133)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)136)), (String_t*)_stringLiteral3202370015); StringU5BU5D_t1642385972* L_134 = L_133; NullCheck(L_134); ArrayElementTypeCheck (L_134, _stringLiteral3202369875); (L_134)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)137)), (String_t*)_stringLiteral3202369875); StringU5BU5D_t1642385972* L_135 = L_134; NullCheck(L_135); ArrayElementTypeCheck (L_135, _stringLiteral1778729099); (L_135)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)138)), (String_t*)_stringLiteral1778729099); StringU5BU5D_t1642385972* L_136 = L_135; NullCheck(L_136); ArrayElementTypeCheck (L_136, _stringLiteral339994567); (L_136)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)139)), (String_t*)_stringLiteral339994567); StringU5BU5D_t1642385972* L_137 = L_136; NullCheck(L_137); ArrayElementTypeCheck (L_137, _stringLiteral1502598545); (L_137)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)140)), (String_t*)_stringLiteral1502598545); StringU5BU5D_t1642385972* L_138 = L_137; NullCheck(L_138); ArrayElementTypeCheck (L_138, _stringLiteral2477512525); (L_138)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)141)), (String_t*)_stringLiteral2477512525); StringU5BU5D_t1642385972* L_139 = L_138; NullCheck(L_139); ArrayElementTypeCheck (L_139, _stringLiteral1453727839); (L_139)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)142)), (String_t*)_stringLiteral1453727839); StringU5BU5D_t1642385972* L_140 = L_139; NullCheck(L_140); ArrayElementTypeCheck (L_140, _stringLiteral1689674280); (L_140)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)143)), (String_t*)_stringLiteral1689674280); StringU5BU5D_t1642385972* L_141 = L_140; NullCheck(L_141); ArrayElementTypeCheck (L_141, _stringLiteral2559449315); (L_141)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)144)), (String_t*)_stringLiteral2559449315); StringU5BU5D_t1642385972* L_142 = L_141; NullCheck(L_142); ArrayElementTypeCheck (L_142, _stringLiteral4172587423); (L_142)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)145)), (String_t*)_stringLiteral4172587423); StringU5BU5D_t1642385972* L_143 = L_142; NullCheck(L_143); ArrayElementTypeCheck (L_143, _stringLiteral2559449314); (L_143)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)146)), (String_t*)_stringLiteral2559449314); StringU5BU5D_t1642385972* L_144 = L_143; NullCheck(L_144); ArrayElementTypeCheck (L_144, _stringLiteral4172587422); (L_144)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)147)), (String_t*)_stringLiteral4172587422); StringU5BU5D_t1642385972* L_145 = L_144; NullCheck(L_145); ArrayElementTypeCheck (L_145, _stringLiteral2559449312); (L_145)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)148)), (String_t*)_stringLiteral2559449312); StringU5BU5D_t1642385972* L_146 = L_145; NullCheck(L_146); ArrayElementTypeCheck (L_146, _stringLiteral4172587420); (L_146)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)149)), (String_t*)_stringLiteral4172587420); StringU5BU5D_t1642385972* L_147 = L_146; NullCheck(L_147); ArrayElementTypeCheck (L_147, _stringLiteral2559449324); (L_147)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)150)), (String_t*)_stringLiteral2559449324); StringU5BU5D_t1642385972* L_148 = L_147; NullCheck(L_148); ArrayElementTypeCheck (L_148, _stringLiteral178545620); (L_148)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)151)), (String_t*)_stringLiteral178545620); StringU5BU5D_t1642385972* L_149 = L_148; NullCheck(L_149); ArrayElementTypeCheck (L_149, _stringLiteral3769302893); (L_149)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)152)), (String_t*)_stringLiteral3769302893); StringU5BU5D_t1642385972* L_150 = L_149; NullCheck(L_150); ArrayElementTypeCheck (L_150, _stringLiteral3769302905); (L_150)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)153)), (String_t*)_stringLiteral3769302905); StringU5BU5D_t1642385972* L_151 = L_150; NullCheck(L_151); ArrayElementTypeCheck (L_151, _stringLiteral1684498374); (L_151)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)154)), (String_t*)_stringLiteral1684498374); StringU5BU5D_t1642385972* L_152 = L_151; NullCheck(L_152); ArrayElementTypeCheck (L_152, _stringLiteral3073335381); (L_152)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)155)), (String_t*)_stringLiteral3073335381); StringU5BU5D_t1642385972* L_153 = L_152; NullCheck(L_153); ArrayElementTypeCheck (L_153, _stringLiteral1180572518); (L_153)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)156)), (String_t*)_stringLiteral1180572518); StringU5BU5D_t1642385972* L_154 = L_153; NullCheck(L_154); ArrayElementTypeCheck (L_154, _stringLiteral1180572519); (L_154)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)157)), (String_t*)_stringLiteral1180572519); StringU5BU5D_t1642385972* L_155 = L_154; NullCheck(L_155); ArrayElementTypeCheck (L_155, _stringLiteral1180572521); (L_155)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)158)), (String_t*)_stringLiteral1180572521); StringU5BU5D_t1642385972* L_156 = L_155; NullCheck(L_156); ArrayElementTypeCheck (L_156, _stringLiteral1180572509); (L_156)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)159)), (String_t*)_stringLiteral1180572509); StringU5BU5D_t1642385972* L_157 = L_156; NullCheck(L_157); ArrayElementTypeCheck (L_157, _stringLiteral3815347542); (L_157)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)160)), (String_t*)_stringLiteral3815347542); StringU5BU5D_t1642385972* L_158 = L_157; NullCheck(L_158); ArrayElementTypeCheck (L_158, _stringLiteral3815347530); (L_158)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)161)), (String_t*)_stringLiteral3815347530); StringU5BU5D_t1642385972* L_159 = L_158; NullCheck(L_159); ArrayElementTypeCheck (L_159, _stringLiteral2501047121); (L_159)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)162)), (String_t*)_stringLiteral2501047121); StringU5BU5D_t1642385972* L_160 = L_159; NullCheck(L_160); ArrayElementTypeCheck (L_160, _stringLiteral4090385577); (L_160)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)163)), (String_t*)_stringLiteral4090385577); StringU5BU5D_t1642385972* L_161 = L_160; NullCheck(L_161); ArrayElementTypeCheck (L_161, _stringLiteral1314794950); (L_161)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)164)), (String_t*)_stringLiteral1314794950); StringU5BU5D_t1642385972* L_162 = L_161; NullCheck(L_162); ArrayElementTypeCheck (L_162, _stringLiteral1002339398); (L_162)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)165)), (String_t*)_stringLiteral1002339398); StringU5BU5D_t1642385972* L_163 = L_162; NullCheck(L_163); ArrayElementTypeCheck (L_163, _stringLiteral782255611); (L_163)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)179)), (String_t*)_stringLiteral782255611); StringU5BU5D_t1642385972* L_164 = L_163; NullCheck(L_164); ArrayElementTypeCheck (L_164, _stringLiteral4176545519); (L_164)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)180)), (String_t*)_stringLiteral4176545519); StringU5BU5D_t1642385972* L_165 = L_164; NullCheck(L_165); ArrayElementTypeCheck (L_165, _stringLiteral782255608); (L_165)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)181)), (String_t*)_stringLiteral782255608); StringU5BU5D_t1642385972* L_166 = L_165; NullCheck(L_166); ArrayElementTypeCheck (L_166, _stringLiteral4176545516); (L_166)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)182)), (String_t*)_stringLiteral4176545516); StringU5BU5D_t1642385972* L_167 = L_166; NullCheck(L_167); ArrayElementTypeCheck (L_167, _stringLiteral782255606); (L_167)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)183)), (String_t*)_stringLiteral782255606); StringU5BU5D_t1642385972* L_168 = L_167; NullCheck(L_168); ArrayElementTypeCheck (L_168, _stringLiteral4176545514); (L_168)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)184)), (String_t*)_stringLiteral4176545514); StringU5BU5D_t1642385972* L_169 = L_168; NullCheck(L_169); ArrayElementTypeCheck (L_169, _stringLiteral782255602); (L_169)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)185)), (String_t*)_stringLiteral782255602); StringU5BU5D_t1642385972* L_170 = L_169; NullCheck(L_170); ArrayElementTypeCheck (L_170, _stringLiteral4176545510); (L_170)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)186)), (String_t*)_stringLiteral4176545510); StringU5BU5D_t1642385972* L_171 = L_170; NullCheck(L_171); ArrayElementTypeCheck (L_171, _stringLiteral3401875426); (L_171)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)194)), (String_t*)_stringLiteral3401875426); StringU5BU5D_t1642385972* L_172 = L_171; NullCheck(L_172); ArrayElementTypeCheck (L_172, _stringLiteral3514721169); (L_172)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)195)), (String_t*)_stringLiteral3514721169); StringU5BU5D_t1642385972* L_173 = L_172; NullCheck(L_173); ArrayElementTypeCheck (L_173, _stringLiteral1157131249); (L_173)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)198)), (String_t*)_stringLiteral1157131249); StringU5BU5D_t1642385972* L_174 = L_173; NullCheck(L_174); ArrayElementTypeCheck (L_174, _stringLiteral3161666159); (L_174)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)208)), (String_t*)_stringLiteral3161666159); StringU5BU5D_t1642385972* L_175 = L_174; NullCheck(L_175); ArrayElementTypeCheck (L_175, _stringLiteral3443880897); (L_175)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)209)), (String_t*)_stringLiteral3443880897); StringU5BU5D_t1642385972* L_176 = L_175; NullCheck(L_176); ArrayElementTypeCheck (L_176, _stringLiteral3443880900); (L_176)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)210)), (String_t*)_stringLiteral3443880900); StringU5BU5D_t1642385972* L_177 = L_176; NullCheck(L_177); ArrayElementTypeCheck (L_177, _stringLiteral3162669967); (L_177)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)211)), (String_t*)_stringLiteral3162669967); StringU5BU5D_t1642385972* L_178 = L_177; NullCheck(L_178); ArrayElementTypeCheck (L_178, _stringLiteral3715361322); (L_178)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)212)), (String_t*)_stringLiteral3715361322); StringU5BU5D_t1642385972* L_179 = L_178; NullCheck(L_179); ArrayElementTypeCheck (L_179, _stringLiteral2814683934); (L_179)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)213)), (String_t*)_stringLiteral2814683934); StringU5BU5D_t1642385972* L_180 = L_179; NullCheck(L_180); ArrayElementTypeCheck (L_180, _stringLiteral4076537830); (L_180)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)214)), (String_t*)_stringLiteral4076537830); StringU5BU5D_t1642385972* L_181 = L_180; NullCheck(L_181); ArrayElementTypeCheck (L_181, _stringLiteral2716565177); (L_181)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)215)), (String_t*)_stringLiteral2716565177); StringU5BU5D_t1642385972* L_182 = L_181; NullCheck(L_182); ArrayElementTypeCheck (L_182, _stringLiteral2807062197); (L_182)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)216)), (String_t*)_stringLiteral2807062197); StringU5BU5D_t1642385972* L_183 = L_182; NullCheck(L_183); ArrayElementTypeCheck (L_183, _stringLiteral3530008064); (L_183)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)217)), (String_t*)_stringLiteral3530008064); StringU5BU5D_t1642385972* L_184 = L_183; NullCheck(L_184); ArrayElementTypeCheck (L_184, _stringLiteral2807702533); (L_184)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)218)), (String_t*)_stringLiteral2807702533); StringU5BU5D_t1642385972* L_185 = L_184; NullCheck(L_185); ArrayElementTypeCheck (L_185, _stringLiteral3551139248); (L_185)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)219)), (String_t*)_stringLiteral3551139248); StringU5BU5D_t1642385972* L_186 = L_185; NullCheck(L_186); ArrayElementTypeCheck (L_186, _stringLiteral876476942); (L_186)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)220)), (String_t*)_stringLiteral876476942); StringU5BU5D_t1642385972* L_187 = L_186; NullCheck(L_187); ArrayElementTypeCheck (L_187, _stringLiteral2448513723); (L_187)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)221)), (String_t*)_stringLiteral2448513723); StringU5BU5D_t1642385972* L_188 = L_187; NullCheck(L_188); ArrayElementTypeCheck (L_188, _stringLiteral3753663670); (L_188)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)222)), (String_t*)_stringLiteral3753663670); StringU5BU5D_t1642385972* L_189 = L_188; NullCheck(L_189); ArrayElementTypeCheck (L_189, _stringLiteral480825959); (L_189)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)223)), (String_t*)_stringLiteral480825959); StringU5BU5D_t1642385972* L_190 = L_189; NullCheck(L_190); ArrayElementTypeCheck (L_190, _stringLiteral1549531859); (L_190)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)224)), (String_t*)_stringLiteral1549531859); StringU5BU5D_t1642385972* L_191 = L_190; NullCheck(L_191); ArrayElementTypeCheck (L_191, _stringLiteral88067259); (L_191)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)248)), (String_t*)_stringLiteral88067259); StringU5BU5D_t1642385972* L_192 = L_191; NullCheck(L_192); ArrayElementTypeCheck (L_192, _stringLiteral88067260); (L_192)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)249)), (String_t*)_stringLiteral88067260); StringU5BU5D_t1642385972* L_193 = L_192; NullCheck(L_193); ArrayElementTypeCheck (L_193, _stringLiteral88067257); (L_193)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)250)), (String_t*)_stringLiteral88067257); StringU5BU5D_t1642385972* L_194 = L_193; NullCheck(L_194); ArrayElementTypeCheck (L_194, _stringLiteral88067258); (L_194)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)251)), (String_t*)_stringLiteral88067258); StringU5BU5D_t1642385972* L_195 = L_194; NullCheck(L_195); ArrayElementTypeCheck (L_195, _stringLiteral88067255); (L_195)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)252)), (String_t*)_stringLiteral88067255); StringU5BU5D_t1642385972* L_196 = L_195; NullCheck(L_196); ArrayElementTypeCheck (L_196, _stringLiteral88067256); (L_196)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)253)), (String_t*)_stringLiteral88067256); StringU5BU5D_t1642385972* L_197 = L_196; NullCheck(L_197); ArrayElementTypeCheck (L_197, _stringLiteral88067253); (L_197)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)254)), (String_t*)_stringLiteral88067253); StringU5BU5D_t1642385972* L_198 = L_197; NullCheck(L_198); ArrayElementTypeCheck (L_198, _stringLiteral1884584617); (L_198)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)255)), (String_t*)_stringLiteral1884584617); StringU5BU5D_t1642385972* L_199 = L_198; NullCheck(L_199); ArrayElementTypeCheck (L_199, _stringLiteral47382726); (L_199)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)256)), (String_t*)_stringLiteral47382726); StringU5BU5D_t1642385972* L_200 = L_199; NullCheck(L_200); ArrayElementTypeCheck (L_200, _stringLiteral3021628343); (L_200)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)257)), (String_t*)_stringLiteral3021628343); StringU5BU5D_t1642385972* L_201 = L_200; NullCheck(L_201); ArrayElementTypeCheck (L_201, _stringLiteral1858828924); (L_201)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)258)), (String_t*)_stringLiteral1858828924); StringU5BU5D_t1642385972* L_202 = L_201; NullCheck(L_202); ArrayElementTypeCheck (L_202, _stringLiteral1168707281); (L_202)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)259)), (String_t*)_stringLiteral1168707281); StringU5BU5D_t1642385972* L_203 = L_202; NullCheck(L_203); ArrayElementTypeCheck (L_203, _stringLiteral4231481919); (L_203)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)260)), (String_t*)_stringLiteral4231481919); StringU5BU5D_t1642385972* L_204 = L_203; NullCheck(L_204); ArrayElementTypeCheck (L_204, _stringLiteral3187196564); (L_204)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)261)), (String_t*)_stringLiteral3187196564); StringU5BU5D_t1642385972* L_205 = L_204; NullCheck(L_205); ArrayElementTypeCheck (L_205, _stringLiteral2307351242); (L_205)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)262)), (String_t*)_stringLiteral2307351242); StringU5BU5D_t1642385972* L_206 = L_205; NullCheck(L_206); ArrayElementTypeCheck (L_206, _stringLiteral1933872749); (L_206)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)263)), (String_t*)_stringLiteral1933872749); StringU5BU5D_t1642385972* L_207 = L_206; NullCheck(L_207); ArrayElementTypeCheck (L_207, _stringLiteral3470150638); (L_207)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)265)), (String_t*)_stringLiteral3470150638); StringU5BU5D_t1642385972* L_208 = L_207; NullCheck(L_208); ArrayElementTypeCheck (L_208, _stringLiteral3660249737); (L_208)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)266)), (String_t*)_stringLiteral3660249737); StringU5BU5D_t1642385972* L_209 = L_208; NullCheck(L_209); ArrayElementTypeCheck (L_209, _stringLiteral2858725215); (L_209)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)267)), (String_t*)_stringLiteral2858725215); StringU5BU5D_t1642385972* L_210 = L_209; NullCheck(L_210); ArrayElementTypeCheck (L_210, _stringLiteral4229665356); (L_210)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)268)), (String_t*)_stringLiteral4229665356); StringU5BU5D_t1642385972* L_211 = L_210; NullCheck(L_211); ArrayElementTypeCheck (L_211, _stringLiteral3236762065); (L_211)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)269)), (String_t*)_stringLiteral3236762065); StringU5BU5D_t1642385972* L_212 = L_211; NullCheck(L_212); ArrayElementTypeCheck (L_212, _stringLiteral2193318831); (L_212)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)270)), (String_t*)_stringLiteral2193318831); StringU5BU5D_t1642385972* L_213 = L_212; NullCheck(L_213); ArrayElementTypeCheck (L_213, _stringLiteral4185878269); (L_213)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)271)), (String_t*)_stringLiteral4185878269); StringU5BU5D_t1642385972* L_214 = L_213; NullCheck(L_214); ArrayElementTypeCheck (L_214, _stringLiteral2034147359); (L_214)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)273)), (String_t*)_stringLiteral2034147359); StringU5BU5D_t1642385972* L_215 = L_214; NullCheck(L_215); ArrayElementTypeCheck (L_215, _stringLiteral3098091945); (L_215)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)274)), (String_t*)_stringLiteral3098091945); StringU5BU5D_t1642385972* L_216 = L_215; NullCheck(L_216); ArrayElementTypeCheck (L_216, _stringLiteral1186066636); (L_216)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)275)), (String_t*)_stringLiteral1186066636); StringU5BU5D_t1642385972* L_217 = L_216; NullCheck(L_217); ArrayElementTypeCheck (L_217, _stringLiteral593465470); (L_217)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)276)), (String_t*)_stringLiteral593465470); StringU5BU5D_t1642385972* L_218 = L_217; NullCheck(L_218); ArrayElementTypeCheck (L_218, _stringLiteral3094106929); (L_218)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)277)), (String_t*)_stringLiteral3094106929); StringU5BU5D_t1642385972* L_219 = L_218; NullCheck(L_219); ArrayElementTypeCheck (L_219, _stringLiteral2255081476); (L_219)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)278)), (String_t*)_stringLiteral2255081476); StringU5BU5D_t1642385972* L_220 = L_219; NullCheck(L_220); ArrayElementTypeCheck (L_220, _stringLiteral1548097516); (L_220)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)279)), (String_t*)_stringLiteral1548097516); StringU5BU5D_t1642385972* L_221 = L_220; NullCheck(L_221); ArrayElementTypeCheck (L_221, _stringLiteral318169515); (L_221)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)280)), (String_t*)_stringLiteral318169515); StringU5BU5D_t1642385972* L_222 = L_221; NullCheck(L_222); ArrayElementTypeCheck (L_222, _stringLiteral2819848329); (L_222)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)282)), (String_t*)_stringLiteral2819848329); StringU5BU5D_t1642385972* L_223 = L_222; NullCheck(L_223); ArrayElementTypeCheck (L_223, _stringLiteral365513102); (L_223)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)284)), (String_t*)_stringLiteral365513102); StringU5BU5D_t1642385972* L_224 = L_223; NullCheck(L_224); ArrayElementTypeCheck (L_224, _stringLiteral4255559471); (L_224)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)285)), (String_t*)_stringLiteral4255559471); StringU5BU5D_t1642385972* L_225 = L_224; NullCheck(L_225); ArrayElementTypeCheck (L_225, _stringLiteral3626041882); (L_225)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)286)), (String_t*)_stringLiteral3626041882); ((OpCodeNames_t1907134268_StaticFields*)OpCodeNames_t1907134268_il2cpp_TypeInfo_var->static_fields)->set_names_0(L_225); return; } } // System.Void System.Reflection.Emit.OpCodes::.cctor() extern "C" void OpCodes__cctor_m939885911 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (OpCodes__cctor_m939885911_MetadataUsageId); s_Il2CppMethodInitialized = true; } { OpCode_t2247480392 L_0; memset(&L_0, 0, sizeof(L_0)); OpCode__ctor_m3329993003(&L_0, ((int32_t)1179903), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Nop_0(L_0); OpCode_t2247480392 L_1; memset(&L_1, 0, sizeof(L_1)); OpCode__ctor_m3329993003(&L_1, ((int32_t)1180159), ((int32_t)17106177), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Break_1(L_1); OpCode_t2247480392 L_2; memset(&L_2, 0, sizeof(L_2)); OpCode__ctor_m3329993003(&L_2, ((int32_t)1245951), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldarg_0_2(L_2); OpCode_t2247480392 L_3; memset(&L_3, 0, sizeof(L_3)); OpCode__ctor_m3329993003(&L_3, ((int32_t)1246207), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldarg_1_3(L_3); OpCode_t2247480392 L_4; memset(&L_4, 0, sizeof(L_4)); OpCode__ctor_m3329993003(&L_4, ((int32_t)1246463), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldarg_2_4(L_4); OpCode_t2247480392 L_5; memset(&L_5, 0, sizeof(L_5)); OpCode__ctor_m3329993003(&L_5, ((int32_t)1246719), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldarg_3_5(L_5); OpCode_t2247480392 L_6; memset(&L_6, 0, sizeof(L_6)); OpCode__ctor_m3329993003(&L_6, ((int32_t)1246975), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldloc_0_6(L_6); OpCode_t2247480392 L_7; memset(&L_7, 0, sizeof(L_7)); OpCode__ctor_m3329993003(&L_7, ((int32_t)1247231), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldloc_1_7(L_7); OpCode_t2247480392 L_8; memset(&L_8, 0, sizeof(L_8)); OpCode__ctor_m3329993003(&L_8, ((int32_t)1247487), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldloc_2_8(L_8); OpCode_t2247480392 L_9; memset(&L_9, 0, sizeof(L_9)); OpCode__ctor_m3329993003(&L_9, ((int32_t)1247743), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldloc_3_9(L_9); OpCode_t2247480392 L_10; memset(&L_10, 0, sizeof(L_10)); OpCode__ctor_m3329993003(&L_10, ((int32_t)17959679), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stloc_0_10(L_10); OpCode_t2247480392 L_11; memset(&L_11, 0, sizeof(L_11)); OpCode__ctor_m3329993003(&L_11, ((int32_t)17959935), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stloc_1_11(L_11); OpCode_t2247480392 L_12; memset(&L_12, 0, sizeof(L_12)); OpCode__ctor_m3329993003(&L_12, ((int32_t)17960191), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stloc_2_12(L_12); OpCode_t2247480392 L_13; memset(&L_13, 0, sizeof(L_13)); OpCode__ctor_m3329993003(&L_13, ((int32_t)17960447), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stloc_3_13(L_13); OpCode_t2247480392 L_14; memset(&L_14, 0, sizeof(L_14)); OpCode__ctor_m3329993003(&L_14, ((int32_t)1249023), ((int32_t)85065985), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldarg_S_14(L_14); OpCode_t2247480392 L_15; memset(&L_15, 0, sizeof(L_15)); OpCode__ctor_m3329993003(&L_15, ((int32_t)1380351), ((int32_t)85065985), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldarga_S_15(L_15); OpCode_t2247480392 L_16; memset(&L_16, 0, sizeof(L_16)); OpCode__ctor_m3329993003(&L_16, ((int32_t)17961215), ((int32_t)85065985), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Starg_S_16(L_16); OpCode_t2247480392 L_17; memset(&L_17, 0, sizeof(L_17)); OpCode__ctor_m3329993003(&L_17, ((int32_t)1249791), ((int32_t)85065985), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldloc_S_17(L_17); OpCode_t2247480392 L_18; memset(&L_18, 0, sizeof(L_18)); OpCode__ctor_m3329993003(&L_18, ((int32_t)1381119), ((int32_t)85065985), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldloca_S_18(L_18); OpCode_t2247480392 L_19; memset(&L_19, 0, sizeof(L_19)); OpCode__ctor_m3329993003(&L_19, ((int32_t)17961983), ((int32_t)85065985), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stloc_S_19(L_19); OpCode_t2247480392 L_20; memset(&L_20, 0, sizeof(L_20)); OpCode__ctor_m3329993003(&L_20, ((int32_t)1643775), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldnull_20(L_20); OpCode_t2247480392 L_21; memset(&L_21, 0, sizeof(L_21)); OpCode__ctor_m3329993003(&L_21, ((int32_t)1381887), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_M1_21(L_21); OpCode_t2247480392 L_22; memset(&L_22, 0, sizeof(L_22)); OpCode__ctor_m3329993003(&L_22, ((int32_t)1382143), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_0_22(L_22); OpCode_t2247480392 L_23; memset(&L_23, 0, sizeof(L_23)); OpCode__ctor_m3329993003(&L_23, ((int32_t)1382399), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_1_23(L_23); OpCode_t2247480392 L_24; memset(&L_24, 0, sizeof(L_24)); OpCode__ctor_m3329993003(&L_24, ((int32_t)1382655), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_2_24(L_24); OpCode_t2247480392 L_25; memset(&L_25, 0, sizeof(L_25)); OpCode__ctor_m3329993003(&L_25, ((int32_t)1382911), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_3_25(L_25); OpCode_t2247480392 L_26; memset(&L_26, 0, sizeof(L_26)); OpCode__ctor_m3329993003(&L_26, ((int32_t)1383167), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_4_26(L_26); OpCode_t2247480392 L_27; memset(&L_27, 0, sizeof(L_27)); OpCode__ctor_m3329993003(&L_27, ((int32_t)1383423), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_5_27(L_27); OpCode_t2247480392 L_28; memset(&L_28, 0, sizeof(L_28)); OpCode__ctor_m3329993003(&L_28, ((int32_t)1383679), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_6_28(L_28); OpCode_t2247480392 L_29; memset(&L_29, 0, sizeof(L_29)); OpCode__ctor_m3329993003(&L_29, ((int32_t)1383935), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_7_29(L_29); OpCode_t2247480392 L_30; memset(&L_30, 0, sizeof(L_30)); OpCode__ctor_m3329993003(&L_30, ((int32_t)1384191), ((int32_t)84214017), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_8_30(L_30); OpCode_t2247480392 L_31; memset(&L_31, 0, sizeof(L_31)); OpCode__ctor_m3329993003(&L_31, ((int32_t)1384447), ((int32_t)84934913), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_S_31(L_31); OpCode_t2247480392 L_32; memset(&L_32, 0, sizeof(L_32)); OpCode__ctor_m3329993003(&L_32, ((int32_t)1384703), ((int32_t)84018433), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I4_32(L_32); OpCode_t2247480392 L_33; memset(&L_33, 0, sizeof(L_33)); OpCode__ctor_m3329993003(&L_33, ((int32_t)1450495), ((int32_t)84083969), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_I8_33(L_33); OpCode_t2247480392 L_34; memset(&L_34, 0, sizeof(L_34)); OpCode__ctor_m3329993003(&L_34, ((int32_t)1516287), ((int32_t)85001473), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_R4_34(L_34); OpCode_t2247480392 L_35; memset(&L_35, 0, sizeof(L_35)); OpCode__ctor_m3329993003(&L_35, ((int32_t)1582079), ((int32_t)84346113), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldc_R8_35(L_35); OpCode_t2247480392 L_36; memset(&L_36, 0, sizeof(L_36)); OpCode__ctor_m3329993003(&L_36, ((int32_t)18097663), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Dup_36(L_36); OpCode_t2247480392 L_37; memset(&L_37, 0, sizeof(L_37)); OpCode__ctor_m3329993003(&L_37, ((int32_t)17966847), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Pop_37(L_37); OpCode_t2247480392 L_38; memset(&L_38, 0, sizeof(L_38)); OpCode__ctor_m3329993003(&L_38, ((int32_t)1189887), ((int32_t)33817857), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Jmp_38(L_38); OpCode_t2247480392 L_39; memset(&L_39, 0, sizeof(L_39)); OpCode__ctor_m3329993003(&L_39, ((int32_t)437987583), ((int32_t)33817857), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Call_39(L_39); OpCode_t2247480392 L_40; memset(&L_40, 0, sizeof(L_40)); OpCode__ctor_m3329993003(&L_40, ((int32_t)437987839), ((int32_t)34145537), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Calli_40(L_40); OpCode_t2247480392 L_41; memset(&L_41, 0, sizeof(L_41)); OpCode__ctor_m3329993003(&L_41, ((int32_t)437398271), ((int32_t)117769473), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ret_41(L_41); OpCode_t2247480392 L_42; memset(&L_42, 0, sizeof(L_42)); OpCode__ctor_m3329993003(&L_42, ((int32_t)1190911), ((int32_t)983297), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Br_S_42(L_42); OpCode_t2247480392 L_43; memset(&L_43, 0, sizeof(L_43)); OpCode__ctor_m3329993003(&L_43, ((int32_t)51522815), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Brfalse_S_43(L_43); OpCode_t2247480392 L_44; memset(&L_44, 0, sizeof(L_44)); OpCode__ctor_m3329993003(&L_44, ((int32_t)51523071), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Brtrue_S_44(L_44); OpCode_t2247480392 L_45; memset(&L_45, 0, sizeof(L_45)); OpCode__ctor_m3329993003(&L_45, ((int32_t)34746111), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Beq_S_45(L_45); OpCode_t2247480392 L_46; memset(&L_46, 0, sizeof(L_46)); OpCode__ctor_m3329993003(&L_46, ((int32_t)34746367), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bge_S_46(L_46); OpCode_t2247480392 L_47; memset(&L_47, 0, sizeof(L_47)); OpCode__ctor_m3329993003(&L_47, ((int32_t)34746623), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bgt_S_47(L_47); OpCode_t2247480392 L_48; memset(&L_48, 0, sizeof(L_48)); OpCode__ctor_m3329993003(&L_48, ((int32_t)34746879), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ble_S_48(L_48); OpCode_t2247480392 L_49; memset(&L_49, 0, sizeof(L_49)); OpCode__ctor_m3329993003(&L_49, ((int32_t)34747135), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Blt_S_49(L_49); OpCode_t2247480392 L_50; memset(&L_50, 0, sizeof(L_50)); OpCode__ctor_m3329993003(&L_50, ((int32_t)34747391), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bne_Un_S_50(L_50); OpCode_t2247480392 L_51; memset(&L_51, 0, sizeof(L_51)); OpCode__ctor_m3329993003(&L_51, ((int32_t)34747647), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bge_Un_S_51(L_51); OpCode_t2247480392 L_52; memset(&L_52, 0, sizeof(L_52)); OpCode__ctor_m3329993003(&L_52, ((int32_t)34747903), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bgt_Un_S_52(L_52); OpCode_t2247480392 L_53; memset(&L_53, 0, sizeof(L_53)); OpCode__ctor_m3329993003(&L_53, ((int32_t)34748159), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ble_Un_S_53(L_53); OpCode_t2247480392 L_54; memset(&L_54, 0, sizeof(L_54)); OpCode__ctor_m3329993003(&L_54, ((int32_t)34748415), ((int32_t)51314945), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Blt_Un_S_54(L_54); OpCode_t2247480392 L_55; memset(&L_55, 0, sizeof(L_55)); OpCode__ctor_m3329993003(&L_55, ((int32_t)1194239), ((int32_t)1281), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Br_55(L_55); OpCode_t2247480392 L_56; memset(&L_56, 0, sizeof(L_56)); OpCode__ctor_m3329993003(&L_56, ((int32_t)51526143), ((int32_t)50332929), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Brfalse_56(L_56); OpCode_t2247480392 L_57; memset(&L_57, 0, sizeof(L_57)); OpCode__ctor_m3329993003(&L_57, ((int32_t)51526399), ((int32_t)50332929), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Brtrue_57(L_57); OpCode_t2247480392 L_58; memset(&L_58, 0, sizeof(L_58)); OpCode__ctor_m3329993003(&L_58, ((int32_t)34749439), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Beq_58(L_58); OpCode_t2247480392 L_59; memset(&L_59, 0, sizeof(L_59)); OpCode__ctor_m3329993003(&L_59, ((int32_t)34749695), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bge_59(L_59); OpCode_t2247480392 L_60; memset(&L_60, 0, sizeof(L_60)); OpCode__ctor_m3329993003(&L_60, ((int32_t)34749951), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bgt_60(L_60); OpCode_t2247480392 L_61; memset(&L_61, 0, sizeof(L_61)); OpCode__ctor_m3329993003(&L_61, ((int32_t)34750207), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ble_61(L_61); OpCode_t2247480392 L_62; memset(&L_62, 0, sizeof(L_62)); OpCode__ctor_m3329993003(&L_62, ((int32_t)34750463), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Blt_62(L_62); OpCode_t2247480392 L_63; memset(&L_63, 0, sizeof(L_63)); OpCode__ctor_m3329993003(&L_63, ((int32_t)34750719), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bne_Un_63(L_63); OpCode_t2247480392 L_64; memset(&L_64, 0, sizeof(L_64)); OpCode__ctor_m3329993003(&L_64, ((int32_t)34750975), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bge_Un_64(L_64); OpCode_t2247480392 L_65; memset(&L_65, 0, sizeof(L_65)); OpCode__ctor_m3329993003(&L_65, ((int32_t)34751231), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Bgt_Un_65(L_65); OpCode_t2247480392 L_66; memset(&L_66, 0, sizeof(L_66)); OpCode__ctor_m3329993003(&L_66, ((int32_t)34751487), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ble_Un_66(L_66); OpCode_t2247480392 L_67; memset(&L_67, 0, sizeof(L_67)); OpCode__ctor_m3329993003(&L_67, ((int32_t)34751743), ((int32_t)50331905), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Blt_Un_67(L_67); OpCode_t2247480392 L_68; memset(&L_68, 0, sizeof(L_68)); OpCode__ctor_m3329993003(&L_68, ((int32_t)51529215), ((int32_t)51053825), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Switch_68(L_68); OpCode_t2247480392 L_69; memset(&L_69, 0, sizeof(L_69)); OpCode__ctor_m3329993003(&L_69, ((int32_t)51726079), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_I1_69(L_69); OpCode_t2247480392 L_70; memset(&L_70, 0, sizeof(L_70)); OpCode__ctor_m3329993003(&L_70, ((int32_t)51726335), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_U1_70(L_70); OpCode_t2247480392 L_71; memset(&L_71, 0, sizeof(L_71)); OpCode__ctor_m3329993003(&L_71, ((int32_t)51726591), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_I2_71(L_71); OpCode_t2247480392 L_72; memset(&L_72, 0, sizeof(L_72)); OpCode__ctor_m3329993003(&L_72, ((int32_t)51726847), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_U2_72(L_72); OpCode_t2247480392 L_73; memset(&L_73, 0, sizeof(L_73)); OpCode__ctor_m3329993003(&L_73, ((int32_t)51727103), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_I4_73(L_73); OpCode_t2247480392 L_74; memset(&L_74, 0, sizeof(L_74)); OpCode__ctor_m3329993003(&L_74, ((int32_t)51727359), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_U4_74(L_74); OpCode_t2247480392 L_75; memset(&L_75, 0, sizeof(L_75)); OpCode__ctor_m3329993003(&L_75, ((int32_t)51793151), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_I8_75(L_75); OpCode_t2247480392 L_76; memset(&L_76, 0, sizeof(L_76)); OpCode__ctor_m3329993003(&L_76, ((int32_t)51727871), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_I_76(L_76); OpCode_t2247480392 L_77; memset(&L_77, 0, sizeof(L_77)); OpCode__ctor_m3329993003(&L_77, ((int32_t)51859199), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_R4_77(L_77); OpCode_t2247480392 L_78; memset(&L_78, 0, sizeof(L_78)); OpCode__ctor_m3329993003(&L_78, ((int32_t)51924991), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_R8_78(L_78); OpCode_t2247480392 L_79; memset(&L_79, 0, sizeof(L_79)); OpCode__ctor_m3329993003(&L_79, ((int32_t)51990783), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldind_Ref_79(L_79); OpCode_t2247480392 L_80; memset(&L_80, 0, sizeof(L_80)); OpCode__ctor_m3329993003(&L_80, ((int32_t)85086719), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stind_Ref_80(L_80); OpCode_t2247480392 L_81; memset(&L_81, 0, sizeof(L_81)); OpCode__ctor_m3329993003(&L_81, ((int32_t)85086975), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stind_I1_81(L_81); OpCode_t2247480392 L_82; memset(&L_82, 0, sizeof(L_82)); OpCode__ctor_m3329993003(&L_82, ((int32_t)85087231), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stind_I2_82(L_82); OpCode_t2247480392 L_83; memset(&L_83, 0, sizeof(L_83)); OpCode__ctor_m3329993003(&L_83, ((int32_t)85087487), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stind_I4_83(L_83); OpCode_t2247480392 L_84; memset(&L_84, 0, sizeof(L_84)); OpCode__ctor_m3329993003(&L_84, ((int32_t)101864959), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stind_I8_84(L_84); OpCode_t2247480392 L_85; memset(&L_85, 0, sizeof(L_85)); OpCode__ctor_m3329993003(&L_85, ((int32_t)135419647), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stind_R4_85(L_85); OpCode_t2247480392 L_86; memset(&L_86, 0, sizeof(L_86)); OpCode__ctor_m3329993003(&L_86, ((int32_t)152197119), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stind_R8_86(L_86); OpCode_t2247480392 L_87; memset(&L_87, 0, sizeof(L_87)); OpCode__ctor_m3329993003(&L_87, ((int32_t)34822399), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Add_87(L_87); OpCode_t2247480392 L_88; memset(&L_88, 0, sizeof(L_88)); OpCode__ctor_m3329993003(&L_88, ((int32_t)34822655), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Sub_88(L_88); OpCode_t2247480392 L_89; memset(&L_89, 0, sizeof(L_89)); OpCode__ctor_m3329993003(&L_89, ((int32_t)34822911), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Mul_89(L_89); OpCode_t2247480392 L_90; memset(&L_90, 0, sizeof(L_90)); OpCode__ctor_m3329993003(&L_90, ((int32_t)34823167), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Div_90(L_90); OpCode_t2247480392 L_91; memset(&L_91, 0, sizeof(L_91)); OpCode__ctor_m3329993003(&L_91, ((int32_t)34823423), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Div_Un_91(L_91); OpCode_t2247480392 L_92; memset(&L_92, 0, sizeof(L_92)); OpCode__ctor_m3329993003(&L_92, ((int32_t)34823679), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Rem_92(L_92); OpCode_t2247480392 L_93; memset(&L_93, 0, sizeof(L_93)); OpCode__ctor_m3329993003(&L_93, ((int32_t)34823935), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Rem_Un_93(L_93); OpCode_t2247480392 L_94; memset(&L_94, 0, sizeof(L_94)); OpCode__ctor_m3329993003(&L_94, ((int32_t)34824191), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_And_94(L_94); OpCode_t2247480392 L_95; memset(&L_95, 0, sizeof(L_95)); OpCode__ctor_m3329993003(&L_95, ((int32_t)34824447), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Or_95(L_95); OpCode_t2247480392 L_96; memset(&L_96, 0, sizeof(L_96)); OpCode__ctor_m3329993003(&L_96, ((int32_t)34824703), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Xor_96(L_96); OpCode_t2247480392 L_97; memset(&L_97, 0, sizeof(L_97)); OpCode__ctor_m3329993003(&L_97, ((int32_t)34824959), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Shl_97(L_97); OpCode_t2247480392 L_98; memset(&L_98, 0, sizeof(L_98)); OpCode__ctor_m3329993003(&L_98, ((int32_t)34825215), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Shr_98(L_98); OpCode_t2247480392 L_99; memset(&L_99, 0, sizeof(L_99)); OpCode__ctor_m3329993003(&L_99, ((int32_t)34825471), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Shr_Un_99(L_99); OpCode_t2247480392 L_100; memset(&L_100, 0, sizeof(L_100)); OpCode__ctor_m3329993003(&L_100, ((int32_t)18048511), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Neg_100(L_100); OpCode_t2247480392 L_101; memset(&L_101, 0, sizeof(L_101)); OpCode__ctor_m3329993003(&L_101, ((int32_t)18048767), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Not_101(L_101); OpCode_t2247480392 L_102; memset(&L_102, 0, sizeof(L_102)); OpCode__ctor_m3329993003(&L_102, ((int32_t)18180095), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_I1_102(L_102); OpCode_t2247480392 L_103; memset(&L_103, 0, sizeof(L_103)); OpCode__ctor_m3329993003(&L_103, ((int32_t)18180351), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_I2_103(L_103); OpCode_t2247480392 L_104; memset(&L_104, 0, sizeof(L_104)); OpCode__ctor_m3329993003(&L_104, ((int32_t)18180607), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_I4_104(L_104); OpCode_t2247480392 L_105; memset(&L_105, 0, sizeof(L_105)); OpCode__ctor_m3329993003(&L_105, ((int32_t)18246399), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_I8_105(L_105); OpCode_t2247480392 L_106; memset(&L_106, 0, sizeof(L_106)); OpCode__ctor_m3329993003(&L_106, ((int32_t)18312191), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_R4_106(L_106); OpCode_t2247480392 L_107; memset(&L_107, 0, sizeof(L_107)); OpCode__ctor_m3329993003(&L_107, ((int32_t)18377983), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_R8_107(L_107); OpCode_t2247480392 L_108; memset(&L_108, 0, sizeof(L_108)); OpCode__ctor_m3329993003(&L_108, ((int32_t)18181631), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_U4_108(L_108); OpCode_t2247480392 L_109; memset(&L_109, 0, sizeof(L_109)); OpCode__ctor_m3329993003(&L_109, ((int32_t)18247423), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_U8_109(L_109); OpCode_t2247480392 L_110; memset(&L_110, 0, sizeof(L_110)); OpCode__ctor_m3329993003(&L_110, ((int32_t)438005759), ((int32_t)33817345), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Callvirt_110(L_110); OpCode_t2247480392 L_111; memset(&L_111, 0, sizeof(L_111)); OpCode__ctor_m3329993003(&L_111, ((int32_t)85094655), ((int32_t)84738817), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Cpobj_111(L_111); OpCode_t2247480392 L_112; memset(&L_112, 0, sizeof(L_112)); OpCode__ctor_m3329993003(&L_112, ((int32_t)51606015), ((int32_t)84738817), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldobj_112(L_112); OpCode_t2247480392 L_113; memset(&L_113, 0, sizeof(L_113)); OpCode__ctor_m3329993003(&L_113, ((int32_t)1667839), ((int32_t)84542209), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldstr_113(L_113); OpCode_t2247480392 L_114; memset(&L_114, 0, sizeof(L_114)); OpCode__ctor_m3329993003(&L_114, ((int32_t)437875711), ((int32_t)33817345), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Newobj_114(L_114); OpCode_t2247480392 L_115; memset(&L_115, 0, sizeof(L_115)); OpCode__ctor_m3329993003(&L_115, ((int32_t)169440511), ((int32_t)84738817), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Castclass_115(L_115); OpCode_t2247480392 L_116; memset(&L_116, 0, sizeof(L_116)); OpCode__ctor_m3329993003(&L_116, ((int32_t)169178623), ((int32_t)84738817), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Isinst_116(L_116); OpCode_t2247480392 L_117; memset(&L_117, 0, sizeof(L_117)); OpCode__ctor_m3329993003(&L_117, ((int32_t)18380543), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_R_Un_117(L_117); OpCode_t2247480392 L_118; memset(&L_118, 0, sizeof(L_118)); OpCode__ctor_m3329993003(&L_118, ((int32_t)169179647), ((int32_t)84739329), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Unbox_118(L_118); OpCode_t2247480392 L_119; memset(&L_119, 0, sizeof(L_119)); OpCode__ctor_m3329993003(&L_119, ((int32_t)168983295), ((int32_t)134546177), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Throw_119(L_119); OpCode_t2247480392 L_120; memset(&L_120, 0, sizeof(L_120)); OpCode__ctor_m3329993003(&L_120, ((int32_t)169049087), ((int32_t)83952385), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldfld_120(L_120); OpCode_t2247480392 L_121; memset(&L_121, 0, sizeof(L_121)); OpCode__ctor_m3329993003(&L_121, ((int32_t)169180415), ((int32_t)83952385), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldflda_121(L_121); OpCode_t2247480392 L_122; memset(&L_122, 0, sizeof(L_122)); OpCode__ctor_m3329993003(&L_122, ((int32_t)185761279), ((int32_t)83952385), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stfld_122(L_122); OpCode_t2247480392 L_123; memset(&L_123, 0, sizeof(L_123)); OpCode__ctor_m3329993003(&L_123, ((int32_t)1277695), ((int32_t)83952385), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldsfld_123(L_123); OpCode_t2247480392 L_124; memset(&L_124, 0, sizeof(L_124)); OpCode__ctor_m3329993003(&L_124, ((int32_t)1409023), ((int32_t)83952385), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldsflda_124(L_124); OpCode_t2247480392 L_125; memset(&L_125, 0, sizeof(L_125)); OpCode__ctor_m3329993003(&L_125, ((int32_t)17989887), ((int32_t)83952385), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stsfld_125(L_125); OpCode_t2247480392 L_126; memset(&L_126, 0, sizeof(L_126)); OpCode__ctor_m3329993003(&L_126, ((int32_t)68321791), ((int32_t)84739329), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stobj_126(L_126); OpCode_t2247480392 L_127; memset(&L_127, 0, sizeof(L_127)); OpCode__ctor_m3329993003(&L_127, ((int32_t)18187007), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I1_Un_127(L_127); OpCode_t2247480392 L_128; memset(&L_128, 0, sizeof(L_128)); OpCode__ctor_m3329993003(&L_128, ((int32_t)18187263), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I2_Un_128(L_128); OpCode_t2247480392 L_129; memset(&L_129, 0, sizeof(L_129)); OpCode__ctor_m3329993003(&L_129, ((int32_t)18187519), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I4_Un_129(L_129); OpCode_t2247480392 L_130; memset(&L_130, 0, sizeof(L_130)); OpCode__ctor_m3329993003(&L_130, ((int32_t)18253311), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I8_Un_130(L_130); OpCode_t2247480392 L_131; memset(&L_131, 0, sizeof(L_131)); OpCode__ctor_m3329993003(&L_131, ((int32_t)18188031), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U1_Un_131(L_131); OpCode_t2247480392 L_132; memset(&L_132, 0, sizeof(L_132)); OpCode__ctor_m3329993003(&L_132, ((int32_t)18188287), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U2_Un_132(L_132); OpCode_t2247480392 L_133; memset(&L_133, 0, sizeof(L_133)); OpCode__ctor_m3329993003(&L_133, ((int32_t)18188543), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U4_Un_133(L_133); OpCode_t2247480392 L_134; memset(&L_134, 0, sizeof(L_134)); OpCode__ctor_m3329993003(&L_134, ((int32_t)18254335), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U8_Un_134(L_134); OpCode_t2247480392 L_135; memset(&L_135, 0, sizeof(L_135)); OpCode__ctor_m3329993003(&L_135, ((int32_t)18189055), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I_Un_135(L_135); OpCode_t2247480392 L_136; memset(&L_136, 0, sizeof(L_136)); OpCode__ctor_m3329993003(&L_136, ((int32_t)18189311), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U_Un_136(L_136); OpCode_t2247480392 L_137; memset(&L_137, 0, sizeof(L_137)); OpCode__ctor_m3329993003(&L_137, ((int32_t)18451711), ((int32_t)84739329), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Box_137(L_137); OpCode_t2247480392 L_138; memset(&L_138, 0, sizeof(L_138)); OpCode__ctor_m3329993003(&L_138, ((int32_t)52006399), ((int32_t)84738817), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Newarr_138(L_138); OpCode_t2247480392 L_139; memset(&L_139, 0, sizeof(L_139)); OpCode__ctor_m3329993003(&L_139, ((int32_t)169185023), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldlen_139(L_139); OpCode_t2247480392 L_140; memset(&L_140, 0, sizeof(L_140)); OpCode__ctor_m3329993003(&L_140, ((int32_t)202739711), ((int32_t)84738817), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelema_140(L_140); OpCode_t2247480392 L_141; memset(&L_141, 0, sizeof(L_141)); OpCode__ctor_m3329993003(&L_141, ((int32_t)202739967), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_I1_141(L_141); OpCode_t2247480392 L_142; memset(&L_142, 0, sizeof(L_142)); OpCode__ctor_m3329993003(&L_142, ((int32_t)202740223), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_U1_142(L_142); OpCode_t2247480392 L_143; memset(&L_143, 0, sizeof(L_143)); OpCode__ctor_m3329993003(&L_143, ((int32_t)202740479), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_I2_143(L_143); OpCode_t2247480392 L_144; memset(&L_144, 0, sizeof(L_144)); OpCode__ctor_m3329993003(&L_144, ((int32_t)202740735), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_U2_144(L_144); OpCode_t2247480392 L_145; memset(&L_145, 0, sizeof(L_145)); OpCode__ctor_m3329993003(&L_145, ((int32_t)202740991), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_I4_145(L_145); OpCode_t2247480392 L_146; memset(&L_146, 0, sizeof(L_146)); OpCode__ctor_m3329993003(&L_146, ((int32_t)202741247), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_U4_146(L_146); OpCode_t2247480392 L_147; memset(&L_147, 0, sizeof(L_147)); OpCode__ctor_m3329993003(&L_147, ((int32_t)202807039), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_I8_147(L_147); OpCode_t2247480392 L_148; memset(&L_148, 0, sizeof(L_148)); OpCode__ctor_m3329993003(&L_148, ((int32_t)202741759), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_I_148(L_148); OpCode_t2247480392 L_149; memset(&L_149, 0, sizeof(L_149)); OpCode__ctor_m3329993003(&L_149, ((int32_t)202873087), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_R4_149(L_149); OpCode_t2247480392 L_150; memset(&L_150, 0, sizeof(L_150)); OpCode__ctor_m3329993003(&L_150, ((int32_t)202938879), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_R8_150(L_150); OpCode_t2247480392 L_151; memset(&L_151, 0, sizeof(L_151)); OpCode__ctor_m3329993003(&L_151, ((int32_t)203004671), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_Ref_151(L_151); OpCode_t2247480392 L_152; memset(&L_152, 0, sizeof(L_152)); OpCode__ctor_m3329993003(&L_152, ((int32_t)219323391), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stelem_I_152(L_152); OpCode_t2247480392 L_153; memset(&L_153, 0, sizeof(L_153)); OpCode__ctor_m3329993003(&L_153, ((int32_t)219323647), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stelem_I1_153(L_153); OpCode_t2247480392 L_154; memset(&L_154, 0, sizeof(L_154)); OpCode__ctor_m3329993003(&L_154, ((int32_t)219323903), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stelem_I2_154(L_154); OpCode_t2247480392 L_155; memset(&L_155, 0, sizeof(L_155)); OpCode__ctor_m3329993003(&L_155, ((int32_t)219324159), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stelem_I4_155(L_155); OpCode_t2247480392 L_156; memset(&L_156, 0, sizeof(L_156)); OpCode__ctor_m3329993003(&L_156, ((int32_t)236101631), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stelem_I8_156(L_156); OpCode_t2247480392 L_157; memset(&L_157, 0, sizeof(L_157)); OpCode__ctor_m3329993003(&L_157, ((int32_t)252879103), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stelem_R4_157(L_157); OpCode_t2247480392 L_158; memset(&L_158, 0, sizeof(L_158)); OpCode__ctor_m3329993003(&L_158, ((int32_t)269656575), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stelem_R8_158(L_158); OpCode_t2247480392 L_159; memset(&L_159, 0, sizeof(L_159)); OpCode__ctor_m3329993003(&L_159, ((int32_t)286434047), ((int32_t)84214529), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stelem_Ref_159(L_159); OpCode_t2247480392 L_160; memset(&L_160, 0, sizeof(L_160)); OpCode__ctor_m3329993003(&L_160, ((int32_t)202613759), ((int32_t)84738817), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldelem_160(L_160); OpCode_t2247480392 L_161; memset(&L_161, 0, sizeof(L_161)); OpCode__ctor_m3329993003(&L_161, ((int32_t)470983935), ((int32_t)84738817), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stelem_161(L_161); OpCode_t2247480392 L_162; memset(&L_162, 0, sizeof(L_162)); OpCode__ctor_m3329993003(&L_162, ((int32_t)169059839), ((int32_t)84738817), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Unbox_Any_162(L_162); OpCode_t2247480392 L_163; memset(&L_163, 0, sizeof(L_163)); OpCode__ctor_m3329993003(&L_163, ((int32_t)18199551), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I1_163(L_163); OpCode_t2247480392 L_164; memset(&L_164, 0, sizeof(L_164)); OpCode__ctor_m3329993003(&L_164, ((int32_t)18199807), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U1_164(L_164); OpCode_t2247480392 L_165; memset(&L_165, 0, sizeof(L_165)); OpCode__ctor_m3329993003(&L_165, ((int32_t)18200063), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I2_165(L_165); OpCode_t2247480392 L_166; memset(&L_166, 0, sizeof(L_166)); OpCode__ctor_m3329993003(&L_166, ((int32_t)18200319), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U2_166(L_166); OpCode_t2247480392 L_167; memset(&L_167, 0, sizeof(L_167)); OpCode__ctor_m3329993003(&L_167, ((int32_t)18200575), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I4_167(L_167); OpCode_t2247480392 L_168; memset(&L_168, 0, sizeof(L_168)); OpCode__ctor_m3329993003(&L_168, ((int32_t)18200831), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U4_168(L_168); OpCode_t2247480392 L_169; memset(&L_169, 0, sizeof(L_169)); OpCode__ctor_m3329993003(&L_169, ((int32_t)18266623), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I8_169(L_169); OpCode_t2247480392 L_170; memset(&L_170, 0, sizeof(L_170)); OpCode__ctor_m3329993003(&L_170, ((int32_t)18266879), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U8_170(L_170); OpCode_t2247480392 L_171; memset(&L_171, 0, sizeof(L_171)); OpCode__ctor_m3329993003(&L_171, ((int32_t)18203391), ((int32_t)84739329), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Refanyval_171(L_171); OpCode_t2247480392 L_172; memset(&L_172, 0, sizeof(L_172)); OpCode__ctor_m3329993003(&L_172, ((int32_t)18400255), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ckfinite_172(L_172); OpCode_t2247480392 L_173; memset(&L_173, 0, sizeof(L_173)); OpCode__ctor_m3329993003(&L_173, ((int32_t)51627775), ((int32_t)84739329), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Mkrefany_173(L_173); OpCode_t2247480392 L_174; memset(&L_174, 0, sizeof(L_174)); OpCode__ctor_m3329993003(&L_174, ((int32_t)1429759), ((int32_t)84673793), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldtoken_174(L_174); OpCode_t2247480392 L_175; memset(&L_175, 0, sizeof(L_175)); OpCode__ctor_m3329993003(&L_175, ((int32_t)18207231), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_U2_175(L_175); OpCode_t2247480392 L_176; memset(&L_176, 0, sizeof(L_176)); OpCode__ctor_m3329993003(&L_176, ((int32_t)18207487), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_U1_176(L_176); OpCode_t2247480392 L_177; memset(&L_177, 0, sizeof(L_177)); OpCode__ctor_m3329993003(&L_177, ((int32_t)18207743), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_I_177(L_177); OpCode_t2247480392 L_178; memset(&L_178, 0, sizeof(L_178)); OpCode__ctor_m3329993003(&L_178, ((int32_t)18207999), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_I_178(L_178); OpCode_t2247480392 L_179; memset(&L_179, 0, sizeof(L_179)); OpCode__ctor_m3329993003(&L_179, ((int32_t)18208255), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_Ovf_U_179(L_179); OpCode_t2247480392 L_180; memset(&L_180, 0, sizeof(L_180)); OpCode__ctor_m3329993003(&L_180, ((int32_t)34854655), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Add_Ovf_180(L_180); OpCode_t2247480392 L_181; memset(&L_181, 0, sizeof(L_181)); OpCode__ctor_m3329993003(&L_181, ((int32_t)34854911), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Add_Ovf_Un_181(L_181); OpCode_t2247480392 L_182; memset(&L_182, 0, sizeof(L_182)); OpCode__ctor_m3329993003(&L_182, ((int32_t)34855167), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Mul_Ovf_182(L_182); OpCode_t2247480392 L_183; memset(&L_183, 0, sizeof(L_183)); OpCode__ctor_m3329993003(&L_183, ((int32_t)34855423), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Mul_Ovf_Un_183(L_183); OpCode_t2247480392 L_184; memset(&L_184, 0, sizeof(L_184)); OpCode__ctor_m3329993003(&L_184, ((int32_t)34855679), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Sub_Ovf_184(L_184); OpCode_t2247480392 L_185; memset(&L_185, 0, sizeof(L_185)); OpCode__ctor_m3329993003(&L_185, ((int32_t)34855935), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Sub_Ovf_Un_185(L_185); OpCode_t2247480392 L_186; memset(&L_186, 0, sizeof(L_186)); OpCode__ctor_m3329993003(&L_186, ((int32_t)1236223), ((int32_t)117769473), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Endfinally_186(L_186); OpCode_t2247480392 L_187; memset(&L_187, 0, sizeof(L_187)); OpCode__ctor_m3329993003(&L_187, ((int32_t)1236479), ((int32_t)1281), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Leave_187(L_187); OpCode_t2247480392 L_188; memset(&L_188, 0, sizeof(L_188)); OpCode__ctor_m3329993003(&L_188, ((int32_t)1236735), ((int32_t)984321), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Leave_S_188(L_188); OpCode_t2247480392 L_189; memset(&L_189, 0, sizeof(L_189)); OpCode__ctor_m3329993003(&L_189, ((int32_t)85123071), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stind_I_189(L_189); OpCode_t2247480392 L_190; memset(&L_190, 0, sizeof(L_190)); OpCode__ctor_m3329993003(&L_190, ((int32_t)18211071), ((int32_t)84215041), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Conv_U_190(L_190); OpCode_t2247480392 L_191; memset(&L_191, 0, sizeof(L_191)); OpCode__ctor_m3329993003(&L_191, ((int32_t)1243391), ((int32_t)67437057), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Prefix7_191(L_191); OpCode_t2247480392 L_192; memset(&L_192, 0, sizeof(L_192)); OpCode__ctor_m3329993003(&L_192, ((int32_t)1243647), ((int32_t)67437057), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Prefix6_192(L_192); OpCode_t2247480392 L_193; memset(&L_193, 0, sizeof(L_193)); OpCode__ctor_m3329993003(&L_193, ((int32_t)1243903), ((int32_t)67437057), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Prefix5_193(L_193); OpCode_t2247480392 L_194; memset(&L_194, 0, sizeof(L_194)); OpCode__ctor_m3329993003(&L_194, ((int32_t)1244159), ((int32_t)67437057), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Prefix4_194(L_194); OpCode_t2247480392 L_195; memset(&L_195, 0, sizeof(L_195)); OpCode__ctor_m3329993003(&L_195, ((int32_t)1244415), ((int32_t)67437057), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Prefix3_195(L_195); OpCode_t2247480392 L_196; memset(&L_196, 0, sizeof(L_196)); OpCode__ctor_m3329993003(&L_196, ((int32_t)1244671), ((int32_t)67437057), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Prefix2_196(L_196); OpCode_t2247480392 L_197; memset(&L_197, 0, sizeof(L_197)); OpCode__ctor_m3329993003(&L_197, ((int32_t)1244927), ((int32_t)67437057), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Prefix1_197(L_197); OpCode_t2247480392 L_198; memset(&L_198, 0, sizeof(L_198)); OpCode__ctor_m3329993003(&L_198, ((int32_t)1245183), ((int32_t)67437057), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Prefixref_198(L_198); OpCode_t2247480392 L_199; memset(&L_199, 0, sizeof(L_199)); OpCode__ctor_m3329993003(&L_199, ((int32_t)1376510), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Arglist_199(L_199); OpCode_t2247480392 L_200; memset(&L_200, 0, sizeof(L_200)); OpCode__ctor_m3329993003(&L_200, ((int32_t)34931198), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ceq_200(L_200); OpCode_t2247480392 L_201; memset(&L_201, 0, sizeof(L_201)); OpCode__ctor_m3329993003(&L_201, ((int32_t)34931454), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Cgt_201(L_201); OpCode_t2247480392 L_202; memset(&L_202, 0, sizeof(L_202)); OpCode__ctor_m3329993003(&L_202, ((int32_t)34931710), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Cgt_Un_202(L_202); OpCode_t2247480392 L_203; memset(&L_203, 0, sizeof(L_203)); OpCode__ctor_m3329993003(&L_203, ((int32_t)34931966), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Clt_203(L_203); OpCode_t2247480392 L_204; memset(&L_204, 0, sizeof(L_204)); OpCode__ctor_m3329993003(&L_204, ((int32_t)34932222), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Clt_Un_204(L_204); OpCode_t2247480392 L_205; memset(&L_205, 0, sizeof(L_205)); OpCode__ctor_m3329993003(&L_205, ((int32_t)1378046), ((int32_t)84149506), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldftn_205(L_205); OpCode_t2247480392 L_206; memset(&L_206, 0, sizeof(L_206)); OpCode__ctor_m3329993003(&L_206, ((int32_t)169150462), ((int32_t)84149506), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldvirtftn_206(L_206); OpCode_t2247480392 L_207; memset(&L_207, 0, sizeof(L_207)); OpCode__ctor_m3329993003(&L_207, ((int32_t)1247742), ((int32_t)84804866), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldarg_207(L_207); OpCode_t2247480392 L_208; memset(&L_208, 0, sizeof(L_208)); OpCode__ctor_m3329993003(&L_208, ((int32_t)1379070), ((int32_t)84804866), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldarga_208(L_208); OpCode_t2247480392 L_209; memset(&L_209, 0, sizeof(L_209)); OpCode__ctor_m3329993003(&L_209, ((int32_t)17959934), ((int32_t)84804866), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Starg_209(L_209); OpCode_t2247480392 L_210; memset(&L_210, 0, sizeof(L_210)); OpCode__ctor_m3329993003(&L_210, ((int32_t)1248510), ((int32_t)84804866), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldloc_210(L_210); OpCode_t2247480392 L_211; memset(&L_211, 0, sizeof(L_211)); OpCode__ctor_m3329993003(&L_211, ((int32_t)1379838), ((int32_t)84804866), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Ldloca_211(L_211); OpCode_t2247480392 L_212; memset(&L_212, 0, sizeof(L_212)); OpCode__ctor_m3329993003(&L_212, ((int32_t)17960702), ((int32_t)84804866), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Stloc_212(L_212); OpCode_t2247480392 L_213; memset(&L_213, 0, sizeof(L_213)); OpCode__ctor_m3329993003(&L_213, ((int32_t)51711998), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Localloc_213(L_213); OpCode_t2247480392 L_214; memset(&L_214, 0, sizeof(L_214)); OpCode__ctor_m3329993003(&L_214, ((int32_t)51515902), ((int32_t)117769474), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Endfilter_214(L_214); OpCode_t2247480392 L_215; memset(&L_215, 0, sizeof(L_215)); OpCode__ctor_m3329993003(&L_215, ((int32_t)1184510), ((int32_t)68158466), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Unaligned_215(L_215); OpCode_t2247480392 L_216; memset(&L_216, 0, sizeof(L_216)); OpCode__ctor_m3329993003(&L_216, ((int32_t)1184766), ((int32_t)67437570), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Volatile_216(L_216); OpCode_t2247480392 L_217; memset(&L_217, 0, sizeof(L_217)); OpCode__ctor_m3329993003(&L_217, ((int32_t)1185022), ((int32_t)67437570), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Tailcall_217(L_217); OpCode_t2247480392 L_218; memset(&L_218, 0, sizeof(L_218)); OpCode__ctor_m3329993003(&L_218, ((int32_t)51516926), ((int32_t)84738818), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Initobj_218(L_218); OpCode_t2247480392 L_219; memset(&L_219, 0, sizeof(L_219)); OpCode__ctor_m3329993003(&L_219, ((int32_t)1185534), ((int32_t)67961858), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Constrained_219(L_219); OpCode_t2247480392 L_220; memset(&L_220, 0, sizeof(L_220)); OpCode__ctor_m3329993003(&L_220, ((int32_t)118626302), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Cpblk_220(L_220); OpCode_t2247480392 L_221; memset(&L_221, 0, sizeof(L_221)); OpCode__ctor_m3329993003(&L_221, ((int32_t)118626558), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Initblk_221(L_221); OpCode_t2247480392 L_222; memset(&L_222, 0, sizeof(L_222)); OpCode__ctor_m3329993003(&L_222, ((int32_t)1186558), ((int32_t)134546178), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Rethrow_222(L_222); OpCode_t2247480392 L_223; memset(&L_223, 0, sizeof(L_223)); OpCode__ctor_m3329993003(&L_223, ((int32_t)1383678), ((int32_t)84739330), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Sizeof_223(L_223); OpCode_t2247480392 L_224; memset(&L_224, 0, sizeof(L_224)); OpCode__ctor_m3329993003(&L_224, ((int32_t)18161150), ((int32_t)84215042), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Refanytype_224(L_224); OpCode_t2247480392 L_225; memset(&L_225, 0, sizeof(L_225)); OpCode__ctor_m3329993003(&L_225, ((int32_t)1187582), ((int32_t)67437570), /*hidden argument*/NULL); ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->set_Readonly_225(L_225); return; } } // System.Int32 System.Reflection.Emit.ParameterBuilder::get_Attributes() extern "C" int32_t ParameterBuilder_get_Attributes_m2421099277 (ParameterBuilder_t3344728474 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_attrs_1(); return L_0; } } // System.String System.Reflection.Emit.ParameterBuilder::get_Name() extern "C" String_t* ParameterBuilder_get_Name_m4058709354 (ParameterBuilder_t3344728474 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_0(); return L_0; } } // System.Int32 System.Reflection.Emit.ParameterBuilder::get_Position() extern "C" int32_t ParameterBuilder_get_Position_m4023585547 (ParameterBuilder_t3344728474 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_position_2(); return L_0; } } // System.Reflection.PropertyAttributes System.Reflection.Emit.PropertyBuilder::get_Attributes() extern "C" int32_t PropertyBuilder_get_Attributes_m1538287354 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_attrs_0(); return L_0; } } // System.Boolean System.Reflection.Emit.PropertyBuilder::get_CanRead() extern "C" bool PropertyBuilder_get_CanRead_m2661496160 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { { MethodBuilder_t644187984 * L_0 = __this->get_get_method_4(); return (bool)((((int32_t)((((Il2CppObject*)(MethodBuilder_t644187984 *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.Emit.PropertyBuilder::get_CanWrite() extern "C" bool PropertyBuilder_get_CanWrite_m2381953607 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { { MethodBuilder_t644187984 * L_0 = __this->get_set_method_3(); return (bool)((((int32_t)((((Il2CppObject*)(MethodBuilder_t644187984 *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Type System.Reflection.Emit.PropertyBuilder::get_DeclaringType() extern "C" Type_t * PropertyBuilder_get_DeclaringType_m3664861407 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_typeb_5(); return L_0; } } // System.String System.Reflection.Emit.PropertyBuilder::get_Name() extern "C" String_t* PropertyBuilder_get_Name_m3823568914 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_1(); return L_0; } } // System.Type System.Reflection.Emit.PropertyBuilder::get_PropertyType() extern "C" Type_t * PropertyBuilder_get_PropertyType_m2865954421 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_type_2(); return L_0; } } // System.Type System.Reflection.Emit.PropertyBuilder::get_ReflectedType() extern "C" Type_t * PropertyBuilder_get_ReflectedType_m2158574648 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { { TypeBuilder_t3308873219 * L_0 = __this->get_typeb_5(); return L_0; } } // System.Reflection.MethodInfo[] System.Reflection.Emit.PropertyBuilder::GetAccessors(System.Boolean) extern "C" MethodInfoU5BU5D_t152480188* PropertyBuilder_GetAccessors_m1006850480 (PropertyBuilder_t3694255912 * __this, bool ___nonPublic0, const MethodInfo* method) { { return (MethodInfoU5BU5D_t152480188*)NULL; } } // System.Object[] System.Reflection.Emit.PropertyBuilder::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* PropertyBuilder_GetCustomAttributes_m1029078269 (PropertyBuilder_t3694255912 * __this, bool ___inherit0, const MethodInfo* method) { { Exception_t1927440687 * L_0 = PropertyBuilder_not_supported_m143748788(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object[] System.Reflection.Emit.PropertyBuilder::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* PropertyBuilder_GetCustomAttributes_m3351693494 (PropertyBuilder_t3694255912 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = PropertyBuilder_not_supported_m143748788(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.MethodInfo System.Reflection.Emit.PropertyBuilder::GetGetMethod(System.Boolean) extern "C" MethodInfo_t * PropertyBuilder_GetGetMethod_m4104689211 (PropertyBuilder_t3694255912 * __this, bool ___nonPublic0, const MethodInfo* method) { { MethodBuilder_t644187984 * L_0 = __this->get_get_method_4(); return L_0; } } // System.Reflection.ParameterInfo[] System.Reflection.Emit.PropertyBuilder::GetIndexParameters() extern "C" ParameterInfoU5BU5D_t2275869610* PropertyBuilder_GetIndexParameters_m530648889 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { { Exception_t1927440687 * L_0 = PropertyBuilder_not_supported_m143748788(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.MethodInfo System.Reflection.Emit.PropertyBuilder::GetSetMethod(System.Boolean) extern "C" MethodInfo_t * PropertyBuilder_GetSetMethod_m3440414495 (PropertyBuilder_t3694255912 * __this, bool ___nonPublic0, const MethodInfo* method) { { MethodBuilder_t644187984 * L_0 = __this->get_set_method_3(); return L_0; } } // System.Object System.Reflection.Emit.PropertyBuilder::GetValue(System.Object,System.Object[]) extern "C" Il2CppObject * PropertyBuilder_GetValue_m1368104137 (PropertyBuilder_t3694255912 * __this, Il2CppObject * ___obj0, ObjectU5BU5D_t3614634134* ___index1, const MethodInfo* method) { { return NULL; } } // System.Object System.Reflection.Emit.PropertyBuilder::GetValue(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" Il2CppObject * PropertyBuilder_GetValue_m2017114019 (PropertyBuilder_t3694255912 * __this, Il2CppObject * ___obj0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, ObjectU5BU5D_t3614634134* ___index3, CultureInfo_t3500843524 * ___culture4, const MethodInfo* method) { { Exception_t1927440687 * L_0 = PropertyBuilder_not_supported_m143748788(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.PropertyBuilder::IsDefined(System.Type,System.Boolean) extern "C" bool PropertyBuilder_IsDefined_m1809430892 (PropertyBuilder_t3694255912 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { Exception_t1927440687 * L_0 = PropertyBuilder_not_supported_m143748788(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Void System.Reflection.Emit.PropertyBuilder::SetValue(System.Object,System.Object,System.Object[]) extern "C" void PropertyBuilder_SetValue_m3999239872 (PropertyBuilder_t3694255912 * __this, Il2CppObject * ___obj0, Il2CppObject * ___value1, ObjectU5BU5D_t3614634134* ___index2, const MethodInfo* method) { { return; } } // System.Void System.Reflection.Emit.PropertyBuilder::SetValue(System.Object,System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" void PropertyBuilder_SetValue_m1174444320 (PropertyBuilder_t3694255912 * __this, Il2CppObject * ___obj0, Il2CppObject * ___value1, int32_t ___invokeAttr2, Binder_t3404612058 * ___binder3, ObjectU5BU5D_t3614634134* ___index4, CultureInfo_t3500843524 * ___culture5, const MethodInfo* method) { { return; } } // System.Reflection.Module System.Reflection.Emit.PropertyBuilder::get_Module() extern "C" Module_t4282841206 * PropertyBuilder_get_Module_m1618339927 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { { Module_t4282841206 * L_0 = MemberInfo_get_Module_m3957426656(__this, /*hidden argument*/NULL); return L_0; } } // System.Exception System.Reflection.Emit.PropertyBuilder::not_supported() extern "C" Exception_t1927440687 * PropertyBuilder_not_supported_m143748788 (PropertyBuilder_t3694255912 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (PropertyBuilder_not_supported_m143748788_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_0, _stringLiteral4087454587, /*hidden argument*/NULL); return L_0; } } // System.Reflection.TypeAttributes System.Reflection.Emit.TypeBuilder::GetAttributeFlagsImpl() extern "C" int32_t TypeBuilder_GetAttributeFlagsImpl_m2593449699 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_attrs_18(); return L_0; } } // System.Void System.Reflection.Emit.TypeBuilder::setup_internal_class(System.Reflection.Emit.TypeBuilder) extern "C" void TypeBuilder_setup_internal_class_m235812026 (TypeBuilder_t3308873219 * __this, TypeBuilder_t3308873219 * ___tb0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef void (*TypeBuilder_setup_internal_class_m235812026_ftn) (TypeBuilder_t3308873219 *, TypeBuilder_t3308873219 *); ((TypeBuilder_setup_internal_class_m235812026_ftn)mscorlib::System::Reflection::Emit::TypeBuilder::setup_internal_class) (__this, ___tb0); } // System.Void System.Reflection.Emit.TypeBuilder::create_generic_class() extern "C" void TypeBuilder_create_generic_class_m986834171 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef void (*TypeBuilder_create_generic_class_m986834171_ftn) (TypeBuilder_t3308873219 *); ((TypeBuilder_create_generic_class_m986834171_ftn)mscorlib::System::Reflection::Emit::TypeBuilder::create_generic_class) (__this); } // System.Reflection.Assembly System.Reflection.Emit.TypeBuilder::get_Assembly() extern "C" Assembly_t4268412390 * TypeBuilder_get_Assembly_m492491492 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { ModuleBuilder_t4156028127 * L_0 = __this->get_pmodule_19(); NullCheck(L_0); Assembly_t4268412390 * L_1 = Module_get_Assembly_m3690289982(L_0, /*hidden argument*/NULL); return L_1; } } // System.String System.Reflection.Emit.TypeBuilder::get_AssemblyQualifiedName() extern "C" String_t* TypeBuilder_get_AssemblyQualifiedName_m2097258567 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_get_AssemblyQualifiedName_m2097258567_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = __this->get_fullname_22(); Assembly_t4268412390 * L_1 = TypeBuilder_get_Assembly_m492491492(__this, /*hidden argument*/NULL); NullCheck(L_1); String_t* L_2 = VirtFuncInvoker0< String_t* >::Invoke(6 /* System.String System.Reflection.Assembly::get_FullName() */, L_1); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_3 = String_Concat_m612901809(NULL /*static, unused*/, L_0, _stringLiteral811305474, L_2, /*hidden argument*/NULL); return L_3; } } // System.Type System.Reflection.Emit.TypeBuilder::get_BaseType() extern "C" Type_t * TypeBuilder_get_BaseType_m4088672180 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_parent_10(); return L_0; } } // System.Type System.Reflection.Emit.TypeBuilder::get_DeclaringType() extern "C" Type_t * TypeBuilder_get_DeclaringType_m3236598700 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_nesting_type_11(); return L_0; } } // System.Type System.Reflection.Emit.TypeBuilder::get_UnderlyingSystemType() extern "C" Type_t * TypeBuilder_get_UnderlyingSystemType_m392404521 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_get_UnderlyingSystemType_m392404521_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0017; } } { Type_t * L_1 = __this->get_created_21(); NullCheck(L_1); Type_t * L_2 = VirtFuncInvoker0< Type_t * >::Invoke(36 /* System.Type System.Type::get_UnderlyingSystemType() */, L_1); return L_2; } IL_0017: { bool L_3 = Type_get_IsEnum_m313908919(__this, /*hidden argument*/NULL); if (!L_3) { goto IL_004a; } } { bool L_4 = TypeBuilder_get_IsCompilerContext_m3623403919(__this, /*hidden argument*/NULL); if (L_4) { goto IL_004a; } } { Type_t * L_5 = __this->get_underlying_type_24(); if (!L_5) { goto IL_003f; } } { Type_t * L_6 = __this->get_underlying_type_24(); return L_6; } IL_003f: { InvalidOperationException_t721527559 * L_7 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m2801133788(L_7, _stringLiteral700545517, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_7); } IL_004a: { return __this; } } // System.String System.Reflection.Emit.TypeBuilder::get_FullName() extern "C" String_t* TypeBuilder_get_FullName_m1626507516 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_fullname_22(); return L_0; } } // System.Reflection.Module System.Reflection.Emit.TypeBuilder::get_Module() extern "C" Module_t4282841206 * TypeBuilder_get_Module_m1668298460 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { ModuleBuilder_t4156028127 * L_0 = __this->get_pmodule_19(); return L_0; } } // System.String System.Reflection.Emit.TypeBuilder::get_Name() extern "C" String_t* TypeBuilder_get_Name_m170882803 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_tname_8(); return L_0; } } // System.String System.Reflection.Emit.TypeBuilder::get_Namespace() extern "C" String_t* TypeBuilder_get_Namespace_m3562783599 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_nspace_9(); return L_0; } } // System.Type System.Reflection.Emit.TypeBuilder::get_ReflectedType() extern "C" Type_t * TypeBuilder_get_ReflectedType_m2504081059 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_nesting_type_11(); return L_0; } } // System.Reflection.ConstructorInfo System.Reflection.Emit.TypeBuilder::GetConstructorImpl(System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" ConstructorInfo_t2851816542 * TypeBuilder_GetConstructorImpl_m4192168686 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, Binder_t3404612058 * ___binder1, int32_t ___callConvention2, TypeU5BU5D_t1664964607* ___types3, ParameterModifierU5BU5D_t963192633* ___modifiers4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetConstructorImpl_m4192168686_MetadataUsageId); s_Il2CppMethodInitialized = true; } ConstructorBuilder_t700974433 * V_0 = NULL; int32_t V_1 = 0; ConstructorBuilder_t700974433 * V_2 = NULL; ConstructorBuilderU5BU5D_t775814140* V_3 = NULL; int32_t V_4 = 0; MethodBaseU5BU5D_t2597254495* V_5 = NULL; ConstructorInfo_t2851816542 * V_6 = NULL; ConstructorBuilderU5BU5D_t775814140* V_7 = NULL; int32_t V_8 = 0; { TypeBuilder_check_created_m2929267877(__this, /*hidden argument*/NULL); Type_t * L_0 = __this->get_created_21(); IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_1 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); if ((!(((Il2CppObject*)(Type_t *)L_0) == ((Il2CppObject*)(Type_t *)L_1)))) { goto IL_0112; } } { ConstructorBuilderU5BU5D_t775814140* L_2 = __this->get_ctors_15(); if (L_2) { goto IL_0028; } } { return (ConstructorInfo_t2851816542 *)NULL; } IL_0028: { V_0 = (ConstructorBuilder_t700974433 *)NULL; V_1 = 0; ConstructorBuilderU5BU5D_t775814140* L_3 = __this->get_ctors_15(); V_3 = L_3; V_4 = 0; goto IL_0064; } IL_003b: { ConstructorBuilderU5BU5D_t775814140* L_4 = V_3; int32_t L_5 = V_4; NullCheck(L_4); int32_t L_6 = L_5; ConstructorBuilder_t700974433 * L_7 = (L_4)->GetAt(static_cast<il2cpp_array_size_t>(L_6)); V_2 = L_7; int32_t L_8 = ___callConvention2; if ((((int32_t)L_8) == ((int32_t)3))) { goto IL_0058; } } { ConstructorBuilder_t700974433 * L_9 = V_2; NullCheck(L_9); int32_t L_10 = ConstructorBuilder_get_CallingConvention_m443074051(L_9, /*hidden argument*/NULL); int32_t L_11 = ___callConvention2; if ((((int32_t)L_10) == ((int32_t)L_11))) { goto IL_0058; } } { goto IL_005e; } IL_0058: { ConstructorBuilder_t700974433 * L_12 = V_2; V_0 = L_12; int32_t L_13 = V_1; V_1 = ((int32_t)((int32_t)L_13+(int32_t)1)); } IL_005e: { int32_t L_14 = V_4; V_4 = ((int32_t)((int32_t)L_14+(int32_t)1)); } IL_0064: { int32_t L_15 = V_4; ConstructorBuilderU5BU5D_t775814140* L_16 = V_3; NullCheck(L_16); if ((((int32_t)L_15) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_16)->max_length))))))) { goto IL_003b; } } { int32_t L_17 = V_1; if (L_17) { goto IL_0076; } } { return (ConstructorInfo_t2851816542 *)NULL; } IL_0076: { TypeU5BU5D_t1664964607* L_18 = ___types3; if (L_18) { goto IL_008c; } } { int32_t L_19 = V_1; if ((((int32_t)L_19) <= ((int32_t)1))) { goto IL_008a; } } { AmbiguousMatchException_t1406414556 * L_20 = (AmbiguousMatchException_t1406414556 *)il2cpp_codegen_object_new(AmbiguousMatchException_t1406414556_il2cpp_TypeInfo_var); AmbiguousMatchException__ctor_m2088048346(L_20, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_20); } IL_008a: { ConstructorBuilder_t700974433 * L_21 = V_0; return L_21; } IL_008c: { int32_t L_22 = V_1; V_5 = ((MethodBaseU5BU5D_t2597254495*)SZArrayNew(MethodBaseU5BU5D_t2597254495_il2cpp_TypeInfo_var, (uint32_t)L_22)); int32_t L_23 = V_1; if ((!(((uint32_t)L_23) == ((uint32_t)1)))) { goto IL_00a5; } } { MethodBaseU5BU5D_t2597254495* L_24 = V_5; ConstructorBuilder_t700974433 * L_25 = V_0; NullCheck(L_24); ArrayElementTypeCheck (L_24, L_25); (L_24)->SetAt(static_cast<il2cpp_array_size_t>(0), (MethodBase_t904190842 *)L_25); goto IL_00f2; } IL_00a5: { V_1 = 0; ConstructorBuilderU5BU5D_t775814140* L_26 = __this->get_ctors_15(); V_7 = L_26; V_8 = 0; goto IL_00e7; } IL_00b7: { ConstructorBuilderU5BU5D_t775814140* L_27 = V_7; int32_t L_28 = V_8; NullCheck(L_27); int32_t L_29 = L_28; ConstructorBuilder_t700974433 * L_30 = (L_27)->GetAt(static_cast<il2cpp_array_size_t>(L_29)); V_6 = L_30; int32_t L_31 = ___callConvention2; if ((((int32_t)L_31) == ((int32_t)3))) { goto IL_00d7; } } { ConstructorInfo_t2851816542 * L_32 = V_6; NullCheck(L_32); int32_t L_33 = VirtFuncInvoker0< int32_t >::Invoke(20 /* System.Reflection.CallingConventions System.Reflection.MethodBase::get_CallingConvention() */, L_32); int32_t L_34 = ___callConvention2; if ((((int32_t)L_33) == ((int32_t)L_34))) { goto IL_00d7; } } { goto IL_00e1; } IL_00d7: { MethodBaseU5BU5D_t2597254495* L_35 = V_5; int32_t L_36 = V_1; int32_t L_37 = L_36; V_1 = ((int32_t)((int32_t)L_37+(int32_t)1)); ConstructorInfo_t2851816542 * L_38 = V_6; NullCheck(L_35); ArrayElementTypeCheck (L_35, L_38); (L_35)->SetAt(static_cast<il2cpp_array_size_t>(L_37), (MethodBase_t904190842 *)L_38); } IL_00e1: { int32_t L_39 = V_8; V_8 = ((int32_t)((int32_t)L_39+(int32_t)1)); } IL_00e7: { int32_t L_40 = V_8; ConstructorBuilderU5BU5D_t775814140* L_41 = V_7; NullCheck(L_41); if ((((int32_t)L_40) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_41)->max_length))))))) { goto IL_00b7; } } IL_00f2: { Binder_t3404612058 * L_42 = ___binder1; if (L_42) { goto IL_00ff; } } { IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); Binder_t3404612058 * L_43 = Binder_get_DefaultBinder_m965620943(NULL /*static, unused*/, /*hidden argument*/NULL); ___binder1 = L_43; } IL_00ff: { Binder_t3404612058 * L_44 = ___binder1; int32_t L_45 = ___bindingAttr0; MethodBaseU5BU5D_t2597254495* L_46 = V_5; TypeU5BU5D_t1664964607* L_47 = ___types3; ParameterModifierU5BU5D_t963192633* L_48 = ___modifiers4; NullCheck(L_44); MethodBase_t904190842 * L_49 = VirtFuncInvoker4< MethodBase_t904190842 *, int32_t, MethodBaseU5BU5D_t2597254495*, TypeU5BU5D_t1664964607*, ParameterModifierU5BU5D_t963192633* >::Invoke(7 /* System.Reflection.MethodBase System.Reflection.Binder::SelectMethod(System.Reflection.BindingFlags,System.Reflection.MethodBase[],System.Type[],System.Reflection.ParameterModifier[]) */, L_44, L_45, L_46, L_47, L_48); return ((ConstructorInfo_t2851816542 *)CastclassClass(L_49, ConstructorInfo_t2851816542_il2cpp_TypeInfo_var)); } IL_0112: { Type_t * L_50 = __this->get_created_21(); int32_t L_51 = ___bindingAttr0; Binder_t3404612058 * L_52 = ___binder1; int32_t L_53 = ___callConvention2; TypeU5BU5D_t1664964607* L_54 = ___types3; ParameterModifierU5BU5D_t963192633* L_55 = ___modifiers4; NullCheck(L_50); ConstructorInfo_t2851816542 * L_56 = Type_GetConstructor_m835344477(L_50, L_51, L_52, L_53, L_54, L_55, /*hidden argument*/NULL); return L_56; } } // System.Boolean System.Reflection.Emit.TypeBuilder::IsDefined(System.Type,System.Boolean) extern "C" bool TypeBuilder_IsDefined_m3186251655 (TypeBuilder_t3308873219 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_IsDefined_m3186251655_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (L_0) { goto IL_001c; } } { bool L_1 = TypeBuilder_get_IsCompilerContext_m3623403919(__this, /*hidden argument*/NULL); if (L_1) { goto IL_001c; } } { NotSupportedException_t1793819818 * L_2 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_2, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_2); } IL_001c: { Type_t * L_3 = ___attributeType0; bool L_4 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); bool L_5 = MonoCustomAttrs_IsDefined_m3820363041(NULL /*static, unused*/, __this, L_3, L_4, /*hidden argument*/NULL); return L_5; } } // System.Object[] System.Reflection.Emit.TypeBuilder::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* TypeBuilder_GetCustomAttributes_m1637538574 (TypeBuilder_t3308873219 * __this, bool ___inherit0, const MethodInfo* method) { { TypeBuilder_check_created_m2929267877(__this, /*hidden argument*/NULL); Type_t * L_0 = __this->get_created_21(); bool L_1 = ___inherit0; NullCheck(L_0); ObjectU5BU5D_t3614634134* L_2 = VirtFuncInvoker1< ObjectU5BU5D_t3614634134*, bool >::Invoke(12 /* System.Object[] System.Reflection.MemberInfo::GetCustomAttributes(System.Boolean) */, L_0, L_1); return L_2; } } // System.Object[] System.Reflection.Emit.TypeBuilder::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* TypeBuilder_GetCustomAttributes_m2702632361 (TypeBuilder_t3308873219 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { { TypeBuilder_check_created_m2929267877(__this, /*hidden argument*/NULL); Type_t * L_0 = __this->get_created_21(); Type_t * L_1 = ___attributeType0; bool L_2 = ___inherit1; NullCheck(L_0); ObjectU5BU5D_t3614634134* L_3 = VirtFuncInvoker2< ObjectU5BU5D_t3614634134*, Type_t *, bool >::Invoke(13 /* System.Object[] System.Reflection.MemberInfo::GetCustomAttributes(System.Type,System.Boolean) */, L_0, L_1, L_2); return L_3; } } // System.Reflection.Emit.ConstructorBuilder System.Reflection.Emit.TypeBuilder::DefineConstructor(System.Reflection.MethodAttributes,System.Reflection.CallingConventions,System.Type[]) extern "C" ConstructorBuilder_t700974433 * TypeBuilder_DefineConstructor_m3431248509 (TypeBuilder_t3308873219 * __this, int32_t ___attributes0, int32_t ___callingConvention1, TypeU5BU5D_t1664964607* ___parameterTypes2, const MethodInfo* method) { { int32_t L_0 = ___attributes0; int32_t L_1 = ___callingConvention1; TypeU5BU5D_t1664964607* L_2 = ___parameterTypes2; ConstructorBuilder_t700974433 * L_3 = TypeBuilder_DefineConstructor_m2972481149(__this, L_0, L_1, L_2, (TypeU5BU5DU5BU5D_t2318378278*)(TypeU5BU5DU5BU5D_t2318378278*)NULL, (TypeU5BU5DU5BU5D_t2318378278*)(TypeU5BU5DU5BU5D_t2318378278*)NULL, /*hidden argument*/NULL); return L_3; } } // System.Reflection.Emit.ConstructorBuilder System.Reflection.Emit.TypeBuilder::DefineConstructor(System.Reflection.MethodAttributes,System.Reflection.CallingConventions,System.Type[],System.Type[][],System.Type[][]) extern "C" ConstructorBuilder_t700974433 * TypeBuilder_DefineConstructor_m2972481149 (TypeBuilder_t3308873219 * __this, int32_t ___attributes0, int32_t ___callingConvention1, TypeU5BU5D_t1664964607* ___parameterTypes2, TypeU5BU5DU5BU5D_t2318378278* ___requiredCustomModifiers3, TypeU5BU5DU5BU5D_t2318378278* ___optionalCustomModifiers4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_DefineConstructor_m2972481149_MetadataUsageId); s_Il2CppMethodInitialized = true; } ConstructorBuilder_t700974433 * V_0 = NULL; ConstructorBuilderU5BU5D_t775814140* V_1 = NULL; { TypeBuilder_check_not_created_m2785532739(__this, /*hidden argument*/NULL); int32_t L_0 = ___attributes0; int32_t L_1 = ___callingConvention1; TypeU5BU5D_t1664964607* L_2 = ___parameterTypes2; TypeU5BU5DU5BU5D_t2318378278* L_3 = ___requiredCustomModifiers3; TypeU5BU5DU5BU5D_t2318378278* L_4 = ___optionalCustomModifiers4; ConstructorBuilder_t700974433 * L_5 = (ConstructorBuilder_t700974433 *)il2cpp_codegen_object_new(ConstructorBuilder_t700974433_il2cpp_TypeInfo_var); ConstructorBuilder__ctor_m2001998159(L_5, __this, L_0, L_1, L_2, L_3, L_4, /*hidden argument*/NULL); V_0 = L_5; ConstructorBuilderU5BU5D_t775814140* L_6 = __this->get_ctors_15(); if (!L_6) { goto IL_005a; } } { ConstructorBuilderU5BU5D_t775814140* L_7 = __this->get_ctors_15(); NullCheck(L_7); V_1 = ((ConstructorBuilderU5BU5D_t775814140*)SZArrayNew(ConstructorBuilderU5BU5D_t775814140_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_7)->max_length))))+(int32_t)1)))); ConstructorBuilderU5BU5D_t775814140* L_8 = __this->get_ctors_15(); ConstructorBuilderU5BU5D_t775814140* L_9 = V_1; ConstructorBuilderU5BU5D_t775814140* L_10 = __this->get_ctors_15(); NullCheck(L_10); Array_Copy_m2363740072(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_8, (Il2CppArray *)(Il2CppArray *)L_9, (((int32_t)((int32_t)(((Il2CppArray *)L_10)->max_length)))), /*hidden argument*/NULL); ConstructorBuilderU5BU5D_t775814140* L_11 = V_1; ConstructorBuilderU5BU5D_t775814140* L_12 = __this->get_ctors_15(); NullCheck(L_12); ConstructorBuilder_t700974433 * L_13 = V_0; NullCheck(L_11); ArrayElementTypeCheck (L_11, L_13); (L_11)->SetAt(static_cast<il2cpp_array_size_t>((((int32_t)((int32_t)(((Il2CppArray *)L_12)->max_length))))), (ConstructorBuilder_t700974433 *)L_13); ConstructorBuilderU5BU5D_t775814140* L_14 = V_1; __this->set_ctors_15(L_14); goto IL_006f; } IL_005a: { __this->set_ctors_15(((ConstructorBuilderU5BU5D_t775814140*)SZArrayNew(ConstructorBuilderU5BU5D_t775814140_il2cpp_TypeInfo_var, (uint32_t)1))); ConstructorBuilderU5BU5D_t775814140* L_15 = __this->get_ctors_15(); ConstructorBuilder_t700974433 * L_16 = V_0; NullCheck(L_15); ArrayElementTypeCheck (L_15, L_16); (L_15)->SetAt(static_cast<il2cpp_array_size_t>(0), (ConstructorBuilder_t700974433 *)L_16); } IL_006f: { ConstructorBuilder_t700974433 * L_17 = V_0; return L_17; } } // System.Reflection.Emit.ConstructorBuilder System.Reflection.Emit.TypeBuilder::DefineDefaultConstructor(System.Reflection.MethodAttributes) extern "C" ConstructorBuilder_t700974433 * TypeBuilder_DefineDefaultConstructor_m2225828699 (TypeBuilder_t3308873219 * __this, int32_t ___attributes0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_DefineDefaultConstructor_m2225828699_MetadataUsageId); s_Il2CppMethodInitialized = true; } Type_t * V_0 = NULL; ConstructorInfo_t2851816542 * V_1 = NULL; ConstructorBuilder_t700974433 * V_2 = NULL; ILGenerator_t99948092 * V_3 = NULL; { Type_t * L_0 = __this->get_parent_10(); if (!L_0) { goto IL_0017; } } { Type_t * L_1 = __this->get_parent_10(); V_0 = L_1; goto IL_0028; } IL_0017: { ModuleBuilder_t4156028127 * L_2 = __this->get_pmodule_19(); NullCheck(L_2); AssemblyBuilder_t1646117627 * L_3 = L_2->get_assemblyb_12(); NullCheck(L_3); Type_t * L_4 = L_3->get_corlib_object_type_12(); V_0 = L_4; } IL_0028: { Type_t * L_5 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_6 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); NullCheck(L_5); ConstructorInfo_t2851816542 * L_7 = Type_GetConstructor_m663514781(L_5, ((int32_t)52), (Binder_t3404612058 *)NULL, L_6, (ParameterModifierU5BU5D_t963192633*)(ParameterModifierU5BU5D_t963192633*)NULL, /*hidden argument*/NULL); V_1 = L_7; ConstructorInfo_t2851816542 * L_8 = V_1; if (L_8) { goto IL_0049; } } { NotSupportedException_t1793819818 * L_9 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_9, _stringLiteral2507326364, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_9); } IL_0049: { int32_t L_10 = ___attributes0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_11 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); ConstructorBuilder_t700974433 * L_12 = TypeBuilder_DefineConstructor_m3431248509(__this, L_10, 1, L_11, /*hidden argument*/NULL); V_2 = L_12; ConstructorBuilder_t700974433 * L_13 = V_2; NullCheck(L_13); ILGenerator_t99948092 * L_14 = ConstructorBuilder_GetILGenerator_m1407935730(L_13, /*hidden argument*/NULL); V_3 = L_14; ILGenerator_t99948092 * L_15 = V_3; IL2CPP_RUNTIME_CLASS_INIT(OpCodes_t3494785031_il2cpp_TypeInfo_var); OpCode_t2247480392 L_16 = ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->get_Ldarg_0_2(); NullCheck(L_15); VirtActionInvoker1< OpCode_t2247480392 >::Invoke(4 /* System.Void System.Reflection.Emit.ILGenerator::Emit(System.Reflection.Emit.OpCode) */, L_15, L_16); ILGenerator_t99948092 * L_17 = V_3; OpCode_t2247480392 L_18 = ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->get_Call_39(); ConstructorInfo_t2851816542 * L_19 = V_1; NullCheck(L_17); VirtActionInvoker2< OpCode_t2247480392 , ConstructorInfo_t2851816542 * >::Invoke(5 /* System.Void System.Reflection.Emit.ILGenerator::Emit(System.Reflection.Emit.OpCode,System.Reflection.ConstructorInfo) */, L_17, L_18, L_19); ILGenerator_t99948092 * L_20 = V_3; OpCode_t2247480392 L_21 = ((OpCodes_t3494785031_StaticFields*)OpCodes_t3494785031_il2cpp_TypeInfo_var->static_fields)->get_Ret_41(); NullCheck(L_20); VirtActionInvoker1< OpCode_t2247480392 >::Invoke(4 /* System.Void System.Reflection.Emit.ILGenerator::Emit(System.Reflection.Emit.OpCode) */, L_20, L_21); ConstructorBuilder_t700974433 * L_22 = V_2; return L_22; } } // System.Type System.Reflection.Emit.TypeBuilder::create_runtime_class(System.Reflection.Emit.TypeBuilder) extern "C" Type_t * TypeBuilder_create_runtime_class_m2719530260 (TypeBuilder_t3308873219 * __this, TypeBuilder_t3308873219 * ___tb0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef Type_t * (*TypeBuilder_create_runtime_class_m2719530260_ftn) (TypeBuilder_t3308873219 *, TypeBuilder_t3308873219 *); return ((TypeBuilder_create_runtime_class_m2719530260_ftn)mscorlib::System::Reflection::Emit::TypeBuilder::create_runtime_class) (__this, ___tb0); } // System.Boolean System.Reflection.Emit.TypeBuilder::is_nested_in(System.Type) extern "C" bool TypeBuilder_is_nested_in_m3557898035 (TypeBuilder_t3308873219 * __this, Type_t * ___t0, const MethodInfo* method) { { goto IL_0016; } IL_0005: { Type_t * L_0 = ___t0; if ((!(((Il2CppObject*)(Type_t *)L_0) == ((Il2CppObject*)(TypeBuilder_t3308873219 *)__this)))) { goto IL_000e; } } { return (bool)1; } IL_000e: { Type_t * L_1 = ___t0; NullCheck(L_1); Type_t * L_2 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Type::get_DeclaringType() */, L_1); ___t0 = L_2; } IL_0016: { Type_t * L_3 = ___t0; if (L_3) { goto IL_0005; } } { return (bool)0; } } // System.Boolean System.Reflection.Emit.TypeBuilder::has_ctor_method() extern "C" bool TypeBuilder_has_ctor_method_m3449702467 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_has_ctor_method_m3449702467_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; MethodBuilder_t644187984 * V_2 = NULL; { V_0 = ((int32_t)6144); V_1 = 0; goto IL_003f; } IL_000d: { MethodBuilderU5BU5D_t4238041457* L_0 = __this->get_methods_14(); int32_t L_1 = V_1; NullCheck(L_0); int32_t L_2 = L_1; MethodBuilder_t644187984 * L_3 = (L_0)->GetAt(static_cast<il2cpp_array_size_t>(L_2)); V_2 = L_3; MethodBuilder_t644187984 * L_4 = V_2; NullCheck(L_4); String_t* L_5 = MethodBuilder_get_Name_m845253610(L_4, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(ConstructorInfo_t2851816542_il2cpp_TypeInfo_var); String_t* L_6 = ((ConstructorInfo_t2851816542_StaticFields*)ConstructorInfo_t2851816542_il2cpp_TypeInfo_var->static_fields)->get_ConstructorName_0(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_7 = String_op_Equality_m1790663636(NULL /*static, unused*/, L_5, L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_003b; } } { MethodBuilder_t644187984 * L_8 = V_2; NullCheck(L_8); int32_t L_9 = MethodBuilder_get_Attributes_m3678061338(L_8, /*hidden argument*/NULL); int32_t L_10 = V_0; int32_t L_11 = V_0; if ((!(((uint32_t)((int32_t)((int32_t)L_9&(int32_t)L_10))) == ((uint32_t)L_11)))) { goto IL_003b; } } { return (bool)1; } IL_003b: { int32_t L_12 = V_1; V_1 = ((int32_t)((int32_t)L_12+(int32_t)1)); } IL_003f: { int32_t L_13 = V_1; int32_t L_14 = __this->get_num_methods_13(); if ((((int32_t)L_13) < ((int32_t)L_14))) { goto IL_000d; } } { return (bool)0; } } // System.Type System.Reflection.Emit.TypeBuilder::CreateType() extern "C" Type_t * TypeBuilder_CreateType_m4126056124 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_CreateType_m4126056124_MetadataUsageId); s_Il2CppMethodInitialized = true; } FieldBuilder_t2784804005 * V_0 = NULL; FieldBuilderU5BU5D_t867683112* V_1 = NULL; int32_t V_2 = 0; Type_t * V_3 = NULL; TypeBuilder_t3308873219 * V_4 = NULL; bool V_5 = false; int32_t V_6 = 0; MethodBuilder_t644187984 * V_7 = NULL; ConstructorBuilder_t700974433 * V_8 = NULL; ConstructorBuilderU5BU5D_t775814140* V_9 = NULL; int32_t V_10 = 0; { bool L_0 = __this->get_createTypeCalled_23(); if (!L_0) { goto IL_0012; } } { Type_t * L_1 = __this->get_created_21(); return L_1; } IL_0012: { bool L_2 = Type_get_IsInterface_m3583817465(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0069; } } { Type_t * L_3 = __this->get_parent_10(); if (L_3) { goto IL_0069; } } { ModuleBuilder_t4156028127 * L_4 = __this->get_pmodule_19(); NullCheck(L_4); AssemblyBuilder_t1646117627 * L_5 = L_4->get_assemblyb_12(); NullCheck(L_5); Type_t * L_6 = L_5->get_corlib_object_type_12(); if ((((Il2CppObject*)(TypeBuilder_t3308873219 *)__this) == ((Il2CppObject*)(Type_t *)L_6))) { goto IL_0069; } } { String_t* L_7 = TypeBuilder_get_FullName_m1626507516(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_8 = String_op_Inequality_m304203149(NULL /*static, unused*/, L_7, _stringLiteral216645436, /*hidden argument*/NULL); if (!L_8) { goto IL_0069; } } { ModuleBuilder_t4156028127 * L_9 = __this->get_pmodule_19(); NullCheck(L_9); AssemblyBuilder_t1646117627 * L_10 = L_9->get_assemblyb_12(); NullCheck(L_10); Type_t * L_11 = L_10->get_corlib_object_type_12(); TypeBuilder_SetParent_m387557893(__this, L_11, /*hidden argument*/NULL); } IL_0069: { TypeBuilder_create_generic_class_m986834171(__this, /*hidden argument*/NULL); FieldBuilderU5BU5D_t867683112* L_12 = __this->get_fields_17(); if (!L_12) { goto IL_010c; } } { FieldBuilderU5BU5D_t867683112* L_13 = __this->get_fields_17(); V_1 = L_13; V_2 = 0; goto IL_0103; } IL_0088: { FieldBuilderU5BU5D_t867683112* L_14 = V_1; int32_t L_15 = V_2; NullCheck(L_14); int32_t L_16 = L_15; FieldBuilder_t2784804005 * L_17 = (L_14)->GetAt(static_cast<il2cpp_array_size_t>(L_16)); V_0 = L_17; FieldBuilder_t2784804005 * L_18 = V_0; if (L_18) { goto IL_0097; } } { goto IL_00ff; } IL_0097: { FieldBuilder_t2784804005 * L_19 = V_0; NullCheck(L_19); Type_t * L_20 = FieldBuilder_get_FieldType_m2267463269(L_19, /*hidden argument*/NULL); V_3 = L_20; FieldBuilder_t2784804005 * L_21 = V_0; NullCheck(L_21); bool L_22 = FieldInfo_get_IsStatic_m1411173225(L_21, /*hidden argument*/NULL); if (L_22) { goto IL_00ff; } } { Type_t * L_23 = V_3; if (!((TypeBuilder_t3308873219 *)IsInstSealed(L_23, TypeBuilder_t3308873219_il2cpp_TypeInfo_var))) { goto IL_00ff; } } { Type_t * L_24 = V_3; NullCheck(L_24); bool L_25 = Type_get_IsValueType_m1733572463(L_24, /*hidden argument*/NULL); if (!L_25) { goto IL_00ff; } } { Type_t * L_26 = V_3; if ((((Il2CppObject*)(Type_t *)L_26) == ((Il2CppObject*)(TypeBuilder_t3308873219 *)__this))) { goto IL_00ff; } } { Type_t * L_27 = V_3; bool L_28 = TypeBuilder_is_nested_in_m3557898035(__this, L_27, /*hidden argument*/NULL); if (!L_28) { goto IL_00ff; } } { Type_t * L_29 = V_3; V_4 = ((TypeBuilder_t3308873219 *)CastclassSealed(L_29, TypeBuilder_t3308873219_il2cpp_TypeInfo_var)); TypeBuilder_t3308873219 * L_30 = V_4; NullCheck(L_30); bool L_31 = TypeBuilder_get_is_created_m736553860(L_30, /*hidden argument*/NULL); if (L_31) { goto IL_00ff; } } { AppDomain_t2719102437 * L_32 = AppDomain_get_CurrentDomain_m3432767403(NULL /*static, unused*/, /*hidden argument*/NULL); TypeBuilder_t3308873219 * L_33 = V_4; NullCheck(L_32); AppDomain_DoTypeResolve_m381738210(L_32, L_33, /*hidden argument*/NULL); TypeBuilder_t3308873219 * L_34 = V_4; NullCheck(L_34); bool L_35 = TypeBuilder_get_is_created_m736553860(L_34, /*hidden argument*/NULL); if (L_35) { goto IL_00ff; } } IL_00ff: { int32_t L_36 = V_2; V_2 = ((int32_t)((int32_t)L_36+(int32_t)1)); } IL_0103: { int32_t L_37 = V_2; FieldBuilderU5BU5D_t867683112* L_38 = V_1; NullCheck(L_38); if ((((int32_t)L_37) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_38)->max_length))))))) { goto IL_0088; } } IL_010c: { Type_t * L_39 = __this->get_parent_10(); if (!L_39) { goto IL_0162; } } { Type_t * L_40 = __this->get_parent_10(); NullCheck(L_40); bool L_41 = Type_get_IsSealed_m2380985836(L_40, /*hidden argument*/NULL); if (!L_41) { goto IL_0162; } } { ObjectU5BU5D_t3614634134* L_42 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)5)); NullCheck(L_42); ArrayElementTypeCheck (L_42, _stringLiteral2411675321); (L_42)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral2411675321); ObjectU5BU5D_t3614634134* L_43 = L_42; String_t* L_44 = TypeBuilder_get_FullName_m1626507516(__this, /*hidden argument*/NULL); NullCheck(L_43); ArrayElementTypeCheck (L_43, L_44); (L_43)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_44); ObjectU5BU5D_t3614634134* L_45 = L_43; NullCheck(L_45); ArrayElementTypeCheck (L_45, _stringLiteral2625238862); (L_45)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2625238862); ObjectU5BU5D_t3614634134* L_46 = L_45; Assembly_t4268412390 * L_47 = TypeBuilder_get_Assembly_m492491492(__this, /*hidden argument*/NULL); NullCheck(L_46); ArrayElementTypeCheck (L_46, L_47); (L_46)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_47); ObjectU5BU5D_t3614634134* L_48 = L_46; NullCheck(L_48); ArrayElementTypeCheck (L_48, _stringLiteral2961462794); (L_48)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral2961462794); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_49 = String_Concat_m3881798623(NULL /*static, unused*/, L_48, /*hidden argument*/NULL); TypeLoadException_t723359155 * L_50 = (TypeLoadException_t723359155 *)il2cpp_codegen_object_new(TypeLoadException_t723359155_il2cpp_TypeInfo_var); TypeLoadException__ctor_m1903359728(L_50, L_49, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_50); } IL_0162: { Type_t * L_51 = __this->get_parent_10(); ModuleBuilder_t4156028127 * L_52 = __this->get_pmodule_19(); NullCheck(L_52); AssemblyBuilder_t1646117627 * L_53 = L_52->get_assemblyb_12(); NullCheck(L_53); Type_t * L_54 = L_53->get_corlib_enum_type_14(); if ((!(((Il2CppObject*)(Type_t *)L_51) == ((Il2CppObject*)(Type_t *)L_54)))) { goto IL_01c3; } } { MethodBuilderU5BU5D_t4238041457* L_55 = __this->get_methods_14(); if (!L_55) { goto IL_01c3; } } { ObjectU5BU5D_t3614634134* L_56 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)5)); NullCheck(L_56); ArrayElementTypeCheck (L_56, _stringLiteral2411675321); (L_56)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral2411675321); ObjectU5BU5D_t3614634134* L_57 = L_56; String_t* L_58 = TypeBuilder_get_FullName_m1626507516(__this, /*hidden argument*/NULL); NullCheck(L_57); ArrayElementTypeCheck (L_57, L_58); (L_57)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_58); ObjectU5BU5D_t3614634134* L_59 = L_57; NullCheck(L_59); ArrayElementTypeCheck (L_59, _stringLiteral2625238862); (L_59)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2625238862); ObjectU5BU5D_t3614634134* L_60 = L_59; Assembly_t4268412390 * L_61 = TypeBuilder_get_Assembly_m492491492(__this, /*hidden argument*/NULL); NullCheck(L_60); ArrayElementTypeCheck (L_60, L_61); (L_60)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_61); ObjectU5BU5D_t3614634134* L_62 = L_60; NullCheck(L_62); ArrayElementTypeCheck (L_62, _stringLiteral159398136); (L_62)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral159398136); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_63 = String_Concat_m3881798623(NULL /*static, unused*/, L_62, /*hidden argument*/NULL); TypeLoadException_t723359155 * L_64 = (TypeLoadException_t723359155 *)il2cpp_codegen_object_new(TypeLoadException_t723359155_il2cpp_TypeInfo_var); TypeLoadException__ctor_m1903359728(L_64, L_63, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_64); } IL_01c3: { MethodBuilderU5BU5D_t4238041457* L_65 = __this->get_methods_14(); if (!L_65) { goto IL_0232; } } { bool L_66 = Type_get_IsAbstract_m2532060002(__this, /*hidden argument*/NULL); V_5 = (bool)((((int32_t)L_66) == ((int32_t)0))? 1 : 0); V_6 = 0; goto IL_0225; } IL_01e1: { MethodBuilderU5BU5D_t4238041457* L_67 = __this->get_methods_14(); int32_t L_68 = V_6; NullCheck(L_67); int32_t L_69 = L_68; MethodBuilder_t644187984 * L_70 = (L_67)->GetAt(static_cast<il2cpp_array_size_t>(L_69)); V_7 = L_70; bool L_71 = V_5; if (!L_71) { goto IL_0211; } } { MethodBuilder_t644187984 * L_72 = V_7; NullCheck(L_72); bool L_73 = MethodBase_get_IsAbstract_m3521819231(L_72, /*hidden argument*/NULL); if (!L_73) { goto IL_0211; } } { MethodBuilder_t644187984 * L_74 = V_7; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_75 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral959906687, L_74, /*hidden argument*/NULL); InvalidOperationException_t721527559 * L_76 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m2801133788(L_76, L_75, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_76); } IL_0211: { MethodBuilder_t644187984 * L_77 = V_7; NullCheck(L_77); MethodBuilder_check_override_m3042345804(L_77, /*hidden argument*/NULL); MethodBuilder_t644187984 * L_78 = V_7; NullCheck(L_78); MethodBuilder_fixup_m4217981161(L_78, /*hidden argument*/NULL); int32_t L_79 = V_6; V_6 = ((int32_t)((int32_t)L_79+(int32_t)1)); } IL_0225: { int32_t L_80 = V_6; int32_t L_81 = __this->get_num_methods_13(); if ((((int32_t)L_80) < ((int32_t)L_81))) { goto IL_01e1; } } IL_0232: { bool L_82 = Type_get_IsInterface_m3583817465(__this, /*hidden argument*/NULL); if (L_82) { goto IL_0297; } } { bool L_83 = Type_get_IsValueType_m1733572463(__this, /*hidden argument*/NULL); if (L_83) { goto IL_0297; } } { ConstructorBuilderU5BU5D_t775814140* L_84 = __this->get_ctors_15(); if (L_84) { goto IL_0297; } } { String_t* L_85 = __this->get_tname_8(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_86 = String_op_Inequality_m304203149(NULL /*static, unused*/, L_85, _stringLiteral216645436, /*hidden argument*/NULL); if (!L_86) { goto IL_0297; } } { int32_t L_87 = TypeBuilder_GetAttributeFlagsImpl_m2593449699(__this, /*hidden argument*/NULL); if ((((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_87&(int32_t)((int32_t)128)))|(int32_t)((int32_t)256)))) == ((int32_t)((int32_t)384)))) { goto IL_0297; } } { bool L_88 = TypeBuilder_has_ctor_method_m3449702467(__this, /*hidden argument*/NULL); if (L_88) { goto IL_0297; } } { TypeBuilder_DefineDefaultConstructor_m2225828699(__this, 6, /*hidden argument*/NULL); } IL_0297: { ConstructorBuilderU5BU5D_t775814140* L_89 = __this->get_ctors_15(); if (!L_89) { goto IL_02d1; } } { ConstructorBuilderU5BU5D_t775814140* L_90 = __this->get_ctors_15(); V_9 = L_90; V_10 = 0; goto IL_02c6; } IL_02b2: { ConstructorBuilderU5BU5D_t775814140* L_91 = V_9; int32_t L_92 = V_10; NullCheck(L_91); int32_t L_93 = L_92; ConstructorBuilder_t700974433 * L_94 = (L_91)->GetAt(static_cast<il2cpp_array_size_t>(L_93)); V_8 = L_94; ConstructorBuilder_t700974433 * L_95 = V_8; NullCheck(L_95); ConstructorBuilder_fixup_m836985654(L_95, /*hidden argument*/NULL); int32_t L_96 = V_10; V_10 = ((int32_t)((int32_t)L_96+(int32_t)1)); } IL_02c6: { int32_t L_97 = V_10; ConstructorBuilderU5BU5D_t775814140* L_98 = V_9; NullCheck(L_98); if ((((int32_t)L_97) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_98)->max_length))))))) { goto IL_02b2; } } IL_02d1: { __this->set_createTypeCalled_23((bool)1); Type_t * L_99 = TypeBuilder_create_runtime_class_m2719530260(__this, __this, /*hidden argument*/NULL); __this->set_created_21(L_99); Type_t * L_100 = __this->get_created_21(); if (!L_100) { goto IL_02f7; } } { Type_t * L_101 = __this->get_created_21(); return L_101; } IL_02f7: { return __this; } } // System.Reflection.ConstructorInfo[] System.Reflection.Emit.TypeBuilder::GetConstructors(System.Reflection.BindingFlags) extern "C" ConstructorInfoU5BU5D_t1996683371* TypeBuilder_GetConstructors_m774120094 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetConstructors_m774120094_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0018; } } { Type_t * L_1 = __this->get_created_21(); int32_t L_2 = ___bindingAttr0; NullCheck(L_1); ConstructorInfoU5BU5D_t1996683371* L_3 = VirtFuncInvoker1< ConstructorInfoU5BU5D_t1996683371*, int32_t >::Invoke(77 /* System.Reflection.ConstructorInfo[] System.Type::GetConstructors(System.Reflection.BindingFlags) */, L_1, L_2); return L_3; } IL_0018: { bool L_4 = TypeBuilder_get_IsCompilerContext_m3623403919(__this, /*hidden argument*/NULL); if (L_4) { goto IL_0029; } } { NotSupportedException_t1793819818 * L_5 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_5, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_5); } IL_0029: { int32_t L_6 = ___bindingAttr0; ConstructorInfoU5BU5D_t1996683371* L_7 = TypeBuilder_GetConstructorsInternal_m2426192231(__this, L_6, /*hidden argument*/NULL); return L_7; } } // System.Reflection.ConstructorInfo[] System.Reflection.Emit.TypeBuilder::GetConstructorsInternal(System.Reflection.BindingFlags) extern "C" ConstructorInfoU5BU5D_t1996683371* TypeBuilder_GetConstructorsInternal_m2426192231 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetConstructorsInternal_m2426192231_MetadataUsageId); s_Il2CppMethodInitialized = true; } ArrayList_t4252133567 * V_0 = NULL; bool V_1 = false; int32_t V_2 = 0; ConstructorBuilder_t700974433 * V_3 = NULL; ConstructorBuilderU5BU5D_t775814140* V_4 = NULL; int32_t V_5 = 0; ConstructorInfoU5BU5D_t1996683371* V_6 = NULL; { ConstructorBuilderU5BU5D_t775814140* L_0 = __this->get_ctors_15(); if (L_0) { goto IL_0012; } } { return ((ConstructorInfoU5BU5D_t1996683371*)SZArrayNew(ConstructorInfoU5BU5D_t1996683371_il2cpp_TypeInfo_var, (uint32_t)0)); } IL_0012: { ArrayList_t4252133567 * L_1 = (ArrayList_t4252133567 *)il2cpp_codegen_object_new(ArrayList_t4252133567_il2cpp_TypeInfo_var); ArrayList__ctor_m4012174379(L_1, /*hidden argument*/NULL); V_0 = L_1; ConstructorBuilderU5BU5D_t775814140* L_2 = __this->get_ctors_15(); V_4 = L_2; V_5 = 0; goto IL_00a3; } IL_0028: { ConstructorBuilderU5BU5D_t775814140* L_3 = V_4; int32_t L_4 = V_5; NullCheck(L_3); int32_t L_5 = L_4; ConstructorBuilder_t700974433 * L_6 = (L_3)->GetAt(static_cast<il2cpp_array_size_t>(L_5)); V_3 = L_6; V_1 = (bool)0; ConstructorBuilder_t700974433 * L_7 = V_3; NullCheck(L_7); int32_t L_8 = ConstructorBuilder_get_Attributes_m2137353707(L_7, /*hidden argument*/NULL); V_2 = L_8; int32_t L_9 = V_2; if ((!(((uint32_t)((int32_t)((int32_t)L_9&(int32_t)7))) == ((uint32_t)6)))) { goto IL_0050; } } { int32_t L_10 = ___bindingAttr0; if (!((int32_t)((int32_t)L_10&(int32_t)((int32_t)16)))) { goto IL_004b; } } { V_1 = (bool)1; } IL_004b: { goto IL_005b; } IL_0050: { int32_t L_11 = ___bindingAttr0; if (!((int32_t)((int32_t)L_11&(int32_t)((int32_t)32)))) { goto IL_005b; } } { V_1 = (bool)1; } IL_005b: { bool L_12 = V_1; if (L_12) { goto IL_0066; } } { goto IL_009d; } IL_0066: { V_1 = (bool)0; int32_t L_13 = V_2; if (!((int32_t)((int32_t)L_13&(int32_t)((int32_t)16)))) { goto IL_0080; } } { int32_t L_14 = ___bindingAttr0; if (!((int32_t)((int32_t)L_14&(int32_t)8))) { goto IL_007b; } } { V_1 = (bool)1; } IL_007b: { goto IL_008a; } IL_0080: { int32_t L_15 = ___bindingAttr0; if (!((int32_t)((int32_t)L_15&(int32_t)4))) { goto IL_008a; } } { V_1 = (bool)1; } IL_008a: { bool L_16 = V_1; if (L_16) { goto IL_0095; } } { goto IL_009d; } IL_0095: { ArrayList_t4252133567 * L_17 = V_0; ConstructorBuilder_t700974433 * L_18 = V_3; NullCheck(L_17); VirtFuncInvoker1< int32_t, Il2CppObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_17, L_18); } IL_009d: { int32_t L_19 = V_5; V_5 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_00a3: { int32_t L_20 = V_5; ConstructorBuilderU5BU5D_t775814140* L_21 = V_4; NullCheck(L_21); if ((((int32_t)L_20) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_21)->max_length))))))) { goto IL_0028; } } { ArrayList_t4252133567 * L_22 = V_0; NullCheck(L_22); int32_t L_23 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_22); V_6 = ((ConstructorInfoU5BU5D_t1996683371*)SZArrayNew(ConstructorInfoU5BU5D_t1996683371_il2cpp_TypeInfo_var, (uint32_t)L_23)); ArrayList_t4252133567 * L_24 = V_0; ConstructorInfoU5BU5D_t1996683371* L_25 = V_6; NullCheck(L_24); VirtActionInvoker1< Il2CppArray * >::Invoke(40 /* System.Void System.Collections.ArrayList::CopyTo(System.Array) */, L_24, (Il2CppArray *)(Il2CppArray *)L_25); ConstructorInfoU5BU5D_t1996683371* L_26 = V_6; return L_26; } } // System.Type System.Reflection.Emit.TypeBuilder::GetElementType() extern "C" Type_t * TypeBuilder_GetElementType_m3707448372 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetElementType_m3707448372_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.EventInfo System.Reflection.Emit.TypeBuilder::GetEvent(System.String,System.Reflection.BindingFlags) extern "C" EventInfo_t * TypeBuilder_GetEvent_m3876348075 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) { { TypeBuilder_check_created_m2929267877(__this, /*hidden argument*/NULL); Type_t * L_0 = __this->get_created_21(); String_t* L_1 = ___name0; int32_t L_2 = ___bindingAttr1; NullCheck(L_0); EventInfo_t * L_3 = VirtFuncInvoker2< EventInfo_t *, String_t*, int32_t >::Invoke(46 /* System.Reflection.EventInfo System.Type::GetEvent(System.String,System.Reflection.BindingFlags) */, L_0, L_1, L_2); return L_3; } } // System.Reflection.FieldInfo System.Reflection.Emit.TypeBuilder::GetField(System.String,System.Reflection.BindingFlags) extern "C" FieldInfo_t * TypeBuilder_GetField_m2112455315 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___bindingAttr1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetField_m2112455315_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t V_1 = 0; FieldInfo_t * V_2 = NULL; FieldBuilderU5BU5D_t867683112* V_3 = NULL; int32_t V_4 = 0; { Type_t * L_0 = __this->get_created_21(); if (!L_0) { goto IL_0019; } } { Type_t * L_1 = __this->get_created_21(); String_t* L_2 = ___name0; int32_t L_3 = ___bindingAttr1; NullCheck(L_1); FieldInfo_t * L_4 = VirtFuncInvoker2< FieldInfo_t *, String_t*, int32_t >::Invoke(47 /* System.Reflection.FieldInfo System.Type::GetField(System.String,System.Reflection.BindingFlags) */, L_1, L_2, L_3); return L_4; } IL_0019: { FieldBuilderU5BU5D_t867683112* L_5 = __this->get_fields_17(); if (L_5) { goto IL_0026; } } { return (FieldInfo_t *)NULL; } IL_0026: { FieldBuilderU5BU5D_t867683112* L_6 = __this->get_fields_17(); V_3 = L_6; V_4 = 0; goto IL_00ca; } IL_0035: { FieldBuilderU5BU5D_t867683112* L_7 = V_3; int32_t L_8 = V_4; NullCheck(L_7); int32_t L_9 = L_8; FieldBuilder_t2784804005 * L_10 = (L_7)->GetAt(static_cast<il2cpp_array_size_t>(L_9)); V_2 = L_10; FieldInfo_t * L_11 = V_2; if (L_11) { goto IL_0045; } } { goto IL_00c4; } IL_0045: { FieldInfo_t * L_12 = V_2; NullCheck(L_12); String_t* L_13 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_12); String_t* L_14 = ___name0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_15 = String_op_Inequality_m304203149(NULL /*static, unused*/, L_13, L_14, /*hidden argument*/NULL); if (!L_15) { goto IL_005b; } } { goto IL_00c4; } IL_005b: { V_0 = (bool)0; FieldInfo_t * L_16 = V_2; NullCheck(L_16); int32_t L_17 = VirtFuncInvoker0< int32_t >::Invoke(14 /* System.Reflection.FieldAttributes System.Reflection.FieldInfo::get_Attributes() */, L_16); V_1 = L_17; int32_t L_18 = V_1; if ((!(((uint32_t)((int32_t)((int32_t)L_18&(int32_t)7))) == ((uint32_t)6)))) { goto IL_007d; } } { int32_t L_19 = ___bindingAttr1; if (!((int32_t)((int32_t)L_19&(int32_t)((int32_t)16)))) { goto IL_0078; } } { V_0 = (bool)1; } IL_0078: { goto IL_0088; } IL_007d: { int32_t L_20 = ___bindingAttr1; if (!((int32_t)((int32_t)L_20&(int32_t)((int32_t)32)))) { goto IL_0088; } } { V_0 = (bool)1; } IL_0088: { bool L_21 = V_0; if (L_21) { goto IL_0093; } } { goto IL_00c4; } IL_0093: { V_0 = (bool)0; int32_t L_22 = V_1; if (!((int32_t)((int32_t)L_22&(int32_t)((int32_t)16)))) { goto IL_00ad; } } { int32_t L_23 = ___bindingAttr1; if (!((int32_t)((int32_t)L_23&(int32_t)8))) { goto IL_00a8; } } { V_0 = (bool)1; } IL_00a8: { goto IL_00b7; } IL_00ad: { int32_t L_24 = ___bindingAttr1; if (!((int32_t)((int32_t)L_24&(int32_t)4))) { goto IL_00b7; } } { V_0 = (bool)1; } IL_00b7: { bool L_25 = V_0; if (L_25) { goto IL_00c2; } } { goto IL_00c4; } IL_00c2: { FieldInfo_t * L_26 = V_2; return L_26; } IL_00c4: { int32_t L_27 = V_4; V_4 = ((int32_t)((int32_t)L_27+(int32_t)1)); } IL_00ca: { int32_t L_28 = V_4; FieldBuilderU5BU5D_t867683112* L_29 = V_3; NullCheck(L_29); if ((((int32_t)L_28) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_29)->max_length))))))) { goto IL_0035; } } { return (FieldInfo_t *)NULL; } } // System.Reflection.FieldInfo[] System.Reflection.Emit.TypeBuilder::GetFields(System.Reflection.BindingFlags) extern "C" FieldInfoU5BU5D_t125053523* TypeBuilder_GetFields_m3875401338 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetFields_m3875401338_MetadataUsageId); s_Il2CppMethodInitialized = true; } ArrayList_t4252133567 * V_0 = NULL; bool V_1 = false; int32_t V_2 = 0; FieldInfo_t * V_3 = NULL; FieldBuilderU5BU5D_t867683112* V_4 = NULL; int32_t V_5 = 0; FieldInfoU5BU5D_t125053523* V_6 = NULL; { Type_t * L_0 = __this->get_created_21(); if (!L_0) { goto IL_0018; } } { Type_t * L_1 = __this->get_created_21(); int32_t L_2 = ___bindingAttr0; NullCheck(L_1); FieldInfoU5BU5D_t125053523* L_3 = VirtFuncInvoker1< FieldInfoU5BU5D_t125053523*, int32_t >::Invoke(49 /* System.Reflection.FieldInfo[] System.Type::GetFields(System.Reflection.BindingFlags) */, L_1, L_2); return L_3; } IL_0018: { FieldBuilderU5BU5D_t867683112* L_4 = __this->get_fields_17(); if (L_4) { goto IL_002a; } } { return ((FieldInfoU5BU5D_t125053523*)SZArrayNew(FieldInfoU5BU5D_t125053523_il2cpp_TypeInfo_var, (uint32_t)0)); } IL_002a: { ArrayList_t4252133567 * L_5 = (ArrayList_t4252133567 *)il2cpp_codegen_object_new(ArrayList_t4252133567_il2cpp_TypeInfo_var); ArrayList__ctor_m4012174379(L_5, /*hidden argument*/NULL); V_0 = L_5; FieldBuilderU5BU5D_t867683112* L_6 = __this->get_fields_17(); V_4 = L_6; V_5 = 0; goto IL_00c6; } IL_0040: { FieldBuilderU5BU5D_t867683112* L_7 = V_4; int32_t L_8 = V_5; NullCheck(L_7); int32_t L_9 = L_8; FieldBuilder_t2784804005 * L_10 = (L_7)->GetAt(static_cast<il2cpp_array_size_t>(L_9)); V_3 = L_10; FieldInfo_t * L_11 = V_3; if (L_11) { goto IL_0051; } } { goto IL_00c0; } IL_0051: { V_1 = (bool)0; FieldInfo_t * L_12 = V_3; NullCheck(L_12); int32_t L_13 = VirtFuncInvoker0< int32_t >::Invoke(14 /* System.Reflection.FieldAttributes System.Reflection.FieldInfo::get_Attributes() */, L_12); V_2 = L_13; int32_t L_14 = V_2; if ((!(((uint32_t)((int32_t)((int32_t)L_14&(int32_t)7))) == ((uint32_t)6)))) { goto IL_0073; } } { int32_t L_15 = ___bindingAttr0; if (!((int32_t)((int32_t)L_15&(int32_t)((int32_t)16)))) { goto IL_006e; } } { V_1 = (bool)1; } IL_006e: { goto IL_007e; } IL_0073: { int32_t L_16 = ___bindingAttr0; if (!((int32_t)((int32_t)L_16&(int32_t)((int32_t)32)))) { goto IL_007e; } } { V_1 = (bool)1; } IL_007e: { bool L_17 = V_1; if (L_17) { goto IL_0089; } } { goto IL_00c0; } IL_0089: { V_1 = (bool)0; int32_t L_18 = V_2; if (!((int32_t)((int32_t)L_18&(int32_t)((int32_t)16)))) { goto IL_00a3; } } { int32_t L_19 = ___bindingAttr0; if (!((int32_t)((int32_t)L_19&(int32_t)8))) { goto IL_009e; } } { V_1 = (bool)1; } IL_009e: { goto IL_00ad; } IL_00a3: { int32_t L_20 = ___bindingAttr0; if (!((int32_t)((int32_t)L_20&(int32_t)4))) { goto IL_00ad; } } { V_1 = (bool)1; } IL_00ad: { bool L_21 = V_1; if (L_21) { goto IL_00b8; } } { goto IL_00c0; } IL_00b8: { ArrayList_t4252133567 * L_22 = V_0; FieldInfo_t * L_23 = V_3; NullCheck(L_22); VirtFuncInvoker1< int32_t, Il2CppObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_22, L_23); } IL_00c0: { int32_t L_24 = V_5; V_5 = ((int32_t)((int32_t)L_24+(int32_t)1)); } IL_00c6: { int32_t L_25 = V_5; FieldBuilderU5BU5D_t867683112* L_26 = V_4; NullCheck(L_26); if ((((int32_t)L_25) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_26)->max_length))))))) { goto IL_0040; } } { ArrayList_t4252133567 * L_27 = V_0; NullCheck(L_27); int32_t L_28 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_27); V_6 = ((FieldInfoU5BU5D_t125053523*)SZArrayNew(FieldInfoU5BU5D_t125053523_il2cpp_TypeInfo_var, (uint32_t)L_28)); ArrayList_t4252133567 * L_29 = V_0; FieldInfoU5BU5D_t125053523* L_30 = V_6; NullCheck(L_29); VirtActionInvoker1< Il2CppArray * >::Invoke(40 /* System.Void System.Collections.ArrayList::CopyTo(System.Array) */, L_29, (Il2CppArray *)(Il2CppArray *)L_30); FieldInfoU5BU5D_t125053523* L_31 = V_6; return L_31; } } // System.Type System.Reflection.Emit.TypeBuilder::GetInterface(System.String,System.Boolean) extern "C" Type_t * TypeBuilder_GetInterface_m1082564294 (TypeBuilder_t3308873219 * __this, String_t* ___name0, bool ___ignoreCase1, const MethodInfo* method) { { TypeBuilder_check_created_m2929267877(__this, /*hidden argument*/NULL); Type_t * L_0 = __this->get_created_21(); String_t* L_1 = ___name0; bool L_2 = ___ignoreCase1; NullCheck(L_0); Type_t * L_3 = VirtFuncInvoker2< Type_t *, String_t*, bool >::Invoke(40 /* System.Type System.Type::GetInterface(System.String,System.Boolean) */, L_0, L_1, L_2); return L_3; } } // System.Type[] System.Reflection.Emit.TypeBuilder::GetInterfaces() extern "C" TypeU5BU5D_t1664964607* TypeBuilder_GetInterfaces_m1818658502 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetInterfaces_m1818658502_MetadataUsageId); s_Il2CppMethodInitialized = true; } TypeU5BU5D_t1664964607* V_0 = NULL; { bool L_0 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0017; } } { Type_t * L_1 = __this->get_created_21(); NullCheck(L_1); TypeU5BU5D_t1664964607* L_2 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(41 /* System.Type[] System.Type::GetInterfaces() */, L_1); return L_2; } IL_0017: { TypeU5BU5D_t1664964607* L_3 = __this->get_interfaces_12(); if (!L_3) { goto IL_003f; } } { TypeU5BU5D_t1664964607* L_4 = __this->get_interfaces_12(); NullCheck(L_4); V_0 = ((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_4)->max_length)))))); TypeU5BU5D_t1664964607* L_5 = __this->get_interfaces_12(); TypeU5BU5D_t1664964607* L_6 = V_0; NullCheck((Il2CppArray *)(Il2CppArray *)L_5); Array_CopyTo_m4061033315((Il2CppArray *)(Il2CppArray *)L_5, (Il2CppArray *)(Il2CppArray *)L_6, 0, /*hidden argument*/NULL); TypeU5BU5D_t1664964607* L_7 = V_0; return L_7; } IL_003f: { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_8 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); return L_8; } } // System.Reflection.MethodInfo[] System.Reflection.Emit.TypeBuilder::GetMethodsByName(System.String,System.Reflection.BindingFlags,System.Boolean,System.Type) extern "C" MethodInfoU5BU5D_t152480188* TypeBuilder_GetMethodsByName_m229541072 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___bindingAttr1, bool ___ignoreCase2, Type_t * ___reflected_type3, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetMethodsByName_m229541072_MetadataUsageId); s_Il2CppMethodInitialized = true; } MethodInfoU5BU5D_t152480188* V_0 = NULL; bool V_1 = false; int32_t V_2 = 0; MethodInfoU5BU5D_t152480188* V_3 = NULL; ArrayList_t4252133567 * V_4 = NULL; bool V_5 = false; int32_t V_6 = 0; MethodInfo_t * V_7 = NULL; ArrayList_t4252133567 * V_8 = NULL; MethodInfo_t * V_9 = NULL; MethodInfoU5BU5D_t152480188* V_10 = NULL; int32_t V_11 = 0; MethodInfoU5BU5D_t152480188* V_12 = NULL; int32_t V_13 = 0; { int32_t L_0 = ___bindingAttr1; if (((int32_t)((int32_t)L_0&(int32_t)2))) { goto IL_0142; } } { Type_t * L_1 = __this->get_parent_10(); if (!L_1) { goto IL_0142; } } { Type_t * L_2 = __this->get_parent_10(); int32_t L_3 = ___bindingAttr1; NullCheck(L_2); MethodInfoU5BU5D_t152480188* L_4 = VirtFuncInvoker1< MethodInfoU5BU5D_t152480188*, int32_t >::Invoke(56 /* System.Reflection.MethodInfo[] System.Type::GetMethods(System.Reflection.BindingFlags) */, L_2, L_3); V_3 = L_4; MethodInfoU5BU5D_t152480188* L_5 = V_3; NullCheck(L_5); ArrayList_t4252133567 * L_6 = (ArrayList_t4252133567 *)il2cpp_codegen_object_new(ArrayList_t4252133567_il2cpp_TypeInfo_var); ArrayList__ctor_m1467563650(L_6, (((int32_t)((int32_t)(((Il2CppArray *)L_5)->max_length)))), /*hidden argument*/NULL); V_4 = L_6; int32_t L_7 = ___bindingAttr1; V_5 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_7&(int32_t)((int32_t)64)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); V_6 = 0; goto IL_00dc; } IL_003e: { MethodInfoU5BU5D_t152480188* L_8 = V_3; int32_t L_9 = V_6; NullCheck(L_8); int32_t L_10 = L_9; MethodInfo_t * L_11 = (L_8)->GetAt(static_cast<il2cpp_array_size_t>(L_10)); V_7 = L_11; MethodInfo_t * L_12 = V_7; NullCheck(L_12); int32_t L_13 = VirtFuncInvoker0< int32_t >::Invoke(19 /* System.Reflection.MethodAttributes System.Reflection.MethodBase::get_Attributes() */, L_12); V_2 = L_13; MethodInfo_t * L_14 = V_7; NullCheck(L_14); bool L_15 = MethodBase_get_IsStatic_m1015686807(L_14, /*hidden argument*/NULL); if (!L_15) { goto IL_0064; } } { bool L_16 = V_5; if (L_16) { goto IL_0064; } } { goto IL_00d6; } IL_0064: { int32_t L_17 = V_2; V_13 = ((int32_t)((int32_t)L_17&(int32_t)7)); int32_t L_18 = V_13; switch (((int32_t)((int32_t)L_18-(int32_t)1))) { case 0: { goto IL_00af; } case 1: { goto IL_00b6; } case 2: { goto IL_009f; } case 3: { goto IL_00b6; } case 4: { goto IL_00b6; } case 5: { goto IL_008f; } } } { goto IL_00b6; } IL_008f: { int32_t L_19 = ___bindingAttr1; V_1 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_19&(int32_t)((int32_t)16)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); goto IL_00c6; } IL_009f: { int32_t L_20 = ___bindingAttr1; V_1 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_20&(int32_t)((int32_t)32)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); goto IL_00c6; } IL_00af: { V_1 = (bool)0; goto IL_00c6; } IL_00b6: { int32_t L_21 = ___bindingAttr1; V_1 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_21&(int32_t)((int32_t)32)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); goto IL_00c6; } IL_00c6: { bool L_22 = V_1; if (!L_22) { goto IL_00d6; } } { ArrayList_t4252133567 * L_23 = V_4; MethodInfo_t * L_24 = V_7; NullCheck(L_23); VirtFuncInvoker1< int32_t, Il2CppObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_23, L_24); } IL_00d6: { int32_t L_25 = V_6; V_6 = ((int32_t)((int32_t)L_25+(int32_t)1)); } IL_00dc: { int32_t L_26 = V_6; MethodInfoU5BU5D_t152480188* L_27 = V_3; NullCheck(L_27); if ((((int32_t)L_26) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_27)->max_length))))))) { goto IL_003e; } } { MethodBuilderU5BU5D_t4238041457* L_28 = __this->get_methods_14(); if (L_28) { goto IL_010b; } } { ArrayList_t4252133567 * L_29 = V_4; NullCheck(L_29); int32_t L_30 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_29); V_0 = ((MethodInfoU5BU5D_t152480188*)SZArrayNew(MethodInfoU5BU5D_t152480188_il2cpp_TypeInfo_var, (uint32_t)L_30)); ArrayList_t4252133567 * L_31 = V_4; MethodInfoU5BU5D_t152480188* L_32 = V_0; NullCheck(L_31); VirtActionInvoker1< Il2CppArray * >::Invoke(40 /* System.Void System.Collections.ArrayList::CopyTo(System.Array) */, L_31, (Il2CppArray *)(Il2CppArray *)L_32); goto IL_013d; } IL_010b: { MethodBuilderU5BU5D_t4238041457* L_33 = __this->get_methods_14(); NullCheck(L_33); ArrayList_t4252133567 * L_34 = V_4; NullCheck(L_34); int32_t L_35 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_34); V_0 = ((MethodInfoU5BU5D_t152480188*)SZArrayNew(MethodInfoU5BU5D_t152480188_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_33)->max_length))))+(int32_t)L_35)))); ArrayList_t4252133567 * L_36 = V_4; MethodInfoU5BU5D_t152480188* L_37 = V_0; NullCheck(L_36); VirtActionInvoker2< Il2CppArray *, int32_t >::Invoke(41 /* System.Void System.Collections.ArrayList::CopyTo(System.Array,System.Int32) */, L_36, (Il2CppArray *)(Il2CppArray *)L_37, 0); MethodBuilderU5BU5D_t4238041457* L_38 = __this->get_methods_14(); MethodInfoU5BU5D_t152480188* L_39 = V_0; ArrayList_t4252133567 * L_40 = V_4; NullCheck(L_40); int32_t L_41 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_40); NullCheck((Il2CppArray *)(Il2CppArray *)L_38); Array_CopyTo_m4061033315((Il2CppArray *)(Il2CppArray *)L_38, (Il2CppArray *)(Il2CppArray *)L_39, L_41, /*hidden argument*/NULL); } IL_013d: { goto IL_0149; } IL_0142: { MethodBuilderU5BU5D_t4238041457* L_42 = __this->get_methods_14(); V_0 = (MethodInfoU5BU5D_t152480188*)L_42; } IL_0149: { MethodInfoU5BU5D_t152480188* L_43 = V_0; if (L_43) { goto IL_0156; } } { return ((MethodInfoU5BU5D_t152480188*)SZArrayNew(MethodInfoU5BU5D_t152480188_il2cpp_TypeInfo_var, (uint32_t)0)); } IL_0156: { ArrayList_t4252133567 * L_44 = (ArrayList_t4252133567 *)il2cpp_codegen_object_new(ArrayList_t4252133567_il2cpp_TypeInfo_var); ArrayList__ctor_m4012174379(L_44, /*hidden argument*/NULL); V_8 = L_44; MethodInfoU5BU5D_t152480188* L_45 = V_0; V_10 = L_45; V_11 = 0; goto IL_0211; } IL_0168: { MethodInfoU5BU5D_t152480188* L_46 = V_10; int32_t L_47 = V_11; NullCheck(L_46); int32_t L_48 = L_47; MethodInfo_t * L_49 = (L_46)->GetAt(static_cast<il2cpp_array_size_t>(L_48)); V_9 = L_49; MethodInfo_t * L_50 = V_9; if (L_50) { goto IL_017b; } } { goto IL_020b; } IL_017b: { String_t* L_51 = ___name0; if (!L_51) { goto IL_0199; } } { MethodInfo_t * L_52 = V_9; NullCheck(L_52); String_t* L_53 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_52); String_t* L_54 = ___name0; bool L_55 = ___ignoreCase2; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); int32_t L_56 = String_Compare_m2851607672(NULL /*static, unused*/, L_53, L_54, L_55, /*hidden argument*/NULL); if (!L_56) { goto IL_0199; } } { goto IL_020b; } IL_0199: { V_1 = (bool)0; MethodInfo_t * L_57 = V_9; NullCheck(L_57); int32_t L_58 = VirtFuncInvoker0< int32_t >::Invoke(19 /* System.Reflection.MethodAttributes System.Reflection.MethodBase::get_Attributes() */, L_57); V_2 = L_58; int32_t L_59 = V_2; if ((!(((uint32_t)((int32_t)((int32_t)L_59&(int32_t)7))) == ((uint32_t)6)))) { goto IL_01bc; } } { int32_t L_60 = ___bindingAttr1; if (!((int32_t)((int32_t)L_60&(int32_t)((int32_t)16)))) { goto IL_01b7; } } { V_1 = (bool)1; } IL_01b7: { goto IL_01c7; } IL_01bc: { int32_t L_61 = ___bindingAttr1; if (!((int32_t)((int32_t)L_61&(int32_t)((int32_t)32)))) { goto IL_01c7; } } { V_1 = (bool)1; } IL_01c7: { bool L_62 = V_1; if (L_62) { goto IL_01d2; } } { goto IL_020b; } IL_01d2: { V_1 = (bool)0; int32_t L_63 = V_2; if (!((int32_t)((int32_t)L_63&(int32_t)((int32_t)16)))) { goto IL_01ec; } } { int32_t L_64 = ___bindingAttr1; if (!((int32_t)((int32_t)L_64&(int32_t)8))) { goto IL_01e7; } } { V_1 = (bool)1; } IL_01e7: { goto IL_01f6; } IL_01ec: { int32_t L_65 = ___bindingAttr1; if (!((int32_t)((int32_t)L_65&(int32_t)4))) { goto IL_01f6; } } { V_1 = (bool)1; } IL_01f6: { bool L_66 = V_1; if (L_66) { goto IL_0201; } } { goto IL_020b; } IL_0201: { ArrayList_t4252133567 * L_67 = V_8; MethodInfo_t * L_68 = V_9; NullCheck(L_67); VirtFuncInvoker1< int32_t, Il2CppObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_67, L_68); } IL_020b: { int32_t L_69 = V_11; V_11 = ((int32_t)((int32_t)L_69+(int32_t)1)); } IL_0211: { int32_t L_70 = V_11; MethodInfoU5BU5D_t152480188* L_71 = V_10; NullCheck(L_71); if ((((int32_t)L_70) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_71)->max_length))))))) { goto IL_0168; } } { ArrayList_t4252133567 * L_72 = V_8; NullCheck(L_72); int32_t L_73 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_72); V_12 = ((MethodInfoU5BU5D_t152480188*)SZArrayNew(MethodInfoU5BU5D_t152480188_il2cpp_TypeInfo_var, (uint32_t)L_73)); ArrayList_t4252133567 * L_74 = V_8; MethodInfoU5BU5D_t152480188* L_75 = V_12; NullCheck(L_74); VirtActionInvoker1< Il2CppArray * >::Invoke(40 /* System.Void System.Collections.ArrayList::CopyTo(System.Array) */, L_74, (Il2CppArray *)(Il2CppArray *)L_75); MethodInfoU5BU5D_t152480188* L_76 = V_12; return L_76; } } // System.Reflection.MethodInfo[] System.Reflection.Emit.TypeBuilder::GetMethods(System.Reflection.BindingFlags) extern "C" MethodInfoU5BU5D_t152480188* TypeBuilder_GetMethods_m4196862738 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { { int32_t L_0 = ___bindingAttr0; MethodInfoU5BU5D_t152480188* L_1 = TypeBuilder_GetMethodsByName_m229541072(__this, (String_t*)NULL, L_0, (bool)0, __this, /*hidden argument*/NULL); return L_1; } } // System.Reflection.MethodInfo System.Reflection.Emit.TypeBuilder::GetMethodImpl(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Reflection.CallingConventions,System.Type[],System.Reflection.ParameterModifier[]) extern "C" MethodInfo_t * TypeBuilder_GetMethodImpl_m1443640538 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___bindingAttr1, Binder_t3404612058 * ___binder2, int32_t ___callConvention3, TypeU5BU5D_t1664964607* ___types4, ParameterModifierU5BU5D_t963192633* ___modifiers5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetMethodImpl_m1443640538_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; MethodInfoU5BU5D_t152480188* V_1 = NULL; MethodInfo_t * V_2 = NULL; MethodBaseU5BU5D_t2597254495* V_3 = NULL; int32_t V_4 = 0; int32_t V_5 = 0; MethodInfo_t * V_6 = NULL; MethodInfoU5BU5D_t152480188* V_7 = NULL; int32_t V_8 = 0; MethodInfo_t * V_9 = NULL; MethodInfoU5BU5D_t152480188* V_10 = NULL; int32_t V_11 = 0; int32_t G_B3_0 = 0; { TypeBuilder_check_created_m2929267877(__this, /*hidden argument*/NULL); int32_t L_0 = ___bindingAttr1; V_0 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)1))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); String_t* L_1 = ___name0; int32_t L_2 = ___bindingAttr1; bool L_3 = V_0; MethodInfoU5BU5D_t152480188* L_4 = TypeBuilder_GetMethodsByName_m229541072(__this, L_1, L_2, L_3, __this, /*hidden argument*/NULL); V_1 = L_4; V_2 = (MethodInfo_t *)NULL; TypeU5BU5D_t1664964607* L_5 = ___types4; if (!L_5) { goto IL_002d; } } { TypeU5BU5D_t1664964607* L_6 = ___types4; NullCheck(L_6); G_B3_0 = (((int32_t)((int32_t)(((Il2CppArray *)L_6)->max_length)))); goto IL_002e; } IL_002d: { G_B3_0 = 0; } IL_002e: { V_4 = G_B3_0; V_5 = 0; MethodInfoU5BU5D_t152480188* L_7 = V_1; V_7 = L_7; V_8 = 0; goto IL_0072; } IL_003e: { MethodInfoU5BU5D_t152480188* L_8 = V_7; int32_t L_9 = V_8; NullCheck(L_8); int32_t L_10 = L_9; MethodInfo_t * L_11 = (L_8)->GetAt(static_cast<il2cpp_array_size_t>(L_10)); V_6 = L_11; int32_t L_12 = ___callConvention3; if ((((int32_t)L_12) == ((int32_t)3))) { goto IL_0063; } } { MethodInfo_t * L_13 = V_6; NullCheck(L_13); int32_t L_14 = VirtFuncInvoker0< int32_t >::Invoke(20 /* System.Reflection.CallingConventions System.Reflection.MethodBase::get_CallingConvention() */, L_13); int32_t L_15 = ___callConvention3; int32_t L_16 = ___callConvention3; if ((((int32_t)((int32_t)((int32_t)L_14&(int32_t)L_15))) == ((int32_t)L_16))) { goto IL_0063; } } { goto IL_006c; } IL_0063: { MethodInfo_t * L_17 = V_6; V_2 = L_17; int32_t L_18 = V_5; V_5 = ((int32_t)((int32_t)L_18+(int32_t)1)); } IL_006c: { int32_t L_19 = V_8; V_8 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_0072: { int32_t L_20 = V_8; MethodInfoU5BU5D_t152480188* L_21 = V_7; NullCheck(L_21); if ((((int32_t)L_20) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_21)->max_length))))))) { goto IL_003e; } } { int32_t L_22 = V_5; if (L_22) { goto IL_0086; } } { return (MethodInfo_t *)NULL; } IL_0086: { int32_t L_23 = V_5; if ((!(((uint32_t)L_23) == ((uint32_t)1)))) { goto IL_0097; } } { int32_t L_24 = V_4; if (L_24) { goto IL_0097; } } { MethodInfo_t * L_25 = V_2; return L_25; } IL_0097: { int32_t L_26 = V_5; V_3 = ((MethodBaseU5BU5D_t2597254495*)SZArrayNew(MethodBaseU5BU5D_t2597254495_il2cpp_TypeInfo_var, (uint32_t)L_26)); int32_t L_27 = V_5; if ((!(((uint32_t)L_27) == ((uint32_t)1)))) { goto IL_00b0; } } { MethodBaseU5BU5D_t2597254495* L_28 = V_3; MethodInfo_t * L_29 = V_2; NullCheck(L_28); ArrayElementTypeCheck (L_28, L_29); (L_28)->SetAt(static_cast<il2cpp_array_size_t>(0), (MethodBase_t904190842 *)L_29); goto IL_00ff; } IL_00b0: { V_5 = 0; MethodInfoU5BU5D_t152480188* L_30 = V_1; V_10 = L_30; V_11 = 0; goto IL_00f4; } IL_00be: { MethodInfoU5BU5D_t152480188* L_31 = V_10; int32_t L_32 = V_11; NullCheck(L_31); int32_t L_33 = L_32; MethodInfo_t * L_34 = (L_31)->GetAt(static_cast<il2cpp_array_size_t>(L_33)); V_9 = L_34; int32_t L_35 = ___callConvention3; if ((((int32_t)L_35) == ((int32_t)3))) { goto IL_00e3; } } { MethodInfo_t * L_36 = V_9; NullCheck(L_36); int32_t L_37 = VirtFuncInvoker0< int32_t >::Invoke(20 /* System.Reflection.CallingConventions System.Reflection.MethodBase::get_CallingConvention() */, L_36); int32_t L_38 = ___callConvention3; int32_t L_39 = ___callConvention3; if ((((int32_t)((int32_t)((int32_t)L_37&(int32_t)L_38))) == ((int32_t)L_39))) { goto IL_00e3; } } { goto IL_00ee; } IL_00e3: { MethodBaseU5BU5D_t2597254495* L_40 = V_3; int32_t L_41 = V_5; int32_t L_42 = L_41; V_5 = ((int32_t)((int32_t)L_42+(int32_t)1)); MethodInfo_t * L_43 = V_9; NullCheck(L_40); ArrayElementTypeCheck (L_40, L_43); (L_40)->SetAt(static_cast<il2cpp_array_size_t>(L_42), (MethodBase_t904190842 *)L_43); } IL_00ee: { int32_t L_44 = V_11; V_11 = ((int32_t)((int32_t)L_44+(int32_t)1)); } IL_00f4: { int32_t L_45 = V_11; MethodInfoU5BU5D_t152480188* L_46 = V_10; NullCheck(L_46); if ((((int32_t)L_45) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_46)->max_length))))))) { goto IL_00be; } } IL_00ff: { TypeU5BU5D_t1664964607* L_47 = ___types4; if (L_47) { goto IL_0112; } } { MethodBaseU5BU5D_t2597254495* L_48 = V_3; IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); MethodBase_t904190842 * L_49 = Binder_FindMostDerivedMatch_m2621831847(NULL /*static, unused*/, L_48, /*hidden argument*/NULL); return ((MethodInfo_t *)CastclassClass(L_49, MethodInfo_t_il2cpp_TypeInfo_var)); } IL_0112: { Binder_t3404612058 * L_50 = ___binder2; if (L_50) { goto IL_011f; } } { IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); Binder_t3404612058 * L_51 = Binder_get_DefaultBinder_m965620943(NULL /*static, unused*/, /*hidden argument*/NULL); ___binder2 = L_51; } IL_011f: { Binder_t3404612058 * L_52 = ___binder2; int32_t L_53 = ___bindingAttr1; MethodBaseU5BU5D_t2597254495* L_54 = V_3; TypeU5BU5D_t1664964607* L_55 = ___types4; ParameterModifierU5BU5D_t963192633* L_56 = ___modifiers5; NullCheck(L_52); MethodBase_t904190842 * L_57 = VirtFuncInvoker4< MethodBase_t904190842 *, int32_t, MethodBaseU5BU5D_t2597254495*, TypeU5BU5D_t1664964607*, ParameterModifierU5BU5D_t963192633* >::Invoke(7 /* System.Reflection.MethodBase System.Reflection.Binder::SelectMethod(System.Reflection.BindingFlags,System.Reflection.MethodBase[],System.Type[],System.Reflection.ParameterModifier[]) */, L_52, L_53, L_54, L_55, L_56); return ((MethodInfo_t *)CastclassClass(L_57, MethodInfo_t_il2cpp_TypeInfo_var)); } } // System.Reflection.PropertyInfo[] System.Reflection.Emit.TypeBuilder::GetProperties(System.Reflection.BindingFlags) extern "C" PropertyInfoU5BU5D_t1736152084* TypeBuilder_GetProperties_m2211539685 (TypeBuilder_t3308873219 * __this, int32_t ___bindingAttr0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetProperties_m2211539685_MetadataUsageId); s_Il2CppMethodInitialized = true; } ArrayList_t4252133567 * V_0 = NULL; bool V_1 = false; int32_t V_2 = 0; MethodInfo_t * V_3 = NULL; PropertyInfo_t * V_4 = NULL; PropertyBuilderU5BU5D_t988886841* V_5 = NULL; int32_t V_6 = 0; PropertyInfoU5BU5D_t1736152084* V_7 = NULL; { bool L_0 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0018; } } { Type_t * L_1 = __this->get_created_21(); int32_t L_2 = ___bindingAttr0; NullCheck(L_1); PropertyInfoU5BU5D_t1736152084* L_3 = VirtFuncInvoker1< PropertyInfoU5BU5D_t1736152084*, int32_t >::Invoke(58 /* System.Reflection.PropertyInfo[] System.Type::GetProperties(System.Reflection.BindingFlags) */, L_1, L_2); return L_3; } IL_0018: { PropertyBuilderU5BU5D_t988886841* L_4 = __this->get_properties_16(); if (L_4) { goto IL_002a; } } { return ((PropertyInfoU5BU5D_t1736152084*)SZArrayNew(PropertyInfoU5BU5D_t1736152084_il2cpp_TypeInfo_var, (uint32_t)0)); } IL_002a: { ArrayList_t4252133567 * L_5 = (ArrayList_t4252133567 *)il2cpp_codegen_object_new(ArrayList_t4252133567_il2cpp_TypeInfo_var); ArrayList__ctor_m4012174379(L_5, /*hidden argument*/NULL); V_0 = L_5; PropertyBuilderU5BU5D_t988886841* L_6 = __this->get_properties_16(); V_5 = L_6; V_6 = 0; goto IL_00e0; } IL_0040: { PropertyBuilderU5BU5D_t988886841* L_7 = V_5; int32_t L_8 = V_6; NullCheck(L_7); int32_t L_9 = L_8; PropertyBuilder_t3694255912 * L_10 = (L_7)->GetAt(static_cast<il2cpp_array_size_t>(L_9)); V_4 = L_10; V_1 = (bool)0; PropertyInfo_t * L_11 = V_4; NullCheck(L_11); MethodInfo_t * L_12 = VirtFuncInvoker1< MethodInfo_t *, bool >::Invoke(19 /* System.Reflection.MethodInfo System.Reflection.PropertyInfo::GetGetMethod(System.Boolean) */, L_11, (bool)1); V_3 = L_12; MethodInfo_t * L_13 = V_3; if (L_13) { goto IL_0061; } } { PropertyInfo_t * L_14 = V_4; NullCheck(L_14); MethodInfo_t * L_15 = VirtFuncInvoker1< MethodInfo_t *, bool >::Invoke(21 /* System.Reflection.MethodInfo System.Reflection.PropertyInfo::GetSetMethod(System.Boolean) */, L_14, (bool)1); V_3 = L_15; } IL_0061: { MethodInfo_t * L_16 = V_3; if (L_16) { goto IL_006c; } } { goto IL_00da; } IL_006c: { MethodInfo_t * L_17 = V_3; NullCheck(L_17); int32_t L_18 = VirtFuncInvoker0< int32_t >::Invoke(19 /* System.Reflection.MethodAttributes System.Reflection.MethodBase::get_Attributes() */, L_17); V_2 = L_18; int32_t L_19 = V_2; if ((!(((uint32_t)((int32_t)((int32_t)L_19&(int32_t)7))) == ((uint32_t)6)))) { goto IL_008c; } } { int32_t L_20 = ___bindingAttr0; if (!((int32_t)((int32_t)L_20&(int32_t)((int32_t)16)))) { goto IL_0087; } } { V_1 = (bool)1; } IL_0087: { goto IL_0097; } IL_008c: { int32_t L_21 = ___bindingAttr0; if (!((int32_t)((int32_t)L_21&(int32_t)((int32_t)32)))) { goto IL_0097; } } { V_1 = (bool)1; } IL_0097: { bool L_22 = V_1; if (L_22) { goto IL_00a2; } } { goto IL_00da; } IL_00a2: { V_1 = (bool)0; int32_t L_23 = V_2; if (!((int32_t)((int32_t)L_23&(int32_t)((int32_t)16)))) { goto IL_00bc; } } { int32_t L_24 = ___bindingAttr0; if (!((int32_t)((int32_t)L_24&(int32_t)8))) { goto IL_00b7; } } { V_1 = (bool)1; } IL_00b7: { goto IL_00c6; } IL_00bc: { int32_t L_25 = ___bindingAttr0; if (!((int32_t)((int32_t)L_25&(int32_t)4))) { goto IL_00c6; } } { V_1 = (bool)1; } IL_00c6: { bool L_26 = V_1; if (L_26) { goto IL_00d1; } } { goto IL_00da; } IL_00d1: { ArrayList_t4252133567 * L_27 = V_0; PropertyInfo_t * L_28 = V_4; NullCheck(L_27); VirtFuncInvoker1< int32_t, Il2CppObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_27, L_28); } IL_00da: { int32_t L_29 = V_6; V_6 = ((int32_t)((int32_t)L_29+(int32_t)1)); } IL_00e0: { int32_t L_30 = V_6; PropertyBuilderU5BU5D_t988886841* L_31 = V_5; NullCheck(L_31); if ((((int32_t)L_30) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_31)->max_length))))))) { goto IL_0040; } } { ArrayList_t4252133567 * L_32 = V_0; NullCheck(L_32); int32_t L_33 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_32); V_7 = ((PropertyInfoU5BU5D_t1736152084*)SZArrayNew(PropertyInfoU5BU5D_t1736152084_il2cpp_TypeInfo_var, (uint32_t)L_33)); ArrayList_t4252133567 * L_34 = V_0; PropertyInfoU5BU5D_t1736152084* L_35 = V_7; NullCheck(L_34); VirtActionInvoker1< Il2CppArray * >::Invoke(40 /* System.Void System.Collections.ArrayList::CopyTo(System.Array) */, L_34, (Il2CppArray *)(Il2CppArray *)L_35); PropertyInfoU5BU5D_t1736152084* L_36 = V_7; return L_36; } } // System.Reflection.PropertyInfo System.Reflection.Emit.TypeBuilder::GetPropertyImpl(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Type,System.Type[],System.Reflection.ParameterModifier[]) extern "C" PropertyInfo_t * TypeBuilder_GetPropertyImpl_m1854119335 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___bindingAttr1, Binder_t3404612058 * ___binder2, Type_t * ___returnType3, TypeU5BU5D_t1664964607* ___types4, ParameterModifierU5BU5D_t963192633* ___modifiers5, const MethodInfo* method) { { Exception_t1927440687 * L_0 = TypeBuilder_not_supported_m3178173643(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.Emit.TypeBuilder::HasElementTypeImpl() extern "C" bool TypeBuilder_HasElementTypeImpl_m3160520656 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { bool L_0 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (L_0) { goto IL_000d; } } { return (bool)0; } IL_000d: { Type_t * L_1 = __this->get_created_21(); NullCheck(L_1); bool L_2 = Type_get_HasElementType_m3319917896(L_1, /*hidden argument*/NULL); return L_2; } } // System.Object System.Reflection.Emit.TypeBuilder::InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]) extern "C" Il2CppObject * TypeBuilder_InvokeMember_m1992906893 (TypeBuilder_t3308873219 * __this, String_t* ___name0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, Il2CppObject * ___target3, ObjectU5BU5D_t3614634134* ___args4, ParameterModifierU5BU5D_t963192633* ___modifiers5, CultureInfo_t3500843524 * ___culture6, StringU5BU5D_t1642385972* ___namedParameters7, const MethodInfo* method) { { TypeBuilder_check_created_m2929267877(__this, /*hidden argument*/NULL); Type_t * L_0 = __this->get_created_21(); String_t* L_1 = ___name0; int32_t L_2 = ___invokeAttr1; Binder_t3404612058 * L_3 = ___binder2; Il2CppObject * L_4 = ___target3; ObjectU5BU5D_t3614634134* L_5 = ___args4; ParameterModifierU5BU5D_t963192633* L_6 = ___modifiers5; CultureInfo_t3500843524 * L_7 = ___culture6; StringU5BU5D_t1642385972* L_8 = ___namedParameters7; NullCheck(L_0); Il2CppObject * L_9 = VirtFuncInvoker8< Il2CppObject *, String_t*, int32_t, Binder_t3404612058 *, Il2CppObject *, ObjectU5BU5D_t3614634134*, ParameterModifierU5BU5D_t963192633*, CultureInfo_t3500843524 *, StringU5BU5D_t1642385972* >::Invoke(78 /* System.Object System.Type::InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]) */, L_0, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8); return L_9; } } // System.Boolean System.Reflection.Emit.TypeBuilder::IsArrayImpl() extern "C" bool TypeBuilder_IsArrayImpl_m1932432187 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.TypeBuilder::IsByRefImpl() extern "C" bool TypeBuilder_IsByRefImpl_m3716138128 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.TypeBuilder::IsPointerImpl() extern "C" bool TypeBuilder_IsPointerImpl_m3046705585 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.TypeBuilder::IsPrimitiveImpl() extern "C" bool TypeBuilder_IsPrimitiveImpl_m3315689435 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.Emit.TypeBuilder::IsValueTypeImpl() extern "C" bool TypeBuilder_IsValueTypeImpl_m1499671481 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_IsValueTypeImpl_m1499671481_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t G_B5_0 = 0; { ModuleBuilder_t4156028127 * L_0 = __this->get_pmodule_19(); NullCheck(L_0); AssemblyBuilder_t1646117627 * L_1 = L_0->get_assemblyb_12(); NullCheck(L_1); Type_t * L_2 = L_1->get_corlib_value_type_13(); IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); bool L_3 = Type_type_is_subtype_of_m312896768(NULL /*static, unused*/, __this, L_2, (bool)0, /*hidden argument*/NULL); if (L_3) { goto IL_0032; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_4 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(ValueType_t3507792607_0_0_0_var), /*hidden argument*/NULL); bool L_5 = Type_type_is_subtype_of_m312896768(NULL /*static, unused*/, __this, L_4, (bool)0, /*hidden argument*/NULL); if (!L_5) { goto IL_0060; } } IL_0032: { ModuleBuilder_t4156028127 * L_6 = __this->get_pmodule_19(); NullCheck(L_6); AssemblyBuilder_t1646117627 * L_7 = L_6->get_assemblyb_12(); NullCheck(L_7); Type_t * L_8 = L_7->get_corlib_value_type_13(); if ((((Il2CppObject*)(TypeBuilder_t3308873219 *)__this) == ((Il2CppObject*)(Type_t *)L_8))) { goto IL_0060; } } { ModuleBuilder_t4156028127 * L_9 = __this->get_pmodule_19(); NullCheck(L_9); AssemblyBuilder_t1646117627 * L_10 = L_9->get_assemblyb_12(); NullCheck(L_10); Type_t * L_11 = L_10->get_corlib_enum_type_14(); G_B5_0 = ((((int32_t)((((Il2CppObject*)(TypeBuilder_t3308873219 *)__this) == ((Il2CppObject*)(Type_t *)L_11))? 1 : 0)) == ((int32_t)0))? 1 : 0); goto IL_0061; } IL_0060: { G_B5_0 = 0; } IL_0061: { return (bool)G_B5_0; } } // System.Type System.Reflection.Emit.TypeBuilder::MakeByRefType() extern "C" Type_t * TypeBuilder_MakeByRefType_m2042877922 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_MakeByRefType_m2042877922_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ByRefType_t1587086384 * L_0 = (ByRefType_t1587086384 *)il2cpp_codegen_object_new(ByRefType_t1587086384_il2cpp_TypeInfo_var); ByRefType__ctor_m2068210324(L_0, __this, /*hidden argument*/NULL); return L_0; } } // System.Type System.Reflection.Emit.TypeBuilder::MakeGenericType(System.Type[]) extern "C" Type_t * TypeBuilder_MakeGenericType_m4282022646 (TypeBuilder_t3308873219 * __this, TypeU5BU5D_t1664964607* ___typeArguments0, const MethodInfo* method) { { TypeU5BU5D_t1664964607* L_0 = ___typeArguments0; Type_t * L_1 = Type_MakeGenericType_m2765875033(__this, L_0, /*hidden argument*/NULL); return L_1; } } // System.RuntimeTypeHandle System.Reflection.Emit.TypeBuilder::get_TypeHandle() extern "C" RuntimeTypeHandle_t2330101084 TypeBuilder_get_TypeHandle_m922348781 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { TypeBuilder_check_created_m2929267877(__this, /*hidden argument*/NULL); Type_t * L_0 = __this->get_created_21(); NullCheck(L_0); RuntimeTypeHandle_t2330101084 L_1 = VirtFuncInvoker0< RuntimeTypeHandle_t2330101084 >::Invoke(35 /* System.RuntimeTypeHandle System.Type::get_TypeHandle() */, L_0); return L_1; } } // System.Void System.Reflection.Emit.TypeBuilder::SetParent(System.Type) extern "C" void TypeBuilder_SetParent_m387557893 (TypeBuilder_t3308873219 * __this, Type_t * ___parent0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_SetParent_m387557893_MetadataUsageId); s_Il2CppMethodInitialized = true; } { TypeBuilder_check_not_created_m2785532739(__this, /*hidden argument*/NULL); Type_t * L_0 = ___parent0; if (L_0) { goto IL_0057; } } { int32_t L_1 = __this->get_attrs_18(); if (!((int32_t)((int32_t)L_1&(int32_t)((int32_t)32)))) { goto IL_0042; } } { int32_t L_2 = __this->get_attrs_18(); if (((int32_t)((int32_t)L_2&(int32_t)((int32_t)128)))) { goto IL_0036; } } { InvalidOperationException_t721527559 * L_3 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m2801133788(L_3, _stringLiteral3528128599, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_3); } IL_0036: { __this->set_parent_10((Type_t *)NULL); goto IL_0052; } IL_0042: { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_4 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); __this->set_parent_10(L_4); } IL_0052: { goto IL_005e; } IL_0057: { Type_t * L_5 = ___parent0; __this->set_parent_10(L_5); } IL_005e: { TypeBuilder_setup_internal_class_m235812026(__this, __this, /*hidden argument*/NULL); return; } } // System.Int32 System.Reflection.Emit.TypeBuilder::get_next_table_index(System.Object,System.Int32,System.Boolean) extern "C" int32_t TypeBuilder_get_next_table_index_m1415870184 (TypeBuilder_t3308873219 * __this, Il2CppObject * ___obj0, int32_t ___table1, bool ___inc2, const MethodInfo* method) { { ModuleBuilder_t4156028127 * L_0 = __this->get_pmodule_19(); Il2CppObject * L_1 = ___obj0; int32_t L_2 = ___table1; bool L_3 = ___inc2; NullCheck(L_0); int32_t L_4 = ModuleBuilder_get_next_table_index_m1552645388(L_0, L_1, L_2, L_3, /*hidden argument*/NULL); return L_4; } } // System.Boolean System.Reflection.Emit.TypeBuilder::get_IsCompilerContext() extern "C" bool TypeBuilder_get_IsCompilerContext_m3623403919 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { ModuleBuilder_t4156028127 * L_0 = __this->get_pmodule_19(); NullCheck(L_0); AssemblyBuilder_t1646117627 * L_1 = L_0->get_assemblyb_12(); NullCheck(L_1); bool L_2 = AssemblyBuilder_get_IsCompilerContext_m2864230005(L_1, /*hidden argument*/NULL); return L_2; } } // System.Boolean System.Reflection.Emit.TypeBuilder::get_is_created() extern "C" bool TypeBuilder_get_is_created_m736553860 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_created_21(); return (bool)((((int32_t)((((Il2CppObject*)(Type_t *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Exception System.Reflection.Emit.TypeBuilder::not_supported() extern "C" Exception_t1927440687 * TypeBuilder_not_supported_m3178173643 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_not_supported_m3178173643_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_0, _stringLiteral4087454587, /*hidden argument*/NULL); return L_0; } } // System.Void System.Reflection.Emit.TypeBuilder::check_not_created() extern "C" void TypeBuilder_check_not_created_m2785532739 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_check_not_created_m2785532739_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0016; } } { InvalidOperationException_t721527559 * L_1 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m2801133788(L_1, _stringLiteral2822774848, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0016: { return; } } // System.Void System.Reflection.Emit.TypeBuilder::check_created() extern "C" void TypeBuilder_check_created_m2929267877 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { bool L_0 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (L_0) { goto IL_0012; } } { Exception_t1927440687 * L_1 = TypeBuilder_not_supported_m3178173643(__this, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0012: { return; } } // System.String System.Reflection.Emit.TypeBuilder::ToString() extern "C" String_t* TypeBuilder_ToString_m1952363535 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { String_t* L_0 = TypeBuilder_get_FullName_m1626507516(__this, /*hidden argument*/NULL); return L_0; } } // System.Boolean System.Reflection.Emit.TypeBuilder::IsAssignableFrom(System.Type) extern "C" bool TypeBuilder_IsAssignableFrom_m212977480 (TypeBuilder_t3308873219 * __this, Type_t * ___c0, const MethodInfo* method) { { Type_t * L_0 = ___c0; bool L_1 = Type_IsAssignableFrom_m907986231(__this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Boolean System.Reflection.Emit.TypeBuilder::IsSubclassOf(System.Type) extern "C" bool TypeBuilder_IsSubclassOf_m428846622 (TypeBuilder_t3308873219 * __this, Type_t * ___c0, const MethodInfo* method) { { Type_t * L_0 = ___c0; bool L_1 = Type_IsSubclassOf_m2450899481(__this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Boolean System.Reflection.Emit.TypeBuilder::IsAssignableTo(System.Type) extern "C" bool TypeBuilder_IsAssignableTo_m3210661829 (TypeBuilder_t3308873219 * __this, Type_t * ___c0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_IsAssignableTo_m3210661829_MetadataUsageId); s_Il2CppMethodInitialized = true; } Type_t * V_0 = NULL; TypeU5BU5D_t1664964607* V_1 = NULL; int32_t V_2 = 0; { Type_t * L_0 = ___c0; if ((!(((Il2CppObject*)(Type_t *)L_0) == ((Il2CppObject*)(TypeBuilder_t3308873219 *)__this)))) { goto IL_0009; } } { return (bool)1; } IL_0009: { Type_t * L_1 = ___c0; NullCheck(L_1); bool L_2 = Type_get_IsInterface_m3583817465(L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0084; } } { Type_t * L_3 = __this->get_parent_10(); if (!L_3) { goto IL_003d; } } { bool L_4 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (!L_4) { goto IL_003d; } } { Type_t * L_5 = ___c0; Type_t * L_6 = __this->get_parent_10(); NullCheck(L_5); bool L_7 = VirtFuncInvoker1< bool, Type_t * >::Invoke(42 /* System.Boolean System.Type::IsAssignableFrom(System.Type) */, L_5, L_6); if (!L_7) { goto IL_003d; } } { return (bool)1; } IL_003d: { TypeU5BU5D_t1664964607* L_8 = __this->get_interfaces_12(); if (L_8) { goto IL_004a; } } { return (bool)0; } IL_004a: { TypeU5BU5D_t1664964607* L_9 = __this->get_interfaces_12(); V_1 = L_9; V_2 = 0; goto IL_006e; } IL_0058: { TypeU5BU5D_t1664964607* L_10 = V_1; int32_t L_11 = V_2; NullCheck(L_10); int32_t L_12 = L_11; Type_t * L_13 = (L_10)->GetAt(static_cast<il2cpp_array_size_t>(L_12)); V_0 = L_13; Type_t * L_14 = ___c0; Type_t * L_15 = V_0; NullCheck(L_14); bool L_16 = VirtFuncInvoker1< bool, Type_t * >::Invoke(42 /* System.Boolean System.Type::IsAssignableFrom(System.Type) */, L_14, L_15); if (!L_16) { goto IL_006a; } } { return (bool)1; } IL_006a: { int32_t L_17 = V_2; V_2 = ((int32_t)((int32_t)L_17+(int32_t)1)); } IL_006e: { int32_t L_18 = V_2; TypeU5BU5D_t1664964607* L_19 = V_1; NullCheck(L_19); if ((((int32_t)L_18) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_19)->max_length))))))) { goto IL_0058; } } { bool L_20 = TypeBuilder_get_is_created_m736553860(__this, /*hidden argument*/NULL); if (L_20) { goto IL_0084; } } { return (bool)0; } IL_0084: { Type_t * L_21 = __this->get_parent_10(); if (L_21) { goto IL_009d; } } { Type_t * L_22 = ___c0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_23 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Il2CppObject_0_0_0_var), /*hidden argument*/NULL); return (bool)((((Il2CppObject*)(Type_t *)L_22) == ((Il2CppObject*)(Type_t *)L_23))? 1 : 0); } IL_009d: { Type_t * L_24 = ___c0; Type_t * L_25 = __this->get_parent_10(); NullCheck(L_24); bool L_26 = VirtFuncInvoker1< bool, Type_t * >::Invoke(42 /* System.Boolean System.Type::IsAssignableFrom(System.Type) */, L_24, L_25); return L_26; } } // System.Type[] System.Reflection.Emit.TypeBuilder::GetGenericArguments() extern "C" TypeU5BU5D_t1664964607* TypeBuilder_GetGenericArguments_m3241780469 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetGenericArguments_m3241780469_MetadataUsageId); s_Il2CppMethodInitialized = true; } TypeU5BU5D_t1664964607* V_0 = NULL; { GenericTypeParameterBuilderU5BU5D_t358971386* L_0 = __this->get_generic_params_20(); if (L_0) { goto IL_000d; } } { return (TypeU5BU5D_t1664964607*)NULL; } IL_000d: { GenericTypeParameterBuilderU5BU5D_t358971386* L_1 = __this->get_generic_params_20(); NullCheck(L_1); V_0 = ((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length)))))); GenericTypeParameterBuilderU5BU5D_t358971386* L_2 = __this->get_generic_params_20(); TypeU5BU5D_t1664964607* L_3 = V_0; NullCheck((Il2CppArray *)(Il2CppArray *)L_2); Array_CopyTo_m4061033315((Il2CppArray *)(Il2CppArray *)L_2, (Il2CppArray *)(Il2CppArray *)L_3, 0, /*hidden argument*/NULL); TypeU5BU5D_t1664964607* L_4 = V_0; return L_4; } } // System.Type System.Reflection.Emit.TypeBuilder::GetGenericTypeDefinition() extern "C" Type_t * TypeBuilder_GetGenericTypeDefinition_m3813000816 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TypeBuilder_GetGenericTypeDefinition_m3813000816_MetadataUsageId); s_Il2CppMethodInitialized = true; } { GenericTypeParameterBuilderU5BU5D_t358971386* L_0 = __this->get_generic_params_20(); if (L_0) { goto IL_0016; } } { InvalidOperationException_t721527559 * L_1 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m2801133788(L_1, _stringLiteral2633815678, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0016: { return __this; } } // System.Boolean System.Reflection.Emit.TypeBuilder::get_ContainsGenericParameters() extern "C" bool TypeBuilder_get_ContainsGenericParameters_m493137229 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { GenericTypeParameterBuilderU5BU5D_t358971386* L_0 = __this->get_generic_params_20(); return (bool)((((int32_t)((((Il2CppObject*)(GenericTypeParameterBuilderU5BU5D_t358971386*)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.Emit.TypeBuilder::get_IsGenericParameter() extern "C" bool TypeBuilder_get_IsGenericParameter_m2604628295 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef bool (*TypeBuilder_get_IsGenericParameter_m2604628295_ftn) (TypeBuilder_t3308873219 *); return ((TypeBuilder_get_IsGenericParameter_m2604628295_ftn)mscorlib::System::Reflection::Emit::TypeBuilder::get_IsGenericParameter) (__this); } // System.Boolean System.Reflection.Emit.TypeBuilder::get_IsGenericTypeDefinition() extern "C" bool TypeBuilder_get_IsGenericTypeDefinition_m1652226431 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { GenericTypeParameterBuilderU5BU5D_t358971386* L_0 = __this->get_generic_params_20(); return (bool)((((int32_t)((((Il2CppObject*)(GenericTypeParameterBuilderU5BU5D_t358971386*)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.Emit.TypeBuilder::get_IsGenericType() extern "C" bool TypeBuilder_get_IsGenericType_m1475565622 (TypeBuilder_t3308873219 * __this, const MethodInfo* method) { { bool L_0 = TypeBuilder_get_IsGenericTypeDefinition_m1652226431(__this, /*hidden argument*/NULL); return L_0; } } // System.Runtime.InteropServices.MarshalAsAttribute System.Reflection.Emit.UnmanagedMarshal::ToMarshalAsAttribute() extern "C" MarshalAsAttribute_t2900773360 * UnmanagedMarshal_ToMarshalAsAttribute_m3695569337 (UnmanagedMarshal_t4270021860 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (UnmanagedMarshal_ToMarshalAsAttribute_m3695569337_MetadataUsageId); s_Il2CppMethodInitialized = true; } MarshalAsAttribute_t2900773360 * V_0 = NULL; { int32_t L_0 = __this->get_t_1(); MarshalAsAttribute_t2900773360 * L_1 = (MarshalAsAttribute_t2900773360 *)il2cpp_codegen_object_new(MarshalAsAttribute_t2900773360_il2cpp_TypeInfo_var); MarshalAsAttribute__ctor_m1892084128(L_1, L_0, /*hidden argument*/NULL); V_0 = L_1; MarshalAsAttribute_t2900773360 * L_2 = V_0; int32_t L_3 = __this->get_tbase_2(); NullCheck(L_2); L_2->set_ArraySubType_1(L_3); MarshalAsAttribute_t2900773360 * L_4 = V_0; String_t* L_5 = __this->get_mcookie_4(); NullCheck(L_4); L_4->set_MarshalCookie_2(L_5); MarshalAsAttribute_t2900773360 * L_6 = V_0; String_t* L_7 = __this->get_marshaltype_5(); NullCheck(L_6); L_6->set_MarshalType_3(L_7); MarshalAsAttribute_t2900773360 * L_8 = V_0; Type_t * L_9 = __this->get_marshaltyperef_6(); NullCheck(L_8); L_8->set_MarshalTypeRef_4(L_9); int32_t L_10 = __this->get_count_0(); if ((!(((uint32_t)L_10) == ((uint32_t)(-1))))) { goto IL_0054; } } { MarshalAsAttribute_t2900773360 * L_11 = V_0; NullCheck(L_11); L_11->set_SizeConst_5(0); goto IL_0060; } IL_0054: { MarshalAsAttribute_t2900773360 * L_12 = V_0; int32_t L_13 = __this->get_count_0(); NullCheck(L_12); L_12->set_SizeConst_5(L_13); } IL_0060: { int32_t L_14 = __this->get_param_num_7(); if ((!(((uint32_t)L_14) == ((uint32_t)(-1))))) { goto IL_0078; } } { MarshalAsAttribute_t2900773360 * L_15 = V_0; NullCheck(L_15); L_15->set_SizeParamIndex_6((int16_t)0); goto IL_0085; } IL_0078: { MarshalAsAttribute_t2900773360 * L_16 = V_0; int32_t L_17 = __this->get_param_num_7(); NullCheck(L_16); L_16->set_SizeParamIndex_6((((int16_t)((int16_t)L_17)))); } IL_0085: { MarshalAsAttribute_t2900773360 * L_18 = V_0; return L_18; } } // System.Void System.Reflection.EventInfo::.ctor() extern "C" void EventInfo__ctor_m1190141300 (EventInfo_t * __this, const MethodInfo* method) { { MemberInfo__ctor_m2808577188(__this, /*hidden argument*/NULL); return; } } // System.Type System.Reflection.EventInfo::get_EventHandlerType() extern "C" Type_t * EventInfo_get_EventHandlerType_m2787680849 (EventInfo_t * __this, const MethodInfo* method) { ParameterInfoU5BU5D_t2275869610* V_0 = NULL; MethodInfo_t * V_1 = NULL; Type_t * V_2 = NULL; { MethodInfo_t * L_0 = VirtFuncInvoker1< MethodInfo_t *, bool >::Invoke(16 /* System.Reflection.MethodInfo System.Reflection.EventInfo::GetAddMethod(System.Boolean) */, __this, (bool)1); V_1 = L_0; MethodInfo_t * L_1 = V_1; NullCheck(L_1); ParameterInfoU5BU5D_t2275869610* L_2 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_1); V_0 = L_2; ParameterInfoU5BU5D_t2275869610* L_3 = V_0; NullCheck(L_3); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_3)->max_length))))) <= ((int32_t)0))) { goto IL_0023; } } { ParameterInfoU5BU5D_t2275869610* L_4 = V_0; NullCheck(L_4); int32_t L_5 = 0; ParameterInfo_t2249040075 * L_6 = (L_4)->GetAt(static_cast<il2cpp_array_size_t>(L_5)); NullCheck(L_6); Type_t * L_7 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_6); V_2 = L_7; Type_t * L_8 = V_2; return L_8; } IL_0023: { return (Type_t *)NULL; } } // System.Reflection.MemberTypes System.Reflection.EventInfo::get_MemberType() extern "C" int32_t EventInfo_get_MemberType_m3337516651 (EventInfo_t * __this, const MethodInfo* method) { { return (int32_t)(2); } } // System.Void System.Reflection.EventInfo/AddEventAdapter::.ctor(System.Object,System.IntPtr) extern "C" void AddEventAdapter__ctor_m4122716273 (AddEventAdapter_t1766862959 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) { __this->set_method_ptr_0((Il2CppMethodPointer)((MethodInfo*)___method1.get_m_value_0())->methodPointer); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // System.Void System.Reflection.EventInfo/AddEventAdapter::Invoke(System.Object,System.Delegate) extern "C" void AddEventAdapter_Invoke_m3970567975 (AddEventAdapter_t1766862959 * __this, Il2CppObject * ____this0, Delegate_t3022476291 * ___dele1, const MethodInfo* method) { if(__this->get_prev_9() != NULL) { AddEventAdapter_Invoke_m3970567975((AddEventAdapter_t1766862959 *)__this->get_prev_9(),____this0, ___dele1, method); } il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found((MethodInfo*)(__this->get_method_3().get_m_value_0())); bool ___methodIsStatic = MethodIsStatic((MethodInfo*)(__this->get_method_3().get_m_value_0())); if (__this->get_m_target_2() != NULL && ___methodIsStatic) { typedef void (*FunctionPointerType) (Il2CppObject *, void* __this, Il2CppObject * ____this0, Delegate_t3022476291 * ___dele1, const MethodInfo* method); ((FunctionPointerType)__this->get_method_ptr_0())(NULL,__this->get_m_target_2(),____this0, ___dele1,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else if (__this->get_m_target_2() != NULL || ___methodIsStatic) { typedef void (*FunctionPointerType) (void* __this, Il2CppObject * ____this0, Delegate_t3022476291 * ___dele1, const MethodInfo* method); ((FunctionPointerType)__this->get_method_ptr_0())(__this->get_m_target_2(),____this0, ___dele1,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else { typedef void (*FunctionPointerType) (void* __this, Delegate_t3022476291 * ___dele1, const MethodInfo* method); ((FunctionPointerType)__this->get_method_ptr_0())(____this0, ___dele1,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } } // System.IAsyncResult System.Reflection.EventInfo/AddEventAdapter::BeginInvoke(System.Object,System.Delegate,System.AsyncCallback,System.Object) extern "C" Il2CppObject * AddEventAdapter_BeginInvoke_m3628937824 (AddEventAdapter_t1766862959 * __this, Il2CppObject * ____this0, Delegate_t3022476291 * ___dele1, AsyncCallback_t163412349 * ___callback2, Il2CppObject * ___object3, const MethodInfo* method) { void *__d_args[3] = {0}; __d_args[0] = ____this0; __d_args[1] = ___dele1; return (Il2CppObject *)il2cpp_codegen_delegate_begin_invoke((Il2CppDelegate*)__this, __d_args, (Il2CppDelegate*)___callback2, (Il2CppObject*)___object3); } // System.Void System.Reflection.EventInfo/AddEventAdapter::EndInvoke(System.IAsyncResult) extern "C" void AddEventAdapter_EndInvoke_m1884114191 (AddEventAdapter_t1766862959 * __this, Il2CppObject * ___result0, const MethodInfo* method) { il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0); } // System.Void System.Reflection.FieldInfo::.ctor() extern "C" void FieldInfo__ctor_m1952545900 (FieldInfo_t * __this, const MethodInfo* method) { { MemberInfo__ctor_m2808577188(__this, /*hidden argument*/NULL); return; } } // System.Reflection.MemberTypes System.Reflection.FieldInfo::get_MemberType() extern "C" int32_t FieldInfo_get_MemberType_m4190511717 (FieldInfo_t * __this, const MethodInfo* method) { { return (int32_t)(4); } } // System.Boolean System.Reflection.FieldInfo::get_IsLiteral() extern "C" bool FieldInfo_get_IsLiteral_m267898096 (FieldInfo_t * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(14 /* System.Reflection.FieldAttributes System.Reflection.FieldInfo::get_Attributes() */, __this); return (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)64)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.FieldInfo::get_IsStatic() extern "C" bool FieldInfo_get_IsStatic_m1411173225 (FieldInfo_t * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(14 /* System.Reflection.FieldAttributes System.Reflection.FieldInfo::get_Attributes() */, __this); return (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)16)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.FieldInfo::get_IsNotSerialized() extern "C" bool FieldInfo_get_IsNotSerialized_m2322769148 (FieldInfo_t * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(14 /* System.Reflection.FieldAttributes System.Reflection.FieldInfo::get_Attributes() */, __this); return (bool)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)128)))) == ((int32_t)((int32_t)128)))? 1 : 0); } } // System.Void System.Reflection.FieldInfo::SetValue(System.Object,System.Object) extern "C" void FieldInfo_SetValue_m2504255891 (FieldInfo_t * __this, Il2CppObject * ___obj0, Il2CppObject * ___value1, const MethodInfo* method) { { Il2CppObject * L_0 = ___obj0; Il2CppObject * L_1 = ___value1; VirtActionInvoker5< Il2CppObject *, Il2CppObject *, int32_t, Binder_t3404612058 *, CultureInfo_t3500843524 * >::Invoke(21 /* System.Void System.Reflection.FieldInfo::SetValue(System.Object,System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Globalization.CultureInfo) */, __this, L_0, L_1, 0, (Binder_t3404612058 *)NULL, (CultureInfo_t3500843524 *)NULL); return; } } // System.Reflection.FieldInfo System.Reflection.FieldInfo::internal_from_handle_type(System.IntPtr,System.IntPtr) extern "C" FieldInfo_t * FieldInfo_internal_from_handle_type_m3419926447 (Il2CppObject * __this /* static, unused */, IntPtr_t ___field_handle0, IntPtr_t ___type_handle1, const MethodInfo* method) { using namespace il2cpp::icalls; typedef FieldInfo_t * (*FieldInfo_internal_from_handle_type_m3419926447_ftn) (IntPtr_t, IntPtr_t); return ((FieldInfo_internal_from_handle_type_m3419926447_ftn)mscorlib::System::Reflection::FieldInfo::internal_from_handle_type) (___field_handle0, ___type_handle1); } // System.Reflection.FieldInfo System.Reflection.FieldInfo::GetFieldFromHandle(System.RuntimeFieldHandle) extern "C" FieldInfo_t * FieldInfo_GetFieldFromHandle_m1587354836 (Il2CppObject * __this /* static, unused */, RuntimeFieldHandle_t2331729674 ___handle0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (FieldInfo_GetFieldFromHandle_m1587354836_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IntPtr_t L_0 = RuntimeFieldHandle_get_Value_m3963757144((&___handle0), /*hidden argument*/NULL); IntPtr_t L_1 = ((IntPtr_t_StaticFields*)IntPtr_t_il2cpp_TypeInfo_var->static_fields)->get_Zero_1(); bool L_2 = IntPtr_op_Equality_m1573482188(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0021; } } { ArgumentException_t3259014390 * L_3 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_3, _stringLiteral382420726, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_3); } IL_0021: { IntPtr_t L_4 = RuntimeFieldHandle_get_Value_m3963757144((&___handle0), /*hidden argument*/NULL); IntPtr_t L_5 = ((IntPtr_t_StaticFields*)IntPtr_t_il2cpp_TypeInfo_var->static_fields)->get_Zero_1(); FieldInfo_t * L_6 = FieldInfo_internal_from_handle_type_m3419926447(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); return L_6; } } // System.Int32 System.Reflection.FieldInfo::GetFieldOffset() extern "C" int32_t FieldInfo_GetFieldOffset_m375239709 (FieldInfo_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (FieldInfo_GetFieldOffset_m375239709_MetadataUsageId); s_Il2CppMethodInitialized = true; } { SystemException_t3877406272 * L_0 = (SystemException_t3877406272 *)il2cpp_codegen_object_new(SystemException_t3877406272_il2cpp_TypeInfo_var); SystemException__ctor_m4001391027(L_0, _stringLiteral3975950849, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Reflection.Emit.UnmanagedMarshal System.Reflection.FieldInfo::GetUnmanagedMarshal() extern "C" UnmanagedMarshal_t4270021860 * FieldInfo_GetUnmanagedMarshal_m3869098058 (FieldInfo_t * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef UnmanagedMarshal_t4270021860 * (*FieldInfo_GetUnmanagedMarshal_m3869098058_ftn) (FieldInfo_t *); return ((FieldInfo_GetUnmanagedMarshal_m3869098058_ftn)mscorlib::System::Reflection::FieldInfo::GetUnmanagedMarshal) (__this); } // System.Reflection.Emit.UnmanagedMarshal System.Reflection.FieldInfo::get_UMarshal() extern "C" UnmanagedMarshal_t4270021860 * FieldInfo_get_UMarshal_m1934544188 (FieldInfo_t * __this, const MethodInfo* method) { { UnmanagedMarshal_t4270021860 * L_0 = FieldInfo_GetUnmanagedMarshal_m3869098058(__this, /*hidden argument*/NULL); return L_0; } } // System.Object[] System.Reflection.FieldInfo::GetPseudoCustomAttributes() extern "C" ObjectU5BU5D_t3614634134* FieldInfo_GetPseudoCustomAttributes_m2500972355 (FieldInfo_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (FieldInfo_GetPseudoCustomAttributes_m2500972355_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; UnmanagedMarshal_t4270021860 * V_1 = NULL; ObjectU5BU5D_t3614634134* V_2 = NULL; { V_0 = 0; bool L_0 = FieldInfo_get_IsNotSerialized_m2322769148(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0011; } } { int32_t L_1 = V_0; V_0 = ((int32_t)((int32_t)L_1+(int32_t)1)); } IL_0011: { Type_t * L_2 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, __this); NullCheck(L_2); bool L_3 = Type_get_IsExplicitLayout_m1489853866(L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_0025; } } { int32_t L_4 = V_0; V_0 = ((int32_t)((int32_t)L_4+(int32_t)1)); } IL_0025: { UnmanagedMarshal_t4270021860 * L_5 = VirtFuncInvoker0< UnmanagedMarshal_t4270021860 * >::Invoke(24 /* System.Reflection.Emit.UnmanagedMarshal System.Reflection.FieldInfo::get_UMarshal() */, __this); V_1 = L_5; UnmanagedMarshal_t4270021860 * L_6 = V_1; if (!L_6) { goto IL_0036; } } { int32_t L_7 = V_0; V_0 = ((int32_t)((int32_t)L_7+(int32_t)1)); } IL_0036: { int32_t L_8 = V_0; if (L_8) { goto IL_003e; } } { return (ObjectU5BU5D_t3614634134*)NULL; } IL_003e: { int32_t L_9 = V_0; V_2 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)L_9)); V_0 = 0; bool L_10 = FieldInfo_get_IsNotSerialized_m2322769148(__this, /*hidden argument*/NULL); if (!L_10) { goto IL_005e; } } { ObjectU5BU5D_t3614634134* L_11 = V_2; int32_t L_12 = V_0; int32_t L_13 = L_12; V_0 = ((int32_t)((int32_t)L_13+(int32_t)1)); NonSerializedAttribute_t399263003 * L_14 = (NonSerializedAttribute_t399263003 *)il2cpp_codegen_object_new(NonSerializedAttribute_t399263003_il2cpp_TypeInfo_var); NonSerializedAttribute__ctor_m1638643584(L_14, /*hidden argument*/NULL); NullCheck(L_11); ArrayElementTypeCheck (L_11, L_14); (L_11)->SetAt(static_cast<il2cpp_array_size_t>(L_13), (Il2CppObject *)L_14); } IL_005e: { Type_t * L_15 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, __this); NullCheck(L_15); bool L_16 = Type_get_IsExplicitLayout_m1489853866(L_15, /*hidden argument*/NULL); if (!L_16) { goto IL_0080; } } { ObjectU5BU5D_t3614634134* L_17 = V_2; int32_t L_18 = V_0; int32_t L_19 = L_18; V_0 = ((int32_t)((int32_t)L_19+(int32_t)1)); int32_t L_20 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Reflection.FieldInfo::GetFieldOffset() */, __this); FieldOffsetAttribute_t1553145711 * L_21 = (FieldOffsetAttribute_t1553145711 *)il2cpp_codegen_object_new(FieldOffsetAttribute_t1553145711_il2cpp_TypeInfo_var); FieldOffsetAttribute__ctor_m3347191262(L_21, L_20, /*hidden argument*/NULL); NullCheck(L_17); ArrayElementTypeCheck (L_17, L_21); (L_17)->SetAt(static_cast<il2cpp_array_size_t>(L_19), (Il2CppObject *)L_21); } IL_0080: { UnmanagedMarshal_t4270021860 * L_22 = V_1; if (!L_22) { goto IL_0093; } } { ObjectU5BU5D_t3614634134* L_23 = V_2; int32_t L_24 = V_0; int32_t L_25 = L_24; V_0 = ((int32_t)((int32_t)L_25+(int32_t)1)); UnmanagedMarshal_t4270021860 * L_26 = V_1; NullCheck(L_26); MarshalAsAttribute_t2900773360 * L_27 = UnmanagedMarshal_ToMarshalAsAttribute_m3695569337(L_26, /*hidden argument*/NULL); NullCheck(L_23); ArrayElementTypeCheck (L_23, L_27); (L_23)->SetAt(static_cast<il2cpp_array_size_t>(L_25), (Il2CppObject *)L_27); } IL_0093: { ObjectU5BU5D_t3614634134* L_28 = V_2; return L_28; } } // System.Void System.Reflection.MemberFilter::.ctor(System.Object,System.IntPtr) extern "C" void MemberFilter__ctor_m1775909550 (MemberFilter_t3405857066 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) { __this->set_method_ptr_0((Il2CppMethodPointer)((MethodInfo*)___method1.get_m_value_0())->methodPointer); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // System.Boolean System.Reflection.MemberFilter::Invoke(System.Reflection.MemberInfo,System.Object) extern "C" bool MemberFilter_Invoke_m2927312774 (MemberFilter_t3405857066 * __this, MemberInfo_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method) { if(__this->get_prev_9() != NULL) { MemberFilter_Invoke_m2927312774((MemberFilter_t3405857066 *)__this->get_prev_9(),___m0, ___filterCriteria1, method); } il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found((MethodInfo*)(__this->get_method_3().get_m_value_0())); bool ___methodIsStatic = MethodIsStatic((MethodInfo*)(__this->get_method_3().get_m_value_0())); if (__this->get_m_target_2() != NULL && ___methodIsStatic) { typedef bool (*FunctionPointerType) (Il2CppObject *, void* __this, MemberInfo_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(NULL,__this->get_m_target_2(),___m0, ___filterCriteria1,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else if (__this->get_m_target_2() != NULL || ___methodIsStatic) { typedef bool (*FunctionPointerType) (void* __this, MemberInfo_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(__this->get_m_target_2(),___m0, ___filterCriteria1,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else { typedef bool (*FunctionPointerType) (void* __this, Il2CppObject * ___filterCriteria1, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(___m0, ___filterCriteria1,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } } // System.IAsyncResult System.Reflection.MemberFilter::BeginInvoke(System.Reflection.MemberInfo,System.Object,System.AsyncCallback,System.Object) extern "C" Il2CppObject * MemberFilter_BeginInvoke_m149662271 (MemberFilter_t3405857066 * __this, MemberInfo_t * ___m0, Il2CppObject * ___filterCriteria1, AsyncCallback_t163412349 * ___callback2, Il2CppObject * ___object3, const MethodInfo* method) { void *__d_args[3] = {0}; __d_args[0] = ___m0; __d_args[1] = ___filterCriteria1; return (Il2CppObject *)il2cpp_codegen_delegate_begin_invoke((Il2CppDelegate*)__this, __d_args, (Il2CppDelegate*)___callback2, (Il2CppObject*)___object3); } // System.Boolean System.Reflection.MemberFilter::EndInvoke(System.IAsyncResult) extern "C" bool MemberFilter_EndInvoke_m3642216476 (MemberFilter_t3405857066 * __this, Il2CppObject * ___result0, const MethodInfo* method) { Il2CppObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0); return *(bool*)UnBox ((Il2CppCodeGenObject*)__result); } // System.Void System.Reflection.MemberInfo::.ctor() extern "C" void MemberInfo__ctor_m2808577188 (MemberInfo_t * __this, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); return; } } // System.Reflection.Module System.Reflection.MemberInfo::get_Module() extern "C" Module_t4282841206 * MemberInfo_get_Module_m3957426656 (MemberInfo_t * __this, const MethodInfo* method) { { Type_t * L_0 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, __this); NullCheck(L_0); Module_t4282841206 * L_1 = VirtFuncInvoker0< Module_t4282841206 * >::Invoke(10 /* System.Reflection.Module System.Type::get_Module() */, L_0); return L_1; } } // System.Void System.Reflection.MemberInfoSerializationHolder::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void MemberInfoSerializationHolder__ctor_m1297860825 (MemberInfoSerializationHolder_t2799051170 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___ctx1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MemberInfoSerializationHolder__ctor_m1297860825_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* V_0 = NULL; String_t* V_1 = NULL; Assembly_t4268412390 * V_2 = NULL; Exception_t1927440687 * __last_unhandled_exception = 0; NO_UNUSED_WARNING (__last_unhandled_exception); Exception_t1927440687 * __exception_local = 0; NO_UNUSED_WARNING (__exception_local); int32_t __leave_target = 0; NO_UNUSED_WARNING (__leave_target); { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_0 = ___info0; NullCheck(L_0); String_t* L_1 = SerializationInfo_GetString_m547109409(L_0, _stringLiteral3484720401, /*hidden argument*/NULL); V_0 = L_1; SerializationInfo_t228987430 * L_2 = ___info0; NullCheck(L_2); String_t* L_3 = SerializationInfo_GetString_m547109409(L_2, _stringLiteral2809705325, /*hidden argument*/NULL); V_1 = L_3; SerializationInfo_t228987430 * L_4 = ___info0; NullCheck(L_4); String_t* L_5 = SerializationInfo_GetString_m547109409(L_4, _stringLiteral2328219947, /*hidden argument*/NULL); __this->set__memberName_0(L_5); SerializationInfo_t228987430 * L_6 = ___info0; NullCheck(L_6); String_t* L_7 = SerializationInfo_GetString_m547109409(L_6, _stringLiteral3902976916, /*hidden argument*/NULL); __this->set__memberSignature_1(L_7); SerializationInfo_t228987430 * L_8 = ___info0; NullCheck(L_8); int32_t L_9 = SerializationInfo_GetInt32_m4039439501(L_8, _stringLiteral1068945792, /*hidden argument*/NULL); __this->set__memberType_2(L_9); } IL_0051: try { // begin try (depth: 1) __this->set__genericArguments_4((TypeU5BU5D_t1664964607*)NULL); goto IL_0063; } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __exception_local = (Exception_t1927440687 *)e.ex; if(il2cpp_codegen_class_is_assignable_from (SerializationException_t753258759_il2cpp_TypeInfo_var, e.ex->klass)) goto CATCH_005d; throw e; } CATCH_005d: { // begin catch(System.Runtime.Serialization.SerializationException) goto IL_0063; } // end catch (depth: 1) IL_0063: { String_t* L_10 = V_0; Assembly_t4268412390 * L_11 = Assembly_Load_m902205655(NULL /*static, unused*/, L_10, /*hidden argument*/NULL); V_2 = L_11; Assembly_t4268412390 * L_12 = V_2; String_t* L_13 = V_1; NullCheck(L_12); Type_t * L_14 = Assembly_GetType_m2765594712(L_12, L_13, (bool)1, (bool)1, /*hidden argument*/NULL); __this->set__reflectedType_3(L_14); return; } } // System.Void System.Reflection.MemberInfoSerializationHolder::Serialize(System.Runtime.Serialization.SerializationInfo,System.String,System.Type,System.String,System.Reflection.MemberTypes) extern "C" void MemberInfoSerializationHolder_Serialize_m1949812823 (Il2CppObject * __this /* static, unused */, SerializationInfo_t228987430 * ___info0, String_t* ___name1, Type_t * ___klass2, String_t* ___signature3, int32_t ___type4, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; String_t* L_1 = ___name1; Type_t * L_2 = ___klass2; String_t* L_3 = ___signature3; int32_t L_4 = ___type4; MemberInfoSerializationHolder_Serialize_m4243060728(NULL /*static, unused*/, L_0, L_1, L_2, L_3, L_4, (TypeU5BU5D_t1664964607*)(TypeU5BU5D_t1664964607*)NULL, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.MemberInfoSerializationHolder::Serialize(System.Runtime.Serialization.SerializationInfo,System.String,System.Type,System.String,System.Reflection.MemberTypes,System.Type[]) extern "C" void MemberInfoSerializationHolder_Serialize_m4243060728 (Il2CppObject * __this /* static, unused */, SerializationInfo_t228987430 * ___info0, String_t* ___name1, Type_t * ___klass2, String_t* ___signature3, int32_t ___type4, TypeU5BU5D_t1664964607* ___genericArguments5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MemberInfoSerializationHolder_Serialize_m4243060728_MetadataUsageId); s_Il2CppMethodInitialized = true; } { SerializationInfo_t228987430 * L_0 = ___info0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_1 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(MemberInfoSerializationHolder_t2799051170_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_0); SerializationInfo_SetType_m499725474(L_0, L_1, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_2 = ___info0; Type_t * L_3 = ___klass2; NullCheck(L_3); Module_t4282841206 * L_4 = VirtFuncInvoker0< Module_t4282841206 * >::Invoke(10 /* System.Reflection.Module System.Type::get_Module() */, L_3); NullCheck(L_4); Assembly_t4268412390 * L_5 = Module_get_Assembly_m3690289982(L_4, /*hidden argument*/NULL); NullCheck(L_5); String_t* L_6 = VirtFuncInvoker0< String_t* >::Invoke(6 /* System.String System.Reflection.Assembly::get_FullName() */, L_5); Type_t * L_7 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(String_t_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_2); SerializationInfo_AddValue_m1781549036(L_2, _stringLiteral3484720401, L_6, L_7, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_8 = ___info0; Type_t * L_9 = ___klass2; NullCheck(L_9); String_t* L_10 = VirtFuncInvoker0< String_t* >::Invoke(18 /* System.String System.Type::get_FullName() */, L_9); Type_t * L_11 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(String_t_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_8); SerializationInfo_AddValue_m1781549036(L_8, _stringLiteral2809705325, L_10, L_11, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_12 = ___info0; String_t* L_13 = ___name1; Type_t * L_14 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(String_t_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_12); SerializationInfo_AddValue_m1781549036(L_12, _stringLiteral2328219947, L_13, L_14, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_15 = ___info0; String_t* L_16 = ___signature3; Type_t * L_17 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(String_t_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_15); SerializationInfo_AddValue_m1781549036(L_15, _stringLiteral3902976916, L_16, L_17, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_18 = ___info0; int32_t L_19 = ___type4; NullCheck(L_18); SerializationInfo_AddValue_m902275108(L_18, _stringLiteral1068945792, L_19, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_20 = ___info0; TypeU5BU5D_t1664964607* L_21 = ___genericArguments5; Type_t * L_22 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(TypeU5BU5D_t1664964607_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_20); SerializationInfo_AddValue_m1781549036(L_20, _stringLiteral3962342765, (Il2CppObject *)(Il2CppObject *)L_21, L_22, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.MemberInfoSerializationHolder::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void MemberInfoSerializationHolder_GetObjectData_m1760456120 (MemberInfoSerializationHolder_t2799051170 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MemberInfoSerializationHolder_GetObjectData_m1760456120_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Object System.Reflection.MemberInfoSerializationHolder::GetRealObject(System.Runtime.Serialization.StreamingContext) extern "C" Il2CppObject * MemberInfoSerializationHolder_GetRealObject_m3643310964 (MemberInfoSerializationHolder_t2799051170 * __this, StreamingContext_t1417235061 ___context0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MemberInfoSerializationHolder_GetRealObject_m3643310964_MetadataUsageId); s_Il2CppMethodInitialized = true; } ConstructorInfoU5BU5D_t1996683371* V_0 = NULL; int32_t V_1 = 0; MethodInfoU5BU5D_t152480188* V_2 = NULL; int32_t V_3 = 0; MethodInfo_t * V_4 = NULL; FieldInfo_t * V_5 = NULL; PropertyInfo_t * V_6 = NULL; EventInfo_t * V_7 = NULL; int32_t V_8 = 0; { int32_t L_0 = __this->get__memberType_2(); V_8 = L_0; int32_t L_1 = V_8; switch (((int32_t)((int32_t)L_1-(int32_t)1))) { case 0: { goto IL_003f; } case 1: { goto IL_01c2; } case 2: { goto IL_0031; } case 3: { goto IL_014c; } case 4: { goto IL_0031; } case 5: { goto IL_0031; } case 6: { goto IL_0031; } case 7: { goto IL_0099; } } } IL_0031: { int32_t L_2 = V_8; if ((((int32_t)L_2) == ((int32_t)((int32_t)16)))) { goto IL_0187; } } { goto IL_01fd; } IL_003f: { Type_t * L_3 = __this->get__reflectedType_3(); NullCheck(L_3); ConstructorInfoU5BU5D_t1996683371* L_4 = VirtFuncInvoker1< ConstructorInfoU5BU5D_t1996683371*, int32_t >::Invoke(77 /* System.Reflection.ConstructorInfo[] System.Type::GetConstructors(System.Reflection.BindingFlags) */, L_3, ((int32_t)60)); V_0 = L_4; V_1 = 0; goto IL_0074; } IL_0054: { ConstructorInfoU5BU5D_t1996683371* L_5 = V_0; int32_t L_6 = V_1; NullCheck(L_5); int32_t L_7 = L_6; ConstructorInfo_t2851816542 * L_8 = (L_5)->GetAt(static_cast<il2cpp_array_size_t>(L_7)); NullCheck(L_8); String_t* L_9 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_8); String_t* L_10 = __this->get__memberSignature_1(); NullCheck(L_9); bool L_11 = String_Equals_m2633592423(L_9, L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_0070; } } { ConstructorInfoU5BU5D_t1996683371* L_12 = V_0; int32_t L_13 = V_1; NullCheck(L_12); int32_t L_14 = L_13; ConstructorInfo_t2851816542 * L_15 = (L_12)->GetAt(static_cast<il2cpp_array_size_t>(L_14)); return L_15; } IL_0070: { int32_t L_16 = V_1; V_1 = ((int32_t)((int32_t)L_16+(int32_t)1)); } IL_0074: { int32_t L_17 = V_1; ConstructorInfoU5BU5D_t1996683371* L_18 = V_0; NullCheck(L_18); if ((((int32_t)L_17) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_18)->max_length))))))) { goto IL_0054; } } { String_t* L_19 = __this->get__memberSignature_1(); Type_t * L_20 = __this->get__reflectedType_3(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_21 = String_Format_m1811873526(NULL /*static, unused*/, _stringLiteral948459439, L_19, L_20, /*hidden argument*/NULL); SerializationException_t753258759 * L_22 = (SerializationException_t753258759 *)il2cpp_codegen_object_new(SerializationException_t753258759_il2cpp_TypeInfo_var); SerializationException__ctor_m1019897788(L_22, L_21, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_22); } IL_0099: { Type_t * L_23 = __this->get__reflectedType_3(); NullCheck(L_23); MethodInfoU5BU5D_t152480188* L_24 = VirtFuncInvoker1< MethodInfoU5BU5D_t152480188*, int32_t >::Invoke(56 /* System.Reflection.MethodInfo[] System.Type::GetMethods(System.Reflection.BindingFlags) */, L_23, ((int32_t)60)); V_2 = L_24; V_3 = 0; goto IL_0127; } IL_00ae: { MethodInfoU5BU5D_t152480188* L_25 = V_2; int32_t L_26 = V_3; NullCheck(L_25); int32_t L_27 = L_26; MethodInfo_t * L_28 = (L_25)->GetAt(static_cast<il2cpp_array_size_t>(L_27)); NullCheck(L_28); String_t* L_29 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_28); String_t* L_30 = __this->get__memberSignature_1(); NullCheck(L_29); bool L_31 = String_Equals_m2633592423(L_29, L_30, /*hidden argument*/NULL); if (!L_31) { goto IL_00ca; } } { MethodInfoU5BU5D_t152480188* L_32 = V_2; int32_t L_33 = V_3; NullCheck(L_32); int32_t L_34 = L_33; MethodInfo_t * L_35 = (L_32)->GetAt(static_cast<il2cpp_array_size_t>(L_34)); return L_35; } IL_00ca: { TypeU5BU5D_t1664964607* L_36 = __this->get__genericArguments_4(); if (!L_36) { goto IL_0123; } } { MethodInfoU5BU5D_t152480188* L_37 = V_2; int32_t L_38 = V_3; NullCheck(L_37); int32_t L_39 = L_38; MethodInfo_t * L_40 = (L_37)->GetAt(static_cast<il2cpp_array_size_t>(L_39)); NullCheck(L_40); bool L_41 = VirtFuncInvoker0< bool >::Invoke(29 /* System.Boolean System.Reflection.MethodInfo::get_IsGenericMethod() */, L_40); if (!L_41) { goto IL_0123; } } { MethodInfoU5BU5D_t152480188* L_42 = V_2; int32_t L_43 = V_3; NullCheck(L_42); int32_t L_44 = L_43; MethodInfo_t * L_45 = (L_42)->GetAt(static_cast<il2cpp_array_size_t>(L_44)); NullCheck(L_45); TypeU5BU5D_t1664964607* L_46 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(26 /* System.Type[] System.Reflection.MethodInfo::GetGenericArguments() */, L_45); NullCheck(L_46); TypeU5BU5D_t1664964607* L_47 = __this->get__genericArguments_4(); NullCheck(L_47); if ((!(((uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_46)->max_length))))) == ((uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_47)->max_length)))))))) { goto IL_0123; } } { MethodInfoU5BU5D_t152480188* L_48 = V_2; int32_t L_49 = V_3; NullCheck(L_48); int32_t L_50 = L_49; MethodInfo_t * L_51 = (L_48)->GetAt(static_cast<il2cpp_array_size_t>(L_50)); TypeU5BU5D_t1664964607* L_52 = __this->get__genericArguments_4(); NullCheck(L_51); MethodInfo_t * L_53 = VirtFuncInvoker1< MethodInfo_t *, TypeU5BU5D_t1664964607* >::Invoke(32 /* System.Reflection.MethodInfo System.Reflection.MethodInfo::MakeGenericMethod(System.Type[]) */, L_51, L_52); V_4 = L_53; MethodInfo_t * L_54 = V_4; NullCheck(L_54); String_t* L_55 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_54); String_t* L_56 = __this->get__memberSignature_1(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_57 = String_op_Equality_m1790663636(NULL /*static, unused*/, L_55, L_56, /*hidden argument*/NULL); if (!L_57) { goto IL_0123; } } { MethodInfo_t * L_58 = V_4; return L_58; } IL_0123: { int32_t L_59 = V_3; V_3 = ((int32_t)((int32_t)L_59+(int32_t)1)); } IL_0127: { int32_t L_60 = V_3; MethodInfoU5BU5D_t152480188* L_61 = V_2; NullCheck(L_61); if ((((int32_t)L_60) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_61)->max_length))))))) { goto IL_00ae; } } { String_t* L_62 = __this->get__memberSignature_1(); Type_t * L_63 = __this->get__reflectedType_3(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_64 = String_Format_m1811873526(NULL /*static, unused*/, _stringLiteral3230290608, L_62, L_63, /*hidden argument*/NULL); SerializationException_t753258759 * L_65 = (SerializationException_t753258759 *)il2cpp_codegen_object_new(SerializationException_t753258759_il2cpp_TypeInfo_var); SerializationException__ctor_m1019897788(L_65, L_64, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_65); } IL_014c: { Type_t * L_66 = __this->get__reflectedType_3(); String_t* L_67 = __this->get__memberName_0(); NullCheck(L_66); FieldInfo_t * L_68 = VirtFuncInvoker2< FieldInfo_t *, String_t*, int32_t >::Invoke(47 /* System.Reflection.FieldInfo System.Type::GetField(System.String,System.Reflection.BindingFlags) */, L_66, L_67, ((int32_t)60)); V_5 = L_68; FieldInfo_t * L_69 = V_5; if (!L_69) { goto IL_016b; } } { FieldInfo_t * L_70 = V_5; return L_70; } IL_016b: { String_t* L_71 = __this->get__memberName_0(); Type_t * L_72 = __this->get__reflectedType_3(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_73 = String_Format_m1811873526(NULL /*static, unused*/, _stringLiteral2962078205, L_71, L_72, /*hidden argument*/NULL); SerializationException_t753258759 * L_74 = (SerializationException_t753258759 *)il2cpp_codegen_object_new(SerializationException_t753258759_il2cpp_TypeInfo_var); SerializationException__ctor_m1019897788(L_74, L_73, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_74); } IL_0187: { Type_t * L_75 = __this->get__reflectedType_3(); String_t* L_76 = __this->get__memberName_0(); NullCheck(L_75); PropertyInfo_t * L_77 = Type_GetProperty_m1510204374(L_75, L_76, ((int32_t)60), /*hidden argument*/NULL); V_6 = L_77; PropertyInfo_t * L_78 = V_6; if (!L_78) { goto IL_01a6; } } { PropertyInfo_t * L_79 = V_6; return L_79; } IL_01a6: { String_t* L_80 = __this->get__memberName_0(); Type_t * L_81 = __this->get__reflectedType_3(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_82 = String_Format_m1811873526(NULL /*static, unused*/, _stringLiteral2138058808, L_80, L_81, /*hidden argument*/NULL); SerializationException_t753258759 * L_83 = (SerializationException_t753258759 *)il2cpp_codegen_object_new(SerializationException_t753258759_il2cpp_TypeInfo_var); SerializationException__ctor_m1019897788(L_83, L_82, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_83); } IL_01c2: { Type_t * L_84 = __this->get__reflectedType_3(); String_t* L_85 = __this->get__memberName_0(); NullCheck(L_84); EventInfo_t * L_86 = VirtFuncInvoker2< EventInfo_t *, String_t*, int32_t >::Invoke(46 /* System.Reflection.EventInfo System.Type::GetEvent(System.String,System.Reflection.BindingFlags) */, L_84, L_85, ((int32_t)60)); V_7 = L_86; EventInfo_t * L_87 = V_7; if (!L_87) { goto IL_01e1; } } { EventInfo_t * L_88 = V_7; return L_88; } IL_01e1: { String_t* L_89 = __this->get__memberName_0(); Type_t * L_90 = __this->get__reflectedType_3(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_91 = String_Format_m1811873526(NULL /*static, unused*/, _stringLiteral3237053035, L_89, L_90, /*hidden argument*/NULL); SerializationException_t753258759 * L_92 = (SerializationException_t753258759 *)il2cpp_codegen_object_new(SerializationException_t753258759_il2cpp_TypeInfo_var); SerializationException__ctor_m1019897788(L_92, L_91, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_92); } IL_01fd: { int32_t L_93 = __this->get__memberType_2(); int32_t L_94 = L_93; Il2CppObject * L_95 = Box(MemberTypes_t3343038963_il2cpp_TypeInfo_var, &L_94); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_96 = String_Format_m2024975688(NULL /*static, unused*/, _stringLiteral2011492163, L_95, /*hidden argument*/NULL); SerializationException_t753258759 * L_97 = (SerializationException_t753258759 *)il2cpp_codegen_object_new(SerializationException_t753258759_il2cpp_TypeInfo_var); SerializationException__ctor_m1019897788(L_97, L_96, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_97); } } // System.Void System.Reflection.MethodBase::.ctor() extern "C" void MethodBase__ctor_m3951051358 (MethodBase_t904190842 * __this, const MethodInfo* method) { { MemberInfo__ctor_m2808577188(__this, /*hidden argument*/NULL); return; } } // System.Reflection.MethodBase System.Reflection.MethodBase::GetMethodFromHandleNoGenericCheck(System.RuntimeMethodHandle) extern "C" MethodBase_t904190842 * MethodBase_GetMethodFromHandleNoGenericCheck_m4274264088 (Il2CppObject * __this /* static, unused */, RuntimeMethodHandle_t894824333 ___handle0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBase_GetMethodFromHandleNoGenericCheck_m4274264088_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IntPtr_t L_0 = RuntimeMethodHandle_get_Value_m333629197((&___handle0), /*hidden argument*/NULL); IntPtr_t L_1 = ((IntPtr_t_StaticFields*)IntPtr_t_il2cpp_TypeInfo_var->static_fields)->get_Zero_1(); MethodBase_t904190842 * L_2 = MethodBase_GetMethodFromIntPtr_m1014299957(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Reflection.MethodBase System.Reflection.MethodBase::GetMethodFromIntPtr(System.IntPtr,System.IntPtr) extern "C" MethodBase_t904190842 * MethodBase_GetMethodFromIntPtr_m1014299957 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, IntPtr_t ___declaringType1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBase_GetMethodFromIntPtr_m1014299957_MetadataUsageId); s_Il2CppMethodInitialized = true; } MethodBase_t904190842 * V_0 = NULL; { IntPtr_t L_0 = ___handle0; IntPtr_t L_1 = ((IntPtr_t_StaticFields*)IntPtr_t_il2cpp_TypeInfo_var->static_fields)->get_Zero_1(); bool L_2 = IntPtr_op_Equality_m1573482188(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_001b; } } { ArgumentException_t3259014390 * L_3 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_3, _stringLiteral382420726, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_3); } IL_001b: { IntPtr_t L_4 = ___handle0; IntPtr_t L_5 = ___declaringType1; MethodBase_t904190842 * L_6 = MethodBase_GetMethodFromHandleInternalType_m570034609(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); V_0 = L_6; MethodBase_t904190842 * L_7 = V_0; if (L_7) { goto IL_0034; } } { ArgumentException_t3259014390 * L_8 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_8, _stringLiteral382420726, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_8); } IL_0034: { MethodBase_t904190842 * L_9 = V_0; return L_9; } } // System.Reflection.MethodBase System.Reflection.MethodBase::GetMethodFromHandle(System.RuntimeMethodHandle) extern "C" MethodBase_t904190842 * MethodBase_GetMethodFromHandle_m3983882276 (Il2CppObject * __this /* static, unused */, RuntimeMethodHandle_t894824333 ___handle0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBase_GetMethodFromHandle_m3983882276_MetadataUsageId); s_Il2CppMethodInitialized = true; } MethodBase_t904190842 * V_0 = NULL; Type_t * V_1 = NULL; { IntPtr_t L_0 = RuntimeMethodHandle_get_Value_m333629197((&___handle0), /*hidden argument*/NULL); IntPtr_t L_1 = ((IntPtr_t_StaticFields*)IntPtr_t_il2cpp_TypeInfo_var->static_fields)->get_Zero_1(); MethodBase_t904190842 * L_2 = MethodBase_GetMethodFromIntPtr_m1014299957(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; MethodBase_t904190842 * L_3 = V_0; NullCheck(L_3); Type_t * L_4 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, L_3); V_1 = L_4; Type_t * L_5 = V_1; NullCheck(L_5); bool L_6 = VirtFuncInvoker0< bool >::Invoke(83 /* System.Boolean System.Type::get_IsGenericType() */, L_5); if (L_6) { goto IL_002f; } } { Type_t * L_7 = V_1; NullCheck(L_7); bool L_8 = VirtFuncInvoker0< bool >::Invoke(81 /* System.Boolean System.Type::get_IsGenericTypeDefinition() */, L_7); if (!L_8) { goto IL_003a; } } IL_002f: { ArgumentException_t3259014390 * L_9 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_9, _stringLiteral1596710604, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_9); } IL_003a: { MethodBase_t904190842 * L_10 = V_0; return L_10; } } // System.Reflection.MethodBase System.Reflection.MethodBase::GetMethodFromHandleInternalType(System.IntPtr,System.IntPtr) extern "C" MethodBase_t904190842 * MethodBase_GetMethodFromHandleInternalType_m570034609 (Il2CppObject * __this /* static, unused */, IntPtr_t ___method_handle0, IntPtr_t ___type_handle1, const MethodInfo* method) { using namespace il2cpp::icalls; typedef MethodBase_t904190842 * (*MethodBase_GetMethodFromHandleInternalType_m570034609_ftn) (IntPtr_t, IntPtr_t); return ((MethodBase_GetMethodFromHandleInternalType_m570034609_ftn)mscorlib::System::Reflection::MethodBase::GetMethodFromHandleInternalType) (___method_handle0, ___type_handle1); } // System.Int32 System.Reflection.MethodBase::GetParameterCount() extern "C" int32_t MethodBase_GetParameterCount_m3877953436 (MethodBase_t904190842 * __this, const MethodInfo* method) { ParameterInfoU5BU5D_t2275869610* V_0 = NULL; { ParameterInfoU5BU5D_t2275869610* L_0 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, __this); V_0 = L_0; ParameterInfoU5BU5D_t2275869610* L_1 = V_0; if (L_1) { goto IL_000f; } } { return 0; } IL_000f: { ParameterInfoU5BU5D_t2275869610* L_2 = V_0; NullCheck(L_2); return (((int32_t)((int32_t)(((Il2CppArray *)L_2)->max_length)))); } } // System.Object System.Reflection.MethodBase::Invoke(System.Object,System.Object[]) extern "C" Il2CppObject * MethodBase_Invoke_m1075809207 (MethodBase_t904190842 * __this, Il2CppObject * ___obj0, ObjectU5BU5D_t3614634134* ___parameters1, const MethodInfo* method) { { Il2CppObject * L_0 = ___obj0; ObjectU5BU5D_t3614634134* L_1 = ___parameters1; Il2CppObject * L_2 = VirtFuncInvoker5< Il2CppObject *, Il2CppObject *, int32_t, Binder_t3404612058 *, ObjectU5BU5D_t3614634134*, CultureInfo_t3500843524 * >::Invoke(17 /* System.Object System.Reflection.MethodBase::Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) */, __this, L_0, 0, (Binder_t3404612058 *)NULL, L_1, (CultureInfo_t3500843524 *)NULL); return L_2; } } // System.Reflection.CallingConventions System.Reflection.MethodBase::get_CallingConvention() extern "C" int32_t MethodBase_get_CallingConvention_m2817807351 (MethodBase_t904190842 * __this, const MethodInfo* method) { { return (int32_t)(1); } } // System.Boolean System.Reflection.MethodBase::get_IsPublic() extern "C" bool MethodBase_get_IsPublic_m479656180 (MethodBase_t904190842 * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(19 /* System.Reflection.MethodAttributes System.Reflection.MethodBase::get_Attributes() */, __this); return (bool)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)7))) == ((int32_t)6))? 1 : 0); } } // System.Boolean System.Reflection.MethodBase::get_IsStatic() extern "C" bool MethodBase_get_IsStatic_m1015686807 (MethodBase_t904190842 * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(19 /* System.Reflection.MethodAttributes System.Reflection.MethodBase::get_Attributes() */, __this); return (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)16)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.MethodBase::get_IsVirtual() extern "C" bool MethodBase_get_IsVirtual_m1107721718 (MethodBase_t904190842 * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(19 /* System.Reflection.MethodAttributes System.Reflection.MethodBase::get_Attributes() */, __this); return (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)64)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.MethodBase::get_IsAbstract() extern "C" bool MethodBase_get_IsAbstract_m3521819231 (MethodBase_t904190842 * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(19 /* System.Reflection.MethodAttributes System.Reflection.MethodBase::get_Attributes() */, __this); return (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)1024)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Int32 System.Reflection.MethodBase::get_next_table_index(System.Object,System.Int32,System.Boolean) extern "C" int32_t MethodBase_get_next_table_index_m3185673846 (MethodBase_t904190842 * __this, Il2CppObject * ___obj0, int32_t ___table1, bool ___inc2, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBase_get_next_table_index_m3185673846_MetadataUsageId); s_Il2CppMethodInitialized = true; } MethodBuilder_t644187984 * V_0 = NULL; ConstructorBuilder_t700974433 * V_1 = NULL; { if (!((MethodBuilder_t644187984 *)IsInstSealed(__this, MethodBuilder_t644187984_il2cpp_TypeInfo_var))) { goto IL_001c; } } { V_0 = ((MethodBuilder_t644187984 *)CastclassSealed(__this, MethodBuilder_t644187984_il2cpp_TypeInfo_var)); MethodBuilder_t644187984 * L_0 = V_0; Il2CppObject * L_1 = ___obj0; int32_t L_2 = ___table1; bool L_3 = ___inc2; NullCheck(L_0); int32_t L_4 = MethodBuilder_get_next_table_index_m683309027(L_0, L_1, L_2, L_3, /*hidden argument*/NULL); return L_4; } IL_001c: { if (!((ConstructorBuilder_t700974433 *)IsInstSealed(__this, ConstructorBuilder_t700974433_il2cpp_TypeInfo_var))) { goto IL_0038; } } { V_1 = ((ConstructorBuilder_t700974433 *)CastclassSealed(__this, ConstructorBuilder_t700974433_il2cpp_TypeInfo_var)); ConstructorBuilder_t700974433 * L_5 = V_1; Il2CppObject * L_6 = ___obj0; int32_t L_7 = ___table1; bool L_8 = ___inc2; NullCheck(L_5); int32_t L_9 = ConstructorBuilder_get_next_table_index_m932085784(L_5, L_6, L_7, L_8, /*hidden argument*/NULL); return L_9; } IL_0038: { Exception_t1927440687 * L_10 = (Exception_t1927440687 *)il2cpp_codegen_object_new(Exception_t1927440687_il2cpp_TypeInfo_var); Exception__ctor_m485833136(L_10, _stringLiteral4028768107, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_10); } } // System.Type[] System.Reflection.MethodBase::GetGenericArguments() extern "C" TypeU5BU5D_t1664964607* MethodBase_GetGenericArguments_m1277035033 (MethodBase_t904190842 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodBase_GetGenericArguments_m1277035033_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m3232764727(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Boolean System.Reflection.MethodBase::get_ContainsGenericParameters() extern "C" bool MethodBase_get_ContainsGenericParameters_m1185248753 (MethodBase_t904190842 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.MethodBase::get_IsGenericMethodDefinition() extern "C" bool MethodBase_get_IsGenericMethodDefinition_m324279468 (MethodBase_t904190842 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.MethodBase::get_IsGenericMethod() extern "C" bool MethodBase_get_IsGenericMethod_m2492617497 (MethodBase_t904190842 * __this, const MethodInfo* method) { { return (bool)0; } } // System.Void System.Reflection.MethodInfo::.ctor() extern "C" void MethodInfo__ctor_m1853540423 (MethodInfo_t * __this, const MethodInfo* method) { { MethodBase__ctor_m3951051358(__this, /*hidden argument*/NULL); return; } } // System.Reflection.MemberTypes System.Reflection.MethodInfo::get_MemberType() extern "C" int32_t MethodInfo_get_MemberType_m103695984 (MethodInfo_t * __this, const MethodInfo* method) { { return (int32_t)(8); } } // System.Type System.Reflection.MethodInfo::get_ReturnType() extern "C" Type_t * MethodInfo_get_ReturnType_m1038770764 (MethodInfo_t * __this, const MethodInfo* method) { { return (Type_t *)NULL; } } // System.Reflection.MethodInfo System.Reflection.MethodInfo::MakeGenericMethod(System.Type[]) extern "C" MethodInfo_t * MethodInfo_MakeGenericMethod_m3327556920 (MethodInfo_t * __this, TypeU5BU5D_t1664964607* ___typeArguments0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodInfo_MakeGenericMethod_m3327556920_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = Object_GetType_m191970594(__this, /*hidden argument*/NULL); NullCheck(L_0); String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Type::ToString() */, L_0); NotSupportedException_t1793819818 * L_2 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_2, L_1, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_2); } } // System.Type[] System.Reflection.MethodInfo::GetGenericArguments() extern "C" TypeU5BU5D_t1664964607* MethodInfo_GetGenericArguments_m3393347888 (MethodInfo_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MethodInfo_GetGenericArguments_m3393347888_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_0 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); return L_0; } } // System.Boolean System.Reflection.MethodInfo::get_IsGenericMethod() extern "C" bool MethodInfo_get_IsGenericMethod_m861531298 (MethodInfo_t * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.MethodInfo::get_IsGenericMethodDefinition() extern "C" bool MethodInfo_get_IsGenericMethodDefinition_m647461435 (MethodInfo_t * __this, const MethodInfo* method) { { return (bool)0; } } // System.Boolean System.Reflection.MethodInfo::get_ContainsGenericParameters() extern "C" bool MethodInfo_get_ContainsGenericParameters_m572340060 (MethodInfo_t * __this, const MethodInfo* method) { { return (bool)0; } } // System.Void System.Reflection.Missing::.ctor() extern "C" void Missing__ctor_m4227264620 (Missing_t1033855606 * __this, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.Missing::.cctor() extern "C" void Missing__cctor_m1775889133 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Missing__cctor_m1775889133_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Missing_t1033855606 * L_0 = (Missing_t1033855606 *)il2cpp_codegen_object_new(Missing_t1033855606_il2cpp_TypeInfo_var); Missing__ctor_m4227264620(L_0, /*hidden argument*/NULL); ((Missing_t1033855606_StaticFields*)Missing_t1033855606_il2cpp_TypeInfo_var->static_fields)->set_Value_0(L_0); return; } } // System.Void System.Reflection.Missing::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void Missing_System_Runtime_Serialization_ISerializable_GetObjectData_m3092937593 (Missing_t1033855606 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { return; } } // System.Void System.Reflection.Module::.ctor() extern "C" void Module__ctor_m3853650010 (Module_t4282841206 * __this, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.Module::.cctor() extern "C" void Module__cctor_m2698817211 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Module__cctor_m2698817211_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IntPtr_t L_0; L_0.set_m_value_0((void*)(void*)Module_filter_by_type_name_m2283758100_MethodInfo_var); TypeFilter_t2905709404 * L_1 = (TypeFilter_t2905709404 *)il2cpp_codegen_object_new(TypeFilter_t2905709404_il2cpp_TypeInfo_var); TypeFilter__ctor_m1798016172(L_1, NULL, L_0, /*hidden argument*/NULL); ((Module_t4282841206_StaticFields*)Module_t4282841206_il2cpp_TypeInfo_var->static_fields)->set_FilterTypeName_1(L_1); IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)Module_filter_by_type_name_ignore_case_m3574895736_MethodInfo_var); TypeFilter_t2905709404 * L_3 = (TypeFilter_t2905709404 *)il2cpp_codegen_object_new(TypeFilter_t2905709404_il2cpp_TypeInfo_var); TypeFilter__ctor_m1798016172(L_3, NULL, L_2, /*hidden argument*/NULL); ((Module_t4282841206_StaticFields*)Module_t4282841206_il2cpp_TypeInfo_var->static_fields)->set_FilterTypeNameIgnoreCase_2(L_3); return; } } // System.Reflection.Assembly System.Reflection.Module::get_Assembly() extern "C" Assembly_t4268412390 * Module_get_Assembly_m3690289982 (Module_t4282841206 * __this, const MethodInfo* method) { { Assembly_t4268412390 * L_0 = __this->get_assembly_4(); return L_0; } } // System.String System.Reflection.Module::get_ScopeName() extern "C" String_t* Module_get_ScopeName_m207704721 (Module_t4282841206 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_scopename_7(); return L_0; } } // System.Object[] System.Reflection.Module::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* Module_GetCustomAttributes_m3581287913 (Module_t4282841206 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Module_GetCustomAttributes_m3581287913_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_2 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Void System.Reflection.Module::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void Module_GetObjectData_m3106234990 (Module_t4282841206 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Module_GetObjectData_m3106234990_MetadataUsageId); s_Il2CppMethodInitialized = true; } { SerializationInfo_t228987430 * L_0 = ___info0; if (L_0) { goto IL_0011; } } { ArgumentNullException_t628810857 * L_1 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m3380712306(L_1, _stringLiteral2792112382, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0011: { SerializationInfo_t228987430 * L_2 = ___info0; StreamingContext_t1417235061 L_3 = ___context1; UnitySerializationHolder_GetModuleData_m2945403213(NULL /*static, unused*/, __this, L_2, L_3, /*hidden argument*/NULL); return; } } // System.Type[] System.Reflection.Module::InternalGetTypes() extern "C" TypeU5BU5D_t1664964607* Module_InternalGetTypes_m4286760634 (Module_t4282841206 * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef TypeU5BU5D_t1664964607* (*Module_InternalGetTypes_m4286760634_ftn) (Module_t4282841206 *); return ((Module_InternalGetTypes_m4286760634_ftn)mscorlib::System::Reflection::Module::InternalGetTypes) (__this); } // System.Type[] System.Reflection.Module::GetTypes() extern "C" TypeU5BU5D_t1664964607* Module_GetTypes_m736359871 (Module_t4282841206 * __this, const MethodInfo* method) { { TypeU5BU5D_t1664964607* L_0 = Module_InternalGetTypes_m4286760634(__this, /*hidden argument*/NULL); return L_0; } } // System.Boolean System.Reflection.Module::IsDefined(System.Type,System.Boolean) extern "C" bool Module_IsDefined_m3561426235 (Module_t4282841206 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Module_IsDefined_m3561426235_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); bool L_2 = MonoCustomAttrs_IsDefined_m3820363041(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Boolean System.Reflection.Module::IsResource() extern "C" bool Module_IsResource_m663979284 (Module_t4282841206 * __this, const MethodInfo* method) { { bool L_0 = __this->get_is_resource_8(); return L_0; } } // System.String System.Reflection.Module::ToString() extern "C" String_t* Module_ToString_m2343839315 (Module_t4282841206 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_6(); return L_0; } } // System.Boolean System.Reflection.Module::filter_by_type_name(System.Type,System.Object) extern "C" bool Module_filter_by_type_name_m2283758100 (Il2CppObject * __this /* static, unused */, Type_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Module_filter_by_type_name_m2283758100_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* V_0 = NULL; { Il2CppObject * L_0 = ___filterCriteria1; V_0 = ((String_t*)CastclassSealed(L_0, String_t_il2cpp_TypeInfo_var)); String_t* L_1 = V_0; NullCheck(L_1); bool L_2 = String_EndsWith_m568509976(L_1, _stringLiteral372029320, /*hidden argument*/NULL); if (!L_2) { goto IL_0032; } } { Type_t * L_3 = ___m0; NullCheck(L_3); String_t* L_4 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_3); String_t* L_5 = V_0; String_t* L_6 = V_0; NullCheck(L_6); int32_t L_7 = String_get_Length_m1606060069(L_6, /*hidden argument*/NULL); NullCheck(L_5); String_t* L_8 = String_Substring_m12482732(L_5, 0, ((int32_t)((int32_t)L_7-(int32_t)1)), /*hidden argument*/NULL); NullCheck(L_4); bool L_9 = String_StartsWith_m1841920685(L_4, L_8, /*hidden argument*/NULL); return L_9; } IL_0032: { Type_t * L_10 = ___m0; NullCheck(L_10); String_t* L_11 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_10); String_t* L_12 = V_0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_13 = String_op_Equality_m1790663636(NULL /*static, unused*/, L_11, L_12, /*hidden argument*/NULL); return L_13; } } // System.Boolean System.Reflection.Module::filter_by_type_name_ignore_case(System.Type,System.Object) extern "C" bool Module_filter_by_type_name_ignore_case_m3574895736 (Il2CppObject * __this /* static, unused */, Type_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Module_filter_by_type_name_ignore_case_m3574895736_MetadataUsageId); s_Il2CppMethodInitialized = true; } String_t* V_0 = NULL; { Il2CppObject * L_0 = ___filterCriteria1; V_0 = ((String_t*)CastclassSealed(L_0, String_t_il2cpp_TypeInfo_var)); String_t* L_1 = V_0; NullCheck(L_1); bool L_2 = String_EndsWith_m568509976(L_1, _stringLiteral372029320, /*hidden argument*/NULL); if (!L_2) { goto IL_003c; } } { Type_t * L_3 = ___m0; NullCheck(L_3); String_t* L_4 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_3); NullCheck(L_4); String_t* L_5 = String_ToLower_m2994460523(L_4, /*hidden argument*/NULL); String_t* L_6 = V_0; String_t* L_7 = V_0; NullCheck(L_7); int32_t L_8 = String_get_Length_m1606060069(L_7, /*hidden argument*/NULL); NullCheck(L_6); String_t* L_9 = String_Substring_m12482732(L_6, 0, ((int32_t)((int32_t)L_8-(int32_t)1)), /*hidden argument*/NULL); NullCheck(L_9); String_t* L_10 = String_ToLower_m2994460523(L_9, /*hidden argument*/NULL); NullCheck(L_5); bool L_11 = String_StartsWith_m1841920685(L_5, L_10, /*hidden argument*/NULL); return L_11; } IL_003c: { Type_t * L_12 = ___m0; NullCheck(L_12); String_t* L_13 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_12); String_t* L_14 = V_0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); int32_t L_15 = String_Compare_m2851607672(NULL /*static, unused*/, L_13, L_14, (bool)1, /*hidden argument*/NULL); return (bool)((((int32_t)L_15) == ((int32_t)0))? 1 : 0); } } // System.Void System.Reflection.MonoCMethod::.ctor() extern "C" void MonoCMethod__ctor_m2473049889 (MonoCMethod_t611352247 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoCMethod__ctor_m2473049889_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(ConstructorInfo_t2851816542_il2cpp_TypeInfo_var); ConstructorInfo__ctor_m3847352284(__this, /*hidden argument*/NULL); return; } } // System.Reflection.ParameterInfo[] System.Reflection.MonoCMethod::GetParameters() extern "C" ParameterInfoU5BU5D_t2275869610* MonoCMethod_GetParameters_m2658773133 (MonoCMethod_t611352247 * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_2(); ParameterInfoU5BU5D_t2275869610* L_1 = MonoMethodInfo_GetParametersInfo_m3456861922(NULL /*static, unused*/, L_0, __this, /*hidden argument*/NULL); return L_1; } } // System.Object System.Reflection.MonoCMethod::InternalInvoke(System.Object,System.Object[],System.Exception&) extern "C" Il2CppObject * MonoCMethod_InternalInvoke_m2816771359 (MonoCMethod_t611352247 * __this, Il2CppObject * ___obj0, ObjectU5BU5D_t3614634134* ___parameters1, Exception_t1927440687 ** ___exc2, const MethodInfo* method) { using namespace il2cpp::icalls; typedef Il2CppObject * (*MonoCMethod_InternalInvoke_m2816771359_ftn) (MonoCMethod_t611352247 *, Il2CppObject *, ObjectU5BU5D_t3614634134*, Exception_t1927440687 **); return ((MonoCMethod_InternalInvoke_m2816771359_ftn)mscorlib::System::Reflection::MonoMethod::InternalInvoke) (__this, ___obj0, ___parameters1, ___exc2); } // System.Object System.Reflection.MonoCMethod::Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" Il2CppObject * MonoCMethod_Invoke_m264177196 (MonoCMethod_t611352247 * __this, Il2CppObject * ___obj0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, ObjectU5BU5D_t3614634134* ___parameters3, CultureInfo_t3500843524 * ___culture4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoCMethod_Invoke_m264177196_MetadataUsageId); s_Il2CppMethodInitialized = true; } ParameterInfoU5BU5D_t2275869610* V_0 = NULL; int32_t V_1 = 0; Exception_t1927440687 * V_2 = NULL; Il2CppObject * V_3 = NULL; Exception_t1927440687 * V_4 = NULL; Exception_t1927440687 * __last_unhandled_exception = 0; NO_UNUSED_WARNING (__last_unhandled_exception); Exception_t1927440687 * __exception_local = 0; NO_UNUSED_WARNING (__exception_local); int32_t __leave_target = 0; NO_UNUSED_WARNING (__leave_target); Il2CppObject * G_B33_0 = NULL; { Binder_t3404612058 * L_0 = ___binder2; if (L_0) { goto IL_000d; } } { IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); Binder_t3404612058 * L_1 = Binder_get_DefaultBinder_m965620943(NULL /*static, unused*/, /*hidden argument*/NULL); ___binder2 = L_1; } IL_000d: { ParameterInfoU5BU5D_t2275869610* L_2 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MonoCMethod::GetParameters() */, __this); V_0 = L_2; ObjectU5BU5D_t3614634134* L_3 = ___parameters3; if (L_3) { goto IL_0023; } } { ParameterInfoU5BU5D_t2275869610* L_4 = V_0; NullCheck(L_4); if ((((int32_t)((int32_t)(((Il2CppArray *)L_4)->max_length))))) { goto IL_0036; } } IL_0023: { ObjectU5BU5D_t3614634134* L_5 = ___parameters3; if (!L_5) { goto IL_0041; } } { ObjectU5BU5D_t3614634134* L_6 = ___parameters3; NullCheck(L_6); ParameterInfoU5BU5D_t2275869610* L_7 = V_0; NullCheck(L_7); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_6)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_7)->max_length))))))) { goto IL_0041; } } IL_0036: { TargetParameterCountException_t1554451430 * L_8 = (TargetParameterCountException_t1554451430 *)il2cpp_codegen_object_new(TargetParameterCountException_t1554451430_il2cpp_TypeInfo_var); TargetParameterCountException__ctor_m2760108938(L_8, _stringLiteral3569083427, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_8); } IL_0041: { int32_t L_9 = ___invokeAttr1; if (((int32_t)((int32_t)L_9&(int32_t)((int32_t)65536)))) { goto IL_006d; } } { Binder_t3404612058 * L_10 = ___binder2; ObjectU5BU5D_t3614634134* L_11 = ___parameters3; ParameterInfoU5BU5D_t2275869610* L_12 = V_0; CultureInfo_t3500843524 * L_13 = ___culture4; IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); bool L_14 = Binder_ConvertArgs_m2999223281(NULL /*static, unused*/, L_10, L_11, L_12, L_13, /*hidden argument*/NULL); if (L_14) { goto IL_0068; } } { ArgumentException_t3259014390 * L_15 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_15, _stringLiteral404785397, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_15); } IL_0068: { goto IL_00a2; } IL_006d: { V_1 = 0; goto IL_0099; } IL_0074: { ObjectU5BU5D_t3614634134* L_16 = ___parameters3; int32_t L_17 = V_1; NullCheck(L_16); int32_t L_18 = L_17; Il2CppObject * L_19 = (L_16)->GetAt(static_cast<il2cpp_array_size_t>(L_18)); NullCheck(L_19); Type_t * L_20 = Object_GetType_m191970594(L_19, /*hidden argument*/NULL); ParameterInfoU5BU5D_t2275869610* L_21 = V_0; int32_t L_22 = V_1; NullCheck(L_21); int32_t L_23 = L_22; ParameterInfo_t2249040075 * L_24 = (L_21)->GetAt(static_cast<il2cpp_array_size_t>(L_23)); NullCheck(L_24); Type_t * L_25 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_24); if ((((Il2CppObject*)(Type_t *)L_20) == ((Il2CppObject*)(Type_t *)L_25))) { goto IL_0095; } } { ArgumentException_t3259014390 * L_26 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_26, _stringLiteral3569083427, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_26); } IL_0095: { int32_t L_27 = V_1; V_1 = ((int32_t)((int32_t)L_27+(int32_t)1)); } IL_0099: { int32_t L_28 = V_1; ParameterInfoU5BU5D_t2275869610* L_29 = V_0; NullCheck(L_29); if ((((int32_t)L_28) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_29)->max_length))))))) { goto IL_0074; } } IL_00a2: { Il2CppObject * L_30 = ___obj0; if (L_30) { goto IL_00d3; } } { Type_t * L_31 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoCMethod::get_DeclaringType() */, __this); NullCheck(L_31); bool L_32 = VirtFuncInvoker0< bool >::Invoke(80 /* System.Boolean System.Type::get_ContainsGenericParameters() */, L_31); if (!L_32) { goto IL_00d3; } } { Type_t * L_33 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoCMethod::get_DeclaringType() */, __this); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_34 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral2903444890, L_33, _stringLiteral1065211720, /*hidden argument*/NULL); MemberAccessException_t2005094827 * L_35 = (MemberAccessException_t2005094827 *)il2cpp_codegen_object_new(MemberAccessException_t2005094827_il2cpp_TypeInfo_var); MemberAccessException__ctor_m111743236(L_35, L_34, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_35); } IL_00d3: { int32_t L_36 = ___invokeAttr1; if (!((int32_t)((int32_t)L_36&(int32_t)((int32_t)512)))) { goto IL_0105; } } { Type_t * L_37 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoCMethod::get_DeclaringType() */, __this); NullCheck(L_37); bool L_38 = Type_get_IsAbstract_m2532060002(L_37, /*hidden argument*/NULL); if (!L_38) { goto IL_0105; } } { Type_t * L_39 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoCMethod::get_DeclaringType() */, __this); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_40 = String_Format_m2024975688(NULL /*static, unused*/, _stringLiteral1582284496, L_39, /*hidden argument*/NULL); MemberAccessException_t2005094827 * L_41 = (MemberAccessException_t2005094827 *)il2cpp_codegen_object_new(MemberAccessException_t2005094827_il2cpp_TypeInfo_var); MemberAccessException__ctor_m111743236(L_41, L_40, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_41); } IL_0105: { V_2 = (Exception_t1927440687 *)NULL; V_3 = NULL; } IL_0109: try { // begin try (depth: 1) Il2CppObject * L_42 = ___obj0; ObjectU5BU5D_t3614634134* L_43 = ___parameters3; Il2CppObject * L_44 = MonoCMethod_InternalInvoke_m2816771359(__this, L_42, L_43, (&V_2), /*hidden argument*/NULL); V_3 = L_44; goto IL_0131; } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __exception_local = (Exception_t1927440687 *)e.ex; if(il2cpp_codegen_class_is_assignable_from (MethodAccessException_t4093255254_il2cpp_TypeInfo_var, e.ex->klass)) goto CATCH_011a; if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->klass)) goto CATCH_0122; throw e; } CATCH_011a: { // begin catch(System.MethodAccessException) { IL2CPP_RAISE_MANAGED_EXCEPTION(__exception_local); } IL_011d: { goto IL_0131; } } // end catch (depth: 1) CATCH_0122: { // begin catch(System.Exception) { V_4 = ((Exception_t1927440687 *)__exception_local); Exception_t1927440687 * L_45 = V_4; TargetInvocationException_t4098620458 * L_46 = (TargetInvocationException_t4098620458 *)il2cpp_codegen_object_new(TargetInvocationException_t4098620458_il2cpp_TypeInfo_var); TargetInvocationException__ctor_m1059845570(L_46, L_45, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_46); } IL_012c: { goto IL_0131; } } // end catch (depth: 1) IL_0131: { Exception_t1927440687 * L_47 = V_2; if (!L_47) { goto IL_0139; } } { Exception_t1927440687 * L_48 = V_2; IL2CPP_RAISE_MANAGED_EXCEPTION(L_48); } IL_0139: { Il2CppObject * L_49 = ___obj0; if (L_49) { goto IL_0145; } } { Il2CppObject * L_50 = V_3; G_B33_0 = L_50; goto IL_0146; } IL_0145: { G_B33_0 = NULL; } IL_0146: { return G_B33_0; } } // System.Object System.Reflection.MonoCMethod::Invoke(System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" Il2CppObject * MonoCMethod_Invoke_m931478014 (MonoCMethod_t611352247 * __this, int32_t ___invokeAttr0, Binder_t3404612058 * ___binder1, ObjectU5BU5D_t3614634134* ___parameters2, CultureInfo_t3500843524 * ___culture3, const MethodInfo* method) { { int32_t L_0 = ___invokeAttr0; Binder_t3404612058 * L_1 = ___binder1; ObjectU5BU5D_t3614634134* L_2 = ___parameters2; CultureInfo_t3500843524 * L_3 = ___culture3; Il2CppObject * L_4 = VirtFuncInvoker5< Il2CppObject *, Il2CppObject *, int32_t, Binder_t3404612058 *, ObjectU5BU5D_t3614634134*, CultureInfo_t3500843524 * >::Invoke(17 /* System.Object System.Reflection.MonoCMethod::Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) */, __this, NULL, L_0, L_1, L_2, L_3); return L_4; } } // System.RuntimeMethodHandle System.Reflection.MonoCMethod::get_MethodHandle() extern "C" RuntimeMethodHandle_t894824333 MonoCMethod_get_MethodHandle_m3394506066 (MonoCMethod_t611352247 * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_2(); RuntimeMethodHandle_t894824333 L_1; memset(&L_1, 0, sizeof(L_1)); RuntimeMethodHandle__ctor_m1162528746(&L_1, L_0, /*hidden argument*/NULL); return L_1; } } // System.Reflection.MethodAttributes System.Reflection.MonoCMethod::get_Attributes() extern "C" int32_t MonoCMethod_get_Attributes_m3914742834 (MonoCMethod_t611352247 * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_2(); int32_t L_1 = MonoMethodInfo_GetAttributes_m2535493430(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.Reflection.CallingConventions System.Reflection.MonoCMethod::get_CallingConvention() extern "C" int32_t MonoCMethod_get_CallingConvention_m3356441108 (MonoCMethod_t611352247 * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_2(); int32_t L_1 = MonoMethodInfo_GetCallingConvention_m3095860872(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.Type System.Reflection.MonoCMethod::get_ReflectedType() extern "C" Type_t * MonoCMethod_get_ReflectedType_m3611546138 (MonoCMethod_t611352247 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_reftype_4(); return L_0; } } // System.Type System.Reflection.MonoCMethod::get_DeclaringType() extern "C" Type_t * MonoCMethod_get_DeclaringType_m4147430117 (MonoCMethod_t611352247 * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_2(); Type_t * L_1 = MonoMethodInfo_GetDeclaringType_m4186531677(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.String System.Reflection.MonoCMethod::get_Name() extern "C" String_t* MonoCMethod_get_Name_m764669486 (MonoCMethod_t611352247 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_3(); if (!L_0) { goto IL_0012; } } { String_t* L_1 = __this->get_name_3(); return L_1; } IL_0012: { String_t* L_2 = MonoMethod_get_name_m1503581873(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return L_2; } } // System.Boolean System.Reflection.MonoCMethod::IsDefined(System.Type,System.Boolean) extern "C" bool MonoCMethod_IsDefined_m3686883242 (MonoCMethod_t611352247 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoCMethod_IsDefined_m3686883242_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); bool L_2 = MonoCustomAttrs_IsDefined_m3820363041(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Object[] System.Reflection.MonoCMethod::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoCMethod_GetCustomAttributes_m2886701175 (MonoCMethod_t611352247 * __this, bool ___inherit0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoCMethod_GetCustomAttributes_m2886701175_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = ___inherit0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_1 = MonoCustomAttrs_GetCustomAttributes_m3069779582(NULL /*static, unused*/, __this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Object[] System.Reflection.MonoCMethod::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoCMethod_GetCustomAttributes_m1110360782 (MonoCMethod_t611352247 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoCMethod_GetCustomAttributes_m1110360782_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_2 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.String System.Reflection.MonoCMethod::ToString() extern "C" String_t* MonoCMethod_ToString_m607787036 (MonoCMethod_t611352247 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoCMethod_ToString_m607787036_MetadataUsageId); s_Il2CppMethodInitialized = true; } StringBuilder_t1221177846 * V_0 = NULL; ParameterInfoU5BU5D_t2275869610* V_1 = NULL; int32_t V_2 = 0; { StringBuilder_t1221177846 * L_0 = (StringBuilder_t1221177846 *)il2cpp_codegen_object_new(StringBuilder_t1221177846_il2cpp_TypeInfo_var); StringBuilder__ctor_m3946851802(L_0, /*hidden argument*/NULL); V_0 = L_0; StringBuilder_t1221177846 * L_1 = V_0; NullCheck(L_1); StringBuilder_Append_m3636508479(L_1, _stringLiteral35761088, /*hidden argument*/NULL); StringBuilder_t1221177846 * L_2 = V_0; String_t* L_3 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoCMethod::get_Name() */, __this); NullCheck(L_2); StringBuilder_Append_m3636508479(L_2, L_3, /*hidden argument*/NULL); StringBuilder_t1221177846 * L_4 = V_0; NullCheck(L_4); StringBuilder_Append_m3636508479(L_4, _stringLiteral372029318, /*hidden argument*/NULL); ParameterInfoU5BU5D_t2275869610* L_5 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MonoCMethod::GetParameters() */, __this); V_1 = L_5; V_2 = 0; goto IL_0064; } IL_0039: { int32_t L_6 = V_2; if ((((int32_t)L_6) <= ((int32_t)0))) { goto IL_004c; } } { StringBuilder_t1221177846 * L_7 = V_0; NullCheck(L_7); StringBuilder_Append_m3636508479(L_7, _stringLiteral811305474, /*hidden argument*/NULL); } IL_004c: { StringBuilder_t1221177846 * L_8 = V_0; ParameterInfoU5BU5D_t2275869610* L_9 = V_1; int32_t L_10 = V_2; NullCheck(L_9); int32_t L_11 = L_10; ParameterInfo_t2249040075 * L_12 = (L_9)->GetAt(static_cast<il2cpp_array_size_t>(L_11)); NullCheck(L_12); Type_t * L_13 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_12); NullCheck(L_13); String_t* L_14 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_13); NullCheck(L_8); StringBuilder_Append_m3636508479(L_8, L_14, /*hidden argument*/NULL); int32_t L_15 = V_2; V_2 = ((int32_t)((int32_t)L_15+(int32_t)1)); } IL_0064: { int32_t L_16 = V_2; ParameterInfoU5BU5D_t2275869610* L_17 = V_1; NullCheck(L_17); if ((((int32_t)L_16) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_17)->max_length))))))) { goto IL_0039; } } { int32_t L_18 = VirtFuncInvoker0< int32_t >::Invoke(20 /* System.Reflection.CallingConventions System.Reflection.MonoCMethod::get_CallingConvention() */, __this); if ((!(((uint32_t)L_18) == ((uint32_t)3)))) { goto IL_0085; } } { StringBuilder_t1221177846 * L_19 = V_0; NullCheck(L_19); StringBuilder_Append_m3636508479(L_19, _stringLiteral3422253728, /*hidden argument*/NULL); } IL_0085: { StringBuilder_t1221177846 * L_20 = V_0; NullCheck(L_20); StringBuilder_Append_m3636508479(L_20, _stringLiteral372029317, /*hidden argument*/NULL); StringBuilder_t1221177846 * L_21 = V_0; NullCheck(L_21); String_t* L_22 = StringBuilder_ToString_m1507807375(L_21, /*hidden argument*/NULL); return L_22; } } // System.Void System.Reflection.MonoCMethod::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void MonoCMethod_GetObjectData_m2435596845 (MonoCMethod_t611352247 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoCMethod::get_Name() */, __this); Type_t * L_2 = VirtFuncInvoker0< Type_t * >::Invoke(9 /* System.Type System.Reflection.MonoCMethod::get_ReflectedType() */, __this); String_t* L_3 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Reflection.MonoCMethod::ToString() */, __this); MemberInfoSerializationHolder_Serialize_m1949812823(NULL /*static, unused*/, L_0, L_1, L_2, L_3, 1, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.MonoEvent::.ctor() extern "C" void MonoEvent__ctor_m1430144453 (MonoEvent_t * __this, const MethodInfo* method) { { EventInfo__ctor_m1190141300(__this, /*hidden argument*/NULL); return; } } // System.Reflection.EventAttributes System.Reflection.MonoEvent::get_Attributes() extern "C" int32_t MonoEvent_get_Attributes_m2985233365 (MonoEvent_t * __this, const MethodInfo* method) { MonoEventInfo_t2190036573 V_0; memset(&V_0, 0, sizeof(V_0)); { MonoEventInfo_t2190036573 L_0 = MonoEventInfo_GetEventInfo_m2331957186(NULL /*static, unused*/, __this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = (&V_0)->get_attrs_6(); return L_1; } } // System.Reflection.MethodInfo System.Reflection.MonoEvent::GetAddMethod(System.Boolean) extern "C" MethodInfo_t * MonoEvent_GetAddMethod_m4289563120 (MonoEvent_t * __this, bool ___nonPublic0, const MethodInfo* method) { MonoEventInfo_t2190036573 V_0; memset(&V_0, 0, sizeof(V_0)); { MonoEventInfo_t2190036573 L_0 = MonoEventInfo_GetEventInfo_m2331957186(NULL /*static, unused*/, __this, /*hidden argument*/NULL); V_0 = L_0; bool L_1 = ___nonPublic0; if (L_1) { goto IL_002a; } } { MethodInfo_t * L_2 = (&V_0)->get_add_method_3(); if (!L_2) { goto IL_0032; } } { MethodInfo_t * L_3 = (&V_0)->get_add_method_3(); NullCheck(L_3); bool L_4 = MethodBase_get_IsPublic_m479656180(L_3, /*hidden argument*/NULL); if (!L_4) { goto IL_0032; } } IL_002a: { MethodInfo_t * L_5 = (&V_0)->get_add_method_3(); return L_5; } IL_0032: { return (MethodInfo_t *)NULL; } } // System.Type System.Reflection.MonoEvent::get_DeclaringType() extern "C" Type_t * MonoEvent_get_DeclaringType_m2319125729 (MonoEvent_t * __this, const MethodInfo* method) { MonoEventInfo_t2190036573 V_0; memset(&V_0, 0, sizeof(V_0)); { MonoEventInfo_t2190036573 L_0 = MonoEventInfo_GetEventInfo_m2331957186(NULL /*static, unused*/, __this, /*hidden argument*/NULL); V_0 = L_0; Type_t * L_1 = (&V_0)->get_declaring_type_0(); return L_1; } } // System.Type System.Reflection.MonoEvent::get_ReflectedType() extern "C" Type_t * MonoEvent_get_ReflectedType_m434281898 (MonoEvent_t * __this, const MethodInfo* method) { MonoEventInfo_t2190036573 V_0; memset(&V_0, 0, sizeof(V_0)); { MonoEventInfo_t2190036573 L_0 = MonoEventInfo_GetEventInfo_m2331957186(NULL /*static, unused*/, __this, /*hidden argument*/NULL); V_0 = L_0; Type_t * L_1 = (&V_0)->get_reflected_type_1(); return L_1; } } // System.String System.Reflection.MonoEvent::get_Name() extern "C" String_t* MonoEvent_get_Name_m2796714646 (MonoEvent_t * __this, const MethodInfo* method) { MonoEventInfo_t2190036573 V_0; memset(&V_0, 0, sizeof(V_0)); { MonoEventInfo_t2190036573 L_0 = MonoEventInfo_GetEventInfo_m2331957186(NULL /*static, unused*/, __this, /*hidden argument*/NULL); V_0 = L_0; String_t* L_1 = (&V_0)->get_name_2(); return L_1; } } // System.String System.Reflection.MonoEvent::ToString() extern "C" String_t* MonoEvent_ToString_m386956596 (MonoEvent_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoEvent_ToString_m386956596_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = EventInfo_get_EventHandlerType_m2787680849(__this, /*hidden argument*/NULL); String_t* L_1 = MonoEvent_get_Name_m2796714646(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_2 = String_Concat_m2000667605(NULL /*static, unused*/, L_0, _stringLiteral372029310, L_1, /*hidden argument*/NULL); return L_2; } } // System.Boolean System.Reflection.MonoEvent::IsDefined(System.Type,System.Boolean) extern "C" bool MonoEvent_IsDefined_m3151861274 (MonoEvent_t * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoEvent_IsDefined_m3151861274_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); bool L_2 = MonoCustomAttrs_IsDefined_m3820363041(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Object[] System.Reflection.MonoEvent::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoEvent_GetCustomAttributes_m2349471159 (MonoEvent_t * __this, bool ___inherit0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoEvent_GetCustomAttributes_m2349471159_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = ___inherit0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_1 = MonoCustomAttrs_GetCustomAttributes_m3069779582(NULL /*static, unused*/, __this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Object[] System.Reflection.MonoEvent::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoEvent_GetCustomAttributes_m3899596098 (MonoEvent_t * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoEvent_GetCustomAttributes_m3899596098_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_2 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Void System.Reflection.MonoEvent::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void MonoEvent_GetObjectData_m4084431065 (MonoEvent_t * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; String_t* L_1 = MonoEvent_get_Name_m2796714646(__this, /*hidden argument*/NULL); Type_t * L_2 = MonoEvent_get_ReflectedType_m434281898(__this, /*hidden argument*/NULL); String_t* L_3 = MonoEvent_ToString_m386956596(__this, /*hidden argument*/NULL); MemberInfoSerializationHolder_Serialize_m1949812823(NULL /*static, unused*/, L_0, L_1, L_2, L_3, 2, /*hidden argument*/NULL); return; } } // Conversion methods for marshalling of: System.Reflection.MonoEventInfo extern "C" void MonoEventInfo_t2190036573_marshal_pinvoke(const MonoEventInfo_t2190036573& unmarshaled, MonoEventInfo_t2190036573_marshaled_pinvoke& marshaled) { Il2CppCodeGenException* ___declaring_type_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'declaring_type' of type 'MonoEventInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___declaring_type_0Exception); } extern "C" void MonoEventInfo_t2190036573_marshal_pinvoke_back(const MonoEventInfo_t2190036573_marshaled_pinvoke& marshaled, MonoEventInfo_t2190036573& unmarshaled) { Il2CppCodeGenException* ___declaring_type_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'declaring_type' of type 'MonoEventInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___declaring_type_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.MonoEventInfo extern "C" void MonoEventInfo_t2190036573_marshal_pinvoke_cleanup(MonoEventInfo_t2190036573_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: System.Reflection.MonoEventInfo extern "C" void MonoEventInfo_t2190036573_marshal_com(const MonoEventInfo_t2190036573& unmarshaled, MonoEventInfo_t2190036573_marshaled_com& marshaled) { Il2CppCodeGenException* ___declaring_type_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'declaring_type' of type 'MonoEventInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___declaring_type_0Exception); } extern "C" void MonoEventInfo_t2190036573_marshal_com_back(const MonoEventInfo_t2190036573_marshaled_com& marshaled, MonoEventInfo_t2190036573& unmarshaled) { Il2CppCodeGenException* ___declaring_type_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'declaring_type' of type 'MonoEventInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___declaring_type_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.MonoEventInfo extern "C" void MonoEventInfo_t2190036573_marshal_com_cleanup(MonoEventInfo_t2190036573_marshaled_com& marshaled) { } // System.Void System.Reflection.MonoEventInfo::get_event_info(System.Reflection.MonoEvent,System.Reflection.MonoEventInfo&) extern "C" void MonoEventInfo_get_event_info_m781402243 (Il2CppObject * __this /* static, unused */, MonoEvent_t * ___ev0, MonoEventInfo_t2190036573 * ___info1, const MethodInfo* method) { using namespace il2cpp::icalls; typedef void (*MonoEventInfo_get_event_info_m781402243_ftn) (MonoEvent_t *, MonoEventInfo_t2190036573 *); ((MonoEventInfo_get_event_info_m781402243_ftn)mscorlib::System::Reflection::MonoEventInfo::get_event_info) (___ev0, ___info1); } // System.Reflection.MonoEventInfo System.Reflection.MonoEventInfo::GetEventInfo(System.Reflection.MonoEvent) extern "C" MonoEventInfo_t2190036573 MonoEventInfo_GetEventInfo_m2331957186 (Il2CppObject * __this /* static, unused */, MonoEvent_t * ___ev0, const MethodInfo* method) { MonoEventInfo_t2190036573 V_0; memset(&V_0, 0, sizeof(V_0)); { MonoEvent_t * L_0 = ___ev0; MonoEventInfo_get_event_info_m781402243(NULL /*static, unused*/, L_0, (&V_0), /*hidden argument*/NULL); MonoEventInfo_t2190036573 L_1 = V_0; return L_1; } } // System.Void System.Reflection.MonoField::.ctor() extern "C" void MonoField__ctor_m494557655 (MonoField_t * __this, const MethodInfo* method) { { FieldInfo__ctor_m1952545900(__this, /*hidden argument*/NULL); return; } } // System.Reflection.FieldAttributes System.Reflection.MonoField::get_Attributes() extern "C" int32_t MonoField_get_Attributes_m4138688533 (MonoField_t * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_attrs_4(); return L_0; } } // System.RuntimeFieldHandle System.Reflection.MonoField::get_FieldHandle() extern "C" RuntimeFieldHandle_t2331729674 MonoField_get_FieldHandle_m4221523254 (MonoField_t * __this, const MethodInfo* method) { { RuntimeFieldHandle_t2331729674 L_0 = __this->get_fhandle_1(); return L_0; } } // System.Type System.Reflection.MonoField::get_FieldType() extern "C" Type_t * MonoField_get_FieldType_m598011426 (MonoField_t * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_type_3(); return L_0; } } // System.Type System.Reflection.MonoField::GetParentType(System.Boolean) extern "C" Type_t * MonoField_GetParentType_m2074626828 (MonoField_t * __this, bool ___declaring0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef Type_t * (*MonoField_GetParentType_m2074626828_ftn) (MonoField_t *, bool); return ((MonoField_GetParentType_m2074626828_ftn)mscorlib::System::Reflection::MonoField::GetParentType) (__this, ___declaring0); } // System.Type System.Reflection.MonoField::get_ReflectedType() extern "C" Type_t * MonoField_get_ReflectedType_m2228561986 (MonoField_t * __this, const MethodInfo* method) { { Type_t * L_0 = MonoField_GetParentType_m2074626828(__this, (bool)0, /*hidden argument*/NULL); return L_0; } } // System.Type System.Reflection.MonoField::get_DeclaringType() extern "C" Type_t * MonoField_get_DeclaringType_m1591666235 (MonoField_t * __this, const MethodInfo* method) { { Type_t * L_0 = MonoField_GetParentType_m2074626828(__this, (bool)1, /*hidden argument*/NULL); return L_0; } } // System.String System.Reflection.MonoField::get_Name() extern "C" String_t* MonoField_get_Name_m3761030246 (MonoField_t * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_2(); return L_0; } } // System.Boolean System.Reflection.MonoField::IsDefined(System.Type,System.Boolean) extern "C" bool MonoField_IsDefined_m1871511958 (MonoField_t * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoField_IsDefined_m1871511958_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); bool L_2 = MonoCustomAttrs_IsDefined_m3820363041(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Object[] System.Reflection.MonoField::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoField_GetCustomAttributes_m4168545977 (MonoField_t * __this, bool ___inherit0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoField_GetCustomAttributes_m4168545977_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = ___inherit0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_1 = MonoCustomAttrs_GetCustomAttributes_m3069779582(NULL /*static, unused*/, __this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Object[] System.Reflection.MonoField::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoField_GetCustomAttributes_m1051163738 (MonoField_t * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoField_GetCustomAttributes_m1051163738_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_2 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Int32 System.Reflection.MonoField::GetFieldOffset() extern "C" int32_t MonoField_GetFieldOffset_m3584238032 (MonoField_t * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef int32_t (*MonoField_GetFieldOffset_m3584238032_ftn) (MonoField_t *); return ((MonoField_GetFieldOffset_m3584238032_ftn)mscorlib::System::Reflection::MonoField::GetFieldOffset) (__this); } // System.Object System.Reflection.MonoField::GetValueInternal(System.Object) extern "C" Il2CppObject * MonoField_GetValueInternal_m1909282050 (MonoField_t * __this, Il2CppObject * ___obj0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef Il2CppObject * (*MonoField_GetValueInternal_m1909282050_ftn) (MonoField_t *, Il2CppObject *); return ((MonoField_GetValueInternal_m1909282050_ftn)mscorlib::System::Reflection::MonoField::GetValueInternal) (__this, ___obj0); } // System.Object System.Reflection.MonoField::GetValue(System.Object) extern "C" Il2CppObject * MonoField_GetValue_m1386935585 (MonoField_t * __this, Il2CppObject * ___obj0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoField_GetValue_m1386935585_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = FieldInfo_get_IsStatic_m1411173225(__this, /*hidden argument*/NULL); if (L_0) { goto IL_0059; } } { Il2CppObject * L_1 = ___obj0; if (L_1) { goto IL_001c; } } { TargetException_t1572104820 * L_2 = (TargetException_t1572104820 *)il2cpp_codegen_object_new(TargetException_t1572104820_il2cpp_TypeInfo_var); TargetException__ctor_m3228808416(L_2, _stringLiteral2752958494, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_2); } IL_001c: { Type_t * L_3 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoField::get_DeclaringType() */, __this); Il2CppObject * L_4 = ___obj0; NullCheck(L_4); Type_t * L_5 = Object_GetType_m191970594(L_4, /*hidden argument*/NULL); NullCheck(L_3); bool L_6 = VirtFuncInvoker1< bool, Type_t * >::Invoke(42 /* System.Boolean System.Type::IsAssignableFrom(System.Type) */, L_3, L_5); if (L_6) { goto IL_0059; } } { String_t* L_7 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoField::get_Name() */, __this); Type_t * L_8 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoField::get_DeclaringType() */, __this); Il2CppObject * L_9 = ___obj0; NullCheck(L_9); Type_t * L_10 = Object_GetType_m191970594(L_9, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_11 = String_Format_m4262916296(NULL /*static, unused*/, _stringLiteral3735664915, L_7, L_8, L_10, /*hidden argument*/NULL); ArgumentException_t3259014390 * L_12 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m544251339(L_12, L_11, _stringLiteral1099314147, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_12); } IL_0059: { bool L_13 = FieldInfo_get_IsLiteral_m267898096(__this, /*hidden argument*/NULL); if (L_13) { goto IL_006a; } } { MonoField_CheckGeneric_m1527550038(__this, /*hidden argument*/NULL); } IL_006a: { Il2CppObject * L_14 = ___obj0; Il2CppObject * L_15 = MonoField_GetValueInternal_m1909282050(__this, L_14, /*hidden argument*/NULL); return L_15; } } // System.String System.Reflection.MonoField::ToString() extern "C" String_t* MonoField_ToString_m517029212 (MonoField_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoField_ToString_m517029212_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = __this->get_type_3(); String_t* L_1 = __this->get_name_2(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_2 = String_Format_m1811873526(NULL /*static, unused*/, _stringLiteral2512070489, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Void System.Reflection.MonoField::SetValueInternal(System.Reflection.FieldInfo,System.Object,System.Object) extern "C" void MonoField_SetValueInternal_m762249951 (Il2CppObject * __this /* static, unused */, FieldInfo_t * ___fi0, Il2CppObject * ___obj1, Il2CppObject * ___value2, const MethodInfo* method) { using namespace il2cpp::icalls; typedef void (*MonoField_SetValueInternal_m762249951_ftn) (FieldInfo_t *, Il2CppObject *, Il2CppObject *); ((MonoField_SetValueInternal_m762249951_ftn)mscorlib::System::Reflection::MonoField::SetValueInternal) (___fi0, ___obj1, ___value2); } // System.Void System.Reflection.MonoField::SetValue(System.Object,System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Globalization.CultureInfo) extern "C" void MonoField_SetValue_m1849281384 (MonoField_t * __this, Il2CppObject * ___obj0, Il2CppObject * ___val1, int32_t ___invokeAttr2, Binder_t3404612058 * ___binder3, CultureInfo_t3500843524 * ___culture4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoField_SetValue_m1849281384_MetadataUsageId); s_Il2CppMethodInitialized = true; } Il2CppObject * V_0 = NULL; { bool L_0 = FieldInfo_get_IsStatic_m1411173225(__this, /*hidden argument*/NULL); if (L_0) { goto IL_0059; } } { Il2CppObject * L_1 = ___obj0; if (L_1) { goto IL_001c; } } { TargetException_t1572104820 * L_2 = (TargetException_t1572104820 *)il2cpp_codegen_object_new(TargetException_t1572104820_il2cpp_TypeInfo_var); TargetException__ctor_m3228808416(L_2, _stringLiteral2752958494, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_2); } IL_001c: { Type_t * L_3 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoField::get_DeclaringType() */, __this); Il2CppObject * L_4 = ___obj0; NullCheck(L_4); Type_t * L_5 = Object_GetType_m191970594(L_4, /*hidden argument*/NULL); NullCheck(L_3); bool L_6 = VirtFuncInvoker1< bool, Type_t * >::Invoke(42 /* System.Boolean System.Type::IsAssignableFrom(System.Type) */, L_3, L_5); if (L_6) { goto IL_0059; } } { String_t* L_7 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoField::get_Name() */, __this); Type_t * L_8 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoField::get_DeclaringType() */, __this); Il2CppObject * L_9 = ___obj0; NullCheck(L_9); Type_t * L_10 = Object_GetType_m191970594(L_9, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_11 = String_Format_m4262916296(NULL /*static, unused*/, _stringLiteral3735664915, L_7, L_8, L_10, /*hidden argument*/NULL); ArgumentException_t3259014390 * L_12 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m544251339(L_12, L_11, _stringLiteral1099314147, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_12); } IL_0059: { bool L_13 = FieldInfo_get_IsLiteral_m267898096(__this, /*hidden argument*/NULL); if (!L_13) { goto IL_006f; } } { FieldAccessException_t1797813379 * L_14 = (FieldAccessException_t1797813379 *)il2cpp_codegen_object_new(FieldAccessException_t1797813379_il2cpp_TypeInfo_var); FieldAccessException__ctor_m3893881490(L_14, _stringLiteral4043003486, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_14); } IL_006f: { Binder_t3404612058 * L_15 = ___binder3; if (L_15) { goto IL_007d; } } { IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); Binder_t3404612058 * L_16 = Binder_get_DefaultBinder_m965620943(NULL /*static, unused*/, /*hidden argument*/NULL); ___binder3 = L_16; } IL_007d: { MonoField_CheckGeneric_m1527550038(__this, /*hidden argument*/NULL); Il2CppObject * L_17 = ___val1; if (!L_17) { goto IL_00db; } } { Binder_t3404612058 * L_18 = ___binder3; Il2CppObject * L_19 = ___val1; Type_t * L_20 = __this->get_type_3(); CultureInfo_t3500843524 * L_21 = ___culture4; NullCheck(L_18); Il2CppObject * L_22 = VirtFuncInvoker3< Il2CppObject *, Il2CppObject *, Type_t *, CultureInfo_t3500843524 * >::Invoke(5 /* System.Object System.Reflection.Binder::ChangeType(System.Object,System.Type,System.Globalization.CultureInfo) */, L_18, L_19, L_20, L_21); V_0 = L_22; Il2CppObject * L_23 = V_0; if (L_23) { goto IL_00d8; } } { ObjectU5BU5D_t3614634134* L_24 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4)); NullCheck(L_24); ArrayElementTypeCheck (L_24, _stringLiteral2614084089); (L_24)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral2614084089); ObjectU5BU5D_t3614634134* L_25 = L_24; Il2CppObject * L_26 = ___val1; NullCheck(L_26); Type_t * L_27 = Object_GetType_m191970594(L_26, /*hidden argument*/NULL); NullCheck(L_25); ArrayElementTypeCheck (L_25, L_27); (L_25)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_27); ObjectU5BU5D_t3614634134* L_28 = L_25; NullCheck(L_28); ArrayElementTypeCheck (L_28, _stringLiteral3234870220); (L_28)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral3234870220); ObjectU5BU5D_t3614634134* L_29 = L_28; Type_t * L_30 = __this->get_type_3(); NullCheck(L_29); ArrayElementTypeCheck (L_29, L_30); (L_29)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_30); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_31 = String_Concat_m3881798623(NULL /*static, unused*/, L_29, /*hidden argument*/NULL); ArgumentException_t3259014390 * L_32 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m544251339(L_32, L_31, _stringLiteral696029875, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_32); } IL_00d8: { Il2CppObject * L_33 = V_0; ___val1 = L_33; } IL_00db: { Il2CppObject * L_34 = ___obj0; Il2CppObject * L_35 = ___val1; MonoField_SetValueInternal_m762249951(NULL /*static, unused*/, __this, L_34, L_35, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.MonoField::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void MonoField_GetObjectData_m3571455087 (MonoField_t * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoField::get_Name() */, __this); Type_t * L_2 = VirtFuncInvoker0< Type_t * >::Invoke(9 /* System.Type System.Reflection.MonoField::get_ReflectedType() */, __this); String_t* L_3 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Reflection.MonoField::ToString() */, __this); MemberInfoSerializationHolder_Serialize_m1949812823(NULL /*static, unused*/, L_0, L_1, L_2, L_3, 4, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.MonoField::CheckGeneric() extern "C" void MonoField_CheckGeneric_m1527550038 (MonoField_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoField_CheckGeneric_m1527550038_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoField::get_DeclaringType() */, __this); NullCheck(L_0); bool L_1 = VirtFuncInvoker0< bool >::Invoke(80 /* System.Boolean System.Type::get_ContainsGenericParameters() */, L_0); if (!L_1) { goto IL_001b; } } { InvalidOperationException_t721527559 * L_2 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m2801133788(L_2, _stringLiteral2139378969, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_2); } IL_001b: { return; } } // System.Void System.Reflection.MonoGenericCMethod::.ctor() extern "C" void MonoGenericCMethod__ctor_m2520666358 (MonoGenericCMethod_t2923423538 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoGenericCMethod__ctor_m2520666358_MetadataUsageId); s_Il2CppMethodInitialized = true; } { MonoCMethod__ctor_m2473049889(__this, /*hidden argument*/NULL); InvalidOperationException_t721527559 * L_0 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m102359810(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.MonoGenericCMethod::get_ReflectedType() extern "C" Type_t * MonoGenericCMethod_get_ReflectedType_m2689239043 (MonoGenericCMethod_t2923423538 * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef Type_t * (*MonoGenericCMethod_get_ReflectedType_m2689239043_ftn) (MonoGenericCMethod_t2923423538 *); return ((MonoGenericCMethod_get_ReflectedType_m2689239043_ftn)mscorlib::System::Reflection::MonoGenericCMethod::get_ReflectedType) (__this); } // System.Void System.Reflection.MonoGenericMethod::.ctor() extern "C" void MonoGenericMethod__ctor_m2255621499 (MonoGenericMethod_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoGenericMethod__ctor_m2255621499_MetadataUsageId); s_Il2CppMethodInitialized = true; } { MonoMethod__ctor_m4091684020(__this, /*hidden argument*/NULL); InvalidOperationException_t721527559 * L_0 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m102359810(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Type System.Reflection.MonoGenericMethod::get_ReflectedType() extern "C" Type_t * MonoGenericMethod_get_ReflectedType_m3194343466 (MonoGenericMethod_t * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef Type_t * (*MonoGenericMethod_get_ReflectedType_m3194343466_ftn) (MonoGenericMethod_t *); return ((MonoGenericMethod_get_ReflectedType_m3194343466_ftn)mscorlib::System::Reflection::MonoGenericMethod::get_ReflectedType) (__this); } // System.Void System.Reflection.MonoMethod::.ctor() extern "C" void MonoMethod__ctor_m4091684020 (MonoMethod_t * __this, const MethodInfo* method) { { MethodInfo__ctor_m1853540423(__this, /*hidden argument*/NULL); return; } } // System.String System.Reflection.MonoMethod::get_name(System.Reflection.MethodBase) extern "C" String_t* MonoMethod_get_name_m1503581873 (Il2CppObject * __this /* static, unused */, MethodBase_t904190842 * ___method0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef String_t* (*MonoMethod_get_name_m1503581873_ftn) (MethodBase_t904190842 *); return ((MonoMethod_get_name_m1503581873_ftn)mscorlib::System::Reflection::MonoMethod::get_name) (___method0); } // System.Reflection.MonoMethod System.Reflection.MonoMethod::get_base_definition(System.Reflection.MonoMethod) extern "C" MonoMethod_t * MonoMethod_get_base_definition_m1625237055 (Il2CppObject * __this /* static, unused */, MonoMethod_t * ___method0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef MonoMethod_t * (*MonoMethod_get_base_definition_m1625237055_ftn) (MonoMethod_t *); return ((MonoMethod_get_base_definition_m1625237055_ftn)mscorlib::System::Reflection::MonoMethod::get_base_definition) (___method0); } // System.Reflection.MethodInfo System.Reflection.MonoMethod::GetBaseDefinition() extern "C" MethodInfo_t * MonoMethod_GetBaseDefinition_m1738989472 (MonoMethod_t * __this, const MethodInfo* method) { { MonoMethod_t * L_0 = MonoMethod_get_base_definition_m1625237055(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return L_0; } } // System.Type System.Reflection.MonoMethod::get_ReturnType() extern "C" Type_t * MonoMethod_get_ReturnType_m4218706049 (MonoMethod_t * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_0(); Type_t * L_1 = MonoMethodInfo_GetReturnType_m2864247130(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.Reflection.ParameterInfo[] System.Reflection.MonoMethod::GetParameters() extern "C" ParameterInfoU5BU5D_t2275869610* MonoMethod_GetParameters_m1240674378 (MonoMethod_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoMethod_GetParameters_m1240674378_MetadataUsageId); s_Il2CppMethodInitialized = true; } ParameterInfoU5BU5D_t2275869610* V_0 = NULL; ParameterInfoU5BU5D_t2275869610* V_1 = NULL; { IntPtr_t L_0 = __this->get_mhandle_0(); ParameterInfoU5BU5D_t2275869610* L_1 = MonoMethodInfo_GetParametersInfo_m3456861922(NULL /*static, unused*/, L_0, __this, /*hidden argument*/NULL); V_0 = L_1; ParameterInfoU5BU5D_t2275869610* L_2 = V_0; NullCheck(L_2); V_1 = ((ParameterInfoU5BU5D_t2275869610*)SZArrayNew(ParameterInfoU5BU5D_t2275869610_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_2)->max_length)))))); ParameterInfoU5BU5D_t2275869610* L_3 = V_0; ParameterInfoU5BU5D_t2275869610* L_4 = V_1; NullCheck((Il2CppArray *)(Il2CppArray *)L_3); Array_CopyTo_m4061033315((Il2CppArray *)(Il2CppArray *)L_3, (Il2CppArray *)(Il2CppArray *)L_4, 0, /*hidden argument*/NULL); ParameterInfoU5BU5D_t2275869610* L_5 = V_1; return L_5; } } // System.Object System.Reflection.MonoMethod::InternalInvoke(System.Object,System.Object[],System.Exception&) extern "C" Il2CppObject * MonoMethod_InternalInvoke_m4055929538 (MonoMethod_t * __this, Il2CppObject * ___obj0, ObjectU5BU5D_t3614634134* ___parameters1, Exception_t1927440687 ** ___exc2, const MethodInfo* method) { using namespace il2cpp::icalls; typedef Il2CppObject * (*MonoMethod_InternalInvoke_m4055929538_ftn) (MonoMethod_t *, Il2CppObject *, ObjectU5BU5D_t3614634134*, Exception_t1927440687 **); return ((MonoMethod_InternalInvoke_m4055929538_ftn)mscorlib::System::Reflection::MonoMethod::InternalInvoke) (__this, ___obj0, ___parameters1, ___exc2); } // System.Object System.Reflection.MonoMethod::Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" Il2CppObject * MonoMethod_Invoke_m3376991795 (MonoMethod_t * __this, Il2CppObject * ___obj0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, ObjectU5BU5D_t3614634134* ___parameters3, CultureInfo_t3500843524 * ___culture4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoMethod_Invoke_m3376991795_MetadataUsageId); s_Il2CppMethodInitialized = true; } ParameterInfoU5BU5D_t2275869610* V_0 = NULL; int32_t V_1 = 0; Exception_t1927440687 * V_2 = NULL; Il2CppObject * V_3 = NULL; Exception_t1927440687 * V_4 = NULL; Exception_t1927440687 * __last_unhandled_exception = 0; NO_UNUSED_WARNING (__last_unhandled_exception); Exception_t1927440687 * __exception_local = 0; NO_UNUSED_WARNING (__exception_local); int32_t __leave_target = 0; NO_UNUSED_WARNING (__leave_target); { Binder_t3404612058 * L_0 = ___binder2; if (L_0) { goto IL_000d; } } { IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); Binder_t3404612058 * L_1 = Binder_get_DefaultBinder_m965620943(NULL /*static, unused*/, /*hidden argument*/NULL); ___binder2 = L_1; } IL_000d: { IntPtr_t L_2 = __this->get_mhandle_0(); ParameterInfoU5BU5D_t2275869610* L_3 = MonoMethodInfo_GetParametersInfo_m3456861922(NULL /*static, unused*/, L_2, __this, /*hidden argument*/NULL); V_0 = L_3; ObjectU5BU5D_t3614634134* L_4 = ___parameters3; if (L_4) { goto IL_0029; } } { ParameterInfoU5BU5D_t2275869610* L_5 = V_0; NullCheck(L_5); if ((((int32_t)((int32_t)(((Il2CppArray *)L_5)->max_length))))) { goto IL_003c; } } IL_0029: { ObjectU5BU5D_t3614634134* L_6 = ___parameters3; if (!L_6) { goto IL_0047; } } { ObjectU5BU5D_t3614634134* L_7 = ___parameters3; NullCheck(L_7); ParameterInfoU5BU5D_t2275869610* L_8 = V_0; NullCheck(L_8); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_7)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_8)->max_length))))))) { goto IL_0047; } } IL_003c: { TargetParameterCountException_t1554451430 * L_9 = (TargetParameterCountException_t1554451430 *)il2cpp_codegen_object_new(TargetParameterCountException_t1554451430_il2cpp_TypeInfo_var); TargetParameterCountException__ctor_m2760108938(L_9, _stringLiteral3569083427, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_9); } IL_0047: { int32_t L_10 = ___invokeAttr1; if (((int32_t)((int32_t)L_10&(int32_t)((int32_t)65536)))) { goto IL_0073; } } { Binder_t3404612058 * L_11 = ___binder2; ObjectU5BU5D_t3614634134* L_12 = ___parameters3; ParameterInfoU5BU5D_t2275869610* L_13 = V_0; CultureInfo_t3500843524 * L_14 = ___culture4; IL2CPP_RUNTIME_CLASS_INIT(Binder_t3404612058_il2cpp_TypeInfo_var); bool L_15 = Binder_ConvertArgs_m2999223281(NULL /*static, unused*/, L_11, L_12, L_13, L_14, /*hidden argument*/NULL); if (L_15) { goto IL_006e; } } { ArgumentException_t3259014390 * L_16 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_16, _stringLiteral404785397, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_16); } IL_006e: { goto IL_00a8; } IL_0073: { V_1 = 0; goto IL_009f; } IL_007a: { ObjectU5BU5D_t3614634134* L_17 = ___parameters3; int32_t L_18 = V_1; NullCheck(L_17); int32_t L_19 = L_18; Il2CppObject * L_20 = (L_17)->GetAt(static_cast<il2cpp_array_size_t>(L_19)); NullCheck(L_20); Type_t * L_21 = Object_GetType_m191970594(L_20, /*hidden argument*/NULL); ParameterInfoU5BU5D_t2275869610* L_22 = V_0; int32_t L_23 = V_1; NullCheck(L_22); int32_t L_24 = L_23; ParameterInfo_t2249040075 * L_25 = (L_22)->GetAt(static_cast<il2cpp_array_size_t>(L_24)); NullCheck(L_25); Type_t * L_26 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_25); if ((((Il2CppObject*)(Type_t *)L_21) == ((Il2CppObject*)(Type_t *)L_26))) { goto IL_009b; } } { ArgumentException_t3259014390 * L_27 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_27, _stringLiteral3569083427, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_27); } IL_009b: { int32_t L_28 = V_1; V_1 = ((int32_t)((int32_t)L_28+(int32_t)1)); } IL_009f: { int32_t L_29 = V_1; ParameterInfoU5BU5D_t2275869610* L_30 = V_0; NullCheck(L_30); if ((((int32_t)L_29) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_30)->max_length))))))) { goto IL_007a; } } IL_00a8: { bool L_31 = VirtFuncInvoker0< bool >::Invoke(27 /* System.Boolean System.Reflection.MonoMethod::get_ContainsGenericParameters() */, __this); if (!L_31) { goto IL_00be; } } { InvalidOperationException_t721527559 * L_32 = (InvalidOperationException_t721527559 *)il2cpp_codegen_object_new(InvalidOperationException_t721527559_il2cpp_TypeInfo_var); InvalidOperationException__ctor_m2801133788(L_32, _stringLiteral68020717, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_32); } IL_00be: { V_3 = NULL; } IL_00c0: try { // begin try (depth: 1) Il2CppObject * L_33 = ___obj0; ObjectU5BU5D_t3614634134* L_34 = ___parameters3; Il2CppObject * L_35 = MonoMethod_InternalInvoke_m4055929538(__this, L_33, L_34, (&V_2), /*hidden argument*/NULL); V_3 = L_35; goto IL_00f0; } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __exception_local = (Exception_t1927440687 *)e.ex; if(il2cpp_codegen_class_is_assignable_from (ThreadAbortException_t1150575753_il2cpp_TypeInfo_var, e.ex->klass)) goto CATCH_00d1; if(il2cpp_codegen_class_is_assignable_from (MethodAccessException_t4093255254_il2cpp_TypeInfo_var, e.ex->klass)) goto CATCH_00d9; if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->klass)) goto CATCH_00e1; throw e; } CATCH_00d1: { // begin catch(System.Threading.ThreadAbortException) { IL2CPP_RAISE_MANAGED_EXCEPTION(__exception_local); } IL_00d4: { goto IL_00f0; } } // end catch (depth: 1) CATCH_00d9: { // begin catch(System.MethodAccessException) { IL2CPP_RAISE_MANAGED_EXCEPTION(__exception_local); } IL_00dc: { goto IL_00f0; } } // end catch (depth: 1) CATCH_00e1: { // begin catch(System.Exception) { V_4 = ((Exception_t1927440687 *)__exception_local); Exception_t1927440687 * L_36 = V_4; TargetInvocationException_t4098620458 * L_37 = (TargetInvocationException_t4098620458 *)il2cpp_codegen_object_new(TargetInvocationException_t4098620458_il2cpp_TypeInfo_var); TargetInvocationException__ctor_m1059845570(L_37, L_36, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_37); } IL_00eb: { goto IL_00f0; } } // end catch (depth: 1) IL_00f0: { Exception_t1927440687 * L_38 = V_2; if (!L_38) { goto IL_00f8; } } { Exception_t1927440687 * L_39 = V_2; IL2CPP_RAISE_MANAGED_EXCEPTION(L_39); } IL_00f8: { Il2CppObject * L_40 = V_3; return L_40; } } // System.RuntimeMethodHandle System.Reflection.MonoMethod::get_MethodHandle() extern "C" RuntimeMethodHandle_t894824333 MonoMethod_get_MethodHandle_m1882915015 (MonoMethod_t * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_0(); RuntimeMethodHandle_t894824333 L_1; memset(&L_1, 0, sizeof(L_1)); RuntimeMethodHandle__ctor_m1162528746(&L_1, L_0, /*hidden argument*/NULL); return L_1; } } // System.Reflection.MethodAttributes System.Reflection.MonoMethod::get_Attributes() extern "C" int32_t MonoMethod_get_Attributes_m4038185617 (MonoMethod_t * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_0(); int32_t L_1 = MonoMethodInfo_GetAttributes_m2535493430(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.Reflection.CallingConventions System.Reflection.MonoMethod::get_CallingConvention() extern "C" int32_t MonoMethod_get_CallingConvention_m2978714873 (MonoMethod_t * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_0(); int32_t L_1 = MonoMethodInfo_GetCallingConvention_m3095860872(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.Type System.Reflection.MonoMethod::get_ReflectedType() extern "C" Type_t * MonoMethod_get_ReflectedType_m3966408549 (MonoMethod_t * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_reftype_2(); return L_0; } } // System.Type System.Reflection.MonoMethod::get_DeclaringType() extern "C" Type_t * MonoMethod_get_DeclaringType_m4119916616 (MonoMethod_t * __this, const MethodInfo* method) { { IntPtr_t L_0 = __this->get_mhandle_0(); Type_t * L_1 = MonoMethodInfo_GetDeclaringType_m4186531677(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); return L_1; } } // System.String System.Reflection.MonoMethod::get_Name() extern "C" String_t* MonoMethod_get_Name_m1650258269 (MonoMethod_t * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_name_1(); if (!L_0) { goto IL_0012; } } { String_t* L_1 = __this->get_name_1(); return L_1; } IL_0012: { String_t* L_2 = MonoMethod_get_name_m1503581873(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return L_2; } } // System.Boolean System.Reflection.MonoMethod::IsDefined(System.Type,System.Boolean) extern "C" bool MonoMethod_IsDefined_m2322670981 (MonoMethod_t * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoMethod_IsDefined_m2322670981_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); bool L_2 = MonoCustomAttrs_IsDefined_m3820363041(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Object[] System.Reflection.MonoMethod::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoMethod_GetCustomAttributes_m2493833930 (MonoMethod_t * __this, bool ___inherit0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoMethod_GetCustomAttributes_m2493833930_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = ___inherit0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_1 = MonoCustomAttrs_GetCustomAttributes_m3069779582(NULL /*static, unused*/, __this, L_0, /*hidden argument*/NULL); return L_1; } } // System.Object[] System.Reflection.MonoMethod::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoMethod_GetCustomAttributes_m3212448303 (MonoMethod_t * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoMethod_GetCustomAttributes_m3212448303_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_2 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Runtime.InteropServices.DllImportAttribute System.Reflection.MonoMethod::GetDllImportAttribute(System.IntPtr) extern "C" DllImportAttribute_t3000813225 * MonoMethod_GetDllImportAttribute_m2757463479 (Il2CppObject * __this /* static, unused */, IntPtr_t ___mhandle0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef DllImportAttribute_t3000813225 * (*MonoMethod_GetDllImportAttribute_m2757463479_ftn) (IntPtr_t); return ((MonoMethod_GetDllImportAttribute_m2757463479_ftn)mscorlib::System::Reflection::MonoMethod::GetDllImportAttribute) (___mhandle0); } // System.Object[] System.Reflection.MonoMethod::GetPseudoCustomAttributes() extern "C" ObjectU5BU5D_t3614634134* MonoMethod_GetPseudoCustomAttributes_m466965107 (MonoMethod_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoMethod_GetPseudoCustomAttributes_m466965107_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; MonoMethodInfo_t3646562144 V_1; memset(&V_1, 0, sizeof(V_1)); ObjectU5BU5D_t3614634134* V_2 = NULL; DllImportAttribute_t3000813225 * V_3 = NULL; { V_0 = 0; IntPtr_t L_0 = __this->get_mhandle_0(); MonoMethodInfo_t3646562144 L_1 = MonoMethodInfo_GetMethodInfo_m3298558752(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); V_1 = L_1; int32_t L_2 = (&V_1)->get_iattrs_3(); if (!((int32_t)((int32_t)L_2&(int32_t)((int32_t)128)))) { goto IL_0024; } } { int32_t L_3 = V_0; V_0 = ((int32_t)((int32_t)L_3+(int32_t)1)); } IL_0024: { int32_t L_4 = (&V_1)->get_attrs_2(); if (!((int32_t)((int32_t)L_4&(int32_t)((int32_t)8192)))) { goto IL_003a; } } { int32_t L_5 = V_0; V_0 = ((int32_t)((int32_t)L_5+(int32_t)1)); } IL_003a: { int32_t L_6 = V_0; if (L_6) { goto IL_0042; } } { return (ObjectU5BU5D_t3614634134*)NULL; } IL_0042: { int32_t L_7 = V_0; V_2 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)L_7)); V_0 = 0; int32_t L_8 = (&V_1)->get_iattrs_3(); if (!((int32_t)((int32_t)L_8&(int32_t)((int32_t)128)))) { goto IL_0069; } } { ObjectU5BU5D_t3614634134* L_9 = V_2; int32_t L_10 = V_0; int32_t L_11 = L_10; V_0 = ((int32_t)((int32_t)L_11+(int32_t)1)); PreserveSigAttribute_t1564965109 * L_12 = (PreserveSigAttribute_t1564965109 *)il2cpp_codegen_object_new(PreserveSigAttribute_t1564965109_il2cpp_TypeInfo_var); PreserveSigAttribute__ctor_m3423226067(L_12, /*hidden argument*/NULL); NullCheck(L_9); ArrayElementTypeCheck (L_9, L_12); (L_9)->SetAt(static_cast<il2cpp_array_size_t>(L_11), (Il2CppObject *)L_12); } IL_0069: { int32_t L_13 = (&V_1)->get_attrs_2(); if (!((int32_t)((int32_t)L_13&(int32_t)((int32_t)8192)))) { goto IL_00a8; } } { IntPtr_t L_14 = __this->get_mhandle_0(); DllImportAttribute_t3000813225 * L_15 = MonoMethod_GetDllImportAttribute_m2757463479(NULL /*static, unused*/, L_14, /*hidden argument*/NULL); V_3 = L_15; int32_t L_16 = (&V_1)->get_iattrs_3(); if (!((int32_t)((int32_t)L_16&(int32_t)((int32_t)128)))) { goto IL_00a0; } } { DllImportAttribute_t3000813225 * L_17 = V_3; NullCheck(L_17); L_17->set_PreserveSig_5((bool)1); } IL_00a0: { ObjectU5BU5D_t3614634134* L_18 = V_2; int32_t L_19 = V_0; int32_t L_20 = L_19; V_0 = ((int32_t)((int32_t)L_20+(int32_t)1)); DllImportAttribute_t3000813225 * L_21 = V_3; NullCheck(L_18); ArrayElementTypeCheck (L_18, L_21); (L_18)->SetAt(static_cast<il2cpp_array_size_t>(L_20), (Il2CppObject *)L_21); } IL_00a8: { ObjectU5BU5D_t3614634134* L_22 = V_2; return L_22; } } // System.Boolean System.Reflection.MonoMethod::ShouldPrintFullName(System.Type) extern "C" bool MonoMethod_ShouldPrintFullName_m2343680861 (Il2CppObject * __this /* static, unused */, Type_t * ___type0, const MethodInfo* method) { int32_t G_B5_0 = 0; int32_t G_B7_0 = 0; int32_t G_B9_0 = 0; { Type_t * L_0 = ___type0; NullCheck(L_0); bool L_1 = Type_get_IsClass_m2968663946(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_003c; } } { Type_t * L_2 = ___type0; NullCheck(L_2); bool L_3 = Type_get_IsPointer_m3832342327(L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_0039; } } { Type_t * L_4 = ___type0; NullCheck(L_4); Type_t * L_5 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_4); NullCheck(L_5); bool L_6 = Type_get_IsPrimitive_m1522841565(L_5, /*hidden argument*/NULL); if (L_6) { goto IL_0036; } } { Type_t * L_7 = ___type0; NullCheck(L_7); Type_t * L_8 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_7); NullCheck(L_8); bool L_9 = Type_get_IsNested_m3671396733(L_8, /*hidden argument*/NULL); G_B5_0 = ((((int32_t)L_9) == ((int32_t)0))? 1 : 0); goto IL_0037; } IL_0036: { G_B5_0 = 0; } IL_0037: { G_B7_0 = G_B5_0; goto IL_003a; } IL_0039: { G_B7_0 = 1; } IL_003a: { G_B9_0 = G_B7_0; goto IL_003d; } IL_003c: { G_B9_0 = 0; } IL_003d: { return (bool)G_B9_0; } } // System.String System.Reflection.MonoMethod::ToString() extern "C" String_t* MonoMethod_ToString_m1014895917 (MonoMethod_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoMethod_ToString_m1014895917_MetadataUsageId); s_Il2CppMethodInitialized = true; } StringBuilder_t1221177846 * V_0 = NULL; Type_t * V_1 = NULL; TypeU5BU5D_t1664964607* V_2 = NULL; int32_t V_3 = 0; ParameterInfoU5BU5D_t2275869610* V_4 = NULL; int32_t V_5 = 0; Type_t * V_6 = NULL; bool V_7 = false; { StringBuilder_t1221177846 * L_0 = (StringBuilder_t1221177846 *)il2cpp_codegen_object_new(StringBuilder_t1221177846_il2cpp_TypeInfo_var); StringBuilder__ctor_m3946851802(L_0, /*hidden argument*/NULL); V_0 = L_0; Type_t * L_1 = VirtFuncInvoker0< Type_t * >::Invoke(31 /* System.Type System.Reflection.MonoMethod::get_ReturnType() */, __this); V_1 = L_1; Type_t * L_2 = V_1; bool L_3 = MonoMethod_ShouldPrintFullName_m2343680861(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_002a; } } { StringBuilder_t1221177846 * L_4 = V_0; Type_t * L_5 = V_1; NullCheck(L_5); String_t* L_6 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Type::ToString() */, L_5); NullCheck(L_4); StringBuilder_Append_m3636508479(L_4, L_6, /*hidden argument*/NULL); goto IL_0037; } IL_002a: { StringBuilder_t1221177846 * L_7 = V_0; Type_t * L_8 = V_1; NullCheck(L_8); String_t* L_9 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_8); NullCheck(L_7); StringBuilder_Append_m3636508479(L_7, L_9, /*hidden argument*/NULL); } IL_0037: { StringBuilder_t1221177846 * L_10 = V_0; NullCheck(L_10); StringBuilder_Append_m3636508479(L_10, _stringLiteral372029310, /*hidden argument*/NULL); StringBuilder_t1221177846 * L_11 = V_0; String_t* L_12 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoMethod::get_Name() */, __this); NullCheck(L_11); StringBuilder_Append_m3636508479(L_11, L_12, /*hidden argument*/NULL); bool L_13 = VirtFuncInvoker0< bool >::Invoke(29 /* System.Boolean System.Reflection.MonoMethod::get_IsGenericMethod() */, __this); if (!L_13) { goto IL_00b0; } } { TypeU5BU5D_t1664964607* L_14 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(26 /* System.Type[] System.Reflection.MonoMethod::GetGenericArguments() */, __this); V_2 = L_14; StringBuilder_t1221177846 * L_15 = V_0; NullCheck(L_15); StringBuilder_Append_m3636508479(L_15, _stringLiteral372029431, /*hidden argument*/NULL); V_3 = 0; goto IL_009b; } IL_0075: { int32_t L_16 = V_3; if ((((int32_t)L_16) <= ((int32_t)0))) { goto IL_0088; } } { StringBuilder_t1221177846 * L_17 = V_0; NullCheck(L_17); StringBuilder_Append_m3636508479(L_17, _stringLiteral372029314, /*hidden argument*/NULL); } IL_0088: { StringBuilder_t1221177846 * L_18 = V_0; TypeU5BU5D_t1664964607* L_19 = V_2; int32_t L_20 = V_3; NullCheck(L_19); int32_t L_21 = L_20; Type_t * L_22 = (L_19)->GetAt(static_cast<il2cpp_array_size_t>(L_21)); NullCheck(L_22); String_t* L_23 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_22); NullCheck(L_18); StringBuilder_Append_m3636508479(L_18, L_23, /*hidden argument*/NULL); int32_t L_24 = V_3; V_3 = ((int32_t)((int32_t)L_24+(int32_t)1)); } IL_009b: { int32_t L_25 = V_3; TypeU5BU5D_t1664964607* L_26 = V_2; NullCheck(L_26); if ((((int32_t)L_25) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_26)->max_length))))))) { goto IL_0075; } } { StringBuilder_t1221177846 * L_27 = V_0; NullCheck(L_27); StringBuilder_Append_m3636508479(L_27, _stringLiteral372029425, /*hidden argument*/NULL); } IL_00b0: { StringBuilder_t1221177846 * L_28 = V_0; NullCheck(L_28); StringBuilder_Append_m3636508479(L_28, _stringLiteral372029318, /*hidden argument*/NULL); ParameterInfoU5BU5D_t2275869610* L_29 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MonoMethod::GetParameters() */, __this); V_4 = L_29; V_5 = 0; goto IL_014b; } IL_00cc: { int32_t L_30 = V_5; if ((((int32_t)L_30) <= ((int32_t)0))) { goto IL_00e0; } } { StringBuilder_t1221177846 * L_31 = V_0; NullCheck(L_31); StringBuilder_Append_m3636508479(L_31, _stringLiteral811305474, /*hidden argument*/NULL); } IL_00e0: { ParameterInfoU5BU5D_t2275869610* L_32 = V_4; int32_t L_33 = V_5; NullCheck(L_32); int32_t L_34 = L_33; ParameterInfo_t2249040075 * L_35 = (L_32)->GetAt(static_cast<il2cpp_array_size_t>(L_34)); NullCheck(L_35); Type_t * L_36 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_35); V_6 = L_36; Type_t * L_37 = V_6; NullCheck(L_37); bool L_38 = Type_get_IsByRef_m3523465500(L_37, /*hidden argument*/NULL); V_7 = L_38; bool L_39 = V_7; if (!L_39) { goto IL_0105; } } { Type_t * L_40 = V_6; NullCheck(L_40); Type_t * L_41 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_40); V_6 = L_41; } IL_0105: { Type_t * L_42 = V_6; bool L_43 = MonoMethod_ShouldPrintFullName_m2343680861(NULL /*static, unused*/, L_42, /*hidden argument*/NULL); if (!L_43) { goto IL_0124; } } { StringBuilder_t1221177846 * L_44 = V_0; Type_t * L_45 = V_6; NullCheck(L_45); String_t* L_46 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Type::ToString() */, L_45); NullCheck(L_44); StringBuilder_Append_m3636508479(L_44, L_46, /*hidden argument*/NULL); goto IL_0132; } IL_0124: { StringBuilder_t1221177846 * L_47 = V_0; Type_t * L_48 = V_6; NullCheck(L_48); String_t* L_49 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_48); NullCheck(L_47); StringBuilder_Append_m3636508479(L_47, L_49, /*hidden argument*/NULL); } IL_0132: { bool L_50 = V_7; if (!L_50) { goto IL_0145; } } { StringBuilder_t1221177846 * L_51 = V_0; NullCheck(L_51); StringBuilder_Append_m3636508479(L_51, _stringLiteral1271078008, /*hidden argument*/NULL); } IL_0145: { int32_t L_52 = V_5; V_5 = ((int32_t)((int32_t)L_52+(int32_t)1)); } IL_014b: { int32_t L_53 = V_5; ParameterInfoU5BU5D_t2275869610* L_54 = V_4; NullCheck(L_54); if ((((int32_t)L_53) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_54)->max_length))))))) { goto IL_00cc; } } { int32_t L_55 = VirtFuncInvoker0< int32_t >::Invoke(20 /* System.Reflection.CallingConventions System.Reflection.MonoMethod::get_CallingConvention() */, __this); if (!((int32_t)((int32_t)L_55&(int32_t)2))) { goto IL_0185; } } { ParameterInfoU5BU5D_t2275869610* L_56 = V_4; NullCheck(L_56); if ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_56)->max_length))))) <= ((int32_t)0))) { goto IL_0179; } } { StringBuilder_t1221177846 * L_57 = V_0; NullCheck(L_57); StringBuilder_Append_m3636508479(L_57, _stringLiteral811305474, /*hidden argument*/NULL); } IL_0179: { StringBuilder_t1221177846 * L_58 = V_0; NullCheck(L_58); StringBuilder_Append_m3636508479(L_58, _stringLiteral1623555996, /*hidden argument*/NULL); } IL_0185: { StringBuilder_t1221177846 * L_59 = V_0; NullCheck(L_59); StringBuilder_Append_m3636508479(L_59, _stringLiteral372029317, /*hidden argument*/NULL); StringBuilder_t1221177846 * L_60 = V_0; NullCheck(L_60); String_t* L_61 = StringBuilder_ToString_m1507807375(L_60, /*hidden argument*/NULL); return L_61; } } // System.Void System.Reflection.MonoMethod::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void MonoMethod_GetObjectData_m3146497844 (MonoMethod_t * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { TypeU5BU5D_t1664964607* V_0 = NULL; TypeU5BU5D_t1664964607* G_B4_0 = NULL; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(29 /* System.Boolean System.Reflection.MonoMethod::get_IsGenericMethod() */, __this); if (!L_0) { goto IL_0021; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(28 /* System.Boolean System.Reflection.MonoMethod::get_IsGenericMethodDefinition() */, __this); if (L_1) { goto IL_0021; } } { TypeU5BU5D_t1664964607* L_2 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(26 /* System.Type[] System.Reflection.MonoMethod::GetGenericArguments() */, __this); G_B4_0 = L_2; goto IL_0022; } IL_0021: { G_B4_0 = ((TypeU5BU5D_t1664964607*)(NULL)); } IL_0022: { V_0 = G_B4_0; SerializationInfo_t228987430 * L_3 = ___info0; String_t* L_4 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoMethod::get_Name() */, __this); Type_t * L_5 = VirtFuncInvoker0< Type_t * >::Invoke(9 /* System.Type System.Reflection.MonoMethod::get_ReflectedType() */, __this); String_t* L_6 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Reflection.MonoMethod::ToString() */, __this); TypeU5BU5D_t1664964607* L_7 = V_0; MemberInfoSerializationHolder_Serialize_m4243060728(NULL /*static, unused*/, L_3, L_4, L_5, L_6, 8, L_7, /*hidden argument*/NULL); return; } } // System.Reflection.MethodInfo System.Reflection.MonoMethod::MakeGenericMethod(System.Type[]) extern "C" MethodInfo_t * MonoMethod_MakeGenericMethod_m3628255919 (MonoMethod_t * __this, TypeU5BU5D_t1664964607* ___methodInstantiation0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoMethod_MakeGenericMethod_m3628255919_MetadataUsageId); s_Il2CppMethodInitialized = true; } Type_t * V_0 = NULL; TypeU5BU5D_t1664964607* V_1 = NULL; int32_t V_2 = 0; MethodInfo_t * V_3 = NULL; { TypeU5BU5D_t1664964607* L_0 = ___methodInstantiation0; if (L_0) { goto IL_0011; } } { ArgumentNullException_t628810857 * L_1 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m3380712306(L_1, _stringLiteral56518380, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_1); } IL_0011: { TypeU5BU5D_t1664964607* L_2 = ___methodInstantiation0; V_1 = L_2; V_2 = 0; goto IL_002e; } IL_001a: { TypeU5BU5D_t1664964607* L_3 = V_1; int32_t L_4 = V_2; NullCheck(L_3); int32_t L_5 = L_4; Type_t * L_6 = (L_3)->GetAt(static_cast<il2cpp_array_size_t>(L_5)); V_0 = L_6; Type_t * L_7 = V_0; if (L_7) { goto IL_002a; } } { ArgumentNullException_t628810857 * L_8 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var); ArgumentNullException__ctor_m911049464(L_8, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_8); } IL_002a: { int32_t L_9 = V_2; V_2 = ((int32_t)((int32_t)L_9+(int32_t)1)); } IL_002e: { int32_t L_10 = V_2; TypeU5BU5D_t1664964607* L_11 = V_1; NullCheck(L_11); if ((((int32_t)L_10) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_11)->max_length))))))) { goto IL_001a; } } { TypeU5BU5D_t1664964607* L_12 = ___methodInstantiation0; MethodInfo_t * L_13 = MonoMethod_MakeGenericMethod_impl_m2063853616(__this, L_12, /*hidden argument*/NULL); V_3 = L_13; MethodInfo_t * L_14 = V_3; if (L_14) { goto IL_006a; } } { TypeU5BU5D_t1664964607* L_15 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(26 /* System.Type[] System.Reflection.MonoMethod::GetGenericArguments() */, __this); NullCheck(L_15); int32_t L_16 = (((int32_t)((int32_t)(((Il2CppArray *)L_15)->max_length)))); Il2CppObject * L_17 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_16); TypeU5BU5D_t1664964607* L_18 = ___methodInstantiation0; NullCheck(L_18); int32_t L_19 = (((int32_t)((int32_t)(((Il2CppArray *)L_18)->max_length)))); Il2CppObject * L_20 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_19); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_21 = String_Format_m1811873526(NULL /*static, unused*/, _stringLiteral2401257820, L_17, L_20, /*hidden argument*/NULL); ArgumentException_t3259014390 * L_22 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_22, L_21, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_22); } IL_006a: { MethodInfo_t * L_23 = V_3; return L_23; } } // System.Reflection.MethodInfo System.Reflection.MonoMethod::MakeGenericMethod_impl(System.Type[]) extern "C" MethodInfo_t * MonoMethod_MakeGenericMethod_impl_m2063853616 (MonoMethod_t * __this, TypeU5BU5D_t1664964607* ___types0, const MethodInfo* method) { using namespace il2cpp::icalls; typedef MethodInfo_t * (*MonoMethod_MakeGenericMethod_impl_m2063853616_ftn) (MonoMethod_t *, TypeU5BU5D_t1664964607*); return ((MonoMethod_MakeGenericMethod_impl_m2063853616_ftn)mscorlib::System::Reflection::MonoMethod::MakeGenericMethod_impl) (__this, ___types0); } // System.Type[] System.Reflection.MonoMethod::GetGenericArguments() extern "C" TypeU5BU5D_t1664964607* MonoMethod_GetGenericArguments_m1043327523 (MonoMethod_t * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef TypeU5BU5D_t1664964607* (*MonoMethod_GetGenericArguments_m1043327523_ftn) (MonoMethod_t *); return ((MonoMethod_GetGenericArguments_m1043327523_ftn)mscorlib::System::Reflection::MonoMethod::GetGenericArguments) (__this); } // System.Boolean System.Reflection.MonoMethod::get_IsGenericMethodDefinition() extern "C" bool MonoMethod_get_IsGenericMethodDefinition_m2424433610 (MonoMethod_t * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef bool (*MonoMethod_get_IsGenericMethodDefinition_m2424433610_ftn) (MonoMethod_t *); return ((MonoMethod_get_IsGenericMethodDefinition_m2424433610_ftn)mscorlib::System::Reflection::MonoMethod::get_IsGenericMethodDefinition) (__this); } // System.Boolean System.Reflection.MonoMethod::get_IsGenericMethod() extern "C" bool MonoMethod_get_IsGenericMethod_m4276550811 (MonoMethod_t * __this, const MethodInfo* method) { using namespace il2cpp::icalls; typedef bool (*MonoMethod_get_IsGenericMethod_m4276550811_ftn) (MonoMethod_t *); return ((MonoMethod_get_IsGenericMethod_m4276550811_ftn)mscorlib::System::Reflection::MonoMethod::get_IsGenericMethod) (__this); } // System.Boolean System.Reflection.MonoMethod::get_ContainsGenericParameters() extern "C" bool MonoMethod_get_ContainsGenericParameters_m2891719083 (MonoMethod_t * __this, const MethodInfo* method) { Type_t * V_0 = NULL; TypeU5BU5D_t1664964607* V_1 = NULL; int32_t V_2 = 0; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(29 /* System.Boolean System.Reflection.MonoMethod::get_IsGenericMethod() */, __this); if (!L_0) { goto IL_0037; } } { TypeU5BU5D_t1664964607* L_1 = VirtFuncInvoker0< TypeU5BU5D_t1664964607* >::Invoke(26 /* System.Type[] System.Reflection.MonoMethod::GetGenericArguments() */, __this); V_1 = L_1; V_2 = 0; goto IL_002e; } IL_0019: { TypeU5BU5D_t1664964607* L_2 = V_1; int32_t L_3 = V_2; NullCheck(L_2); int32_t L_4 = L_3; Type_t * L_5 = (L_2)->GetAt(static_cast<il2cpp_array_size_t>(L_4)); V_0 = L_5; Type_t * L_6 = V_0; NullCheck(L_6); bool L_7 = VirtFuncInvoker0< bool >::Invoke(80 /* System.Boolean System.Type::get_ContainsGenericParameters() */, L_6); if (!L_7) { goto IL_002a; } } { return (bool)1; } IL_002a: { int32_t L_8 = V_2; V_2 = ((int32_t)((int32_t)L_8+(int32_t)1)); } IL_002e: { int32_t L_9 = V_2; TypeU5BU5D_t1664964607* L_10 = V_1; NullCheck(L_10); if ((((int32_t)L_9) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_10)->max_length))))))) { goto IL_0019; } } IL_0037: { Type_t * L_11 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MonoMethod::get_DeclaringType() */, __this); NullCheck(L_11); bool L_12 = VirtFuncInvoker0< bool >::Invoke(80 /* System.Boolean System.Type::get_ContainsGenericParameters() */, L_11); return L_12; } } // Conversion methods for marshalling of: System.Reflection.MonoMethodInfo extern "C" void MonoMethodInfo_t3646562144_marshal_pinvoke(const MonoMethodInfo_t3646562144& unmarshaled, MonoMethodInfo_t3646562144_marshaled_pinvoke& marshaled) { Il2CppCodeGenException* ___parent_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'parent' of type 'MonoMethodInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___parent_0Exception); } extern "C" void MonoMethodInfo_t3646562144_marshal_pinvoke_back(const MonoMethodInfo_t3646562144_marshaled_pinvoke& marshaled, MonoMethodInfo_t3646562144& unmarshaled) { Il2CppCodeGenException* ___parent_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'parent' of type 'MonoMethodInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___parent_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.MonoMethodInfo extern "C" void MonoMethodInfo_t3646562144_marshal_pinvoke_cleanup(MonoMethodInfo_t3646562144_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: System.Reflection.MonoMethodInfo extern "C" void MonoMethodInfo_t3646562144_marshal_com(const MonoMethodInfo_t3646562144& unmarshaled, MonoMethodInfo_t3646562144_marshaled_com& marshaled) { Il2CppCodeGenException* ___parent_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'parent' of type 'MonoMethodInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___parent_0Exception); } extern "C" void MonoMethodInfo_t3646562144_marshal_com_back(const MonoMethodInfo_t3646562144_marshaled_com& marshaled, MonoMethodInfo_t3646562144& unmarshaled) { Il2CppCodeGenException* ___parent_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'parent' of type 'MonoMethodInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___parent_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.MonoMethodInfo extern "C" void MonoMethodInfo_t3646562144_marshal_com_cleanup(MonoMethodInfo_t3646562144_marshaled_com& marshaled) { } // System.Void System.Reflection.MonoMethodInfo::get_method_info(System.IntPtr,System.Reflection.MonoMethodInfo&) extern "C" void MonoMethodInfo_get_method_info_m3630911979 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, MonoMethodInfo_t3646562144 * ___info1, const MethodInfo* method) { using namespace il2cpp::icalls; typedef void (*MonoMethodInfo_get_method_info_m3630911979_ftn) (IntPtr_t, MonoMethodInfo_t3646562144 *); ((MonoMethodInfo_get_method_info_m3630911979_ftn)mscorlib::System::Reflection::MonoMethodInfo::get_method_info) (___handle0, ___info1); } // System.Reflection.MonoMethodInfo System.Reflection.MonoMethodInfo::GetMethodInfo(System.IntPtr) extern "C" MonoMethodInfo_t3646562144 MonoMethodInfo_GetMethodInfo_m3298558752 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) { MonoMethodInfo_t3646562144 V_0; memset(&V_0, 0, sizeof(V_0)); { IntPtr_t L_0 = ___handle0; MonoMethodInfo_get_method_info_m3630911979(NULL /*static, unused*/, L_0, (&V_0), /*hidden argument*/NULL); MonoMethodInfo_t3646562144 L_1 = V_0; return L_1; } } // System.Type System.Reflection.MonoMethodInfo::GetDeclaringType(System.IntPtr) extern "C" Type_t * MonoMethodInfo_GetDeclaringType_m4186531677 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) { MonoMethodInfo_t3646562144 V_0; memset(&V_0, 0, sizeof(V_0)); { IntPtr_t L_0 = ___handle0; MonoMethodInfo_t3646562144 L_1 = MonoMethodInfo_GetMethodInfo_m3298558752(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); V_0 = L_1; Type_t * L_2 = (&V_0)->get_parent_0(); return L_2; } } // System.Type System.Reflection.MonoMethodInfo::GetReturnType(System.IntPtr) extern "C" Type_t * MonoMethodInfo_GetReturnType_m2864247130 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) { MonoMethodInfo_t3646562144 V_0; memset(&V_0, 0, sizeof(V_0)); { IntPtr_t L_0 = ___handle0; MonoMethodInfo_t3646562144 L_1 = MonoMethodInfo_GetMethodInfo_m3298558752(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); V_0 = L_1; Type_t * L_2 = (&V_0)->get_ret_1(); return L_2; } } // System.Reflection.MethodAttributes System.Reflection.MonoMethodInfo::GetAttributes(System.IntPtr) extern "C" int32_t MonoMethodInfo_GetAttributes_m2535493430 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) { MonoMethodInfo_t3646562144 V_0; memset(&V_0, 0, sizeof(V_0)); { IntPtr_t L_0 = ___handle0; MonoMethodInfo_t3646562144 L_1 = MonoMethodInfo_GetMethodInfo_m3298558752(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); V_0 = L_1; int32_t L_2 = (&V_0)->get_attrs_2(); return L_2; } } // System.Reflection.CallingConventions System.Reflection.MonoMethodInfo::GetCallingConvention(System.IntPtr) extern "C" int32_t MonoMethodInfo_GetCallingConvention_m3095860872 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, const MethodInfo* method) { MonoMethodInfo_t3646562144 V_0; memset(&V_0, 0, sizeof(V_0)); { IntPtr_t L_0 = ___handle0; MonoMethodInfo_t3646562144 L_1 = MonoMethodInfo_GetMethodInfo_m3298558752(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); V_0 = L_1; int32_t L_2 = (&V_0)->get_callconv_4(); return L_2; } } // System.Reflection.ParameterInfo[] System.Reflection.MonoMethodInfo::get_parameter_info(System.IntPtr,System.Reflection.MemberInfo) extern "C" ParameterInfoU5BU5D_t2275869610* MonoMethodInfo_get_parameter_info_m3554140855 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, MemberInfo_t * ___member1, const MethodInfo* method) { using namespace il2cpp::icalls; typedef ParameterInfoU5BU5D_t2275869610* (*MonoMethodInfo_get_parameter_info_m3554140855_ftn) (IntPtr_t, MemberInfo_t *); return ((MonoMethodInfo_get_parameter_info_m3554140855_ftn)mscorlib::System::Reflection::MonoMethodInfo::get_parameter_info) (___handle0, ___member1); } // System.Reflection.ParameterInfo[] System.Reflection.MonoMethodInfo::GetParametersInfo(System.IntPtr,System.Reflection.MemberInfo) extern "C" ParameterInfoU5BU5D_t2275869610* MonoMethodInfo_GetParametersInfo_m3456861922 (Il2CppObject * __this /* static, unused */, IntPtr_t ___handle0, MemberInfo_t * ___member1, const MethodInfo* method) { { IntPtr_t L_0 = ___handle0; MemberInfo_t * L_1 = ___member1; ParameterInfoU5BU5D_t2275869610* L_2 = MonoMethodInfo_get_parameter_info_m3554140855(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Void System.Reflection.MonoProperty::.ctor() extern "C" void MonoProperty__ctor_m945517100 (MonoProperty_t * __this, const MethodInfo* method) { { PropertyInfo__ctor_m1808219471(__this, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.MonoProperty::CachePropertyInfo(System.Reflection.PInfo) extern "C" void MonoProperty_CachePropertyInfo_m1437316683 (MonoProperty_t * __this, int32_t ___flags0, const MethodInfo* method) { { int32_t L_0 = __this->get_cached_3(); int32_t L_1 = ___flags0; int32_t L_2 = ___flags0; if ((((int32_t)((int32_t)((int32_t)L_0&(int32_t)L_1))) == ((int32_t)L_2))) { goto IL_0029; } } { MonoPropertyInfo_t486106184 * L_3 = __this->get_address_of_info_2(); int32_t L_4 = ___flags0; MonoPropertyInfo_get_property_info_m556498347(NULL /*static, unused*/, __this, L_3, L_4, /*hidden argument*/NULL); int32_t L_5 = __this->get_cached_3(); int32_t L_6 = ___flags0; __this->set_cached_3(((int32_t)((int32_t)L_5|(int32_t)L_6))); } IL_0029: { return; } } // System.Reflection.PropertyAttributes System.Reflection.MonoProperty::get_Attributes() extern "C" int32_t MonoProperty_get_Attributes_m2589593297 (MonoProperty_t * __this, const MethodInfo* method) { { MonoProperty_CachePropertyInfo_m1437316683(__this, 1, /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); int32_t L_1 = L_0->get_attrs_4(); return L_1; } } // System.Boolean System.Reflection.MonoProperty::get_CanRead() extern "C" bool MonoProperty_get_CanRead_m1173212369 (MonoProperty_t * __this, const MethodInfo* method) { { MonoProperty_CachePropertyInfo_m1437316683(__this, 2, /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); MethodInfo_t * L_1 = L_0->get_get_method_2(); return (bool)((((int32_t)((((Il2CppObject*)(MethodInfo_t *)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.MonoProperty::get_CanWrite() extern "C" bool MonoProperty_get_CanWrite_m2124922514 (MonoProperty_t * __this, const MethodInfo* method) { { MonoProperty_CachePropertyInfo_m1437316683(__this, 4, /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); MethodInfo_t * L_1 = L_0->get_set_method_3(); return (bool)((((int32_t)((((Il2CppObject*)(MethodInfo_t *)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Type System.Reflection.MonoProperty::get_PropertyType() extern "C" Type_t * MonoProperty_get_PropertyType_m1921201152 (MonoProperty_t * __this, const MethodInfo* method) { ParameterInfoU5BU5D_t2275869610* V_0 = NULL; { MonoProperty_CachePropertyInfo_m1437316683(__this, 6, /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); MethodInfo_t * L_1 = L_0->get_get_method_2(); if (!L_1) { goto IL_0028; } } { MonoPropertyInfo_t486106184 * L_2 = __this->get_address_of_info_2(); MethodInfo_t * L_3 = L_2->get_get_method_2(); NullCheck(L_3); Type_t * L_4 = VirtFuncInvoker0< Type_t * >::Invoke(31 /* System.Type System.Reflection.MethodInfo::get_ReturnType() */, L_3); return L_4; } IL_0028: { MonoPropertyInfo_t486106184 * L_5 = __this->get_address_of_info_2(); MethodInfo_t * L_6 = L_5->get_set_method_3(); NullCheck(L_6); ParameterInfoU5BU5D_t2275869610* L_7 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_6); V_0 = L_7; ParameterInfoU5BU5D_t2275869610* L_8 = V_0; ParameterInfoU5BU5D_t2275869610* L_9 = V_0; NullCheck(L_9); NullCheck(L_8); int32_t L_10 = ((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_9)->max_length))))-(int32_t)1)); ParameterInfo_t2249040075 * L_11 = (L_8)->GetAt(static_cast<il2cpp_array_size_t>(L_10)); NullCheck(L_11); Type_t * L_12 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_11); return L_12; } } // System.Type System.Reflection.MonoProperty::get_ReflectedType() extern "C" Type_t * MonoProperty_get_ReflectedType_m903353661 (MonoProperty_t * __this, const MethodInfo* method) { { MonoProperty_CachePropertyInfo_m1437316683(__this, 8, /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); Type_t * L_1 = L_0->get_parent_0(); return L_1; } } // System.Type System.Reflection.MonoProperty::get_DeclaringType() extern "C" Type_t * MonoProperty_get_DeclaringType_m4236036432 (MonoProperty_t * __this, const MethodInfo* method) { { MonoProperty_CachePropertyInfo_m1437316683(__this, ((int32_t)16), /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); Type_t * L_1 = L_0->get_parent_0(); return L_1; } } // System.String System.Reflection.MonoProperty::get_Name() extern "C" String_t* MonoProperty_get_Name_m1248249317 (MonoProperty_t * __this, const MethodInfo* method) { { MonoProperty_CachePropertyInfo_m1437316683(__this, ((int32_t)32), /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); String_t* L_1 = L_0->get_name_1(); return L_1; } } // System.Reflection.MethodInfo[] System.Reflection.MonoProperty::GetAccessors(System.Boolean) extern "C" MethodInfoU5BU5D_t152480188* MonoProperty_GetAccessors_m3704698731 (MonoProperty_t * __this, bool ___nonPublic0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_GetAccessors_m3704698731_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; MethodInfoU5BU5D_t152480188* V_2 = NULL; int32_t V_3 = 0; { V_0 = 0; V_1 = 0; MonoProperty_CachePropertyInfo_m1437316683(__this, 6, /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); MethodInfo_t * L_1 = L_0->get_set_method_3(); if (!L_1) { goto IL_0038; } } { bool L_2 = ___nonPublic0; if (L_2) { goto IL_0036; } } { MonoPropertyInfo_t486106184 * L_3 = __this->get_address_of_info_2(); MethodInfo_t * L_4 = L_3->get_set_method_3(); NullCheck(L_4); bool L_5 = MethodBase_get_IsPublic_m479656180(L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_0038; } } IL_0036: { V_1 = 1; } IL_0038: { MonoPropertyInfo_t486106184 * L_6 = __this->get_address_of_info_2(); MethodInfo_t * L_7 = L_6->get_get_method_2(); if (!L_7) { goto IL_0065; } } { bool L_8 = ___nonPublic0; if (L_8) { goto IL_0063; } } { MonoPropertyInfo_t486106184 * L_9 = __this->get_address_of_info_2(); MethodInfo_t * L_10 = L_9->get_get_method_2(); NullCheck(L_10); bool L_11 = MethodBase_get_IsPublic_m479656180(L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_0065; } } IL_0063: { V_0 = 1; } IL_0065: { int32_t L_12 = V_0; int32_t L_13 = V_1; V_2 = ((MethodInfoU5BU5D_t152480188*)SZArrayNew(MethodInfoU5BU5D_t152480188_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)L_12+(int32_t)L_13)))); V_3 = 0; int32_t L_14 = V_1; if (!L_14) { goto IL_0088; } } { MethodInfoU5BU5D_t152480188* L_15 = V_2; int32_t L_16 = V_3; int32_t L_17 = L_16; V_3 = ((int32_t)((int32_t)L_17+(int32_t)1)); MonoPropertyInfo_t486106184 * L_18 = __this->get_address_of_info_2(); MethodInfo_t * L_19 = L_18->get_set_method_3(); NullCheck(L_15); ArrayElementTypeCheck (L_15, L_19); (L_15)->SetAt(static_cast<il2cpp_array_size_t>(L_17), (MethodInfo_t *)L_19); } IL_0088: { int32_t L_20 = V_0; if (!L_20) { goto IL_00a0; } } { MethodInfoU5BU5D_t152480188* L_21 = V_2; int32_t L_22 = V_3; int32_t L_23 = L_22; V_3 = ((int32_t)((int32_t)L_23+(int32_t)1)); MonoPropertyInfo_t486106184 * L_24 = __this->get_address_of_info_2(); MethodInfo_t * L_25 = L_24->get_get_method_2(); NullCheck(L_21); ArrayElementTypeCheck (L_21, L_25); (L_21)->SetAt(static_cast<il2cpp_array_size_t>(L_23), (MethodInfo_t *)L_25); } IL_00a0: { MethodInfoU5BU5D_t152480188* L_26 = V_2; return L_26; } } // System.Reflection.MethodInfo System.Reflection.MonoProperty::GetGetMethod(System.Boolean) extern "C" MethodInfo_t * MonoProperty_GetGetMethod_m1100580870 (MonoProperty_t * __this, bool ___nonPublic0, const MethodInfo* method) { { MonoProperty_CachePropertyInfo_m1437316683(__this, 2, /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); MethodInfo_t * L_1 = L_0->get_get_method_2(); if (!L_1) { goto IL_003e; } } { bool L_2 = ___nonPublic0; if (L_2) { goto IL_0032; } } { MonoPropertyInfo_t486106184 * L_3 = __this->get_address_of_info_2(); MethodInfo_t * L_4 = L_3->get_get_method_2(); NullCheck(L_4); bool L_5 = MethodBase_get_IsPublic_m479656180(L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_003e; } } IL_0032: { MonoPropertyInfo_t486106184 * L_6 = __this->get_address_of_info_2(); MethodInfo_t * L_7 = L_6->get_get_method_2(); return L_7; } IL_003e: { return (MethodInfo_t *)NULL; } } // System.Reflection.ParameterInfo[] System.Reflection.MonoProperty::GetIndexParameters() extern "C" ParameterInfoU5BU5D_t2275869610* MonoProperty_GetIndexParameters_m832800404 (MonoProperty_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_GetIndexParameters_m832800404_MetadataUsageId); s_Il2CppMethodInitialized = true; } ParameterInfoU5BU5D_t2275869610* V_0 = NULL; ParameterInfoU5BU5D_t2275869610* V_1 = NULL; int32_t V_2 = 0; ParameterInfo_t2249040075 * V_3 = NULL; { MonoProperty_CachePropertyInfo_m1437316683(__this, 6, /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); MethodInfo_t * L_1 = L_0->get_get_method_2(); if (!L_1) { goto IL_002d; } } { MonoPropertyInfo_t486106184 * L_2 = __this->get_address_of_info_2(); MethodInfo_t * L_3 = L_2->get_get_method_2(); NullCheck(L_3); ParameterInfoU5BU5D_t2275869610* L_4 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_3); V_0 = L_4; goto IL_006f; } IL_002d: { MonoPropertyInfo_t486106184 * L_5 = __this->get_address_of_info_2(); MethodInfo_t * L_6 = L_5->get_set_method_3(); if (!L_6) { goto IL_0068; } } { MonoPropertyInfo_t486106184 * L_7 = __this->get_address_of_info_2(); MethodInfo_t * L_8 = L_7->get_set_method_3(); NullCheck(L_8); ParameterInfoU5BU5D_t2275869610* L_9 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_8); V_1 = L_9; ParameterInfoU5BU5D_t2275869610* L_10 = V_1; NullCheck(L_10); V_0 = ((ParameterInfoU5BU5D_t2275869610*)SZArrayNew(ParameterInfoU5BU5D_t2275869610_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_10)->max_length))))-(int32_t)1)))); ParameterInfoU5BU5D_t2275869610* L_11 = V_1; ParameterInfoU5BU5D_t2275869610* L_12 = V_0; ParameterInfoU5BU5D_t2275869610* L_13 = V_0; NullCheck(L_13); Array_Copy_m2363740072(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_11, (Il2CppArray *)(Il2CppArray *)L_12, (((int32_t)((int32_t)(((Il2CppArray *)L_13)->max_length)))), /*hidden argument*/NULL); goto IL_006f; } IL_0068: { return ((ParameterInfoU5BU5D_t2275869610*)SZArrayNew(ParameterInfoU5BU5D_t2275869610_il2cpp_TypeInfo_var, (uint32_t)0)); } IL_006f: { V_2 = 0; goto IL_0088; } IL_0076: { ParameterInfoU5BU5D_t2275869610* L_14 = V_0; int32_t L_15 = V_2; NullCheck(L_14); int32_t L_16 = L_15; ParameterInfo_t2249040075 * L_17 = (L_14)->GetAt(static_cast<il2cpp_array_size_t>(L_16)); V_3 = L_17; ParameterInfoU5BU5D_t2275869610* L_18 = V_0; int32_t L_19 = V_2; ParameterInfo_t2249040075 * L_20 = V_3; ParameterInfo_t2249040075 * L_21 = (ParameterInfo_t2249040075 *)il2cpp_codegen_object_new(ParameterInfo_t2249040075_il2cpp_TypeInfo_var); ParameterInfo__ctor_m3204994840(L_21, L_20, __this, /*hidden argument*/NULL); NullCheck(L_18); ArrayElementTypeCheck (L_18, L_21); (L_18)->SetAt(static_cast<il2cpp_array_size_t>(L_19), (ParameterInfo_t2249040075 *)L_21); int32_t L_22 = V_2; V_2 = ((int32_t)((int32_t)L_22+(int32_t)1)); } IL_0088: { int32_t L_23 = V_2; ParameterInfoU5BU5D_t2275869610* L_24 = V_0; NullCheck(L_24); if ((((int32_t)L_23) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_24)->max_length))))))) { goto IL_0076; } } { ParameterInfoU5BU5D_t2275869610* L_25 = V_0; return L_25; } } // System.Reflection.MethodInfo System.Reflection.MonoProperty::GetSetMethod(System.Boolean) extern "C" MethodInfo_t * MonoProperty_GetSetMethod_m436306154 (MonoProperty_t * __this, bool ___nonPublic0, const MethodInfo* method) { { MonoProperty_CachePropertyInfo_m1437316683(__this, 4, /*hidden argument*/NULL); MonoPropertyInfo_t486106184 * L_0 = __this->get_address_of_info_2(); MethodInfo_t * L_1 = L_0->get_set_method_3(); if (!L_1) { goto IL_003e; } } { bool L_2 = ___nonPublic0; if (L_2) { goto IL_0032; } } { MonoPropertyInfo_t486106184 * L_3 = __this->get_address_of_info_2(); MethodInfo_t * L_4 = L_3->get_set_method_3(); NullCheck(L_4); bool L_5 = MethodBase_get_IsPublic_m479656180(L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_003e; } } IL_0032: { MonoPropertyInfo_t486106184 * L_6 = __this->get_address_of_info_2(); MethodInfo_t * L_7 = L_6->get_set_method_3(); return L_7; } IL_003e: { return (MethodInfo_t *)NULL; } } // System.Boolean System.Reflection.MonoProperty::IsDefined(System.Type,System.Boolean) extern "C" bool MonoProperty_IsDefined_m2473061021 (MonoProperty_t * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_IsDefined_m2473061021_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); bool L_1 = MonoCustomAttrs_IsDefined_m3820363041(NULL /*static, unused*/, __this, L_0, (bool)0, /*hidden argument*/NULL); return L_1; } } // System.Object[] System.Reflection.MonoProperty::GetCustomAttributes(System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoProperty_GetCustomAttributes_m1497967922 (MonoProperty_t * __this, bool ___inherit0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_GetCustomAttributes_m1497967922_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_0 = MonoCustomAttrs_GetCustomAttributes_m3069779582(NULL /*static, unused*/, __this, (bool)0, /*hidden argument*/NULL); return L_0; } } // System.Object[] System.Reflection.MonoProperty::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* MonoProperty_GetCustomAttributes_m1756234231 (MonoProperty_t * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_GetCustomAttributes_m1756234231_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_1 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_0, (bool)0, /*hidden argument*/NULL); return L_1; } } // System.Reflection.MonoProperty/GetterAdapter System.Reflection.MonoProperty::CreateGetterDelegate(System.Reflection.MethodInfo) extern "C" GetterAdapter_t1423755509 * MonoProperty_CreateGetterDelegate_m2961258839 (Il2CppObject * __this /* static, unused */, MethodInfo_t * ___method0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_CreateGetterDelegate_m2961258839_MetadataUsageId); s_Il2CppMethodInitialized = true; } TypeU5BU5D_t1664964607* V_0 = NULL; Type_t * V_1 = NULL; Il2CppObject * V_2 = NULL; MethodInfo_t * V_3 = NULL; Type_t * V_4 = NULL; String_t* V_5 = NULL; { MethodInfo_t * L_0 = ___method0; NullCheck(L_0); bool L_1 = MethodBase_get_IsStatic_m1015686807(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0033; } } { TypeU5BU5D_t1664964607* L_2 = ((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)1)); MethodInfo_t * L_3 = ___method0; NullCheck(L_3); Type_t * L_4 = VirtFuncInvoker0< Type_t * >::Invoke(31 /* System.Type System.Reflection.MethodInfo::get_ReturnType() */, L_3); NullCheck(L_2); ArrayElementTypeCheck (L_2, L_4); (L_2)->SetAt(static_cast<il2cpp_array_size_t>(0), (Type_t *)L_4); V_0 = L_2; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_5 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(StaticGetter_1_t2308823731_0_0_0_var), /*hidden argument*/NULL); V_4 = L_5; V_5 = _stringLiteral984599999; goto IL_005f; } IL_0033: { TypeU5BU5D_t1664964607* L_6 = ((TypeU5BU5D_t1664964607*)SZArrayNew(TypeU5BU5D_t1664964607_il2cpp_TypeInfo_var, (uint32_t)2)); MethodInfo_t * L_7 = ___method0; NullCheck(L_7); Type_t * L_8 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, L_7); NullCheck(L_6); ArrayElementTypeCheck (L_6, L_8); (L_6)->SetAt(static_cast<il2cpp_array_size_t>(0), (Type_t *)L_8); TypeU5BU5D_t1664964607* L_9 = L_6; MethodInfo_t * L_10 = ___method0; NullCheck(L_10); Type_t * L_11 = VirtFuncInvoker0< Type_t * >::Invoke(31 /* System.Type System.Reflection.MethodInfo::get_ReturnType() */, L_10); NullCheck(L_9); ArrayElementTypeCheck (L_9, L_11); (L_9)->SetAt(static_cast<il2cpp_array_size_t>(1), (Type_t *)L_11); V_0 = L_9; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_12 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Getter_2_t3970651952_0_0_0_var), /*hidden argument*/NULL); V_4 = L_12; V_5 = _stringLiteral3063456723; } IL_005f: { Type_t * L_13 = V_4; TypeU5BU5D_t1664964607* L_14 = V_0; NullCheck(L_13); Type_t * L_15 = VirtFuncInvoker1< Type_t *, TypeU5BU5D_t1664964607* >::Invoke(84 /* System.Type System.Type::MakeGenericType(System.Type[]) */, L_13, L_14); V_1 = L_15; Type_t * L_16 = V_1; MethodInfo_t * L_17 = ___method0; Delegate_t3022476291 * L_18 = Delegate_CreateDelegate_m3813023227(NULL /*static, unused*/, L_16, L_17, (bool)0, /*hidden argument*/NULL); V_2 = L_18; Il2CppObject * L_19 = V_2; if (L_19) { goto IL_007d; } } { MethodAccessException_t4093255254 * L_20 = (MethodAccessException_t4093255254 *)il2cpp_codegen_object_new(MethodAccessException_t4093255254_il2cpp_TypeInfo_var); MethodAccessException__ctor_m3450464547(L_20, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_20); } IL_007d: { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_21 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(MonoProperty_t_0_0_0_var), /*hidden argument*/NULL); String_t* L_22 = V_5; NullCheck(L_21); MethodInfo_t * L_23 = Type_GetMethod_m475234662(L_21, L_22, ((int32_t)40), /*hidden argument*/NULL); V_3 = L_23; MethodInfo_t * L_24 = V_3; TypeU5BU5D_t1664964607* L_25 = V_0; NullCheck(L_24); MethodInfo_t * L_26 = VirtFuncInvoker1< MethodInfo_t *, TypeU5BU5D_t1664964607* >::Invoke(32 /* System.Reflection.MethodInfo System.Reflection.MethodInfo::MakeGenericMethod(System.Type[]) */, L_24, L_25); V_3 = L_26; Type_t * L_27 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(GetterAdapter_t1423755509_0_0_0_var), /*hidden argument*/NULL); Il2CppObject * L_28 = V_2; MethodInfo_t * L_29 = V_3; Delegate_t3022476291 * L_30 = Delegate_CreateDelegate_m3052767705(NULL /*static, unused*/, L_27, L_28, L_29, (bool)1, /*hidden argument*/NULL); return ((GetterAdapter_t1423755509 *)CastclassSealed(L_30, GetterAdapter_t1423755509_il2cpp_TypeInfo_var)); } } // System.Object System.Reflection.MonoProperty::GetValue(System.Object,System.Object[]) extern "C" Il2CppObject * MonoProperty_GetValue_m3088777694 (MonoProperty_t * __this, Il2CppObject * ___obj0, ObjectU5BU5D_t3614634134* ___index1, const MethodInfo* method) { { Il2CppObject * L_0 = ___obj0; ObjectU5BU5D_t3614634134* L_1 = ___index1; Il2CppObject * L_2 = VirtFuncInvoker5< Il2CppObject *, Il2CppObject *, int32_t, Binder_t3404612058 *, ObjectU5BU5D_t3614634134*, CultureInfo_t3500843524 * >::Invoke(23 /* System.Object System.Reflection.MonoProperty::GetValue(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) */, __this, L_0, 0, (Binder_t3404612058 *)NULL, L_1, (CultureInfo_t3500843524 *)NULL); return L_2; } } // System.Object System.Reflection.MonoProperty::GetValue(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" Il2CppObject * MonoProperty_GetValue_m2150318626 (MonoProperty_t * __this, Il2CppObject * ___obj0, int32_t ___invokeAttr1, Binder_t3404612058 * ___binder2, ObjectU5BU5D_t3614634134* ___index3, CultureInfo_t3500843524 * ___culture4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_GetValue_m2150318626_MetadataUsageId); s_Il2CppMethodInitialized = true; } Il2CppObject * V_0 = NULL; MethodInfo_t * V_1 = NULL; SecurityException_t887327375 * V_2 = NULL; Exception_t1927440687 * __last_unhandled_exception = 0; NO_UNUSED_WARNING (__last_unhandled_exception); Exception_t1927440687 * __exception_local = 0; NO_UNUSED_WARNING (__exception_local); int32_t __leave_target = 0; NO_UNUSED_WARNING (__leave_target); { V_0 = NULL; MethodInfo_t * L_0 = VirtFuncInvoker1< MethodInfo_t *, bool >::Invoke(19 /* System.Reflection.MethodInfo System.Reflection.MonoProperty::GetGetMethod(System.Boolean) */, __this, (bool)1); V_1 = L_0; MethodInfo_t * L_1 = V_1; if (L_1) { goto IL_002b; } } { String_t* L_2 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoProperty::get_Name() */, __this); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_3 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral3303126324, L_2, _stringLiteral372029307, /*hidden argument*/NULL); ArgumentException_t3259014390 * L_4 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_4, L_3, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4); } IL_002b: try { // begin try (depth: 1) { ObjectU5BU5D_t3614634134* L_5 = ___index3; if (!L_5) { goto IL_003b; } } IL_0032: { ObjectU5BU5D_t3614634134* L_6 = ___index3; NullCheck(L_6); if ((((int32_t)((int32_t)(((Il2CppArray *)L_6)->max_length))))) { goto IL_004d; } } IL_003b: { MethodInfo_t * L_7 = V_1; Il2CppObject * L_8 = ___obj0; int32_t L_9 = ___invokeAttr1; Binder_t3404612058 * L_10 = ___binder2; CultureInfo_t3500843524 * L_11 = ___culture4; NullCheck(L_7); Il2CppObject * L_12 = VirtFuncInvoker5< Il2CppObject *, Il2CppObject *, int32_t, Binder_t3404612058 *, ObjectU5BU5D_t3614634134*, CultureInfo_t3500843524 * >::Invoke(17 /* System.Object System.Reflection.MethodBase::Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) */, L_7, L_8, L_9, L_10, (ObjectU5BU5D_t3614634134*)(ObjectU5BU5D_t3614634134*)NULL, L_11); V_0 = L_12; goto IL_005b; } IL_004d: { MethodInfo_t * L_13 = V_1; Il2CppObject * L_14 = ___obj0; int32_t L_15 = ___invokeAttr1; Binder_t3404612058 * L_16 = ___binder2; ObjectU5BU5D_t3614634134* L_17 = ___index3; CultureInfo_t3500843524 * L_18 = ___culture4; NullCheck(L_13); Il2CppObject * L_19 = VirtFuncInvoker5< Il2CppObject *, Il2CppObject *, int32_t, Binder_t3404612058 *, ObjectU5BU5D_t3614634134*, CultureInfo_t3500843524 * >::Invoke(17 /* System.Object System.Reflection.MethodBase::Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) */, L_13, L_14, L_15, L_16, L_17, L_18); V_0 = L_19; } IL_005b: { goto IL_006d; } } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __exception_local = (Exception_t1927440687 *)e.ex; if(il2cpp_codegen_class_is_assignable_from (SecurityException_t887327375_il2cpp_TypeInfo_var, e.ex->klass)) goto CATCH_0060; throw e; } CATCH_0060: { // begin catch(System.Security.SecurityException) { V_2 = ((SecurityException_t887327375 *)__exception_local); SecurityException_t887327375 * L_20 = V_2; TargetInvocationException_t4098620458 * L_21 = (TargetInvocationException_t4098620458 *)il2cpp_codegen_object_new(TargetInvocationException_t4098620458_il2cpp_TypeInfo_var); TargetInvocationException__ctor_m1059845570(L_21, L_20, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_21); } IL_0068: { goto IL_006d; } } // end catch (depth: 1) IL_006d: { Il2CppObject * L_22 = V_0; return L_22; } } // System.Void System.Reflection.MonoProperty::SetValue(System.Object,System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) extern "C" void MonoProperty_SetValue_m1423050605 (MonoProperty_t * __this, Il2CppObject * ___obj0, Il2CppObject * ___value1, int32_t ___invokeAttr2, Binder_t3404612058 * ___binder3, ObjectU5BU5D_t3614634134* ___index4, CultureInfo_t3500843524 * ___culture5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_SetValue_m1423050605_MetadataUsageId); s_Il2CppMethodInitialized = true; } MethodInfo_t * V_0 = NULL; ObjectU5BU5D_t3614634134* V_1 = NULL; int32_t V_2 = 0; { MethodInfo_t * L_0 = VirtFuncInvoker1< MethodInfo_t *, bool >::Invoke(21 /* System.Reflection.MethodInfo System.Reflection.MonoProperty::GetSetMethod(System.Boolean) */, __this, (bool)1); V_0 = L_0; MethodInfo_t * L_1 = V_0; if (L_1) { goto IL_0029; } } { String_t* L_2 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoProperty::get_Name() */, __this); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_3 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral449389896, L_2, _stringLiteral372029307, /*hidden argument*/NULL); ArgumentException_t3259014390 * L_4 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var); ArgumentException__ctor_m3739475201(L_4, L_3, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_4); } IL_0029: { ObjectU5BU5D_t3614634134* L_5 = ___index4; if (!L_5) { goto IL_0039; } } { ObjectU5BU5D_t3614634134* L_6 = ___index4; NullCheck(L_6); if ((((int32_t)((int32_t)(((Il2CppArray *)L_6)->max_length))))) { goto IL_0049; } } IL_0039: { ObjectU5BU5D_t3614634134* L_7 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)1)); Il2CppObject * L_8 = ___value1; NullCheck(L_7); ArrayElementTypeCheck (L_7, L_8); (L_7)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)L_8); V_1 = L_7; goto IL_0064; } IL_0049: { ObjectU5BU5D_t3614634134* L_9 = ___index4; NullCheck(L_9); V_2 = (((int32_t)((int32_t)(((Il2CppArray *)L_9)->max_length)))); int32_t L_10 = V_2; V_1 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)L_10+(int32_t)1)))); ObjectU5BU5D_t3614634134* L_11 = ___index4; ObjectU5BU5D_t3614634134* L_12 = V_1; NullCheck((Il2CppArray *)(Il2CppArray *)L_11); Array_CopyTo_m4061033315((Il2CppArray *)(Il2CppArray *)L_11, (Il2CppArray *)(Il2CppArray *)L_12, 0, /*hidden argument*/NULL); ObjectU5BU5D_t3614634134* L_13 = V_1; int32_t L_14 = V_2; Il2CppObject * L_15 = ___value1; NullCheck(L_13); ArrayElementTypeCheck (L_13, L_15); (L_13)->SetAt(static_cast<il2cpp_array_size_t>(L_14), (Il2CppObject *)L_15); } IL_0064: { MethodInfo_t * L_16 = V_0; Il2CppObject * L_17 = ___obj0; int32_t L_18 = ___invokeAttr2; Binder_t3404612058 * L_19 = ___binder3; ObjectU5BU5D_t3614634134* L_20 = V_1; CultureInfo_t3500843524 * L_21 = ___culture5; NullCheck(L_16); VirtFuncInvoker5< Il2CppObject *, Il2CppObject *, int32_t, Binder_t3404612058 *, ObjectU5BU5D_t3614634134*, CultureInfo_t3500843524 * >::Invoke(17 /* System.Object System.Reflection.MethodBase::Invoke(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) */, L_16, L_17, L_18, L_19, L_20, L_21); return; } } // System.String System.Reflection.MonoProperty::ToString() extern "C" String_t* MonoProperty_ToString_m1379465861 (MonoProperty_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_ToString_m1379465861_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = VirtFuncInvoker0< Type_t * >::Invoke(17 /* System.Type System.Reflection.MonoProperty::get_PropertyType() */, __this); NullCheck(L_0); String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Type::ToString() */, L_0); String_t* L_2 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoProperty::get_Name() */, __this); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_3 = String_Concat_m612901809(NULL /*static, unused*/, L_1, _stringLiteral372029310, L_2, /*hidden argument*/NULL); return L_3; } } // System.Type[] System.Reflection.MonoProperty::GetOptionalCustomModifiers() extern "C" TypeU5BU5D_t1664964607* MonoProperty_GetOptionalCustomModifiers_m3827844355 (MonoProperty_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_GetOptionalCustomModifiers_m3827844355_MetadataUsageId); s_Il2CppMethodInitialized = true; } TypeU5BU5D_t1664964607* V_0 = NULL; { TypeU5BU5D_t1664964607* L_0 = MonoPropertyInfo_GetTypeModifiers_m184537257(NULL /*static, unused*/, __this, (bool)1, /*hidden argument*/NULL); V_0 = L_0; TypeU5BU5D_t1664964607* L_1 = V_0; if (L_1) { goto IL_0014; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_2 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); return L_2; } IL_0014: { TypeU5BU5D_t1664964607* L_3 = V_0; return L_3; } } // System.Type[] System.Reflection.MonoProperty::GetRequiredCustomModifiers() extern "C" TypeU5BU5D_t1664964607* MonoProperty_GetRequiredCustomModifiers_m576853384 (MonoProperty_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MonoProperty_GetRequiredCustomModifiers_m576853384_MetadataUsageId); s_Il2CppMethodInitialized = true; } TypeU5BU5D_t1664964607* V_0 = NULL; { TypeU5BU5D_t1664964607* L_0 = MonoPropertyInfo_GetTypeModifiers_m184537257(NULL /*static, unused*/, __this, (bool)0, /*hidden argument*/NULL); V_0 = L_0; TypeU5BU5D_t1664964607* L_1 = V_0; if (L_1) { goto IL_0014; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_2 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); return L_2; } IL_0014: { TypeU5BU5D_t1664964607* L_3 = V_0; return L_3; } } // System.Void System.Reflection.MonoProperty::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void MonoProperty_GetObjectData_m2540252220 (MonoProperty_t * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MonoProperty::get_Name() */, __this); Type_t * L_2 = VirtFuncInvoker0< Type_t * >::Invoke(9 /* System.Type System.Reflection.MonoProperty::get_ReflectedType() */, __this); String_t* L_3 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Reflection.MonoProperty::ToString() */, __this); MemberInfoSerializationHolder_Serialize_m1949812823(NULL /*static, unused*/, L_0, L_1, L_2, L_3, ((int32_t)16), /*hidden argument*/NULL); return; } } // System.Void System.Reflection.MonoProperty/GetterAdapter::.ctor(System.Object,System.IntPtr) extern "C" void GetterAdapter__ctor_m4231828815 (GetterAdapter_t1423755509 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) { __this->set_method_ptr_0((Il2CppMethodPointer)((MethodInfo*)___method1.get_m_value_0())->methodPointer); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // System.Object System.Reflection.MonoProperty/GetterAdapter::Invoke(System.Object) extern "C" Il2CppObject * GetterAdapter_Invoke_m2777461448 (GetterAdapter_t1423755509 * __this, Il2CppObject * ____this0, const MethodInfo* method) { if(__this->get_prev_9() != NULL) { GetterAdapter_Invoke_m2777461448((GetterAdapter_t1423755509 *)__this->get_prev_9(),____this0, method); } il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found((MethodInfo*)(__this->get_method_3().get_m_value_0())); bool ___methodIsStatic = MethodIsStatic((MethodInfo*)(__this->get_method_3().get_m_value_0())); if (__this->get_m_target_2() != NULL && ___methodIsStatic) { typedef Il2CppObject * (*FunctionPointerType) (Il2CppObject *, void* __this, Il2CppObject * ____this0, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(NULL,__this->get_m_target_2(),____this0,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else if (__this->get_m_target_2() != NULL || ___methodIsStatic) { typedef Il2CppObject * (*FunctionPointerType) (void* __this, Il2CppObject * ____this0, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(__this->get_m_target_2(),____this0,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else { typedef Il2CppObject * (*FunctionPointerType) (void* __this, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(____this0,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } } // System.IAsyncResult System.Reflection.MonoProperty/GetterAdapter::BeginInvoke(System.Object,System.AsyncCallback,System.Object) extern "C" Il2CppObject * GetterAdapter_BeginInvoke_m3760926500 (GetterAdapter_t1423755509 * __this, Il2CppObject * ____this0, AsyncCallback_t163412349 * ___callback1, Il2CppObject * ___object2, const MethodInfo* method) { void *__d_args[2] = {0}; __d_args[0] = ____this0; return (Il2CppObject *)il2cpp_codegen_delegate_begin_invoke((Il2CppDelegate*)__this, __d_args, (Il2CppDelegate*)___callback1, (Il2CppObject*)___object2); } // System.Object System.Reflection.MonoProperty/GetterAdapter::EndInvoke(System.IAsyncResult) extern "C" Il2CppObject * GetterAdapter_EndInvoke_m1928570128 (GetterAdapter_t1423755509 * __this, Il2CppObject * ___result0, const MethodInfo* method) { Il2CppObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0); return (Il2CppObject *)__result; } // Conversion methods for marshalling of: System.Reflection.MonoPropertyInfo extern "C" void MonoPropertyInfo_t486106184_marshal_pinvoke(const MonoPropertyInfo_t486106184& unmarshaled, MonoPropertyInfo_t486106184_marshaled_pinvoke& marshaled) { Il2CppCodeGenException* ___parent_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'parent' of type 'MonoPropertyInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___parent_0Exception); } extern "C" void MonoPropertyInfo_t486106184_marshal_pinvoke_back(const MonoPropertyInfo_t486106184_marshaled_pinvoke& marshaled, MonoPropertyInfo_t486106184& unmarshaled) { Il2CppCodeGenException* ___parent_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'parent' of type 'MonoPropertyInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___parent_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.MonoPropertyInfo extern "C" void MonoPropertyInfo_t486106184_marshal_pinvoke_cleanup(MonoPropertyInfo_t486106184_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: System.Reflection.MonoPropertyInfo extern "C" void MonoPropertyInfo_t486106184_marshal_com(const MonoPropertyInfo_t486106184& unmarshaled, MonoPropertyInfo_t486106184_marshaled_com& marshaled) { Il2CppCodeGenException* ___parent_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'parent' of type 'MonoPropertyInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___parent_0Exception); } extern "C" void MonoPropertyInfo_t486106184_marshal_com_back(const MonoPropertyInfo_t486106184_marshaled_com& marshaled, MonoPropertyInfo_t486106184& unmarshaled) { Il2CppCodeGenException* ___parent_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'parent' of type 'MonoPropertyInfo': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___parent_0Exception); } // Conversion method for clean up from marshalling of: System.Reflection.MonoPropertyInfo extern "C" void MonoPropertyInfo_t486106184_marshal_com_cleanup(MonoPropertyInfo_t486106184_marshaled_com& marshaled) { } // System.Void System.Reflection.MonoPropertyInfo::get_property_info(System.Reflection.MonoProperty,System.Reflection.MonoPropertyInfo&,System.Reflection.PInfo) extern "C" void MonoPropertyInfo_get_property_info_m556498347 (Il2CppObject * __this /* static, unused */, MonoProperty_t * ___prop0, MonoPropertyInfo_t486106184 * ___info1, int32_t ___req_info2, const MethodInfo* method) { using namespace il2cpp::icalls; typedef void (*MonoPropertyInfo_get_property_info_m556498347_ftn) (MonoProperty_t *, MonoPropertyInfo_t486106184 *, int32_t); ((MonoPropertyInfo_get_property_info_m556498347_ftn)mscorlib::System::Reflection::MonoPropertyInfo::get_property_info) (___prop0, ___info1, ___req_info2); } // System.Type[] System.Reflection.MonoPropertyInfo::GetTypeModifiers(System.Reflection.MonoProperty,System.Boolean) extern "C" TypeU5BU5D_t1664964607* MonoPropertyInfo_GetTypeModifiers_m184537257 (Il2CppObject * __this /* static, unused */, MonoProperty_t * ___prop0, bool ___optional1, const MethodInfo* method) { using namespace il2cpp::icalls; typedef TypeU5BU5D_t1664964607* (*MonoPropertyInfo_GetTypeModifiers_m184537257_ftn) (MonoProperty_t *, bool); return ((MonoPropertyInfo_GetTypeModifiers_m184537257_ftn)mscorlib::System::Reflection::MonoPropertyInfo::GetTypeModifiers) (___prop0, ___optional1); } // System.Void System.Reflection.ParameterInfo::.ctor() extern "C" void ParameterInfo__ctor_m1986388557 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.ParameterInfo::.ctor(System.Reflection.Emit.ParameterBuilder,System.Type,System.Reflection.MemberInfo,System.Int32) extern "C" void ParameterInfo__ctor_m2149157062 (ParameterInfo_t2249040075 * __this, ParameterBuilder_t3344728474 * ___pb0, Type_t * ___type1, MemberInfo_t * ___member2, int32_t ___position3, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); Type_t * L_0 = ___type1; __this->set_ClassImpl_0(L_0); MemberInfo_t * L_1 = ___member2; __this->set_MemberImpl_2(L_1); ParameterBuilder_t3344728474 * L_2 = ___pb0; if (!L_2) { goto IL_0045; } } { ParameterBuilder_t3344728474 * L_3 = ___pb0; NullCheck(L_3); String_t* L_4 = VirtFuncInvoker0< String_t* >::Invoke(5 /* System.String System.Reflection.Emit.ParameterBuilder::get_Name() */, L_3); __this->set_NameImpl_3(L_4); ParameterBuilder_t3344728474 * L_5 = ___pb0; NullCheck(L_5); int32_t L_6 = VirtFuncInvoker0< int32_t >::Invoke(6 /* System.Int32 System.Reflection.Emit.ParameterBuilder::get_Position() */, L_5); __this->set_PositionImpl_4(((int32_t)((int32_t)L_6-(int32_t)1))); ParameterBuilder_t3344728474 * L_7 = ___pb0; NullCheck(L_7); int32_t L_8 = VirtFuncInvoker0< int32_t >::Invoke(4 /* System.Int32 System.Reflection.Emit.ParameterBuilder::get_Attributes() */, L_7); __this->set_AttrsImpl_5(L_8); goto IL_005d; } IL_0045: { __this->set_NameImpl_3((String_t*)NULL); int32_t L_9 = ___position3; __this->set_PositionImpl_4(((int32_t)((int32_t)L_9-(int32_t)1))); __this->set_AttrsImpl_5(0); } IL_005d: { return; } } // System.Void System.Reflection.ParameterInfo::.ctor(System.Reflection.ParameterInfo,System.Reflection.MemberInfo) extern "C" void ParameterInfo__ctor_m3204994840 (ParameterInfo_t2249040075 * __this, ParameterInfo_t2249040075 * ___pinfo0, MemberInfo_t * ___member1, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); ParameterInfo_t2249040075 * L_0 = ___pinfo0; NullCheck(L_0); Type_t * L_1 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_0); __this->set_ClassImpl_0(L_1); MemberInfo_t * L_2 = ___member1; __this->set_MemberImpl_2(L_2); ParameterInfo_t2249040075 * L_3 = ___pinfo0; NullCheck(L_3); String_t* L_4 = VirtFuncInvoker0< String_t* >::Invoke(9 /* System.String System.Reflection.ParameterInfo::get_Name() */, L_3); __this->set_NameImpl_3(L_4); ParameterInfo_t2249040075 * L_5 = ___pinfo0; NullCheck(L_5); int32_t L_6 = VirtFuncInvoker0< int32_t >::Invoke(10 /* System.Int32 System.Reflection.ParameterInfo::get_Position() */, L_5); __this->set_PositionImpl_4(L_6); ParameterInfo_t2249040075 * L_7 = ___pinfo0; NullCheck(L_7); int32_t L_8 = VirtFuncInvoker0< int32_t >::Invoke(7 /* System.Reflection.ParameterAttributes System.Reflection.ParameterInfo::get_Attributes() */, L_7); __this->set_AttrsImpl_5(L_8); return; } } // System.String System.Reflection.ParameterInfo::ToString() extern "C" String_t* ParameterInfo_ToString_m1722229694 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ParameterInfo_ToString_m1722229694_MetadataUsageId); s_Il2CppMethodInitialized = true; } Type_t * V_0 = NULL; bool V_1 = false; String_t* V_2 = NULL; int32_t G_B7_0 = 0; String_t* G_B10_0 = NULL; { Type_t * L_0 = __this->get_ClassImpl_0(); V_0 = L_0; goto IL_0013; } IL_000c: { Type_t * L_1 = V_0; NullCheck(L_1); Type_t * L_2 = VirtFuncInvoker0< Type_t * >::Invoke(45 /* System.Type System.Type::GetElementType() */, L_1); V_0 = L_2; } IL_0013: { Type_t * L_3 = V_0; NullCheck(L_3); bool L_4 = Type_get_HasElementType_m3319917896(L_3, /*hidden argument*/NULL); if (L_4) { goto IL_000c; } } { Type_t * L_5 = V_0; NullCheck(L_5); bool L_6 = Type_get_IsPrimitive_m1522841565(L_5, /*hidden argument*/NULL); if (L_6) { goto IL_0060; } } { Type_t * L_7 = __this->get_ClassImpl_0(); IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_8 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(Void_t1841601450_0_0_0_var), /*hidden argument*/NULL); if ((((Il2CppObject*)(Type_t *)L_7) == ((Il2CppObject*)(Type_t *)L_8))) { goto IL_0060; } } { Type_t * L_9 = __this->get_ClassImpl_0(); NullCheck(L_9); String_t* L_10 = VirtFuncInvoker0< String_t* >::Invoke(34 /* System.String System.Type::get_Namespace() */, L_9); MemberInfo_t * L_11 = __this->get_MemberImpl_2(); NullCheck(L_11); Type_t * L_12 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.MemberInfo::get_DeclaringType() */, L_11); NullCheck(L_12); String_t* L_13 = VirtFuncInvoker0< String_t* >::Invoke(34 /* System.String System.Type::get_Namespace() */, L_12); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_14 = String_op_Equality_m1790663636(NULL /*static, unused*/, L_10, L_13, /*hidden argument*/NULL); G_B7_0 = ((int32_t)(L_14)); goto IL_0061; } IL_0060: { G_B7_0 = 1; } IL_0061: { V_1 = (bool)G_B7_0; bool L_15 = V_1; if (!L_15) { goto IL_0078; } } { Type_t * L_16 = __this->get_ClassImpl_0(); NullCheck(L_16); String_t* L_17 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_16); G_B10_0 = L_17; goto IL_0083; } IL_0078: { Type_t * L_18 = __this->get_ClassImpl_0(); NullCheck(L_18); String_t* L_19 = VirtFuncInvoker0< String_t* >::Invoke(18 /* System.String System.Type::get_FullName() */, L_18); G_B10_0 = L_19; } IL_0083: { V_2 = G_B10_0; bool L_20 = ParameterInfo_get_IsRetval_m1881464570(__this, /*hidden argument*/NULL); if (L_20) { goto IL_00aa; } } { String_t* L_21 = V_2; Il2CppChar L_22 = ((Il2CppChar)((int32_t)32)); Il2CppObject * L_23 = Box(Char_t3454481338_il2cpp_TypeInfo_var, &L_22); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_24 = String_Concat_m56707527(NULL /*static, unused*/, L_21, L_23, /*hidden argument*/NULL); V_2 = L_24; String_t* L_25 = V_2; String_t* L_26 = __this->get_NameImpl_3(); String_t* L_27 = String_Concat_m2596409543(NULL /*static, unused*/, L_25, L_26, /*hidden argument*/NULL); V_2 = L_27; } IL_00aa: { String_t* L_28 = V_2; return L_28; } } // System.Type System.Reflection.ParameterInfo::get_ParameterType() extern "C" Type_t * ParameterInfo_get_ParameterType_m1441012169 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { Type_t * L_0 = __this->get_ClassImpl_0(); return L_0; } } // System.Reflection.ParameterAttributes System.Reflection.ParameterInfo::get_Attributes() extern "C" int32_t ParameterInfo_get_Attributes_m407887446 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_AttrsImpl_5(); return L_0; } } // System.Boolean System.Reflection.ParameterInfo::get_IsIn() extern "C" bool ParameterInfo_get_IsIn_m1357865245 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(7 /* System.Reflection.ParameterAttributes System.Reflection.ParameterInfo::get_Attributes() */, __this); return (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)1))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.ParameterInfo::get_IsOptional() extern "C" bool ParameterInfo_get_IsOptional_m2877290948 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(7 /* System.Reflection.ParameterAttributes System.Reflection.ParameterInfo::get_Attributes() */, __this); return (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)16)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.ParameterInfo::get_IsOut() extern "C" bool ParameterInfo_get_IsOut_m3097675062 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(7 /* System.Reflection.ParameterAttributes System.Reflection.ParameterInfo::get_Attributes() */, __this); return (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)2))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Boolean System.Reflection.ParameterInfo::get_IsRetval() extern "C" bool ParameterInfo_get_IsRetval_m1881464570 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(7 /* System.Reflection.ParameterAttributes System.Reflection.ParameterInfo::get_Attributes() */, __this); return (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)8))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0); } } // System.Reflection.MemberInfo System.Reflection.ParameterInfo::get_Member() extern "C" MemberInfo_t * ParameterInfo_get_Member_m4111292219 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { MemberInfo_t * L_0 = __this->get_MemberImpl_2(); return L_0; } } // System.String System.Reflection.ParameterInfo::get_Name() extern "C" String_t* ParameterInfo_get_Name_m149251884 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_NameImpl_3(); return L_0; } } // System.Int32 System.Reflection.ParameterInfo::get_Position() extern "C" int32_t ParameterInfo_get_Position_m2135360011 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_PositionImpl_4(); return L_0; } } // System.Object[] System.Reflection.ParameterInfo::GetCustomAttributes(System.Type,System.Boolean) extern "C" ObjectU5BU5D_t3614634134* ParameterInfo_GetCustomAttributes_m2985072480 (ParameterInfo_t2249040075 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ParameterInfo_GetCustomAttributes_m2985072480_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); ObjectU5BU5D_t3614634134* L_2 = MonoCustomAttrs_GetCustomAttributes_m939426263(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Boolean System.Reflection.ParameterInfo::IsDefined(System.Type,System.Boolean) extern "C" bool ParameterInfo_IsDefined_m2412925144 (ParameterInfo_t2249040075 * __this, Type_t * ___attributeType0, bool ___inherit1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ParameterInfo_IsDefined_m2412925144_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Type_t * L_0 = ___attributeType0; bool L_1 = ___inherit1; IL2CPP_RUNTIME_CLASS_INIT(MonoCustomAttrs_t2976585698_il2cpp_TypeInfo_var); bool L_2 = MonoCustomAttrs_IsDefined_m3820363041(NULL /*static, unused*/, __this, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Object[] System.Reflection.ParameterInfo::GetPseudoCustomAttributes() extern "C" ObjectU5BU5D_t3614634134* ParameterInfo_GetPseudoCustomAttributes_m2952359394 (ParameterInfo_t2249040075 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ParameterInfo_GetPseudoCustomAttributes_m2952359394_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; ObjectU5BU5D_t3614634134* V_1 = NULL; { V_0 = 0; bool L_0 = ParameterInfo_get_IsIn_m1357865245(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0011; } } { int32_t L_1 = V_0; V_0 = ((int32_t)((int32_t)L_1+(int32_t)1)); } IL_0011: { bool L_2 = ParameterInfo_get_IsOut_m3097675062(__this, /*hidden argument*/NULL); if (!L_2) { goto IL_0020; } } { int32_t L_3 = V_0; V_0 = ((int32_t)((int32_t)L_3+(int32_t)1)); } IL_0020: { bool L_4 = ParameterInfo_get_IsOptional_m2877290948(__this, /*hidden argument*/NULL); if (!L_4) { goto IL_002f; } } { int32_t L_5 = V_0; V_0 = ((int32_t)((int32_t)L_5+(int32_t)1)); } IL_002f: { UnmanagedMarshal_t4270021860 * L_6 = __this->get_marshalAs_6(); if (!L_6) { goto IL_003e; } } { int32_t L_7 = V_0; V_0 = ((int32_t)((int32_t)L_7+(int32_t)1)); } IL_003e: { int32_t L_8 = V_0; if (L_8) { goto IL_0046; } } { return (ObjectU5BU5D_t3614634134*)NULL; } IL_0046: { int32_t L_9 = V_0; V_1 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)L_9)); V_0 = 0; bool L_10 = ParameterInfo_get_IsIn_m1357865245(__this, /*hidden argument*/NULL); if (!L_10) { goto IL_0066; } } { ObjectU5BU5D_t3614634134* L_11 = V_1; int32_t L_12 = V_0; int32_t L_13 = L_12; V_0 = ((int32_t)((int32_t)L_13+(int32_t)1)); InAttribute_t1394050551 * L_14 = (InAttribute_t1394050551 *)il2cpp_codegen_object_new(InAttribute_t1394050551_il2cpp_TypeInfo_var); InAttribute__ctor_m1401060713(L_14, /*hidden argument*/NULL); NullCheck(L_11); ArrayElementTypeCheck (L_11, L_14); (L_11)->SetAt(static_cast<il2cpp_array_size_t>(L_13), (Il2CppObject *)L_14); } IL_0066: { bool L_15 = ParameterInfo_get_IsOptional_m2877290948(__this, /*hidden argument*/NULL); if (!L_15) { goto IL_007d; } } { ObjectU5BU5D_t3614634134* L_16 = V_1; int32_t L_17 = V_0; int32_t L_18 = L_17; V_0 = ((int32_t)((int32_t)L_18+(int32_t)1)); OptionalAttribute_t827982902 * L_19 = (OptionalAttribute_t827982902 *)il2cpp_codegen_object_new(OptionalAttribute_t827982902_il2cpp_TypeInfo_var); OptionalAttribute__ctor_m1739107582(L_19, /*hidden argument*/NULL); NullCheck(L_16); ArrayElementTypeCheck (L_16, L_19); (L_16)->SetAt(static_cast<il2cpp_array_size_t>(L_18), (Il2CppObject *)L_19); } IL_007d: { bool L_20 = ParameterInfo_get_IsOut_m3097675062(__this, /*hidden argument*/NULL); if (!L_20) { goto IL_0094; } } { ObjectU5BU5D_t3614634134* L_21 = V_1; int32_t L_22 = V_0; int32_t L_23 = L_22; V_0 = ((int32_t)((int32_t)L_23+(int32_t)1)); OutAttribute_t1539424546 * L_24 = (OutAttribute_t1539424546 *)il2cpp_codegen_object_new(OutAttribute_t1539424546_il2cpp_TypeInfo_var); OutAttribute__ctor_m1447235100(L_24, /*hidden argument*/NULL); NullCheck(L_21); ArrayElementTypeCheck (L_21, L_24); (L_21)->SetAt(static_cast<il2cpp_array_size_t>(L_23), (Il2CppObject *)L_24); } IL_0094: { UnmanagedMarshal_t4270021860 * L_25 = __this->get_marshalAs_6(); if (!L_25) { goto IL_00b1; } } { ObjectU5BU5D_t3614634134* L_26 = V_1; int32_t L_27 = V_0; int32_t L_28 = L_27; V_0 = ((int32_t)((int32_t)L_28+(int32_t)1)); UnmanagedMarshal_t4270021860 * L_29 = __this->get_marshalAs_6(); NullCheck(L_29); MarshalAsAttribute_t2900773360 * L_30 = UnmanagedMarshal_ToMarshalAsAttribute_m3695569337(L_29, /*hidden argument*/NULL); NullCheck(L_26); ArrayElementTypeCheck (L_26, L_30); (L_26)->SetAt(static_cast<il2cpp_array_size_t>(L_28), (Il2CppObject *)L_30); } IL_00b1: { ObjectU5BU5D_t3614634134* L_31 = V_1; return L_31; } } // Conversion methods for marshalling of: System.Reflection.ParameterModifier extern "C" void ParameterModifier_t1820634920_marshal_pinvoke(const ParameterModifier_t1820634920& unmarshaled, ParameterModifier_t1820634920_marshaled_pinvoke& marshaled) { if (unmarshaled.get__byref_0() != NULL) { int32_t _unmarshaled__byref_Length = (unmarshaled.get__byref_0())->max_length; marshaled.____byref_0 = il2cpp_codegen_marshal_allocate_array<int32_t>(_unmarshaled__byref_Length); for (int32_t i = 0; i < _unmarshaled__byref_Length; i++) { (marshaled.____byref_0)[i] = static_cast<int32_t>((unmarshaled.get__byref_0())->GetAtUnchecked(static_cast<il2cpp_array_size_t>(i))); } } else { marshaled.____byref_0 = NULL; } } extern "C" void ParameterModifier_t1820634920_marshal_pinvoke_back(const ParameterModifier_t1820634920_marshaled_pinvoke& marshaled, ParameterModifier_t1820634920& unmarshaled) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ParameterModifier_t1820634920_pinvoke_FromNativeMethodDefinition_MetadataUsageId); s_Il2CppMethodInitialized = true; } if (marshaled.____byref_0 != NULL) { if (unmarshaled.get__byref_0() == NULL) { unmarshaled.set__byref_0(reinterpret_cast<BooleanU5BU5D_t3568034315*>(SZArrayNew(BooleanU5BU5D_t3568034315_il2cpp_TypeInfo_var, 1))); } int32_t _arrayLength = (unmarshaled.get__byref_0())->max_length; for (int32_t i = 0; i < _arrayLength; i++) { (unmarshaled.get__byref_0())->SetAtUnchecked(static_cast<il2cpp_array_size_t>(i), static_cast<bool>((marshaled.____byref_0)[i])); } } } // Conversion method for clean up from marshalling of: System.Reflection.ParameterModifier extern "C" void ParameterModifier_t1820634920_marshal_pinvoke_cleanup(ParameterModifier_t1820634920_marshaled_pinvoke& marshaled) { if (marshaled.____byref_0 != NULL) { il2cpp_codegen_marshal_free(marshaled.____byref_0); marshaled.____byref_0 = NULL; } } // Conversion methods for marshalling of: System.Reflection.ParameterModifier extern "C" void ParameterModifier_t1820634920_marshal_com(const ParameterModifier_t1820634920& unmarshaled, ParameterModifier_t1820634920_marshaled_com& marshaled) { if (unmarshaled.get__byref_0() != NULL) { int32_t _unmarshaled__byref_Length = (unmarshaled.get__byref_0())->max_length; marshaled.____byref_0 = il2cpp_codegen_marshal_allocate_array<int32_t>(_unmarshaled__byref_Length); for (int32_t i = 0; i < _unmarshaled__byref_Length; i++) { (marshaled.____byref_0)[i] = static_cast<int32_t>((unmarshaled.get__byref_0())->GetAtUnchecked(static_cast<il2cpp_array_size_t>(i))); } } else { marshaled.____byref_0 = NULL; } } extern "C" void ParameterModifier_t1820634920_marshal_com_back(const ParameterModifier_t1820634920_marshaled_com& marshaled, ParameterModifier_t1820634920& unmarshaled) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ParameterModifier_t1820634920_com_FromNativeMethodDefinition_MetadataUsageId); s_Il2CppMethodInitialized = true; } if (marshaled.____byref_0 != NULL) { if (unmarshaled.get__byref_0() == NULL) { unmarshaled.set__byref_0(reinterpret_cast<BooleanU5BU5D_t3568034315*>(SZArrayNew(BooleanU5BU5D_t3568034315_il2cpp_TypeInfo_var, 1))); } int32_t _arrayLength = (unmarshaled.get__byref_0())->max_length; for (int32_t i = 0; i < _arrayLength; i++) { (unmarshaled.get__byref_0())->SetAtUnchecked(static_cast<il2cpp_array_size_t>(i), static_cast<bool>((marshaled.____byref_0)[i])); } } } // Conversion method for clean up from marshalling of: System.Reflection.ParameterModifier extern "C" void ParameterModifier_t1820634920_marshal_com_cleanup(ParameterModifier_t1820634920_marshaled_com& marshaled) { if (marshaled.____byref_0 != NULL) { il2cpp_codegen_marshal_free(marshaled.____byref_0); marshaled.____byref_0 = NULL; } } // System.Void System.Reflection.Pointer::.ctor() extern "C" void Pointer__ctor_m906226785 (Pointer_t937075087 * __this, const MethodInfo* method) { { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.Pointer::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void Pointer_System_Runtime_Serialization_ISerializable_GetObjectData_m4103721774 (Pointer_t937075087 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Pointer_System_Runtime_Serialization_ISerializable_GetObjectData_m4103721774_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1793819818 * L_0 = (NotSupportedException_t1793819818 *)il2cpp_codegen_object_new(NotSupportedException_t1793819818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m836173213(L_0, _stringLiteral506242180, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Void System.Reflection.PropertyInfo::.ctor() extern "C" void PropertyInfo__ctor_m1808219471 (PropertyInfo_t * __this, const MethodInfo* method) { { MemberInfo__ctor_m2808577188(__this, /*hidden argument*/NULL); return; } } // System.Reflection.MemberTypes System.Reflection.PropertyInfo::get_MemberType() extern "C" int32_t PropertyInfo_get_MemberType_m1634143880 (PropertyInfo_t * __this, const MethodInfo* method) { { return (int32_t)(((int32_t)16)); } } // System.Object System.Reflection.PropertyInfo::GetValue(System.Object,System.Object[]) extern "C" Il2CppObject * PropertyInfo_GetValue_m3655964945 (PropertyInfo_t * __this, Il2CppObject * ___obj0, ObjectU5BU5D_t3614634134* ___index1, const MethodInfo* method) { { Il2CppObject * L_0 = ___obj0; ObjectU5BU5D_t3614634134* L_1 = ___index1; Il2CppObject * L_2 = VirtFuncInvoker5< Il2CppObject *, Il2CppObject *, int32_t, Binder_t3404612058 *, ObjectU5BU5D_t3614634134*, CultureInfo_t3500843524 * >::Invoke(23 /* System.Object System.Reflection.PropertyInfo::GetValue(System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) */, __this, L_0, 0, (Binder_t3404612058 *)NULL, L_1, (CultureInfo_t3500843524 *)NULL); return L_2; } } // System.Void System.Reflection.PropertyInfo::SetValue(System.Object,System.Object,System.Object[]) extern "C" void PropertyInfo_SetValue_m2961483868 (PropertyInfo_t * __this, Il2CppObject * ___obj0, Il2CppObject * ___value1, ObjectU5BU5D_t3614634134* ___index2, const MethodInfo* method) { { Il2CppObject * L_0 = ___obj0; Il2CppObject * L_1 = ___value1; ObjectU5BU5D_t3614634134* L_2 = ___index2; VirtActionInvoker6< Il2CppObject *, Il2CppObject *, int32_t, Binder_t3404612058 *, ObjectU5BU5D_t3614634134*, CultureInfo_t3500843524 * >::Invoke(25 /* System.Void System.Reflection.PropertyInfo::SetValue(System.Object,System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object[],System.Globalization.CultureInfo) */, __this, L_0, L_1, 0, (Binder_t3404612058 *)NULL, L_2, (CultureInfo_t3500843524 *)NULL); return; } } // System.Type[] System.Reflection.PropertyInfo::GetOptionalCustomModifiers() extern "C" TypeU5BU5D_t1664964607* PropertyInfo_GetOptionalCustomModifiers_m747937176 (PropertyInfo_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (PropertyInfo_GetOptionalCustomModifiers_m747937176_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_0 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); return L_0; } } // System.Type[] System.Reflection.PropertyInfo::GetRequiredCustomModifiers() extern "C" TypeU5BU5D_t1664964607* PropertyInfo_GetRequiredCustomModifiers_m2291294773 (PropertyInfo_t * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (PropertyInfo_GetRequiredCustomModifiers_m2291294773_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); TypeU5BU5D_t1664964607* L_0 = ((Type_t_StaticFields*)Type_t_il2cpp_TypeInfo_var->static_fields)->get_EmptyTypes_3(); return L_0; } } // System.Void System.Reflection.StrongNameKeyPair::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void StrongNameKeyPair__ctor_m1022407102 (StrongNameKeyPair_t4090869089 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (StrongNameKeyPair__ctor_m1022407102_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Object__ctor_m2551263788(__this, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_0 = ___info0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_1 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(ByteU5BU5D_t3397334013_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_0); Il2CppObject * L_2 = SerializationInfo_GetValue_m1127314592(L_0, _stringLiteral3721378849, L_1, /*hidden argument*/NULL); __this->set__publicKey_0(((ByteU5BU5D_t3397334013*)Castclass(L_2, ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var))); SerializationInfo_t228987430 * L_3 = ___info0; NullCheck(L_3); String_t* L_4 = SerializationInfo_GetString_m547109409(L_3, _stringLiteral3423086453, /*hidden argument*/NULL); __this->set__keyPairContainer_1(L_4); SerializationInfo_t228987430 * L_5 = ___info0; NullCheck(L_5); bool L_6 = SerializationInfo_GetBoolean_m3573708305(L_5, _stringLiteral2645312083, /*hidden argument*/NULL); __this->set__keyPairExported_2(L_6); SerializationInfo_t228987430 * L_7 = ___info0; Type_t * L_8 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(ByteU5BU5D_t3397334013_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_7); Il2CppObject * L_9 = SerializationInfo_GetValue_m1127314592(L_7, _stringLiteral622693823, L_8, /*hidden argument*/NULL); __this->set__keyPairArray_3(((ByteU5BU5D_t3397334013*)Castclass(L_9, ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var))); return; } } // System.Void System.Reflection.StrongNameKeyPair::System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void StrongNameKeyPair_System_Runtime_Serialization_ISerializable_GetObjectData_m1693082120 (StrongNameKeyPair_t4090869089 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (StrongNameKeyPair_System_Runtime_Serialization_ISerializable_GetObjectData_m1693082120_MetadataUsageId); s_Il2CppMethodInitialized = true; } { SerializationInfo_t228987430 * L_0 = ___info0; ByteU5BU5D_t3397334013* L_1 = __this->get__publicKey_0(); IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_2 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(ByteU5BU5D_t3397334013_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_0); SerializationInfo_AddValue_m1781549036(L_0, _stringLiteral3721378849, (Il2CppObject *)(Il2CppObject *)L_1, L_2, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_3 = ___info0; String_t* L_4 = __this->get__keyPairContainer_1(); NullCheck(L_3); SerializationInfo_AddValue_m1740888931(L_3, _stringLiteral3423086453, L_4, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_5 = ___info0; bool L_6 = __this->get__keyPairExported_2(); NullCheck(L_5); SerializationInfo_AddValue_m1192926088(L_5, _stringLiteral2645312083, L_6, /*hidden argument*/NULL); SerializationInfo_t228987430 * L_7 = ___info0; ByteU5BU5D_t3397334013* L_8 = __this->get__keyPairArray_3(); Type_t * L_9 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(ByteU5BU5D_t3397334013_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_7); SerializationInfo_AddValue_m1781549036(L_7, _stringLiteral622693823, (Il2CppObject *)(Il2CppObject *)L_8, L_9, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.StrongNameKeyPair::System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(System.Object) extern "C" void StrongNameKeyPair_System_Runtime_Serialization_IDeserializationCallback_OnDeserialization_m2330221363 (StrongNameKeyPair_t4090869089 * __this, Il2CppObject * ___sender0, const MethodInfo* method) { { return; } } // System.Void System.Reflection.TargetException::.ctor() extern "C" void TargetException__ctor_m104994274 (TargetException_t1572104820 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TargetException__ctor_m104994274_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = Locale_GetText_m1954433032(NULL /*static, unused*/, _stringLiteral3413494879, /*hidden argument*/NULL); Exception__ctor_m485833136(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.TargetException::.ctor(System.String) extern "C" void TargetException__ctor_m3228808416 (TargetException_t1572104820 * __this, String_t* ___message0, const MethodInfo* method) { { String_t* L_0 = ___message0; Exception__ctor_m485833136(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.TargetException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void TargetException__ctor_m2630053835 (TargetException_t1572104820 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___context1; Exception__ctor_m3836998015(__this, L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.TargetInvocationException::.ctor(System.Exception) extern "C" void TargetInvocationException__ctor_m1059845570 (TargetInvocationException_t4098620458 * __this, Exception_t1927440687 * ___inner0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TargetInvocationException__ctor_m1059845570_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Exception_t1927440687 * L_0 = ___inner0; Exception__ctor_m2453009240(__this, _stringLiteral2114161008, L_0, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.TargetInvocationException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void TargetInvocationException__ctor_m2308614207 (TargetInvocationException_t4098620458 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___sc1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___sc1; Exception__ctor_m3836998015(__this, L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.TargetParameterCountException::.ctor() extern "C" void TargetParameterCountException__ctor_m1256521036 (TargetParameterCountException_t1554451430 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (TargetParameterCountException__ctor_m1256521036_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = Locale_GetText_m1954433032(NULL /*static, unused*/, _stringLiteral212474851, /*hidden argument*/NULL); Exception__ctor_m485833136(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.TargetParameterCountException::.ctor(System.String) extern "C" void TargetParameterCountException__ctor_m2760108938 (TargetParameterCountException_t1554451430 * __this, String_t* ___message0, const MethodInfo* method) { { String_t* L_0 = ___message0; Exception__ctor_m485833136(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.TargetParameterCountException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) extern "C" void TargetParameterCountException__ctor_m2091252449 (TargetParameterCountException_t1554451430 * __this, SerializationInfo_t228987430 * ___info0, StreamingContext_t1417235061 ___context1, const MethodInfo* method) { { SerializationInfo_t228987430 * L_0 = ___info0; StreamingContext_t1417235061 L_1 = ___context1; Exception__ctor_m3836998015(__this, L_0, L_1, /*hidden argument*/NULL); return; } } // System.Void System.Reflection.TypeFilter::.ctor(System.Object,System.IntPtr) extern "C" void TypeFilter__ctor_m1798016172 (TypeFilter_t2905709404 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) { __this->set_method_ptr_0((Il2CppMethodPointer)((MethodInfo*)___method1.get_m_value_0())->methodPointer); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // System.Boolean System.Reflection.TypeFilter::Invoke(System.Type,System.Object) extern "C" bool TypeFilter_Invoke_m2156848151 (TypeFilter_t2905709404 * __this, Type_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method) { if(__this->get_prev_9() != NULL) { TypeFilter_Invoke_m2156848151((TypeFilter_t2905709404 *)__this->get_prev_9(),___m0, ___filterCriteria1, method); } il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found((MethodInfo*)(__this->get_method_3().get_m_value_0())); bool ___methodIsStatic = MethodIsStatic((MethodInfo*)(__this->get_method_3().get_m_value_0())); if (__this->get_m_target_2() != NULL && ___methodIsStatic) { typedef bool (*FunctionPointerType) (Il2CppObject *, void* __this, Type_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(NULL,__this->get_m_target_2(),___m0, ___filterCriteria1,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else if (__this->get_m_target_2() != NULL || ___methodIsStatic) { typedef bool (*FunctionPointerType) (void* __this, Type_t * ___m0, Il2CppObject * ___filterCriteria1, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(__this->get_m_target_2(),___m0, ___filterCriteria1,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else { typedef bool (*FunctionPointerType) (void* __this, Il2CppObject * ___filterCriteria1, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(___m0, ___filterCriteria1,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } } // System.IAsyncResult System.Reflection.TypeFilter::BeginInvoke(System.Type,System.Object,System.AsyncCallback,System.Object) extern "C" Il2CppObject * TypeFilter_BeginInvoke_m2395188690 (TypeFilter_t2905709404 * __this, Type_t * ___m0, Il2CppObject * ___filterCriteria1, AsyncCallback_t163412349 * ___callback2, Il2CppObject * ___object3, const MethodInfo* method) { void *__d_args[3] = {0}; __d_args[0] = ___m0; __d_args[1] = ___filterCriteria1; return (Il2CppObject *)il2cpp_codegen_delegate_begin_invoke((Il2CppDelegate*)__this, __d_args, (Il2CppDelegate*)___callback2, (Il2CppObject*)___object3); } // System.Boolean System.Reflection.TypeFilter::EndInvoke(System.IAsyncResult) extern "C" bool TypeFilter_EndInvoke_m997625354 (TypeFilter_t2905709404 * __this, Il2CppObject * ___result0, const MethodInfo* method) { Il2CppObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0); return *(bool*)UnBox ((Il2CppCodeGenObject*)__result); } // System.Void System.ResolveEventArgs::.ctor(System.String) extern "C" void ResolveEventArgs__ctor_m1927258464 (ResolveEventArgs_t1859808873 * __this, String_t* ___name0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ResolveEventArgs__ctor_m1927258464_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(EventArgs_t3289624707_il2cpp_TypeInfo_var); EventArgs__ctor_m3696060910(__this, /*hidden argument*/NULL); String_t* L_0 = ___name0; __this->set_m_Name_1(L_0); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif
39.648063
525
0.779764
[ "object" ]
44a98b746aae77e2fb22427c875b3e1d6ed16700
2,368
cpp
C++
examples/console/main.cpp
allenu/animata
9743cbd1aa5de876267ae6f82eacfe4c0c442a83
[ "MIT" ]
1
2017-02-09T00:44:07.000Z
2017-02-09T00:44:07.000Z
examples/console/main.cpp
allenu/animata
9743cbd1aa5de876267ae6f82eacfe4c0c442a83
[ "MIT" ]
null
null
null
examples/console/main.cpp
allenu/animata
9743cbd1aa5de876267ae6f82eacfe4c0c442a83
[ "MIT" ]
null
null
null
#include <string> #include <stdio.h> #include <animata.h> #include <ActorDescriptionFromJsonDocument.h> int main(int argc, char *argv[]) { const std::string jsonDocument = "{\"states\":{\"standing\":{\"frames\":[{\"sprite\":\"standing1\"},{\"sprite\":\"standing2\"},{\"sprite\":\"standing3\"}],\"default_state\":true,\"next\":\"standing\"},\"punching\":{\"frames\":[{\"sprite\":\"punching1\",\"attack\":10},{\"sprite\":\"punching2\"}]},\"kicking\":{\"frames\":[{\"sprite\":\"kicking1\",\"attack\":2},{\"sprite\":\"kicking2\"}]},\"hurt\":{\"frames\":[{\"sprite\":\"hurt1\"},{\"sprite\":\"hurt2\"}],\"uninterruptible\":true}},\"groups\":{\"attacking\":[\"punching\",\"kicking\"]},\"transitions\":[{\"from\":\"any\",\"excluding\":[\"hurt\",\"attacking\"],\"to\":\"punching\",\"input\":[\"punch\"]},{\"from\":\"any\",\"excluding\":\"hurt\",\"to\":\"kicking\",\"input\":[\"kick\"]},{\"from\":\"any\",\"excluding\":\"hurt\",\"to\":\"hurt\",\"input\":[\"hurt\"]}]}"; ActorDescription actorDescription = ActorDescriptionFromJsonDocument(jsonDocument); const ActorState initialState = { actorDescription.default_state, 0 }; // const std::vector<std::string> inputs = { "punch" }; const std::vector<std::string> inputs = { "none" }; const ActorState nextState = NextActorState(actorDescription, initialState, inputs); const AnimationState & nextAnimationState = actorDescription.states[nextState.state_name]; const PropertySet & animationFrame = nextAnimationState.frames[nextState.frame_index]; printf("New state: %s, frame index: %d, sprite name: %s\n", nextState.state_name.c_str(), nextState.frame_index, animationFrame.StringWithName("sprite").c_str()); // Loop a bunch of times on it printf("\n----\n"); ActorState currentState = nextState; for (int i=0; i < 20; ++i) { currentState = NextActorState(actorDescription, currentState, inputs); const ActorState nextState = NextActorState(actorDescription, currentState, inputs); const AnimationState & nextAnimationState = actorDescription.states[currentState.state_name]; const PropertySet & animationFrame = nextAnimationState.frames[currentState.frame_index]; printf("New state: %s, frame index: %d, sprite name: %s\n", currentState.state_name.c_str(), currentState.frame_index, animationFrame.StringWithName("sprite").c_str()); } return 0; }
64
824
0.666385
[ "vector" ]
44aadecf3544199e864dc0a0d87b66472d3981af
1,777
cpp
C++
library/file/filesystem.cpp
andinsbing/Qt-Online-Judge
9526984a8abbfbc43e27b743e27c5d7125790933
[ "MIT" ]
null
null
null
library/file/filesystem.cpp
andinsbing/Qt-Online-Judge
9526984a8abbfbc43e27b743e27c5d7125790933
[ "MIT" ]
null
null
null
library/file/filesystem.cpp
andinsbing/Qt-Online-Judge
9526984a8abbfbc43e27b743e27c5d7125790933
[ "MIT" ]
null
null
null
#include "filesystem.h" #include <QDebug> #include <QDir> #include <QFile> #include <QFileInfo> #include <QJsonDocument> FileSystem::FileSystem(QObject* parent) : QObject(parent) {} void FileSystem::makeFile(const QString& path, const QByteArray& data) { QFileInfo fileInfo(path); QDir dir = fileInfo.absoluteDir(); if (!dir.exists()) { bool isAbleToMakePath = dir.mkpath(dir.absolutePath()); Q_ASSERT(isAbleToMakePath); } QFile file(path); bool isAbleToWrite = file.open(QFile::WriteOnly); Q_ASSERT(isAbleToWrite); auto bytes = file.write(data); Q_ASSERT(bytes != -1); file.close(); } QByteArray FileSystem::readFile(const QString& path) { QFile file(path); bool isAbleToRead = file.open(QFile::ReadOnly); Q_ASSERT(isAbleToRead); return file.readAll(); } QJsonObject FileSystem::readJson(const QString& path) { QJsonDocument doc = QJsonDocument::fromJson(readFile(path)); Q_ASSERT(doc.isObject()); return doc.object(); } void FileSystem::makeJson(const QString& path, const QJsonObject& json) { QJsonDocument doc; doc.setObject(json); makeFile(path, doc.toJson(QJsonDocument::JsonFormat::Indented)); } bool FileSystem::hasDIr(const QString& dir) { return QDir(dir).exists(); } bool FileSystem::hasDIr(const std::initializer_list<QString>& dirList) { for (const auto& i : dirList) { if (!hasDIr(i)) { return false; } } return true; } bool FileSystem::hasFile(const QString& path) { return QFileInfo(path).exists(); } bool FileSystem::hasFile(const std::initializer_list<QString>& pathList) { for (const auto& i : pathList) { if (!hasFile(i)) { return false; } } return true; }
23.077922
72
0.660664
[ "object" ]
44ad75e0d9f098fade9a99266e2d9dd9e58d4794
1,698
cpp
C++
src/libdict/DictStringUtils.cpp
twd2/WDict
35bcf332343735865dfea908459c2114d2d256bf
[ "MIT" ]
8
2016-04-15T15:59:43.000Z
2020-11-18T22:08:59.000Z
src/libdict/DictStringUtils.cpp
twd2/WDict
35bcf332343735865dfea908459c2114d2d256bf
[ "MIT" ]
null
null
null
src/libdict/DictStringUtils.cpp
twd2/WDict
35bcf332343735865dfea908459c2114d2d256bf
[ "MIT" ]
5
2016-05-02T13:59:38.000Z
2019-06-09T16:28:26.000Z
#include "DictStringUtils.h" std::vector<std::string> DictStringUtils::GetWords(std::string text, bool unique) { for (size_t i = 0; i < text.length(); ++i) { if (text[i] >= 'A' && text[i] <= 'Z') { text[i] = text[i] - 'A' + 'a'; } if (!(text[i] >= 'a' && text[i] <= 'z')) { text[i] = ' '; } } std::stringstream ss(text); std::vector<std::string> vec; std::string word; while (ss >> word) { vec.push_back(word); } if (unique) { std::sort(vec.begin(), vec.end()); auto iter = std::unique(vec.begin(), vec.end()); vec.resize(std::distance(vec.begin(), iter)); } return vec; } size_t DictStringUtils::Distance(const std::string &a, const std::string &b) { size_t d[a.length() + 1][b.length() + 1]; for (size_t i = 0; i <= a.length(); ++i) { d[i][0] = i; } for (size_t i = 0; i <= b.length(); ++i) { d[0][i] = i; } for (size_t i = 1; i <= a.length(); ++i) { for (size_t j = 1; j <= b.length(); ++j) { int cost = 0; if (a[i - 1] != b[j - 1]) { cost = 1; } d[i][j] = std::min(std::min(d[i - 1][j] + 1, // delete d[i][j - 1] + 1), // insert d[i - 1][j - 1] + cost); // replace } } return d[a.length()][b.length()]; } template <> std::string DictStringUtils::ToString(const std::string &a) { return a; } template <> std::string DictStringUtils::FromString(const std::string &a) { return a; }
21.769231
81
0.429329
[ "vector" ]
44ad9e9cf120bcf6f2a87589ae189c6376ecb193
1,846
cpp
C++
4. Алгоритмы на графах/72. Алгоритм Дейкстры #3831/[OK]221883.cpp
godnoTA/acm.bsu.by
3e1cf1c545c691de82b5e1d2e0768b41ea581734
[ "Unlicense" ]
19
2018-05-19T16:37:14.000Z
2022-03-23T20:13:43.000Z
4. Алгоритмы на графах/72. Алгоритм Дейкстры #3831/[OK]221883.cpp
godnoTA/acm.bsu.by
3e1cf1c545c691de82b5e1d2e0768b41ea581734
[ "Unlicense" ]
6
2020-05-07T21:06:48.000Z
2020-06-05T17:52:57.000Z
4. Алгоритмы на графах/72. Алгоритм Дейкстры #3831/[OK]221883.cpp
godnoTA/acm.bsu.by
3e1cf1c545c691de82b5e1d2e0768b41ea581734
[ "Unlicense" ]
31
2019-03-01T21:41:38.000Z
2022-03-27T17:56:39.000Z
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <fstream> #include <queue> #include <vector> auto compare = [](const std::pair<long long, long long> &p1, const std::pair<long long, long long> &p2) { return p1.second > p2.second; }; int main() { std::ios_base::sync_with_stdio(false); freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); long long n; long long m; bool *blocked; long long *priorities; std::cin >> n >> m; std::vector<std::vector<std::pair<long long,long long>>> adjacent_list(n); std::priority_queue<std::pair<long long, long long>, std::vector<std::pair<long long, long long>>,decltype(compare)> min_heap(compare); blocked = new bool[n]; priorities = new long long[n]; for (long long i = 0; i < n; i++) { blocked[i] = false; priorities[i] = 0; } long long v1, v2, weight; for (long long i = 0; i < m; i++) { std::cin >> v1 >> v2 >> weight; (adjacent_list[v1-1]).push_back(std::make_pair(v2-1, weight)); (adjacent_list[v2-1]).push_back(std::make_pair(v1-1, weight)); } min_heap.push(std::make_pair(0,0)); while (!min_heap.empty()) { auto vertex = (min_heap.top()); min_heap.pop(); if (!blocked[vertex.first]) { blocked[vertex.first] = true; priorities[vertex.first] = vertex.second; for (long long i = 0; i < adjacent_list[vertex.first].size(); i++) { if (!blocked[adjacent_list[vertex.first][i].first]) { long long new_priority = (vertex.second) + (adjacent_list[vertex.first][i]).second; priorities[adjacent_list[vertex.first][i].first] = new_priority; min_heap.push(std::make_pair(adjacent_list[vertex.first][i].first, new_priority)); } } } } std::cout << priorities[n-1] << std::endl; fclose(stdout); fclose(stdin); system("pause"); return 0; }
30.766667
137
0.634345
[ "vector" ]
44b3d3ed75e69827b1a3c8f060793df04394d9d0
11,494
cc
C++
table/block.cc
soarpenguin/vidardb
cec2191ea881388b14c3f15ff62d8b473cd255f7
[ "BSD-3-Clause" ]
1
2021-02-02T09:38:15.000Z
2021-02-02T09:38:15.000Z
table/block.cc
soarpenguin/vidardb
cec2191ea881388b14c3f15ff62d8b473cd255f7
[ "BSD-3-Clause" ]
null
null
null
table/block.cc
soarpenguin/vidardb
cec2191ea881388b14c3f15ff62d8b473cd255f7
[ "BSD-3-Clause" ]
null
null
null
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. // // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. // // Decodes the blocks generated by block_builder.cc. #include "table/block.h" #include <algorithm> #include <string> #include <unordered_map> #include <vector> #include "vidardb/comparator.h" #include "table/format.h" #include "util/coding.h" #include "util/logging.h" #include "util/perf_context_imp.h" namespace vidardb { // Helper routine: decode the next block entry starting at "p", // storing the number of shared key bytes, non_shared key bytes, // and the length of the value in "*shared", "*non_shared", and // "*value_length", respectively. Will not derefence past "limit". // // If any errors are detected, returns nullptr. Otherwise, returns a // pointer to the key delta (just past the three decoded values). static inline const char* DecodeEntry(const char* p, const char* limit, uint32_t* shared, uint32_t* non_shared, uint32_t* value_length) { if (limit - p < 3) return nullptr; *shared = reinterpret_cast<const unsigned char*>(p)[0]; *non_shared = reinterpret_cast<const unsigned char*>(p)[1]; *value_length = reinterpret_cast<const unsigned char*>(p)[2]; if ((*shared | *non_shared | *value_length) < 128) { // Fast path: all three values are encoded in one byte each p += 3; } else { if ((p = GetVarint32Ptr(p, limit, shared)) == nullptr) return nullptr; if ((p = GetVarint32Ptr(p, limit, non_shared)) == nullptr) return nullptr; if ((p = GetVarint32Ptr(p, limit, value_length)) == nullptr) return nullptr; } if (static_cast<uint32_t>(limit - p) < (*non_shared + *value_length)) { return nullptr; } return p; } void BlockIter::Next() { assert(Valid()); ParseNextKey(); } void BlockIter::Prev() { assert(Valid()); // Scan backwards to a restart point before current_ const uint32_t original = current_; while (GetRestartPoint(restart_index_) >= original) { if (restart_index_ == 0) { // No more entries current_ = restarts_; restart_index_ = num_restarts_; return; } restart_index_--; } SeekToRestartPoint(restart_index_); do { // Loop until end of current entry hits the start of original entry } while (ParseNextKey() && NextEntryOffset() < original); } void BlockIter::Seek(const Slice& target) { PERF_TIMER_GUARD(block_seek_nanos); if (data_ == nullptr) { // Not init yet return; } uint32_t index = 0; bool ok = BinarySeek(target, 0, num_restarts_ - 1, &index); if (!ok) { return; } SeekToRestartPoint(index); // Linear search (within restart block) for first key >= target while (true) { if (!ParseNextKey() || Compare(key_.GetKey(), target) >= 0) { return; } } } void BlockIter::SeekToFirst() { if (data_ == nullptr) { // Not init yet return; } SeekToRestartPoint(0); ParseNextKey(); } void BlockIter::SeekToLast() { if (data_ == nullptr) { // Not init yet return; } SeekToRestartPoint(num_restarts_ - 1); while (ParseNextKey() && NextEntryOffset() < restarts_) { // Keep skipping } } void BlockIter::CorruptionError() { current_ = restarts_; restart_index_ = num_restarts_; status_ = Status::Corruption("bad entry in block"); key_.Clear(); value_.clear(); } bool BlockIter::ParseNextKey() { current_ = NextEntryOffset(); const char* p = data_ + current_; const char* limit = data_ + restarts_; // Restarts come right after data if (p >= limit) { // No more entries to return. Mark as invalid. current_ = restarts_; restart_index_ = num_restarts_; return false; } // Decode next entry uint32_t shared, non_shared, value_length; p = DecodeEntry(p, limit, &shared, &non_shared, &value_length); if (p == nullptr || key_.Size() < shared) { CorruptionError(); return false; } else { if (shared == 0) { // If this key don't share any bytes with prev key then we don't need // to decode it and can use it's address in the block directly. key_.SetKey(Slice(p, non_shared), false /* copy */); } else { // This key share `shared` bytes with prev key, we need to decode it key_.TrimAppend(shared, p, non_shared); } value_ = Slice(p + non_shared, value_length); while (restart_index_ + 1 < num_restarts_ && GetRestartPoint(restart_index_ + 1) < current_) { ++restart_index_; } return true; } } // Binary search in restart array to find the first restart point // with a key >= target (TODO: this comment is inaccurate) bool BlockIter::BinarySeek(const Slice& target, uint32_t left, uint32_t right, uint32_t* index) { assert(left <= right); while (left < right) { uint32_t mid = (left + right + 1) / 2; uint32_t region_offset = GetRestartPoint(mid); uint32_t shared, non_shared, value_length; const char* key_ptr = DecodeEntry(data_ + region_offset, data_ + restarts_, &shared, &non_shared, &value_length); if (key_ptr == nullptr || (shared != 0)) { CorruptionError(); return false; } Slice mid_key(key_ptr, non_shared); int cmp = Compare(mid_key, target); if (cmp < 0) { // Key at "mid" is smaller than "target". Therefore all // blocks before "mid" are uninteresting. left = mid; } else if (cmp > 0) { // Key at "mid" is >= "target". Therefore all blocks at or // after "mid" are uninteresting. right = mid - 1; } else { left = right = mid; } } *index = left; return true; } uint32_t Block::NumRestarts() const { assert(size_ >= 2*sizeof(uint32_t)); return DecodeFixed32(data_ + size_ - sizeof(uint32_t)); } Block::Block(BlockContents&& contents) : contents_(std::move(contents)), data_(contents_.data.data()), size_(contents_.data.size()) { if (size_ < sizeof(uint32_t)) { size_ = 0; // Error marker } else { restart_offset_ = static_cast<uint32_t>(size_) - (1 + NumRestarts()) * sizeof(uint32_t); if (restart_offset_ > size_ - sizeof(uint32_t)) { // The size is too small for NumRestarts() and therefore // restart_offset_ wrapped around. size_ = 0; } } } // Helper routine: decode the next block entry starting at "p", // storing the number of the length of the key or value in "key_length" // or "*value_length". Will not derefence past "limit". // // If any errors are detected, returns nullptr. Otherwise, returns a // pointer to the key delta (just past the decoded values). static inline const char* DecodeKeyOrValue(const char* p, const char* limit, uint32_t* length) { if (limit - p < 1) return nullptr; *length = reinterpret_cast<const unsigned char*>(p)[0]; if (*length < 128) { // Fast path: key_length is encoded in one byte each p++; } else { if ((p = GetVarint32Ptr(p, limit, length)) == nullptr) return nullptr; } if (static_cast<uint32_t>(limit - p) < *length) { return nullptr; } return p; } void ColumnBlockIter::Seek(const Slice& target) { PERF_TIMER_GUARD(block_seek_nanos); if (data_ == nullptr) { // Not init yet return; } uint32_t index = 0; bool ok = BinarySeek(target, 0, num_restarts_ - 1, &index); if (!ok) { return; } SeekToRestartPoint(index); if (!ParseNextKey()) { return; } Slice key = key_.GetKey(); uint64_t restart_pos = 0; GetFixed64BigEndian(&key, &restart_pos); uint64_t target_pos = 0; GetFixed64BigEndian(&target, &target_pos); uint64_t step = target_pos - restart_pos; // Linear search (within restart block) for first key >= target for (uint64_t i = 0u; i < step; i++) { if (!ParseNextKey()) { return; } } } bool ColumnBlockIter::ParseNextKey() { current_ = NextEntryOffset(); const char* p = data_ + current_; const char* limit = data_ + restarts_; // Restarts come right after data if (p >= limit) { // No more entries to return. Mark as invalid. current_ = restarts_; restart_index_ = num_restarts_; return false; } while (restart_index_ + 1 < num_restarts_ && GetRestartPoint(restart_index_ + 1) <= current_) { ++restart_index_; } uint32_t restart_offset = GetRestartPoint(restart_index_); bool has_key = (restart_offset == current_ ? true : false); // Decode next entry uint32_t key_length = 0; if (has_key) { p = DecodeKeyOrValue(p, limit, &key_length); if (p == nullptr) { CorruptionError(); return false; } key_.SetKey(Slice(p, key_length), false /* copy */); } p += key_length; uint32_t value_length; p = DecodeKeyOrValue(p, limit, &value_length); if (p == nullptr) { CorruptionError(); return false; } value_ = Slice(p, value_length); return true; } // Binary search in restart array to find the first restart point // with a key >= target (TODO: this comment is inaccurate) bool ColumnBlockIter::BinarySeek(const Slice& target, uint32_t left, uint32_t right, uint32_t* index) { assert(left <= right); while (left < right) { uint32_t mid = (left + right + 1) / 2; uint32_t region_offset = GetRestartPoint(mid); uint32_t key_length; const char* key_ptr = DecodeKeyOrValue(data_ + region_offset, data_ + restarts_, &key_length); if (key_ptr == nullptr) { CorruptionError(); return false; } Slice mid_key(key_ptr, key_length); int cmp = Compare(mid_key, target); if (cmp < 0) { // Key at "mid" is smaller than "target". Therefore all // blocks before "mid" are uninteresting. left = mid; } else if (cmp > 0) { // Key at "mid" is >= "target". Therefore all blocks at or // after "mid" are uninteresting. right = mid - 1; } else { left = right = mid; } } *index = left; return true; } InternalIterator* Block::NewIterator(const Comparator* cmp, BlockIter* iter, bool column) { if (size_ < 2*sizeof(uint32_t)) { if (iter != nullptr) { iter->SetStatus(Status::Corruption("bad block contents")); return iter; } else { return NewErrorInternalIterator(Status::Corruption("bad block contents")); } } const uint32_t num_restarts = NumRestarts(); if (num_restarts == 0) { if (iter != nullptr) { iter->SetStatus(Status::OK()); return iter; } else { return NewEmptyInternalIterator(); } } else { if (iter != nullptr) { iter->Initialize(cmp, data_, restart_offset_, num_restarts); } else { iter = column ? new ColumnBlockIter(cmp, data_, restart_offset_, num_restarts): new BlockIter(cmp, data_, restart_offset_, num_restarts); } } return iter; } size_t Block::ApproximateMemoryUsage() const { return usable_size(); } } // namespace vidardb
29.321429
80
0.637028
[ "vector" ]
44bd0dd02bbd1f64b1f64f6deb5acb5eae0f6dfd
4,255
cpp
C++
src/core/tests/float16.cpp
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
1,127
2018-10-15T14:36:58.000Z
2020-04-20T09:29:44.000Z
src/core/tests/float16.cpp
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
439
2018-10-20T04:40:35.000Z
2020-04-19T05:56:25.000Z
src/core/tests/float16.cpp
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
414
2018-10-17T05:53:46.000Z
2020-04-16T17:29:53.000Z
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "ngraph/type/float16.hpp" #include <climits> #include <random> #include "gtest/gtest.h" #include "ngraph/runtime/aligned_buffer.hpp" #include "util/float_util.hpp" using namespace std; using namespace ngraph; TEST(float16, conversions) { float16 f16; const char* source_string; std::string f16_string; // 1.f source_string = "0 01111 00 0000 0000"; f16 = test::bits_to_float16(source_string); EXPECT_EQ(f16, float16(1.0)); f16_string = test::float16_to_bits(f16); EXPECT_STREQ(source_string, f16_string.c_str()); EXPECT_EQ(static_cast<float>(f16), 1.0); // -1.f source_string = "1 01111 00 0000 0000"; f16 = test::bits_to_float16(source_string); EXPECT_EQ(f16, float16(-1.0)); f16_string = test::float16_to_bits(f16); EXPECT_STREQ(source_string, f16_string.c_str()); EXPECT_EQ(static_cast<float>(f16), -1.0); // 0.f source_string = "0 00000 00 0000 0000"; f16 = test::bits_to_float16(source_string); EXPECT_EQ(f16, float16(0.0)); f16_string = test::float16_to_bits(f16); EXPECT_STREQ(source_string, f16_string.c_str()); EXPECT_EQ(static_cast<float>(f16), 0.0); // 1.5f source_string = "0 01111 10 0000 0000"; f16 = test::bits_to_float16(source_string); EXPECT_EQ(f16, float16(1.5)); f16_string = test::float16_to_bits(f16); EXPECT_STREQ(source_string, f16_string.c_str()); EXPECT_EQ(static_cast<float>(f16), 1.5); } TEST(float16, assigns) { float16 f16; f16 = 2.0; EXPECT_EQ(f16, float16(2.0)); std::vector<float> f32vec{1.0, 2.0, 4.0}; std::vector<float16> f16vec; std::copy(f32vec.begin(), f32vec.end(), std::back_inserter(f16vec)); for (size_t i = 0; i < f32vec.size(); ++i) { EXPECT_EQ(f32vec.at(i), f16vec.at(i)); } float f32arr[] = {1.0, 2.0, 4.0}; float16 f16arr[sizeof(f32arr)]; for (size_t i = 0; i < sizeof(f32arr) / sizeof(f32arr[0]); ++i) { f16arr[i] = f32arr[i]; EXPECT_EQ(f32arr[i], f16arr[i]); } } TEST(float16, values) { EXPECT_EQ(static_cast<float16>(test::FloatUnion(0, 112 - 8, (1 << 21) + 0).f).to_bits(), float16(0, 0, 2).to_bits()); EXPECT_EQ(static_cast<float16>(test::FloatUnion(0, 112 - 8, (1 << 21) + 1).f).to_bits(), float16(0, 0, 3).to_bits()); EXPECT_EQ(static_cast<float16>(1.0 / (256.0 * 65536.0)).to_bits(), float16(0, 0, 1).to_bits()); EXPECT_EQ(static_cast<float16>(1.5 / (256.0 * 65536.0)).to_bits(), float16(0, 0, 2).to_bits()); EXPECT_EQ(static_cast<float16>(1.25 / (256.0 * 65536.0)).to_bits(), float16(0, 0, 1).to_bits()); EXPECT_EQ(static_cast<float16>(1.0 / (128.0 * 65536.0)).to_bits(), float16(0, 0, 2).to_bits()); EXPECT_EQ(static_cast<float16>(1.5 / (128.0 * 65536.0)).to_bits(), float16(0, 0, 3).to_bits()); EXPECT_EQ(static_cast<float16>(1.25 / (128.0 * 65536.0)).to_bits(), float16(0, 0, 2).to_bits()); EXPECT_EQ(static_cast<float16>(std::numeric_limits<float>::infinity()).to_bits(), float16(0, 0x1F, 0).to_bits()); EXPECT_EQ(static_cast<float16>(-std::numeric_limits<float>::infinity()).to_bits(), float16(1, 0x1F, 0).to_bits()); EXPECT_TRUE(isnan(static_cast<float16>(std::numeric_limits<float>::quiet_NaN()))); EXPECT_TRUE(isnan(static_cast<float16>(std::numeric_limits<float>::signaling_NaN()))); EXPECT_EQ(static_cast<float16>(2.73786e-05).to_bits(), 459); EXPECT_EQ(static_cast<float16>(3.87722e-05).to_bits(), 650); EXPECT_EQ(static_cast<float16>(-0.0223043).to_bits(), 42422); EXPECT_EQ(static_cast<float16>(5.10779e-05).to_bits(), 857); EXPECT_EQ(static_cast<float16>(-5.10779e-05).to_bits(), 0x8359); EXPECT_EQ(static_cast<float16>(-2.553895e-05).to_bits(), 0x81ac); EXPECT_EQ(static_cast<float16>(-0.0001021558).to_bits(), 0x86b2); EXPECT_EQ(static_cast<float16>(5.960464477539063e-08).to_bits(), 0x01); EXPECT_EQ(static_cast<float16>(8.940696716308594e-08).to_bits(), 0x02); EXPECT_EQ(static_cast<float16>(65536.0).to_bits(), 0x7c00); EXPECT_EQ(static_cast<float16>(65519.0).to_bits(), 0x7bff); EXPECT_EQ(static_cast<float16>(65520.0).to_bits(), 0x7c00); }
41.31068
118
0.662045
[ "vector" ]
44bd23461691b44be017d0dda3418f9d3d6ad925
4,411
cpp
C++
Final/Dataset/B2016_Z3_Z2/student5899.cpp
Team-PyRated/PyRated
1df171c8a5a98977b7a96ee298a288314d1b1b96
[ "MIT" ]
null
null
null
Final/Dataset/B2016_Z3_Z2/student5899.cpp
Team-PyRated/PyRated
1df171c8a5a98977b7a96ee298a288314d1b1b96
[ "MIT" ]
null
null
null
Final/Dataset/B2016_Z3_Z2/student5899.cpp
Team-PyRated/PyRated
1df171c8a5a98977b7a96ee298a288314d1b1b96
[ "MIT" ]
null
null
null
/B2016/2017: Zadaća 3, Zadatak 2 #include <iostream> #include <string> #include <map> #include <vector> #include <set> #include <stdexcept> #include <iterator> //provjeravamo da li je znak slovo ili broj bool slovo(char s) { if ((s >= 'A' && s <= 'Z') || (s >= 'a' && s <= 'z') || (s>='0' && s<='9')) return true; return false; } std::string PretvoriUMala(std::string s) { for(int i=0;i<s.length();i++) { if(s[i]>='A' && s[i]<='Z') s[i]+=32; } return s; } std::map<std::string,std::set<int>> KreirajIndeksPojmova(std::string a) { std::map<std::string,std::set<int>> novo; std::set<int> skup; std::string help; std::string pomoc; std::string s(PretvoriUMala(a)); for(int i=0;i<s.length();i++) { if(s[i]==' ') continue; //ako je razmak else { if(!slovo(s[i])) continue; skup.insert(i); while((slovo(s[i])) || s[i]!=' ') //uzimamo rijec { if(!slovo(s[i]) || s[i]=='\0') break; help+=s[i]; i++; } for(int j=0;j<s.length();j++) //petlja za pretragu istih rijeci { if(i==j) continue; int k; k=j; while ((slovo(s[i])) || s[k]!=' ') //uzimamo rijec koju poredimo { if(!slovo(s[k]) || s[k]=='\0') break; pomoc+=s[k]; k++; } if(help==pomoc) //ako su isti indeks stavljamo u skup { skup.insert(j); pomoc.resize(0); j=k; } else { pomoc.resize(0); j=k; continue; } } } novo[help]=skup; //kreiramo par u mapi help.resize(0); skup.clear();// cistimo skup } return novo; } std::vector<std::string> NapraviVektorStringova(std::string s) { std::vector<std::string> vektorstringova; std::string help; for(int i=0;i<s.length();i++) { while(s[i]!=' ') { help+=s[i]; i++; if(s[i]=='\0' || s[i]==' ') break; } if(s[i]==' ' || s[i]=='\0') vektorstringova.push_back(help); help.resize(0); } return vektorstringova; } std::set<int> PretraziIndeksPojmova(std::string s,std::map<std::string,std::set<int>> mapa) { std::set<int> skup; auto v(NapraviVektorStringova(s)); for(int i=0;i<v.size();i++) { auto it(mapa.find(v[i])); //trazimo kljucnu rijec if(it==mapa.end()) throw std::logic_error ("Pojam nije nadjen"); else { skup=mapa[v[i]]; } } return skup; } void IspisiIndeksPojmova(std::map<std::string,std::set<int>> mapa) { for(auto it=mapa.begin();it!=mapa.end();it++) { std::cout<<it->first<<": "; int brojac(0); for(auto i=(it->second).begin();i!=(it->second).end();i++) { brojac++; //brojimo elemente if(brojac==std::distance((it->second).begin(),(it->second).end())) std::cout<<*i; //koristimo funkciju distance da saznamo broj elemenata //ako je brojac jednak broju elemenata dosli smo na kraj else std::cout <<*i<<","; } std::cout <<std::endl; } } int main() { std::string s; std::cout<<"Unesite tekst: "; std::getline(std::cin,s); auto mapa(KreirajIndeksPojmova(s)); IspisiIndeksPojmova(mapa); while (1) { std::cout<<"Unesite rijec: "; std::string rijec; std::getline(std::cin,rijec); if(rijec==".") break; try { auto skup(PretraziIndeksPojmova(rijec,mapa)); //moze baciti izuzetak for(auto x:skup) std::cout<<x<<" "; } catch(std::logic_error e) { std::cout<<"Unesena rijec nije nadjena!"; } std::cout<<std::endl; } return 0; }
27.228395
151
0.432782
[ "vector" ]
44c117d5753a413c1234e988740d9314b576bbb4
1,042
cpp
C++
ACM/leetcode/10_DP.cpp
chaohu/Daily-Learning
0e8d14a3497ad319eda20bc4682cec08d5d6fb08
[ "MIT" ]
12
2016-04-09T15:43:02.000Z
2022-03-22T01:58:25.000Z
ACM/leetcode/10_DP.cpp
chaohu/Daily-Learning
0e8d14a3497ad319eda20bc4682cec08d5d6fb08
[ "MIT" ]
null
null
null
ACM/leetcode/10_DP.cpp
chaohu/Daily-Learning
0e8d14a3497ad319eda20bc4682cec08d5d6fb08
[ "MIT" ]
2
2018-08-23T07:34:59.000Z
2019-06-20T10:17:31.000Z
/************************************************************************* > File Name: 10_DP.cpp > Author: huchao > Mail: hnhuchao1@163.com > Created Time: 2017年12月20日 星期三 21时39分31秒 ************************************************************************/ #include <iostream> #include <string> #include <vector> using namespace std; int main() { string s = "ssss"; string p = "ssss"; int m = s.size(), n = p.size(); vector<vector<bool> > f(m + 1, vector<bool>(n + 1, false)); f[0][0] = true; f[0][1] = false; for (int i = 1; i <= m; i++) f[i][0] = false; for (int j = 2; j <= n; j++) { f[0][j] = '*' == p[j - 1] && f[0][j - 2]; } for (int i = 1; i <= m; i++) { for (int j = 1; j <= n; j++) { if ('*' == p[j - 1]) { f[i][j] = f[i][j - 2] || ((s[i - 1] == p[j - 2] || '.' == p[j - 2]) && f[i - 1][j]); } else { f[i][j] = f[i - 1][j - 1] && (s[i - 1] == p[j - 1] || '.' == p[j - 1]); } } } if (f[m][n]) cout << "Matched successfully" << endl; else cout << "Matched failed" << endl; return 0; }
26.05
88
0.389635
[ "vector" ]
44c228d90b4efa1bd53897033fc1348281a4f2d7
2,353
cpp
C++
LeetCode/ThousandTwo/1494-parallel_courses_2.cpp
Ginkgo-Biloba/Cpp-Repo1-VS
231c68a055e6bf69a3f7c224e7c0182b67ce5b67
[ "Apache-2.0" ]
null
null
null
LeetCode/ThousandTwo/1494-parallel_courses_2.cpp
Ginkgo-Biloba/Cpp-Repo1-VS
231c68a055e6bf69a3f7c224e7c0182b67ce5b67
[ "Apache-2.0" ]
null
null
null
LeetCode/ThousandTwo/1494-parallel_courses_2.cpp
Ginkgo-Biloba/Cpp-Repo1-VS
231c68a055e6bf69a3f7c224e7c0182b67ce5b67
[ "Apache-2.0" ]
null
null
null
#include "leetcode.hpp" /* 1494. 并行课程 II 给你一个整数 n 表示某所大学里课程的数目,编号为 1 到 n ,数组 dependencies 中, dependencies[i] = [xi, yi] 表示一个先修课的关系,也就是课程 xi 必须在课程 yi 之前上。 同时你还有一个整数 k 。 在一个学期中,你 最多 可以同时上 k 门课,前提是这些课的先修课在之前的学期里已经上过了。 请你返回上完所有课最少需要多少个学期。 题目保证一定存在一种上完所有课的方式。 示例 1: https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2020/06/27/leetcode_parallel_courses_1.png 输入:n = 4, dependencies = [[2,1],[3,1],[1,4]], k = 2 输出:3 解释:上图展示了题目输入的图。 在第一个学期中,我们可以上课程 2 和课程 3 。 然后第二个学期上课程 1 ,第三个学期上课程 4 。 示例 2: https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2020/06/27/leetcode_parallel_courses_2.png 输入:n = 5, dependencies = [[2,1],[3,1],[4,1],[1,5]], k = 2 输出:4 解释:上图展示了题目输入的图。 一个最优方案是:第一学期上课程 2 和 3,第二学期上课程 4 ,第三学期上课程 1 ,第四学期上课程 5 。 示例 3: 输入:n = 11, dependencies = [], k = 2 输出:6 提示: 1 <= n <= 15 1 <= k <= n 0 <= dependencies.length <= n * (n-1) / 2 dependencies[i].length == 2 1 <= xi, yi <= n xi != yi 所有先修关系都是不同的,也就是说 dependencies[i] != dependencies[j] 。 题目输入的图是个有向无环图。 */ unsigned popcnt(unsigned n) { #if defined _MSC_VER return __popcnt(n); #elif defined __GNUC__ return __builtin_popcount(n); #else n = n - ((n >> 1) & 0x55555555); n = (n & 0x33333333) + ((n >> 2) & 0x33333333); n = (n + (n >> 4)) & 0x0f0f0f0f; n = (n * 0x1010101) >> 24; return n; #endif } // https://leetcode.com/problems/parallel-courses-ii/discuss/709382/C%2B%2B-O(3n)-bitmask-dynamic-programming-code-with-comments-and-tutorial // 抄的 int minNumberOfSemesters(int n, vector<vector<int>>& depend, int k) { int Z = 1 << n; vector<int> dep(n); for (auto& d : depend) dep[d[1] - 1] |= 1 << (d[0] - 1); // 状态 i 的前提条件 vector<int> pre(Z); for (int i = 0; i < Z; ++i) for (int m = 0; m < n; ++m) { if (i & (1 << m)) pre[i] |= dep[m]; } // 状态 i 的结果,是 1 的那些位还没有上课 vector<int> dp(Z, n + 1); dp[0] = 0; for (int i = 0; i < Z; ++i) { for (int m = i; m > 0; m = (m - 1) & i) { if (static_cast<int>(popcnt(m)) > k) continue; int taken = i ^ (Z - 1); if ((taken & pre[m]) == pre[m]) dp[i] = min(dp[i], dp[i ^ m] + 1); } } return dp[Z - 1]; } int main() { vector<vector<int>> a = { { 2, 1 }, { 3, 1 }, { 1, 4 } }, b = { { 2, 1 }, { 3, 1 }, { 4, 1 }, { 1, 5 } }, c; OutExpr(minNumberOfSemesters(4, a, 2), "%d"); OutExpr(minNumberOfSemesters(5, b, 2), "%d"); OutExpr(minNumberOfSemesters(11, c, 2), "%d"); }
22.84466
141
0.592435
[ "vector" ]
44caeecd8c4787066ba09a0cb1f662db42ee605a
4,086
cpp
C++
sources/Entity/Wizard.cpp
MA-School/IndieStudio
8069c992ccea3ee1dec0a9e8c3929333697ffe46
[ "MIT" ]
1
2018-02-06T16:07:17.000Z
2018-02-06T16:07:17.000Z
sources/Entity/Wizard.cpp
MaximeAubanel/IndieStudio
8069c992ccea3ee1dec0a9e8c3929333697ffe46
[ "MIT" ]
null
null
null
sources/Entity/Wizard.cpp
MaximeAubanel/IndieStudio
8069c992ccea3ee1dec0a9e8c3929333697ffe46
[ "MIT" ]
3
2018-02-06T16:07:22.000Z
2018-07-12T15:02:03.000Z
/* ** Wizard.cpp for cpp_indie_studio in /home/sshsupreme/tek2/cpp_indie_studio/sources/newEntity ** ** Made by sshSupreme ** Login <sshsupreme@epitech.net> ** ** Started on Sat Jun 03 00:03:40 2017 sshSupreme ** Last update Sat Jun 17 20:12:50 2017 Florent Sebag */ #include "PlayableEntity.hpp" #include "../Core/RessourcesManager.hpp" #include "../Gui/GeneralGUI.hpp" #include "../Projectil/Projectil.hpp" void NsEntity::Wizard::PushProjectil(std::shared_ptr<NsProjectil::Fireball> entity, const irr::core::vector3df& pos, std::vector<std::shared_ptr<NsProjectil::Projectil>>& vProjectil_) { NsGUI::GraphicsEngine &engine = NsGUI::GraphicsEngine::Instance(); irr::scene::IParticleSystemSceneNode *node = engine.Scene()->addParticleSystemSceneNode(false); scene::IParticleEmitter* em = node->createBoxEmitter( core::aabbox3d<f32>(-7,0,-7,7,1,7), // emitter size core::vector3df(0.0f,0.0f,0.0f), // initial direction 50, 50, // emit rate video::SColor(0,255,255,255), // darkest color video::SColor(0,255,255,255), // brightest color 10,10,0, // min and max age, angle core::dimension2df(40.f,40.f), // max size core::dimension2df(40.f,40.f)); // max size node->setEmitter(em); // this grabs the emitter em->drop(); // so we can drop it here without deleting it node->setPosition(pos); node->setScale(core::vector3df(1,1,1)); node->setMaterialFlag(video::EMF_LIGHTING, false); node->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); node->setMaterialTexture(0, entity->getTexture().getTexture()); node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); entity->setNode(node); entity->Initialization(); vProjectil_.push_back(entity); } void NsEntity::Wizard::Move() { if (this->isMoving == false) this->MoveAnim(); if (this->isMoving == false && this->isShooting == true) this->MoveShotAnim(); this->isMoving = true; } void NsEntity::Wizard::Static() { if (this->isShooting == false) this->StaticAnim(); this->isMoving = false; } void NsEntity::Wizard::Spell_1() { } void NsEntity::Wizard::Spell_2() { } void NsEntity::Wizard::Spell_3() { } void NsEntity::Wizard::AutoRangeShot(std::vector<std::shared_ptr<NsProjectil::Projectil>>& v) { NsManager::NsAudioManager_.getSound("fireball")->getSound().play(); PushProjectil(std::make_shared<NsProjectil::Fireball>(NsManager::NsTexturesManager_.getTexture("fire"), this->getNode()->getRotation()), this->getNode()->getPosition(), v); if (this->isShooting == false) this->ShotAnim(); if (this->isShooting == false && this->isMoving == true) this->MoveShotAnim(); this->isShooting = true; } void NsEntity::Wizard::StopShot() { if (this->isShooting == true && this->isMoving == true) this->MoveAnim(); if (this->isShooting == true && this->isMoving == false) this->StaticAnim(); this->isShooting = false; } void NsEntity::Wizard::Death() { this->DeathAnim(); } void NsEntity::Wizard::MoveAnim() {this->getNode()->setFrameLoop(2, 26);} void NsEntity::Wizard::ShotAnim() {this->getNode()->setFrameLoop(28, 40);} void NsEntity::Wizard::StaticAnim() {this->getNode()->setFrameLoop(0, 0);} void NsEntity::Wizard::MoveShotAnim() {this->getNode()->setFrameLoop(28, 40);} void NsEntity::Wizard::DeathAnim() {this->getNode()->setFrameLoop(42, 60);} void NsEntity::Wizard::HappyAnim() {this->getNode()->setFrameLoop(62, 80);} void NsEntity::Wizard::AngryAnim() {this->getNode()->setFrameLoop(82, 100);} NsEntity::Wizard::Wizard(Model3D& model) : PlayableEntity(model) { this->isMoving = false; this->isShooting = false; this->Health_ = 80; this->MaxHealth_ = this->Health_; this->Damages_ = 0; this->Ranger_ = true; this->speedAttack_ = 30; } NsEntity::Wizard::~Wizard() { }
34.627119
205
0.637788
[ "vector", "model" ]
44cb0eb1c5dc816453b7209a52b7bcf57f086786
5,797
cpp
C++
lib/Transforms/Scalar/DxilEraseDeadRegion.cpp
ashleysmithgpu/DirectXShaderCompiler
dffbf4de98efcbaa78529e1c5a77dd6b6a692804
[ "NCSA" ]
null
null
null
lib/Transforms/Scalar/DxilEraseDeadRegion.cpp
ashleysmithgpu/DirectXShaderCompiler
dffbf4de98efcbaa78529e1c5a77dd6b6a692804
[ "NCSA" ]
null
null
null
lib/Transforms/Scalar/DxilEraseDeadRegion.cpp
ashleysmithgpu/DirectXShaderCompiler
dffbf4de98efcbaa78529e1c5a77dd6b6a692804
[ "NCSA" ]
null
null
null
//===- DxilEraseDeadRegion.cpp - Heuristically Remove Dead Region ---------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // Overview: // 1. Identify potentially dead regions by finding blocks with multiple // predecessors but no PHIs // 2. Find common dominant ancestor of all the predecessors // 3. Ensure original block post-dominates the ancestor // 4. Ensure no instructions in the region have side effects (not including // original block and ancestor) // 5. Remove all blocks in the region (excluding original block and ancestor) // #include "llvm/Pass.h" #include "llvm/Analysis/CFG.h" #include "llvm/Analysis/PostDominators.h" #include "llvm/Transforms/Scalar.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Function.h" #include "llvm/IR/BasicBlock.h" #include <unordered_map> #include <unordered_set> using namespace llvm; struct DxilEraseDeadRegion : public FunctionPass { static char ID; DxilEraseDeadRegion() : FunctionPass(ID) { initializeDxilEraseDeadRegionPass(*PassRegistry::getPassRegistry()); } std::unordered_map<BasicBlock *, bool> m_HasSideEffect; bool HasSideEffects(BasicBlock *BB) { auto FindIt = m_HasSideEffect.find(BB); if (FindIt != m_HasSideEffect.end()) { return FindIt->second; } for (Instruction &I : *BB) if (I.mayHaveSideEffects()) { m_HasSideEffect[BB] = true; return true; } m_HasSideEffect[BB] = false; return false; } bool FindDeadRegion(PostDominatorTree *PDT, BasicBlock *Begin, BasicBlock *End, std::set<BasicBlock *> &Region) { std::vector<BasicBlock *> WorkList; auto ProcessSuccessors = [this, &WorkList, Begin, End, &Region, PDT](BasicBlock *BB) { for (BasicBlock *Succ : successors(BB)) { if (Succ == End) continue; if (Succ == Begin) return false; // If goes back to the beginning, there's a loop, give up. if (Region.count(Succ)) continue; if (this->HasSideEffects(Succ)) return false; // Give up if the block may have side effects WorkList.push_back(Succ); Region.insert(Succ); } return true; }; if (!ProcessSuccessors(Begin)) return false; while (WorkList.size()) { BasicBlock *BB = WorkList.back(); WorkList.pop_back(); if (!ProcessSuccessors(BB)) return false; } return Region.size() != 0; } bool TrySimplify(DominatorTree *DT, PostDominatorTree *PDT, BasicBlock *BB) { // Give up if BB has any Phis if (BB->begin() != BB->end() && isa<PHINode>(BB->begin())) return false; std::vector<BasicBlock *> Predecessors(pred_begin(BB), pred_end(BB)); if (Predecessors.size() < 2) return false; // Give up if BB is a self loop for (BasicBlock *PredBB : Predecessors) if (PredBB == BB) return false; // Find the common ancestor of all the predecessors BasicBlock *Common = DT->findNearestCommonDominator(Predecessors[0], Predecessors[1]); if (!Common) return false; for (unsigned i = 2; i < Predecessors.size(); i++) { Common = DT->findNearestCommonDominator(Common, Predecessors[i]); if (!Common) return false; } // If there are any metadata on Common block's branch, give up. if (Common->getTerminator()->hasMetadataOtherThanDebugLoc()) return false; if (!DT->properlyDominates(Common, BB)) return false; if (!PDT->properlyDominates(BB, Common)) return false; std::set<BasicBlock *> Region; if (!this->FindDeadRegion(PDT, Common, BB, Region)) return false; // If BB branches INTO the region, forming a loop give up. for (BasicBlock *Succ : successors(BB)) if (Region.count(Succ)) return false; // Replace Common's branch with an unconditional branch to BB Common->getTerminator()->eraseFromParent(); BranchInst::Create(BB, Common); // Delete the region for (BasicBlock *BB : Region) { for (Instruction &I : *BB) I.dropAllReferences(); BB->dropAllReferences(); } for (BasicBlock *BB : Region) { while (BB->begin() != BB->end()) BB->begin()->eraseFromParent(); BB->eraseFromParent(); } return true; } void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequired<DominatorTreeWrapperPass>(); AU.addRequired<PostDominatorTree>(); } bool runOnFunction(Function &F) override { auto *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); auto *PDT = &getAnalysis<PostDominatorTree>(); std::unordered_set<BasicBlock *> FailedSet; bool Changed = false; while (1) { bool LocalChanged = false; for (Function::iterator It = F.begin(), E = F.end(); It != E; It++) { BasicBlock &BB = *It; if (FailedSet.count(&BB)) continue; if (this->TrySimplify(DT, PDT, &BB)) { LocalChanged = true; break; } else { FailedSet.insert(&BB); } } Changed |= LocalChanged; if (!LocalChanged) break; } return Changed; } }; char DxilEraseDeadRegion::ID; Pass *llvm::createDxilEraseDeadRegionPass() { return new DxilEraseDeadRegion(); } INITIALIZE_PASS_BEGIN(DxilEraseDeadRegion, "dxil-erase-dead-region", "Dxil Erase Dead Region", false, false) INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) INITIALIZE_PASS_DEPENDENCY(PostDominatorTree) INITIALIZE_PASS_END(DxilEraseDeadRegion, "dxil-erase-dead-region", "Dxil Erase Dead Region", false, false)
30.036269
115
0.644299
[ "vector" ]
44ce0d0e9987e7c25a3f259ecbd8e52f5dce46a0
4,840
cpp
C++
edk/ViewGUTexture.cpp
Edimartin/edk-source
de9a152e91344e201669b0421e5f44dea40cebf9
[ "MIT" ]
null
null
null
edk/ViewGUTexture.cpp
Edimartin/edk-source
de9a152e91344e201669b0421e5f44dea40cebf9
[ "MIT" ]
null
null
null
edk/ViewGUTexture.cpp
Edimartin/edk-source
de9a152e91344e201669b0421e5f44dea40cebf9
[ "MIT" ]
null
null
null
#include "ViewGUTexture.h" /* Library C++ ViewGUTexture - View to write the scene in a texture. Copyright 2013 Eduardo Moura Sales Martins (edimartin@gmail.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ edk::ViewGUTexture::ViewGUTexture(edk::size2ui32 size){ //load the texture this->render.createRender(size); } edk::ViewGUTexture::ViewGUTexture(edk::uint32 width,edk::uint32 height){ // this->render.createRender(width,height); } edk::ViewGUTexture::~ViewGUTexture(){ //delete render this->render.deleteRender(); } //set the new size of the texture bool edk::ViewGUTexture::setTextureSize(edk::size2ui32 size){ return this->render.createRender(size); } bool edk::ViewGUTexture::setTextureSize(edk::uint32 width,edk::uint32 height){ // return this->setTextureSize(edk::size2ui32(width,height)); } //return the textureSize edk::size2ui32 edk::ViewGUTexture::getTextureSize(){ return this->render.getSize(); } edk::uint32 edk::ViewGUTexture::getTextureWidth(){ return this->render.getSize().width; } edk::uint32 edk::ViewGUTexture::getTextureHeight(){ return this->render.getSize().height; } //return the texture mode edk::uint32 edk::ViewGUTexture::getTextureModeEDK(){ return this->render.getModeEDK(); } edk::uint32 edk::ViewGUTexture::getTextureModeGU(){ return this->render.getModeGU(); } void edk::ViewGUTexture::draw(rectf32 outsideViewOrigin){ //test if it's not hided if(!this->hide){ //test if are using the modelView if(!edk::GU::guUsingMatrix(GU_MODELVIEW))edk::GU::guUseMatrix(GU_MODELVIEW); //use the renderBuffer this->render.useThisBuffer(); //draw bufferViewPort edk::GU::guSetViewport(0u ,0u ,this->render.getSize().width ,this->render.getSize().height ); edk::GU::guColor4f32(this->backgroundColor); //set backGround Color //draw the viewCamera this->drawCamera(); //draw the polygon in the view this->drawPolygon(outsideViewOrigin); //remove the renderBuffer edk::Texture2DRender::dontUseFrameBuffer(); //Now draw the scene with the texture //Then draw this->drawViewport(outsideViewOrigin); // edk::GU::guColor3f32(1,1,1); //use the shader program this->shader.useThisShader(); //set the camera position edk::GU::guUseMatrix(GU_PROJECTION); //Load the identity edk::GU::guLoadIdentity(); //Set the ortho camera edk::GU::guUseOrtho(0,1,0,1,-1,1); //set the matrix before draw the scene edk::GU::guUseMatrix(GU_MODELVIEW); //use texture edk::GU::guEnable(GU_TEXTURE_2D); //set the texture edk::GU::guUseTexture2D(this->render.getID()); //render the polygon //Draw a quadrangle edk::GU::guBegin(GU_QUADS); edk::GU::guVertexTex2f32(0.f, 0.f); edk::GU::guVertex3f32(0.f, 0.f, 0.f); edk::GU::guVertexTex2f32(0.f, 1.f); edk::GU::guVertex3f32(0.f, 1.f, 0.f); edk::GU::guVertexTex2f32(1.f, 1.f); edk::GU::guVertex3f32(1.f, 1.f, 0.f); edk::GU::guVertexTex2f32(1.f, 0.f); edk::GU::guVertex3f32(1.f, 0.f, 0.f); edk::GU::guEnd(); edk::GU::guUseTexture2D(0u); edk::GU::guDisable(GU_TEXTURE_2D); //remove the shader program this->shader.useNoShader(); //remove the buffer this->render.dontUseFrameBuffer(); this->drawViewInside(); } } //read from the texture bool edk::ViewGUTexture::read(const edk::classID data,edk::uint32 format){ return this->render.readFromTexture(data,format); }
31.428571
84
0.656612
[ "render" ]
44ce54cf1e0f854f4aa4e6540105e0acf2803b0b
6,972
hh
C++
thirdparty/eigen3.2.10/bench/btl/generic_bench/btl.hh
rgijsen/opengl_tmp_poc
93e3a08e30ed100475034281208200ed724db5d9
[ "Apache-2.0" ]
null
null
null
thirdparty/eigen3.2.10/bench/btl/generic_bench/btl.hh
rgijsen/opengl_tmp_poc
93e3a08e30ed100475034281208200ed724db5d9
[ "Apache-2.0" ]
null
null
null
thirdparty/eigen3.2.10/bench/btl/generic_bench/btl.hh
rgijsen/opengl_tmp_poc
93e3a08e30ed100475034281208200ed724db5d9
[ "Apache-2.0" ]
null
null
null
//===================================================== // File : btl.hh // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr> //===================================================== // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // #ifndef BTL_HH #define BTL_HH #include "bench_parameter.hh" #include <iostream> #include <algorithm> #include <vector> #include <string> #include "utilities.h" #if (defined __GNUC__) #define BTL_ALWAYS_INLINE __attribute__((always_inline)) inline #else #define BTL_ALWAYS_INLINE inline #endif #if (defined __GNUC__) #define BTL_DONT_INLINE __attribute__((noinline)) #else #define BTL_DONT_INLINE #endif #if (defined __GNUC__) #define BTL_ASM_COMMENT(X) asm("#" X) #else #define BTL_ASM_COMMENT(X) #endif #ifdef __SSE__ #include "xmmintrin.h" // This enables flush to zero (FTZ) and denormals are zero (DAZ) modes: #define BTL_DISABLE_SSE_EXCEPTIONS() { _mm_setcsr(_mm_getcsr() | 0x8040); } #else #define BTL_DISABLE_SSE_EXCEPTIONS() #endif /** Enhanced std::string */ class BtlString : public std::string { public: BtlString() : std::string() {} BtlString(const BtlString& str) : std::string(static_cast<const std::string&>(str)) {} BtlString(const std::string& str) : std::string(str) {} BtlString(const char* str) : std::string(str) {} operator const char* () const { return c_str(); } void trim( bool left = true, bool right = true ) { int lspaces, rspaces, len = length(), i; lspaces = rspaces = 0; if ( left ) for (i=0; i<len && (at(i)==' '||at(i)=='\t'||at(i)=='\r'||at(i)=='\n'); ++lspaces,++i); if ( right && lspaces < len ) for(i=len-1; i>=0 && (at(i)==' '||at(i)=='\t'||at(i)=='\r'||at(i)=='\n'); rspaces++,i--); *this = substr(lspaces, len-lspaces-rspaces); } std::vector<BtlString> split( const BtlString& delims = "\t\n ") const { std::vector<BtlString> ret; unsigned int numSplits = 0; size_t start, pos; start = 0; do { pos = find_first_of(delims, start); if (pos == start) { ret.push_back(""); start = pos + 1; } else if (pos == npos) ret.push_back( substr(start) ); else { ret.push_back( substr(start, pos - start) ); start = pos + 1; } //start = find_first_not_of(delims, start); ++numSplits; } while (pos != npos); return ret; } bool endsWith(const BtlString& str) const { if(str.size()>this->size()) return false; return this->substr(this->size()-str.size(),str.size()) == str; } bool contains(const BtlString& str) const { return this->find(str)<this->size(); } bool beginsWith(const BtlString& str) const { if(str.size()>this->size()) return false; return this->substr(0,str.size()) == str; } BtlString toLowerCase( void ) { std::transform(begin(), end(), begin(), static_cast<int(*)(int)>(::tolower) ); return *this; } BtlString toUpperCase( void ) { std::transform(begin(), end(), begin(), static_cast<int(*)(int)>(::toupper) ); return *this; } /** Case insensitive comparison. */ bool isEquiv(const BtlString& str) const { BtlString str0 = *this; str0.toLowerCase(); BtlString str1 = str; str1.toLowerCase(); return str0 == str1; } /** Decompose the current string as a path and a file. For instance: "dir1/dir2/file.ext" leads to path="dir1/dir2/" and filename="file.ext" */ void decomposePathAndFile(BtlString& path, BtlString& filename) const { std::vector<BtlString> elements = this->split("/\\"); path = ""; filename = elements.back(); elements.pop_back(); if (this->at(0)=='/') path = "/"; for (unsigned int i=0 ; i<elements.size() ; ++i) path += elements[i] + "/"; } }; class BtlConfig { public: BtlConfig() : overwriteResults(false), checkResults(true), realclock(false), tries(DEFAULT_NB_TRIES) { char * _config; _config = getenv ("BTL_CONFIG"); if (_config!=NULL) { std::vector<BtlString> config = BtlString(_config).split(" \t\n"); for (int i = 0; i<config.size(); i++) { if (config[i].beginsWith("-a")) { if (i+1==config.size()) { std::cerr << "error processing option: " << config[i] << "\n"; exit(2); } Instance.m_selectedActionNames = config[i+1].split(":"); i += 1; } else if (config[i].beginsWith("-t")) { if (i+1==config.size()) { std::cerr << "error processing option: " << config[i] << "\n"; exit(2); } Instance.tries = atoi(config[i+1].c_str()); i += 1; } else if (config[i].beginsWith("--overwrite")) { Instance.overwriteResults = true; } else if (config[i].beginsWith("--nocheck")) { Instance.checkResults = false; } else if (config[i].beginsWith("--real")) { Instance.realclock = true; } } } BTL_DISABLE_SSE_EXCEPTIONS(); } BTL_DONT_INLINE static bool skipAction(const std::string& _name) { if (Instance.m_selectedActionNames.empty()) return false; BtlString name(_name); for (int i=0; i<Instance.m_selectedActionNames.size(); ++i) if (name.contains(Instance.m_selectedActionNames[i])) return false; return true; } static BtlConfig Instance; bool overwriteResults; bool checkResults; bool realclock; int tries; protected: std::vector<BtlString> m_selectedActionNames; }; #define BTL_MAIN \ BtlConfig BtlConfig::Instance #endif // BTL_HH
28.691358
102
0.546041
[ "vector", "transform" ]
44d3c7fafff710aca1eecf154f186b1d8594fdd2
310
hpp
C++
pbdata/saf/AlnInfo.hpp
ggraham/blasr_libcpp
4abef36585bbb677ebc4acb9d4e44e82331d59f7
[ "RSA-MD" ]
4
2015-07-03T11:59:54.000Z
2018-05-17T00:03:22.000Z
pbdata/saf/AlnInfo.hpp
ggraham/blasr_libcpp
4abef36585bbb677ebc4acb9d4e44e82331d59f7
[ "RSA-MD" ]
79
2015-06-29T18:07:21.000Z
2018-09-19T13:38:39.000Z
pbdata/saf/AlnInfo.hpp
ggraham/blasr_libcpp
4abef36585bbb677ebc4acb9d4e44e82331d59f7
[ "RSA-MD" ]
19
2015-06-23T08:43:29.000Z
2021-04-28T18:37:47.000Z
#ifndef DATASTRUCTURES_SAF_ALN_INFO_H_ #define DATASTRUCTURES_SAF_ALN_INFO_H_ #include <cstdint> #include <vector> #include <pbdata/Types.h> #include <pbdata/alignment/CmpAlignment.hpp> class AlnInfo { public: std::vector<CmpAlignment> alignments; UInt nAlignments; uint64_t lastRow; }; #endif
16.315789
44
0.770968
[ "vector" ]
44d4d9d72646fc7b31f57b388ac7849ccc2d3b16
2,193
hpp
C++
darkroom/include/darkroom/gazebo/DarkRoomVisualPlugin.hpp
mattgil23/test01
9464e40caf483eae60fa9c0b490ce8f09e552a53
[ "BSD-3-Clause" ]
11
2018-03-10T04:32:11.000Z
2022-02-10T10:55:44.000Z
darkroom/include/darkroom/gazebo/DarkRoomVisualPlugin.hpp
mattgil23/test01
9464e40caf483eae60fa9c0b490ce8f09e552a53
[ "BSD-3-Clause" ]
null
null
null
darkroom/include/darkroom/gazebo/DarkRoomVisualPlugin.hpp
mattgil23/test01
9464e40caf483eae60fa9c0b490ce8f09e552a53
[ "BSD-3-Clause" ]
1
2019-05-04T09:51:01.000Z
2019-05-04T09:51:01.000Z
#pragma once #include "gazebo/physics/physics.hh" #include "gazebo/transport/TransportTypes.hh" #include "gazebo/msgs/MessageTypes.hh" #include "gazebo/common/Time.hh" #include "gazebo/common/Plugin.hh" #include "gazebo/common/Events.hh" #include "gazebo/rendering/DynamicLines.hh" #include "gazebo/rendering/RenderTypes.hh" #include "gazebo/rendering/Visual.hh" #include "gazebo/rendering/Scene.hh" #include <ros/callback_queue.h> #include <ros/advertise_options.h> #include <ros/ros.h> #include <geometry_msgs/Point.h> // if you want some positions of the model use this.... #include <gazebo_msgs/ModelStates.h> #include <boost/thread.hpp> #include <boost/bind.hpp> namespace gazebo { namespace rendering { class DarkRoomVisualPlugin : public VisualPlugin { public: /// \brief Constructor DarkRoomVisualPlugin(); /// \brief Destructor virtual ~DarkRoomVisualPlugin(); /// \brief Load the visual force plugin tags /// \param node XML config node void Load( VisualPtr _parent, sdf::ElementPtr _sdf ); protected: /// \brief Update the visual plugin virtual void UpdateChild(); private: /// \brief pointer to ros node ros::NodeHandlePtr nh; /// \brief store model name std::string model_name_; /// \brief topic name std::string topic_name_; // /// \brief The visual pointer used to visualize the force. VisualPtr visual_; // /// \brief The scene pointer. ScenePtr scene_; /// \brief For example a line to visualize the force DynamicLines *line; /// \brief for setting ROS name space std::string visual_namespace_; /// \Subscribe to some force ros::Subscriber force_sub_; /// \brief Visualize the force void VisualizeForceOnLink(const geometry_msgs::PointConstPtr &force_ms); // Pointer to the update event connection event::ConnectionPtr update_connection_; }; } }
26.421687
84
0.615595
[ "model" ]
44d8c62f766d8bd862de21ed4aa57bb0993dd38c
6,030
hpp
C++
include/lbann/callbacks/callback_variable_minibatch.hpp
forsyth2/lbann
64fc0346f65353c2f7526a019da964914e539fb0
[ "Apache-2.0" ]
null
null
null
include/lbann/callbacks/callback_variable_minibatch.hpp
forsyth2/lbann
64fc0346f65353c2f7526a019da964914e539fb0
[ "Apache-2.0" ]
null
null
null
include/lbann/callbacks/callback_variable_minibatch.hpp
forsyth2/lbann
64fc0346f65353c2f7526a019da964914e539fb0
[ "Apache-2.0" ]
null
null
null
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the LBANN Research Team (B. Van Essen, et al.) listed in // the CONTRIBUTORS file. <lbann-dev@llnl.gov> // // LLNL-CODE-697807. // All rights reserved. // // This file is part of LBANN: Livermore Big Artificial Neural Network // Toolkit. For details, see http://software.llnl.gov/LBANN or // https://github.com/LLNL/LBANN. // // Licensed under the Apache License, Version 2.0 (the "Licensee"); you // may not use this file except in compliance with the License. You may // obtain a copy of the License at: // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the license. // // lbann_variable_minibatch .hpp .cpp - Callback for variable-size mini-batches //////////////////////////////////////////////////////////////////////////////// #ifndef LBANN_CALLBACKS_VARIABLE_MINIBATCH_HPP_INCLUDED #define LBANN_CALLBACKS_VARIABLE_MINIBATCH_HPP_INCLUDED #include "lbann/callbacks/callback.hpp" namespace lbann { /** * Support changing the mini-batch size on different schedules. * Implementations should override implement the abstract methods to define * concrete schedules. */ class lbann_callback_variable_minibatch : public lbann_callback { public: lbann_callback_variable_minibatch(int starting_mbsize); lbann_callback_variable_minibatch( const lbann_callback_variable_minibatch&) = default; lbann_callback_variable_minibatch& operator=( const lbann_callback_variable_minibatch&) = default; /// Set the initial mini-batch size. void on_train_begin(model *m) override; /// Potentially change the mini-batch size. void on_epoch_end(model *m) override; protected: /** * Implemented by child classes to provide the mini-batch/learning schedule. * This is called at the end of every training epoch. If it returns false, * no changes are made from the currently established schedule. * If this returns true, the mini-batch size will be changed accordingly. * If the mini-batch size is larger than the model's maximum mini-batch size, * a warning is printed and the maximum mini-batch size is used. * If new_lr also non-zero, the learning rate will be changed to new_lr, * with a linear ramp time. (If ramp_time is 0, it is changed immediately.) * Note changing the learning rate while in a ramp may lead to unexpected * behavior; also be aware of interactions with other learning rate * schedules. */ virtual bool schedule(model *m, int& new_mbsize, float& new_lr, int& ramp_time) = 0; /// Change the learning rate of every layer in m to new_lr. void change_learning_rate(model *m, float new_lr) const; /// Get the current learning rate (assumes every layer has the same one). float get_current_learning_rate(model *m) const; /// Initial mini-batch size. const int m_starting_mbsize; /** * The current mini-batch size for this epoch. * This is kept separately from the model's get_current_mini_batch_size() * method, as calling that in on_epoch_end returns the size of the last mini- * batch, not the "base" mini-batch. */ int m_current_mini_batch_size; /// Current number of epochs left to ramp the learning rate. int m_ramp_count = 0; /// Amount to increment the learning rate by when ramping. float m_lr_incr = 0.0f; }; /** * Double the mini-batch size every set number of epochs. * Also doubles the learning rate. */ class lbann_callback_step_minibatch : public lbann_callback_variable_minibatch { public: lbann_callback_step_minibatch(int starting_mbsize, int step, int ramp_time = 0); lbann_callback_step_minibatch(const lbann_callback_step_minibatch&) = default; lbann_callback_step_minibatch& operator=( const lbann_callback_step_minibatch&) = default; lbann_callback_step_minibatch* copy() const override { return new lbann_callback_step_minibatch(*this); } std::string name() const override { return "step minibatch"; } protected: bool schedule(model *m, int& new_mbsize, float& new_lr, int& ramp_time) override; /// Number of epochs between mini-batch size increases. int m_step; /// Number of steps to ramp the learning rate over. int m_ramp_time; }; class lbann_callback_minibatch_schedule : public lbann_callback_variable_minibatch { public: /// Represents a step in a schedule of mini-batch sizes. struct minibatch_step { /// Epoch for this schedule to start. int epoch; /// Mini-batch size to use. int mbsize; /// Learning rate to use. float lr; /// Number of epochs to ramp the learning rate over. int ramp_time; minibatch_step(int _epoch, int _mbsize, float _lr, int _ramp_time) : epoch(_epoch), mbsize(_mbsize), lr(_lr), ramp_time(_ramp_time) {} }; lbann_callback_minibatch_schedule( int starting_mbsize, std::vector<minibatch_step> steps); lbann_callback_minibatch_schedule( const lbann_callback_minibatch_schedule&) = default; lbann_callback_minibatch_schedule& operator=( const lbann_callback_minibatch_schedule&) = default; lbann_callback_minibatch_schedule* copy() const override { return new lbann_callback_minibatch_schedule(*this); } std::string name() const override { return "minibatch schedule"; } protected: bool schedule(model *m, int& new_mbsize, float& new_lr, int& ramp_time) override; /// Steps in the mini-batch schedule, stored in reverse sorted order. std::vector<minibatch_step> m_steps; }; } // namespace lbann #endif // LBANN_CALLBACKS_VARIABLE_MINIBATCH_HPP_INCLUDED
41.30137
84
0.724544
[ "vector", "model" ]
44d9347b8a32d1307861100febe906e62399eb99
2,305
cpp
C++
Trees/HuffmanDecoding.cpp
WinterSoldier13/interview-preparation-kit
64e56725c1a8af17c209bb3191227935b05f6227
[ "MIT" ]
175
2019-12-08T19:48:20.000Z
2022-03-24T07:38:08.000Z
Trees/HuffmanDecoding.cpp
WinterSoldier13/interview-preparation-kit
64e56725c1a8af17c209bb3191227935b05f6227
[ "MIT" ]
40
2019-12-07T08:11:41.000Z
2020-10-09T08:11:22.000Z
Trees/HuffmanDecoding.cpp
WinterSoldier13/interview-preparation-kit
64e56725c1a8af17c209bb3191227935b05f6227
[ "MIT" ]
95
2019-12-07T06:25:31.000Z
2022-03-03T20:12:45.000Z
// // main.cpp // Huffman // // Created by Vatsal Chanana #include<bits/stdc++.h> using namespace std; typedef struct node { int freq; char data; node * left; node * right; } node; struct deref:public binary_function<node*, node*, bool> { bool operator()(const node * a, const node * b)const { return a->freq > b->freq; } }; typedef priority_queue<node *, vector<node*>, deref> spq; node * huffman_hidden(string s) { spq pq; vector<int>count(256,0); for(int i = 0; i < s.length(); i++ ) { count[s[i]]++; } for(int i=0; i < 256; i++) { node * n_node = new node; n_node->left = NULL; n_node->right = NULL; n_node->data = (char)i; n_node->freq = count[i]; if( count[i] != 0 ) pq.push(n_node); } while( pq.size() != 1 ) { node * left = pq.top(); pq.pop(); node * right = pq.top(); pq.pop(); node * comb = new node; comb->freq = left->freq + right->freq; comb->data = '\0'; comb->left = left; comb->right = right; pq.push(comb); } return pq.top(); } void print_codes_hidden(node * root, string code, map<char, string>&mp) { if(root == NULL) return; if(root->data != '\0') { mp[root->data] = code; } print_codes_hidden(root->left, code+'0', mp); print_codes_hidden(root->right, code+'1', mp); } /* The structure of the node is typedef struct node { int freq; char data; node * left; node * right; } node; */ void decode_huff(node * root, string s) { int index=0; char ch; node* ptr=root; while(index!=s.size()) { ch=s[index++]; ptr=((ch=='1')?ptr->right:ptr->left); if (ptr->data) { cout << ptr->data; ptr=root; } } } int main() { string s; std::cin >> s; node * tree = huffman_hidden(s); string code = ""; map<char, string>mp; print_codes_hidden(tree, code, mp); string coded; for( int i = 0; i < s.length(); i++ ) { coded += mp[s[i]]; } decode_huff(tree,coded); return 0; }
17.201493
73
0.484599
[ "vector" ]
44de07d3fb5eb09b8b9fe6402cf61ee2002c4f60
1,315
cpp
C++
benchmarks/msteinbeck-tinyspline/examples/cpp/quickstart.cpp
pointhi/benchmarks
68899480c0fc8d361079a81edc6d816d5f17d58e
[ "UPL-1.0" ]
7
2018-12-10T02:41:43.000Z
2020-06-18T06:13:59.000Z
benchmarks/msteinbeck-tinyspline/examples/cpp/quickstart.cpp
pointhi/benchmarks
68899480c0fc8d361079a81edc6d816d5f17d58e
[ "UPL-1.0" ]
23
2018-06-07T07:46:27.000Z
2018-08-06T17:57:39.000Z
benchmarks/msteinbeck-tinyspline/examples/cpp/quickstart.cpp
pointhi/benchmarks
68899480c0fc8d361079a81edc6d816d5f17d58e
[ "UPL-1.0" ]
2
2018-11-27T20:37:34.000Z
2019-04-23T15:38:35.000Z
#include <iostream> #include "tinysplinecpp.h" int main(int argc, char **argv) { // Create a cubic spline with 7 control points in 2D using // a clamped knot vector. This call is equivalent to: // tinyspline::BSpline spline(7, 2, 3, TS_CLAMPED); tinyspline::BSpline spline(7); // Setup control points. std::vector<tinyspline::real> ctrlp = spline.ctrlp(); ctrlp[0] = -1.75; // x0 ctrlp[1] = -1.0; // y0 ctrlp[2] = -1.5; // x1 ctrlp[3] = -0.5; // y1 ctrlp[4] = -1.5; // x2 ctrlp[5] = 0.0; // y2 ctrlp[6] = -1.25; // x3 ctrlp[7] = 0.5; // y3 ctrlp[8] = -0.75; // x4 ctrlp[9] = 0.75; // y4 ctrlp[10] = 0.0; // x5 ctrlp[11] = 0.5; // y5 ctrlp[12] = 0.5; // x6 ctrlp[13] = 0.0; // y6 spline.setCtrlp(ctrlp); // Stores our evaluation results. std::vector<tinyspline::real> result; // Evaluate `spline` at u = 0.4 using 'evaluate'. result = spline.evaluate(0.4).result(); std::cout << "x = " << result[0] << ", y = " << result[1] << std::endl; // Derive `spline` and subdivide it into a sequence of Bezier curves. tinyspline::BSpline beziers = spline.derive().toBeziers(); // Evaluate `beziers` at u = 0.3 using '()' instead of 'evaluate'. result = beziers(0.3).result(); std::cout << "x = " << result[0] << ", y = " << result[1] << std::endl; return 0; }
29.222222
72
0.585551
[ "vector" ]
44deb4a7017f4c070f51c8f3643632cfe78a6c14
1,509
cc
C++
CPP/No368.cc
hxz1998/funny_leetcode
1d2c425af09b57a030fc018ddc1e1a5ffb966cd0
[ "Apache-2.0" ]
null
null
null
CPP/No368.cc
hxz1998/funny_leetcode
1d2c425af09b57a030fc018ddc1e1a5ffb966cd0
[ "Apache-2.0" ]
null
null
null
CPP/No368.cc
hxz1998/funny_leetcode
1d2c425af09b57a030fc018ddc1e1a5ffb966cd0
[ "Apache-2.0" ]
null
null
null
/** * Created by Xiaozhong on 2020/8/31. * Copyright (c) 2020/8/31 Xiaozhong. All rights reserved. */ #include "vector" #include "unordered_map" #include "algorithm" #include "iostream" using namespace std; class Solution { private: unordered_map<int, vector<int>> _eds; vector<int> _nums; // 查找以 i 为结尾的最长子序列 vector<int> eds(int i) { // 如果之前计算过了,那就没必要再计算了 if (_eds.count(i)) return _eds[i]; vector<int> max_subset; // 从 k 到 i 逐个计算最大子序列 for (int k = 0; k < i; ++k) { if (_nums[i] % _nums[k] == 0) { // 如果最大值可以被 k 位置上的数整除,那么就继续下一步 vector<int> subset = eds(k); if (max_subset.size() < subset.size()) max_subset = subset; } } vector<int> entry(max_subset.begin(), max_subset.end()); entry.push_back(_nums[i]); // 添加进来现在的数 _eds[i] = entry; // 建立记忆 return entry; } public: vector<int> largestDivisibleSubset(vector<int> &nums) { int n = nums.size(); if (n == 0) return {}; sort(nums.begin(), nums.end()); this->_nums = nums; vector<int> max_subset; for (int i = 0; i < n; ++i) { vector<int> subset = eds(i); if (max_subset.size() < subset.size()) max_subset = subset; } return max_subset; } }; int main() { Solution s; vector<int> nums = {1, 2, 3}; vector<int> ans = s.largestDivisibleSubset(nums); for (int i : ans) cout << i << " "; }
26.017241
75
0.542744
[ "vector" ]
44dffecc1c27dbb0f1f4b85534f1d44898a87d61
54,121
cpp
C++
cmp_compressonatorlib/bc7/3dquant_vpc.cpp
galek/Compressonator
cb281b97eb05e35ec739a462c71524c4b1eefae3
[ "MIT" ]
622
2016-05-12T17:39:27.000Z
2020-03-09T08:51:41.000Z
cmp_compressonatorlib/bc7/3dquant_vpc.cpp
galek/Compressonator
cb281b97eb05e35ec739a462c71524c4b1eefae3
[ "MIT" ]
110
2020-03-14T15:30:42.000Z
2022-03-31T07:59:29.000Z
cmp_compressonatorlib/bc7/3dquant_vpc.cpp
galek/Compressonator
cb281b97eb05e35ec739a462c71524c4b1eefae3
[ "MIT" ]
105
2016-05-12T18:55:39.000Z
2020-03-04T15:02:01.000Z
//=============================================================================== // Copyright (c) 2007-2016 Advanced Micro Devices, Inc. All rights reserved. // Copyright (c) 2004-2006 ATI Technologies Inc. //=============================================================================== // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions : // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #include <assert.h> #include <math.h> #include <float.h> #include <assert.h> #include "common.h" #include "3dquant_constants.h" #include "3dquant_vpc.h" #include "bc7_definitions.h" #include "debug.h" #include <mutex> #ifdef BC7_DEBUG_TO_RESULTS_TXT FILE *fp; #endif #define EPSILON 0.000001 #define MAX_TRY 20 #undef TRACE #define MAX_TRACE 250000 struct TRACE { int k; double d; }; static int trcnts[MAX_CLUSTERS][MAX_ENTRIES_QUANT_TRACE]; #define USE_TRACE_WITH_DYNAMIC_MEM #ifdef USE_TRACE_WITH_DYNAMIC_MEM int* amd_codes[MAX_CLUSTERS][MAX_ENTRIES_QUANT_TRACE] = {}; TRACE* amd_trs[MAX_CLUSTERS][MAX_ENTRIES_QUANT_TRACE] = {}; #else int amd_codes[MAX_CLUSTERS][MAX_ENTRIES_QUANT_TRACE][MAX_TRACE]; TRACE amd_trs[MAX_CLUSTERS][MAX_ENTRIES_QUANT_TRACE][MAX_TRACE]; #endif static int g_Quant_init = 0; void traceBuilder (int numEntries, int numClusters,struct TRACE tr [], int code[], int *trcnt ); std::mutex mtx; void Quant_Init(void) { if (g_Quant_init > 0) { g_Quant_init++; return; } if (amd_codes[0][0]) return; mtx.lock(); for ( int numClusters = 0; numClusters < MAX_CLUSTERS; numClusters++ ) { for ( int numEntries = 0; numEntries < MAX_ENTRIES_QUANT_TRACE; numEntries++ ) { #ifdef USE_TRACE_WITH_DYNAMIC_MEM amd_codes[ numClusters][ numEntries ] = new int[ MAX_TRACE ]; amd_trs[ numClusters ][ numEntries ] = new TRACE[ MAX_TRACE ]; assert(amd_codes[ numClusters][ numEntries ]); assert(amd_trs[ numClusters ][ numEntries ]); #endif traceBuilder ( numEntries+1, numClusters+1, amd_trs[numClusters][numEntries], amd_codes[numClusters][numEntries], trcnts[numClusters]+(numEntries)); } } init_ramps(); g_Quant_init++; mtx.unlock(); } void Quant_DeInit(void) { g_Quant_init--; if (g_Quant_init > 1) { return; } else { g_Quant_init = 0; // Reset in case user called Quant_DeInit too many times without matching Quant_Init if (amd_codes[0][0] == nullptr) return; #ifdef USE_TRACE_WITH_DYNAMIC_MEM for (int i = 0; i < MAX_CLUSTERS; i++) { for (int j = 0; j < MAX_ENTRIES_QUANT_TRACE; j++) { if (amd_codes[i][j]) { delete[] amd_codes[i][j]; amd_codes[i][j] = nullptr; } if (amd_trs[i][j]) { delete[] amd_trs[i][j]; amd_trs[i][j] = nullptr; } } } #endif } } //========================================================================================= void sugar(void) { #ifdef USE_DBGTRACE DbgTrace(("sugar!")) #endif }; // called many times Optimize this call! inline int a_compare( const void *arg1, const void *arg2 ) { // #ifdef USE_DBGTRACE // DbgTrace(()); // #endif if (((a* )arg1)->d-((a* )arg2)->d > 0 ) return 1; if (((a* )arg1)->d-((a* )arg2)->d < 0 ) return -1; return 0; }; // // We ignore the issue of ordering equal elements here, though it can affect results abit // void sortProjection(double projection[MAX_ENTRIES], int order[MAX_ENTRIES], int numEntries) { int i; a what[MAX_ENTRIES+MAX_PARTITIONS_TABLE]; for (i=0; i < numEntries; i++) what[what[i].i=i].d = projection[i]; qsort((void*)&what, numEntries, sizeof(a),a_compare); for (i=0; i < numEntries; i++) order[i]=what[i].i; }; void covariance(double data[][DIMENSION], int numEntries, double cov[DIMENSION][DIMENSION]) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int i,j,k; for(i=0; i<DIMENSION; i++) for(j=0; j<=i; j++) { cov[i][j]=0; for(k=0; k<numEntries; k++) cov[i][j]+=data[k][i]*data[k][j]; } for(i=0; i<DIMENSION; i++) for(j=i+1; j<DIMENSION; j++) cov[i][j] = cov[j][i]; } void covariance_d(double data[][MAX_DIMENSION_BIG], int numEntries, double cov[MAX_DIMENSION_BIG][MAX_DIMENSION_BIG], int dimension) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int i,j,k; for(i=0; i<dimension; i++) for(j=0; j<=i; j++) { cov[i][j]=0; for(k=0; k<numEntries; k++) cov[i][j]+=data[k][i]*data[k][j]; } for(i=0; i<dimension; i++) for(j=i+1; j<dimension; j++) cov[i][j] = cov[j][i]; } void centerInPlace(double data[][DIMENSION], int numEntries, double mean[DIMENSION]) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int i,k; for(i=0; i<DIMENSION; i++) { mean[i]=0; for(k=0; k<numEntries; k++) mean[i]+=data[k][i]; } if (!numEntries) return; for(i=0; i<DIMENSION; i++) { mean[i]/=(double) numEntries; for(k=0; k<numEntries; k++) data[k][i]-=mean[i]; } } void centerInPlace_d(double data[][MAX_DIMENSION_BIG], int numEntries, double mean[MAX_DIMENSION_BIG], int dimension) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int i,k; for(i=0; i<dimension; i++) { mean[i]=0; for(k=0; k<numEntries; k++) mean[i]+=data[k][i]; } if (!numEntries) return; for(i=0; i<dimension; i++) { mean[i]/=(double) numEntries; for(k=0; k<numEntries; k++) data[k][i]-=mean[i]; } } void project(double data[][DIMENSION], int numEntries, double vector[DIMENSION], double projection[MAX_ENTRIES]) { #ifdef USE_DBGTRACE DbgTrace(()); #endif // assume that vector is normalized already int i,k; for(k=0; k<numEntries; k++) { projection[k]=0; for(i=0; i<DIMENSION; i++) { projection[k]+=data[k][i]*vector[i]; } } } void project_d(double data[][MAX_DIMENSION_BIG], int numEntries, double vector[MAX_DIMENSION_BIG], double projection[MAX_ENTRIES], int dimension) { // assume that vector is normalized already int i,k; for(k=0; k<numEntries; k++) { projection[k]=0; for(i=0; i<dimension; i++) { projection[k]+=data[k][i]*vector[i]; } } } void eigenVector(double cov[DIMENSION][DIMENSION], double vector[DIMENSION]) { #ifdef USE_DBGTRACE DbgTrace(()); #endif // calculate an eigenvecto corresponding to a biggest eigenvalue // will work for non-zero non-negative matricies only #define EV_ITERATION_NUMBER 20 #define EV_SLACK 2 /* additive for exp base 2)*/ int i,j,k,l, m, n,p,q; double c[2][DIMENSION][DIMENSION]; double maxDiag; for(i=0; i<DIMENSION; i++) for(j=0; j<DIMENSION; j++) c[0][i][j] =cov[i][j]; p = (int) floor(log( (DBL_MAX_EXP - EV_SLACK) / ceil (log((double)DIMENSION)/log(2.)) )/log(2.)); assert(p>0); p = p >0 ? p : 1; q = (EV_ITERATION_NUMBER+p-1) / p; l=0; for(n=0; n<q; n++) { maxDiag = 0; for(i=0; i<DIMENSION; i++) maxDiag = c[l][i][i] > maxDiag ? c[l][i][i] : maxDiag; if (maxDiag<=0) { sugar(); return; } assert(maxDiag > 0); for(i=0; i<DIMENSION; i++) for(j=0; j<DIMENSION; j++) c[l][i][j] /=maxDiag; for(m=0; m<p; m++) { for(i=0; i<DIMENSION; i++) for(j=0; j<DIMENSION; j++) { c[1-l][i][j]=0; for(k=0; k<DIMENSION; k++) c[1-l][i][j]+=c[l][i][k]*c[l][k][j]; } l=1-l; } } maxDiag = 0; k =0; for(i=0; i<DIMENSION; i++) { k = c[l][i][i] > maxDiag ? i : k; maxDiag = c[l][i][i] > maxDiag ? c[l][i][i] : maxDiag; } double t; t=0; for(i=0; i<DIMENSION; i++) { t+=c[l][k][i]*c[l][k][i]; vector[i]=c[l][k][i]; } // normalization is really optional t= sqrt(t); assert(t>0); if (t<=0) { sugar(); return; } for(i=0; i<DIMENSION; i++) vector[i]/=t; } void eigenVector_d(double cov[MAX_DIMENSION_BIG][MAX_DIMENSION_BIG], double vector[MAX_DIMENSION_BIG], int dimension) { #ifdef USE_DBGTRACE DbgTrace(()); #endif // calculate an eigenvecto corresponding to a biggest eigenvalue // will work for non-zero non-negative matricies only #define EV_ITERATION_NUMBER 20 #define EV_SLACK 2 /* additive for exp base 2)*/ int i,j,k,l, m, n,p,q; double c[2][MAX_DIMENSION_BIG][MAX_DIMENSION_BIG]; double maxDiag; for(i=0; i<dimension; i++) for(j=0; j<dimension; j++) c[0][i][j] =cov[i][j]; p = (int) floor(log( (DBL_MAX_EXP - EV_SLACK) / ceil (log((double)dimension)/log(2.)) )/log(2.)); assert(p>0); p = p >0 ? p : 1; q = (EV_ITERATION_NUMBER+p-1) / p; l=0; for(n=0; n<q; n++) { maxDiag = 0; for(i=0; i<dimension; i++) maxDiag = c[l][i][i] > maxDiag ? c[l][i][i] : maxDiag; if (maxDiag<=0) { sugar(); return; } assert(maxDiag >0); for(i=0; i<dimension; i++) for(j=0; j<dimension; j++) c[l][i][j] /=maxDiag; for(m=0; m<p; m++) { for(i=0; i<dimension; i++) for(j=0; j<dimension; j++) { double temp=0; for(k=0; k<dimension; k++) { // Notes: // This is the most consuming portion of the code and needs optimizing for perfromance temp += c[l][i][k]*c[l][k][j]; } c[1-l][i][j]=temp; } l=1-l; } } maxDiag = 0; k =0; for(i=0; i<dimension; i++) { k = c[l][i][i] > maxDiag ? i : k; maxDiag = c[l][i][i] > maxDiag ? c[l][i][i] : maxDiag; } double t; t=0; for(i=0; i<dimension; i++) { t+=c[l][k][i]*c[l][k][i]; vector[i]=c[l][k][i]; } // normalization is really optional t= sqrt(t); assert(t>0); if (t<=0) { sugar(); return; } for(i=0; i<dimension; i++) vector[i]/=t; } double partition2(double data[][DIMENSION], int numEntries,int index[]) { #ifdef USE_DBGTRACE DbgTrace(("-> get_partition_subset() is not implemented data is global")); #endif int i,j,k; double cov[2][DIMENSION][DIMENSION]; double center[2][DIMENSION]; double cnt[2] = {0,0}; double vector[2][DIMENSION]; double acc=0; for(k=0; k<numEntries; k++) cnt[index[k]]++; for(i=0; i<DIMENSION; i++) { center[0][i]=center[1][i]=0; for(k=0; k<numEntries; k++) center[index[k]][i]+=data[k][i]; } for(i=0; i<DIMENSION; i++) for(j=0; j<=i; j++) { cov[0][i][j]=cov[1][i][j]=0; for(k=0; k<numEntries; k++) cov[index[k]][i][j]+=data[k][i]*data[k][j]; } for(i=0; i<DIMENSION; i++) for(j=0; j<=i; j++) for (k=0; k<2; k++) if (cnt[k]!=0) cov[k][i][j] -=center[k][i]*center[k][j]/(double)cnt[k]; for(i=0; i<DIMENSION; i++) for(j=i+1; j<DIMENSION; j++) for(k=0; k<2; k++) cov[k][i][j] = cov[k][j][i]; for(k=0; k<2; k++) eigenVector(cov[k], vector[k]); // assume the returned vector is nomalized for(i=0; i<DIMENSION; i++) for(k=0; k<2; k++) acc+=cov[k][i][i]; for(i=0; i<DIMENSION; i++) for(j=0; j<DIMENSION; j++) for(k=0; k<2; k++) acc-=cov[k][i][j]*vector[k][i]*vector[k][j]; return(acc); } void quantEven(double data[MAX_ENTRIES][DIMENSION],int numEntries, int numClusters, int index[MAX_ENTRIES]) { #ifdef USE_DBGTRACE DbgTrace(()); #endif // Data should be centered, otherwise will not work // The running time (number of iteration of the external loop) is // binomial(numEntries+numClusters-2, numClusters-1) // First cluster is always used, (without loss of generality) // Ramp should be shifted such, that the first element ramp[0] is 0 int i,k; int level; double t,s; int c =1; int cluster[MAX_CLUSTERS]; int bestCluster[MAX_CLUSTERS]; // stores the las index for the cluster double dpAcc [MAX_CLUSTERS][DIMENSION]; double index2Acc [MAX_CLUSTERS]; // for backtraking double indexAcc [MAX_CLUSTERS]; double dRamp2[MAX_CLUSTERS]; // first differenses of the (shifted) ramp squared double S; double nErrorNum=0; // not the actual error, but some (decreasing) linear functional of it represented // as numerator and denominator double nErrorDen=1; level=1; bestCluster[0]=cluster[0]=cluster[1]=numEntries; indexAcc[0]=index2Acc[0]=indexAcc[1]=index2Acc[1]=0; for(i=0; i<DIMENSION; i++) dpAcc[0][i]=dpAcc[1][i]=0; S = 1/sqrt((double) numEntries); for(i=1; i<MAX_CLUSTERS; i++) { dRamp2[i] = 2*i-1; } level=1; do { k = --cluster[level-1]; indexAcc [level] += S; index2Acc [level] += dRamp2 [level]; t=0; for(i=0; i<DIMENSION; i++) { // using scaled ramp instead of non-scaled here effectively scales the data, so // the resulting quantisation will be the same, but the error metric value will be different dpAcc [level][i] += data[k][i]; t += dpAcc[level][i] * dpAcc[level][i]; } if ((cluster[level]!= numEntries || cluster[level-1]!=0) && nErrorNum * (s=index2Acc[level]-indexAcc[level] * indexAcc[level]) < nErrorDen * t) { nErrorNum=t; nErrorDen=s; for(i=0; i<=level; i++) bestCluster[i]=cluster[i]; } c++; if (level < numClusters - 1 ) { // go up level++; indexAcc [level]=indexAcc [level-1]; index2Acc[level]=index2Acc[level-1]; for(i=0; i<DIMENSION; i++) dpAcc [level][i]=dpAcc [level-1][i]; } else while ((level-1) && cluster[level-1]==cluster[level-2]) level--; cluster[level]=numEntries; } while (level != 1 || cluster[level-1] != 0); for (level=i=0; i< numEntries; i++) { while (i==bestCluster[level]) level++; index[i]=level; } } void quantLineConstr(double data[][DIMENSION], int order[MAX_ENTRIES],int numEntries, int numClusters, int index[MAX_ENTRIES]) { #ifdef USE_DBGTRACE DbgTrace(()); #endif // Data should be centered, otherwise will not work // The running time (number of iteration of the external loop) is // binomial(numEntries+numClusters-2, numClusters-1) // Index just defines which points should be combined in a cluster int i,j,k; int level; double t,s; // We need paddingof 0 on -1 index int cluster_[MAX_CLUSTERS+1]= {0}; int *cluster = cluster_+1; int bestCluster[MAX_CLUSTERS]; // stores the las index for the cluster double cov[DIMENSION][DIMENSION]; double dir[DIMENSION]; double gcAcc[MAX_CLUSTERS][DIMENSION];// Clusters' graviti centers double gcSAcc[MAX_CLUSTERS][DIMENSION];// Clusters' graviti centers double nError=0; // not the actual error, but some (decreasing) linear functional of it represented // as numerator and denominator level=1; bestCluster[0]=cluster[0]=cluster[1]=numEntries; for(i=0; i<DIMENSION; i++) gcAcc[0][i]=gcAcc[1][i]=0; level=1; do { assert(level >0); k = order[--cluster[level-1]]; s=(cluster[level-1]-cluster[level-2]) == 0 ? 0: 1/sqrt( (double) (cluster[level-1]-cluster[level-2])); // see cluster_ decl for // cluster[-1] value t=1/sqrt((double) (numEntries-cluster[level-1])); for(i=0; i<DIMENSION; i++) { gcAcc[level ][i] += data[k][i]; gcAcc[level-1][i] -= data[k][i]; gcSAcc[level-1][i] = gcAcc[level-1][i] * s; gcSAcc[level ][i] = gcAcc[level ][i] * t; } covariance(gcSAcc, level+1, cov); eigenVector(cov, dir); // assume the vector is normalized here t=0; for(i=0; i<DIMENSION; i++) for(j=0; j<DIMENSION; j++) t+= cov[i][j]*dir[i]*dir[j]; if (t>nError) { nError=t; for(i=0; i<=level; i++) bestCluster[i]=cluster[i]; } if (level < numClusters - 1 ) { // go up level++; for(i=0; i<DIMENSION; i++) gcAcc [level][i]=0; } else while ((level-1) && cluster[level-1]==cluster[level-2]) { level--; for(i=0; i<DIMENSION; i++) gcAcc [level][i]+=gcAcc [level+1][i]; } cluster[level]=numEntries; } while (level != 1 || cluster[level-1] != 1); for (level=i=0; i< numEntries; i++) { while (i==bestCluster[level]) level++; index[order[i]]=level; } } double totalError(double data[MAX_ENTRIES][DIMENSION],double data2[MAX_ENTRIES][DIMENSION],int numEntries) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int i,j; double t=0; for (i=0; i<numEntries; i++) for (j=0; j<DIMENSION; j++) t+= (data[i][j]-data2[i][j])*(data[i][j]-data2[i][j]); return t; }; double totalError_d(double data[MAX_ENTRIES][MAX_DIMENSION_BIG],double data2[MAX_ENTRIES][MAX_DIMENSION_BIG],int numEntries, int dimension) { int i,j; double t=0; for (i=0; i<numEntries; i++) for (j=0; j<dimension; j++) t+= (data[i][j]-data2[i][j])*(data[i][j]-data2[i][j]); #ifdef USE_DBGTRACE DbgTrace(( "[%3.3f]",t)); #endif return t; }; double optQuantEven( double data[MAX_ENTRIES][DIMENSION], int numEntries, int numClusters, int index[MAX_ENTRIES], double out[MAX_ENTRIES][DIMENSION], double direction [DIMENSION],double *step ) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int maxTry=MAX_TRY; int i,j,k; double t,s; double centered[MAX_ENTRIES][DIMENSION]; double ordered[MAX_ENTRIES][DIMENSION]; double mean[DIMENSION]; double cov[DIMENSION][DIMENSION]; double projected[MAX_ENTRIES]; int order[MAX_ENTRIES]; for (i=0; i<numEntries; i++) for (j=0; j<DIMENSION; j++) centered[i][j]=data[i][j]; centerInPlace(centered, numEntries, mean); covariance(centered, numEntries, cov); // check if they all are the same t=0; for (j=0; j<DIMENSION; j++) t+= cov[j][j]; if (t==0 || numEntries==0) { for (i=0; i<numEntries; i++) { index[i]=0; for (j=0; j<DIMENSION; j++) out[i][j]=mean[j]; } return 0.; } eigenVector(cov, direction); project(centered, numEntries, direction, projected); for (i=0; i<maxTry; i++) { if (i) { t=0; for (j=0; j<DIMENSION; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=ordered[k][j]*index[k]; t+=direction[j]*direction[j]; } // Actually we don't need to normailize direction here, as the // optimal quntization (index) is invariant of the scale. // Hence we don't care about possible degenration of the <direction> either // though normally it should not happen // However, the EPSILON should be scaled, otherwise is does not make sense t = sqrt(t)*EPSILON; project(centered, numEntries, direction, projected); for (j=1; j < numEntries; j++) if (projected[order[j]] < projected[order[j-1]]-t /*EPSILON*/) break; if (j >= numEntries) break; } sortProjection(projected, order, numEntries); for (k=0; k<numEntries; k++) for (j=0; j<DIMENSION; j++) ordered[k][j]=centered[order[k]][j]; quantEven(ordered, numEntries, numClusters, index); } s=t=0; double q=0; for (k=0; k<numEntries; k++) { s+= index[k]; t+= index[k]*index[k]; } for (j=0; j<DIMENSION; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=ordered[k][j]*index[k]; q+= direction[j]* direction[j]; } s /= (double) numEntries; t = t - s * s * (double) numEntries; #ifdef USE_DBGTRACE if (t==0) DbgTrace(("l;lkjk")); #endif assert(t !=0); t = (t == 0 ? 0. : 1/t); for (i=0; i<numEntries; i++) for (j=0; j<DIMENSION; j++) out[order[i]][j]=mean[j]+direction[j]*t*(index[i]-s); // normalize direction for output q=sqrt(q); *step=t*q; for (j=0; j<DIMENSION; j++) direction[j]/=q; return totalError(data,out,numEntries); }; int requantize(double data[MAX_ENTRIES][DIMENSION], double centers[MAX_CLUSTERS][DIMENSION], int numEntries, int numClusters,int index[MAX_ENTRIES] ) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int i,j,k; double p,q; int cnt[MAX_CLUSTERS]; int change =0; for (i=0; i<numEntries; i++) { p=0; index[i]=0; for(k=0; k<DIMENSION; k++) p+=(data[i][k]-centers[index[i]][k])*(data[i][k]-centers[index[i]][k]); for(j=0; j<numClusters; j++) { q=0; for(k=0; k<DIMENSION; k++) q+=(data[i][k]-centers[j][k])*(data[i][k]-centers[j][k]); change |= q < p ? (j!= index[i]) : 0; index[i]= q < p ? j : index[i]; p = q < p ? q : p; } } for(j=0; j<numClusters; j++) cnt[j]=0; for(j=0; j<numClusters; j++) for(k=0; k<DIMENSION; k++) centers[j][k]=0; for (i=0; i<numEntries; i++) { cnt[index[i]]++; for(k=0; k<DIMENSION; k++) centers[index[i]][k]+=data[i][k]; } for(j=0; j<numClusters; j++) for(k=0; k<DIMENSION; k++) centers[j][k]/=(double) cnt[j]; return(change); } double optQuantLineConstr( double data[MAX_ENTRIES][DIMENSION], int numEntries, int numClusters, int index[MAX_ENTRIES], double out[MAX_ENTRIES][DIMENSION] ) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int maxTry=MAX_TRY; int i,j,k; double t; double centered[MAX_ENTRIES][DIMENSION]; double mean[DIMENSION]; double cov[DIMENSION][DIMENSION]; double projected[MAX_ENTRIES]; double direction [DIMENSION]; int order[MAX_ENTRIES]; for (i=0; i<numEntries; i++) for (j=0; j<DIMENSION; j++) centered[i][j]=data[i][j]; centerInPlace(centered, numEntries, mean); covariance(centered, numEntries, cov); // check if they all are the same t=0; for (j=0; j<DIMENSION; j++) t+= cov[j][j]; if (t==0 || numEntries==0) { for (i=0; i<numEntries; i++) { index[i]=0; for (j=0; j<DIMENSION; j++) out[i][j]=mean[j]; } return 0.; } eigenVector(cov, direction); project(centered, numEntries, direction, projected); for (i=0; i<maxTry; i++) { if (i) { t=0; for (j=0; j<DIMENSION; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=centered[k][j]*index[k]; t=direction[j]*direction[j]; } // Actually we don't need to normailize direction here, as the // optimal quntization (index) is invariant of the scale. // Hence we don't care about possible degenration of the <direction> either // though normally it should not happen // However, the EPSILON should be scaled, otherwise is does not make sense t = sqrt(t)*EPSILON; project(centered, numEntries, direction, projected); for (j=1; j < numEntries; j++) if (projected[order[j]] < projected[order[j-1]]-t /*EPSILON*/) break; if (j >= numEntries) break; } sortProjection(projected, order, numEntries); quantLineConstr(centered, order, numEntries, numClusters, index); } double gcAcc[MAX_CLUSTERS][DIMENSION]; double gcSAcc[MAX_CLUSTERS][DIMENSION]; double gcS[MAX_CLUSTERS]; for(i=0; i<MAX_CLUSTERS; i++) { gcS[i]=0; for(j=0; j<DIMENSION; j++) gcAcc[i][j]=0; } for (k=0; k<numEntries; k++) { gcS[index[k]]+=1; for (j=0; j<DIMENSION; j++) gcAcc[index[k]][j]+=centered[k][j]; } for(i=0; i<numClusters; i++) for (j=0; j<DIMENSION; j++) if (gcS[i]!=0) { gcSAcc[i][j] = gcAcc[i][j]/sqrt((double)gcS[i]); gcAcc[i][j] /= ((double)gcS[i]); } else gcSAcc[i][j] = 0; covariance(gcSAcc, numClusters, cov); eigenVector(cov, direction); // assume the vector is normalized here for(i=0; i<numClusters; i++) { gcS[i]=0; for (j=0; j<DIMENSION; j++) gcS[i]+=direction[j]*gcAcc[i][j]; } for (i=0; i<numEntries; i++) for (j=0; j<DIMENSION; j++) out[i][j]=mean[j]+direction[j]*gcS[index[i]]; return totalError(data,out,numEntries); }; void quantTrace(double data[MAX_ENTRIES_QUANT_TRACE][DIMENSION],int numEntries, int numClusters, int index[MAX_ENTRIES_QUANT_TRACE]) { // Data should be centered, otherwise will not work int i,j,k; double sdata[2*MAX_ENTRIES][DIMENSION]; double dpAcc [DIMENSION]; double M =0; struct TRACE *tr ; tr=amd_trs[numClusters-1][numEntries-1]; int trcnt =trcnts[numClusters-1][numEntries-1]; int *code; code=amd_codes[numClusters-1][numEntries-1]; for (i=0; i<numEntries; i++) for (j=0; j<DIMENSION; j++) { sdata[2*i][j]= data[i][j]; sdata[2*i+1][j]=-data[i][j]; } for (j=0; j<DIMENSION; j++) dpAcc[j]=0; k=-1; #define UROLL_STEP(i) \ dpAcc[0]+=sdata[tr[i].k][0];\ dpAcc[1]+=sdata[tr[i].k][1];\ dpAcc[2]+=sdata[tr[i].k][2];\ { double c; \ c = (dpAcc[0]*dpAcc[0]+dpAcc[1]*dpAcc[1]+dpAcc[2]*dpAcc[2])*tr[i].d;\ if (c > M) {k=i;M=c;};}; for (i=0; i+15<trcnt; i+=16) { UROLL_STEP(i) UROLL_STEP(i+1) UROLL_STEP(i+2) UROLL_STEP(i+3) UROLL_STEP(i+4) UROLL_STEP(i+5) UROLL_STEP(i+6) UROLL_STEP(i+7) UROLL_STEP(i+8) UROLL_STEP(i+9) UROLL_STEP(i+10) UROLL_STEP(i+11) UROLL_STEP(i+12) UROLL_STEP(i+13) UROLL_STEP(i+14) UROLL_STEP(i+15) } for (; i<trcnt; i++) { UROLL_STEP(i) } if ((k<0)||(k >=MAX_TRACE)) { // NP return; } k = code[k]; i=0; for (j=0; j<numEntries; j++) { while ((k & 1) ==0) { i++; k>>=1; } index[j]=i; k>>=1; } } void quantTrace_d(double data[MAX_ENTRIES_QUANT_TRACE][MAX_DIMENSION_BIG],int numEntries, int numClusters, int index[MAX_ENTRIES_QUANT_TRACE],int dimension) { #ifdef USE_DBGTRACE DbgTrace(()); #endif // Data should be centered, otherwise will not work int i,j,k; double sdata[2*MAX_ENTRIES][MAX_DIMENSION_BIG]; double dpAcc [MAX_DIMENSION_BIG]; double M =0; struct TRACE *tr ; tr=amd_trs[numClusters-1][numEntries-1]; int trcnt =trcnts[numClusters-1][numEntries-1]; int *code; code=amd_codes[numClusters-1][numEntries-1]; for (i=0; i<numEntries; i++) for (j=0; j<dimension; j++) { sdata[2*i][j]= data[i][j]; sdata[2*i+1][j]=-data[i][j]; } for (j=0; j<dimension; j++) dpAcc[j]=0; k=-1; #define UROLL_STEP_1(i) \ dpAcc[0]+=sdata[tr[i].k][0];\ {\ double c; \ c = (dpAcc[0]*dpAcc[0])*tr[i].d;\ if (c > M) {k=i;M=c;};\ }; #define UROLL_STEP_2(i) \ dpAcc[0]+=sdata[tr[i].k][0];\ dpAcc[1]+=sdata[tr[i].k][1];\ { double c; \ c = (dpAcc[0]*dpAcc[0]+dpAcc[1]*dpAcc[1])*tr[i].d;\ if (c > M) {k=i;M=c;};}; #define UROLL_STEP_3(i) \ dpAcc[0]+=sdata[tr[i].k][0];\ dpAcc[1]+=sdata[tr[i].k][1];\ dpAcc[2]+=sdata[tr[i].k][2];\ { double c; \ c = (dpAcc[0]*dpAcc[0]+dpAcc[1]*dpAcc[1]+dpAcc[2]*dpAcc[2])*tr[i].d;\ if (c > M) {k=i;M=c;};}; #define UROLL_STEP_4(i) \ dpAcc[0]+=sdata[tr[i].k][0];\ dpAcc[1]+=sdata[tr[i].k][1];\ dpAcc[2]+=sdata[tr[i].k][2];\ dpAcc[3]+=sdata[tr[i].k][3];\ { double c; \ c = (dpAcc[0]*dpAcc[0]+dpAcc[1]*dpAcc[1]+dpAcc[2]*dpAcc[2]+dpAcc[3]*dpAcc[3])*tr[i].d;\ if (c > M) {k=i;M=c;};}; #undef UROLL_STEP #define UROLL_MACRO(UROLL_STEP){\ \ \ for (i=0;i+15<trcnt;i+=16)\ {\ UROLL_STEP(i)\ UROLL_STEP(i+1)\ UROLL_STEP(i+2)\ UROLL_STEP(i+3)\ UROLL_STEP(i+4)\ UROLL_STEP(i+5)\ UROLL_STEP(i+6)\ UROLL_STEP(i+7)\ UROLL_STEP(i+8)\ UROLL_STEP(i+9)\ UROLL_STEP(i+10)\ UROLL_STEP(i+11)\ UROLL_STEP(i+12)\ UROLL_STEP(i+13)\ UROLL_STEP(i+14)\ UROLL_STEP(i+15)\ }\ \ for (;i<trcnt;i++) {\ UROLL_STEP(i)\ }}; switch(dimension) { case 1: UROLL_MACRO(UROLL_STEP_1); break; case 2: UROLL_MACRO(UROLL_STEP_2); break; case 3: UROLL_MACRO(UROLL_STEP_3); break; case 4: UROLL_MACRO(UROLL_STEP_4); break; default: return; break; } if (k<0) { #ifdef USE_DBGTRACE DbgTrace(("ERROR: quatnTrace\n")); #endif return; } k = code[k]; i=0; for (j=0; j<numEntries; j++) { while ((k & 1) ==0) { i++; k>>=1; } index[j]=i; k>>=1; } } void quant_AnD_Shell(double* v_, int k, int n, int *idx) { // input: // // v_ points, might be uncentered // k - number of points in the ramp // n - number of points in v_ // // output: // // index, uncentered, in the range 0..k-1 // #define MAX_BLOCK MAX_ENTRIES int i,j; double v[MAX_BLOCK]; double z[MAX_BLOCK]; a d[MAX_BLOCK]; double l; double mm; double r=0; int mi; assert((v_ != NULL) && (n>1) && (k>1)); double m, M, s, dm=0.; m=M=v_[0]; for (i=1; i < n; i++) { m = m < v_[i] ? m : v_[i]; M = M > v_[i] ? M : v_[i]; } if (M==m) { for (i=0; i < n; i++) idx[i]=0; return; } assert(M-m >0); s = (k-1)/(M-m); for (i=0; i < n; i++) { v[i] = v_[i]*s; idx[i]=(int)(z[i] = floor(v[i] +0.5 /* stabilizer*/ - m *s)); d[i].d = v[i]-z[i]- m *s; d[i].i = i; dm+= d[i].d; r += d[i].d*d[i].d; } if (n*r- dm*dm >= (double)(n-1)/4 /*slack*/ /2) { dm /= (double)n; for (i=0; i < n; i++) d[i].d -= dm; qsort((void*)&d, n, sizeof(a),a_compare); // got into fundamental simplex // move coordinate system origin to its center for (i=0; i < n; i++) d[i].d -= (2.*(double)i+1-(double)n)/2./(double)n; mm=l=0.; j=-1; for (i=0; i < n; i++) { l+=d[i].d; if (l < mm) { mm =l; j=i; } } // position which should be in 0 j = ++j % n; for (i=j; i < n; i++) idx[d[i].i]++; } // get rid of an offset in idx mi=idx[0]; for (i=1; i < n; i++) mi = mi < idx[i]? mi :idx[i]; for (i=0; i < n; i++) idx[i]-=mi; } double optQuantTrace( double data[MAX_ENTRIES][DIMENSION], int numEntries, int numClusters, int index_[MAX_ENTRIES], double out[MAX_ENTRIES][DIMENSION], double direction [DIMENSION],double *step ) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int index[MAX_ENTRIES]; int maxTry=MAX_TRY; int i,j,k; double t,s; double centered[MAX_ENTRIES][DIMENSION]; double ordered[MAX_ENTRIES][DIMENSION]; double mean[DIMENSION]; double cov[DIMENSION][DIMENSION]; double projected[MAX_ENTRIES]; int order[MAX_ENTRIES]; for (i=0; i<numEntries; i++) for (j=0; j<DIMENSION; j++) centered[i][j]=data[i][j]; centerInPlace(centered, numEntries, mean); covariance(centered, numEntries, cov); // check if they all are the same t=0; for (j=0; j<DIMENSION; j++) t+= cov[j][j]; if (t==0 || numEntries==0) { for (i=0; i<numEntries; i++) { index_[i]=0; for (j=0; j<DIMENSION; j++) out[i][j]=mean[j]; } return 0.; } eigenVector(cov, direction); project(centered, numEntries, direction, projected); for (i=0; i<maxTry; i++) { if (i) { t=0; for (j=0; j<DIMENSION; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=ordered[k][j]*index[k]; t+=direction[j]*direction[j]; } // Actually we don't need to normailize direction here, as the // optimal quntization (index) is invariant of the scale. // Hence we don't care about possible degenration of the <direction> either // though normally it should not happen // However, the EPSILON should be scaled, otherwise is does not make sense t = sqrt(t)*EPSILON; project(centered, numEntries, direction, projected); for (j=1; j < numEntries; j++) if (projected[order[j]] < projected[order[j-1]]-t /*EPSILON*/) break; if (j >= numEntries) break; } sortProjection(projected, order, numEntries); for (k=0; k<numEntries; k++) for (j=0; j<DIMENSION; j++) ordered[k][j]=centered[order[k]][j]; quantTrace(ordered, numEntries, numClusters, index); } s=t=0; double q=0; for (k=0; k<numEntries; k++) { s+= index[k]; t+= index[k]*index[k]; } for (j=0; j<DIMENSION; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=ordered[k][j]*index[k]; q+= direction[j]* direction[j]; } s /= (double) numEntries; t = t - s * s * (double) numEntries; #ifdef USE_DBGTRACE if (t==0) DbgTrace(("l;lkjk")); #endif assert(t !=0); t = (t == 0 ? 0. : 1/t); for (i=0; i<numEntries; i++) { for (j=0; j<DIMENSION; j++) out[order[i]][j]=mean[j]+direction[j]*t*(index[i]-s); index_[order[i]]=index[i]; } // normalize direction for output q=sqrt(q); *step=t*q; for (j=0; j<DIMENSION; j++) direction[j]/=q; return totalError(data,out,numEntries); } double optQuantTrace_d( double data[MAX_ENTRIES][MAX_DIMENSION_BIG], int numEntries, int numClusters, int index_[MAX_ENTRIES], double out[MAX_ENTRIES][MAX_DIMENSION_BIG], double direction [MAX_DIMENSION_BIG],double *step, int dimension ) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int index[MAX_ENTRIES]; int maxTry=MAX_TRY; int i,j,k; double t,s; double centered[MAX_ENTRIES][MAX_DIMENSION_BIG]; double ordered[MAX_ENTRIES][MAX_DIMENSION_BIG]; double mean[MAX_DIMENSION_BIG]; double cov[DIMENSION][MAX_DIMENSION_BIG]; double projected[MAX_ENTRIES]; int order[MAX_ENTRIES]; for (i=0; i<numEntries; i++) for (j=0; j<dimension; j++) centered[i][j]=data[i][j]; centerInPlace_d(centered, numEntries, mean, dimension); covariance_d(centered, numEntries, cov, dimension); // check if they all are the same t=0; for (j=0; j<dimension; j++) t+= cov[j][j]; if (t<EPSILON || numEntries==0) { for (i=0; i<numEntries; i++) { index_[i]=0; for (j=0; j<dimension; j++) out[i][j]=mean[j]; } return 0.; } eigenVector_d(cov, direction, dimension); project_d(centered, numEntries, direction, projected, dimension); for (i=0; i<maxTry; i++) { if (i) { t=0; for (j=0; j<dimension; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=ordered[k][j]*index[k]; t+=direction[j]*direction[j]; } // Actually we don't need to normailize direction here, as the // optimal quntization (index) is invariant of the scale. // Hence we don't care about possible degenration of the <direction> either // though normally it should not happen // However, the EPSILON should be scaled, otherwise is does not make sense t = sqrt(t)*EPSILON; project_d(centered, numEntries, direction, projected, dimension); for (j=1; j < numEntries; j++) if (projected[order[j]] < projected[order[j-1]]-t /*EPSILON*/) break; if (j >= numEntries) break; } sortProjection(projected, order, numEntries); for (k=0; k<numEntries; k++) for (j=0; j<dimension; j++) ordered[k][j]=centered[order[k]][j]; quantTrace_d(ordered, numEntries, numClusters, index, dimension); } s=t=0; double q=0; for (k=0; k<numEntries; k++) { s+= index[k]; t+= index[k]*index[k]; } for (j=0; j<dimension; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=ordered[k][j]*index[k]; q+= direction[j]* direction[j]; } s /= (double) numEntries; t = t - s * s * (double) numEntries; assert(t !=0); t = (t == 0 ? 0. : 1/t); for (i=0; i<numEntries; i++) { for (j=0; j<dimension; j++) out[order[i]][j]=mean[j]+direction[j]*t*(index[i]-s); index_[order[i]]=index[i]; } // normalize direction for output q=sqrt(q); *step=t*q; for (j=0; j<dimension; j++) direction[j]/=q; return totalError_d(data,out,numEntries, dimension); } void traceBuilder (int numEntries, int numClusters,struct TRACE tr [], int code[], int *trcnt ) { //================= #define DIG(J_IN,I,N,J_OUT,DIR,NC,NCC) \ for (I=J_IN;I<N || NC < NCC ;I++) { \ J_OUT = ((((J_IN) & 0x1)==DIR) ? I : N-1-(I-(J_IN))); \ //================= int i[7]; int j[7]; int k[7]= {0,1,2,3,4,5,6}; int n; int c =0; int c0 =0; int p; int h[8]= {0,0,0,0, 0,0,0,0}; if (numClusters == 1) { tr[c].k=0; tr[c].d=0; code[c]=0; *trcnt=0; return; } h[numClusters-1]=numEntries; int q = numEntries*(numClusters-1); int q2 = numEntries*(numClusters-1)*(numClusters-1); n = numEntries + numClusters -2; // higest delimiter postion; all points start in highest cluster int cd = -(1<< (numClusters-1)); DIG( 0,i[0],n,j[0],0,numClusters,2) DIG(j[0]+1,i[1],n,j[1],1,numClusters,3) DIG(j[1]+1,i[2],n,j[2],0,numClusters,4) DIG(j[2]+1,i[3],n,j[3],1,numClusters,5) DIG(j[3]+1,i[4],n,j[4],0,numClusters,6) DIG(j[4]+1,i[5],n,j[5],1,numClusters,7) DIG(j[5]+1,i[6],n,j[6],0,numClusters,8) int rescan; do { rescan=0; for (p=0; p<numClusters-1; p++) { if (abs(j[p]-k[p]) >1 ) { #ifdef USE_DBGTRACE DbgTrace(("Driving trace generation error")); for (p=0; p<numClusters-1; p++) DbgTrace(("%d %d %d",k[p],j[p],n)); #endif return; } else if (j[p]-k[p]== 1 ) { int ci= k[p]-p; // move it one cluster down "-" int cn=p+1; h[cn]--; h[cn-1]++; if (h[cn] < 0 || h[cn-1]>= numEntries) { rescan =1; h[cn]++; h[cn-1]--; } else { q2+= -2*cn+1; q--; { int i1,cc=0; for(i1=0; i1<numClusters; i1++) cc += i1*i1*h[i1]; #ifdef USE_DBGTRACE if (cc !=q2) DbgTrace(("1 - q2 %d %d", cc,q2)); #endif }; #ifdef USE_DBGTRACE if (ci <0 || ci>=numEntries || cn <1 || cn >= numClusters || h[cn] < 0 || h[cn-1]>= numEntries) DbgTrace(("tre1 %d %d %d %d %d %d",ci,cn,numEntries,numClusters,h[cn],h[cn-1])); #endif cd |= (1<<k[p]); cd &= ~(1<<j[p]); if (c < MAX_TRACE) { // NP tr[c].k=2*ci+1; tr[c].d=1./((double) q2 - (double) q*(double) q /(double) (numEntries)); code[c]=cd; c++; } else { // What to do here? tr[c].k=0; tr[c].d=0; code[c]=0; *trcnt=0; return; } k[p]=j[p]; } } else if (j[p]-k[p]==-1 ) { int ci=j[p]-p; // move it up int cn =p; h[cn]--; h[cn+1]++; if (h[cn] < 0 || h[cn+1]>= numEntries) { rescan =1; h[cn]++; h[cn+1]--; } else { q2+= 2*cn+1; q++; { int i1,cc=0; for(i1=0; i1<numClusters; i1++) cc += i1*i1*h[i1]; #ifdef USE_DBGTRACE if (cc !=q2) DbgTrace(("2- q2 %d %d", cc,q2)); #endif }; #ifdef USE_DBGTRACE if (ci <0 || ci>=numEntries || cn >= numClusters-1 || h[cn] < 0 || h[cn+1]>= numEntries) DbgTrace(("tre2 %d %d %d %d %d %d",ci,cn,numEntries,numClusters,h[cn],h[cn+1])); #endif cd |= (1<<k[p]); cd &= ~(1<<j[p]); if (c < MAX_TRACE) { // NP tr[c].k=2*ci; tr[c].d=1./((double) q2 - (double) q*(double) q /(double) (numEntries)); code[c]=cd; c++; } else { // What to do here? tr[c].k=0; tr[c].d=0; code[c]=0; *trcnt=0; return; } k[p]=j[p]; } } } } while (rescan); c0++; if (numClusters < 8) break; } if (numClusters < 7) break; } if (numClusters < 6) break; } if (numClusters < 5) break; } if (numClusters < 4) break; } if (numClusters < 3) break; } if (numClusters < 2) break; } *trcnt=c; } double optQuantAnD( double data[MAX_ENTRIES][DIMENSION], int numEntries, int numClusters, int index[MAX_ENTRIES], double out[MAX_ENTRIES][DIMENSION], double direction [DIMENSION],double *step ) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int index_[MAX_ENTRIES]; int maxTry=MAX_TRY*10; int try_two=50; int i,j,k; double t,s; double centered[MAX_ENTRIES][DIMENSION]; double mean[DIMENSION]; double cov[DIMENSION][DIMENSION]; double projected[MAX_ENTRIES]; int order_[MAX_ENTRIES]; for (i=0; i<numEntries; i++) for (j=0; j<DIMENSION; j++) centered[i][j]=data[i][j]; centerInPlace(centered, numEntries, mean); covariance(centered, numEntries, cov); // check if they all are the same t=0; for (j=0; j<DIMENSION; j++) t+= cov[j][j]; if (t==0 || numEntries==0) { for (i=0; i<numEntries; i++) { index[i]=0; for (j=0; j<DIMENSION; j++) out[i][j]=mean[j]; } return 0.; } eigenVector(cov, direction); project(centered, numEntries, direction, projected); int quant_AnD_Shell_Calls = 0; for (i=0; i<maxTry; i++) { int done =0; if (i) { do { double q; q=s=t=0; for (k=0; k<numEntries; k++) { s+= index[k]; t+= index[k]*index[k]; } for (j=0; j<DIMENSION; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=centered[k][j]*index[k]; q+= direction[j]* direction[j]; } s /= (double) numEntries; t = t - s * s * (double) numEntries; assert(t !=0); t = (t == 0 ? 0. : 1/t); // We need to requantize q = sqrt(q); t *=q; if (q !=0) for (j=0; j<DIMENSION; j++) direction[j]/=q; // direction normalized project(centered, numEntries, direction, projected); sortProjection(projected, order_, numEntries); int index__[MAX_ENTRIES]; // it's projected and centered; cluster centers are (index[i]-s)*t (*dir) k=0; for (j=0; j < numEntries; j++) { while (projected[order_[j]] > (k+0.5 -s)*t && k < numClusters-1) k++; index__[order_[j]]=k; } done =1; for (j=0; j < numEntries; j++) { done = (done && (index__[j]==index[j])); index[j]=index__[j]; } } while (! done && try_two--); if (i==1) for (j=0; j < numEntries; j++) index_[j]=index[j]; else { done =1; for (j=0; j < numEntries; j++) { done = (done && (index_[j]==index[j])); index_[j]=index_[j]; } if (done) break; } } quant_AnD_Shell_Calls++; quant_AnD_Shell(projected, numClusters,numEntries, index); } #ifdef USE_DBGTRACE DbgTrace(("->quant_AnD_Shell [%2d]",quant_AnD_Shell_Calls)); #endif s=t=0; double q=0; for (k=0; k<numEntries; k++) { s+= index[k]; t+= index[k]*index[k]; } for (j=0; j<DIMENSION; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=centered[k][j]*index[k]; q+= direction[j]* direction[j]; } s /= (double) numEntries; t = t - s * s * (double) numEntries; #ifdef USE_DBGTRACE if (t==0) DbgTrace(("l;lkjk")); #endif assert(t !=0); t = (t == 0 ? 0. : 1/t); for (i=0; i<numEntries; i++) for (j=0; j<DIMENSION; j++) out[i][j]=mean[j]+direction[j]*t*(index[i]-s); // normalize direction for output q=sqrt(q); *step=t*q; for (j=0; j<DIMENSION; j++) direction[j]/=q; return totalError(data,out,numEntries); } double optQuantAnD_d( double data[MAX_ENTRIES][MAX_DIMENSION_BIG], int numEntries, int numClusters, int index[MAX_ENTRIES], double out[MAX_ENTRIES][MAX_DIMENSION_BIG], double direction [MAX_DIMENSION_BIG],double *step, int dimension ) { #ifdef USE_DBGTRACE DbgTrace(()); #endif int index_[MAX_ENTRIES]; int maxTry=MAX_TRY*10; int try_two=50; int i,j,k; double t,s; double centered[MAX_ENTRIES][MAX_DIMENSION_BIG]; double mean[MAX_DIMENSION_BIG]; double cov[MAX_DIMENSION_BIG][MAX_DIMENSION_BIG]; double projected[MAX_ENTRIES]; int order_[MAX_ENTRIES]; for (i=0; i<numEntries; i++) for (j=0; j<dimension; j++) centered[i][j]=data[i][j]; centerInPlace_d(centered, numEntries, mean, dimension); covariance_d(centered, numEntries, cov, dimension); // check if they all are the same t=0; for (j=0; j<dimension; j++) t+= cov[j][j]; if (t<(1./256.) || numEntries==0) { for (i=0; i<numEntries; i++) { index[i]=0; for (j=0; j<dimension; j++) out[i][j]=mean[j]; } return 0.; } eigenVector_d(cov, direction, dimension); project_d(centered, numEntries, direction, projected, dimension); int quant_AnD_Shell_Calls = 0; for (i=0; i<maxTry; i++) { int done =0; if (i) { do { double q; q=s=t=0; for (k=0; k<numEntries; k++) { s+= index[k]; t+= index[k]*index[k]; } for (j=0; j<dimension; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=centered[k][j]*index[k]; q+= direction[j]* direction[j]; } s /= (double) numEntries; t = t - s * s * (double) numEntries; assert(t !=0); t = (t == 0 ? 0. : 1/t); // We need to requantize q = sqrt(q); t *=q; if (q !=0) for (j=0; j<dimension; j++) direction[j]/=q; // direction normalized project_d(centered, numEntries, direction, projected, dimension); sortProjection(projected, order_, numEntries); int index__[MAX_ENTRIES]; // it's projected and centered; cluster centers are (index[i]-s)*t (*dir) k=0; for (j=0; j < numEntries; j++) { while (projected[order_[j]] > (k+0.5 -s)*t && k < numClusters-1) k++; index__[order_[j]]=k; } done =1; for (j=0; j < numEntries; j++) { done = (done && (index__[j]==index[j])); index[j]=index__[j]; } } while (! done && try_two--); if (i==1) for (j=0; j < numEntries; j++) index_[j]=index[j]; else { done =1; for (j=0; j < numEntries; j++) { done = (done && (index_[j]==index[j])); index_[j]=index_[j]; } if (done) break; } } quant_AnD_Shell_Calls++; quant_AnD_Shell(projected, numClusters,numEntries, index); } #ifdef USE_DBGTRACE DbgTrace(("->quant_AnD_Shell [%2d]",quant_AnD_Shell_Calls)); #endif s=t=0; double q=0; for (k=0; k<numEntries; k++) { s+= index[k]; t+= index[k]*index[k]; } for (j=0; j<dimension; j++) { direction[j]=0; for (k=0; k<numEntries; k++) direction[j]+=centered[k][j]*index[k]; q+= direction[j]* direction[j]; } s /= (double) numEntries; t = t - s * s * (double) numEntries; assert(t !=0); t = (t == 0 ? 0. : 1/t); for (i=0; i<numEntries; i++) for (j=0; j<dimension; j++) out[i][j]=mean[j]+direction[j]*t*(index[i]-s); // normalize direction for output q=sqrt(q); *step=t*q; for (j=0; j<dimension; j++) direction[j]/=q; return totalError_d(data,out,numEntries, dimension); }
25.432801
158
0.496221
[ "vector" ]
44e67bfddc60de5664c21a3a2578607f40113477
9,733
cpp
C++
opengl/morphing/main.cpp
proydakov/cppzone
2cee5523df8fadbd087746c16bbf386360c8114a
[ "MIT" ]
4
2015-02-16T12:34:13.000Z
2016-12-14T20:12:17.000Z
opengl/morphing/main.cpp
proydakov/cpplabs
8f958e00a3bd3f9594a57b39c02fbf964749f2a3
[ "MIT" ]
null
null
null
opengl/morphing/main.cpp
proydakov/cpplabs
8f958e00a3bd3f9594a57b39c02fbf964749f2a3
[ "MIT" ]
3
2015-07-17T09:25:07.000Z
2018-08-08T13:56:33.000Z
/* * Copyright (c) 2020 Evgeny Proydakov <lord.tiran@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include <ctime> #include <cmath> #include <string> #include <cassert> #include <iostream> #include <opengl_sdk/application.h> #include <cube.h> #include <torus.h> #include <lines.h> #include <chaos.h> #include <spiral.h> #include <sphere.h> #include <paraboloid.h> class tcapplication : public application { public: tcapplication(int argc, char* argv[], std::size_t w, std::size_t h); void init() override; void resize(std::size_t w, std::size_t h) override; void update(std::chrono::microseconds delta) override; void draw() override; void info(std::ostream&) override; void on_event(SDL_Event const&) override; private: const std::string COMMENT = "Keys 'w', 's', 'd', 'a' to rotate the object.\n\ Keys '1 ', '2', '3', '4', '5', '6', '7' are used to select the type of object.\n\ Key 't' is used to select the type of morphing.\n\ Press ESC for exit."; const float MORPHING_STEPS = 150; bool g_morphing = false; const GLfloat MAX_POINT_DELTA = 0.01f; const GLfloat SPEED_DELTA = 0.05f; typedef object< point3d<GLfloat>, color_rgba<GLdouble> > scene_object; const unsigned OBJECT_SPHERE = 0; const unsigned OBJECT_TORUS = 1; const unsigned OBJECT_LINES = 2; const unsigned OBJECT_CUBE = 3; const unsigned OBJECT_SPIRAL = 4; const unsigned OBJECT_PARABOLOID = 5; const unsigned OBJECT_CHAOS = 6; unsigned g_object_index = OBJECT_SPHERE; scene_object g_object_sphere; scene_object g_object_torus; scene_object g_object_lines; scene_object g_object_cube; scene_object g_object_spiral; scene_object g_object_paraboloid; scene_object g_object_chaos; scene_object g_object; scene_object g_object_last; std::vector<scene_object> g_objects; GLfloat g_move_delta = 0; GLfloat g_ySpeed = 0; GLfloat g_zSpeed = 0.2f; GLfloat g_yRotation = 0; GLfloat g_zRotation = 0; }; tcapplication::tcapplication(int argc, char* argv[], std::size_t w, std::size_t h) : application(argc, argv, w, h) { } void tcapplication::init() { glClearColor(0.0, 0.0, 0.0, 0.0); glShadeModel(GL_SMOOTH); glDepthFunc(GL_LESS); glEnable(GL_DEPTH_TEST); glBlendFunc(GL_SRC_ALPHA, GL_ONE); glEnable(GL_BLEND); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glPointSize(1.7f); srand((unsigned)time(NULL)); unsigned size = 1600; scene_object::color_type color(0.1, 0.5, 1.0, 1.0); generate_sphere(g_object_sphere, color, 0.5f, size); generate_torus(g_object_torus, color, 0.5f, 0.1f, size); generate_cube(g_object_cube, color, 1.0f, size); generate_lines(g_object_lines, color, 0.5f, size); generate_spiral(g_object_spiral, color, 0.5f, size); generate_paraboloid(g_object_paraboloid, color, 0.5f, size); generate_chaos(g_object_chaos, color, 0.5f, size); g_objects.push_back(g_object_sphere); g_objects.push_back(g_object_torus); g_objects.push_back(g_object_lines); g_objects.push_back(g_object_cube); g_objects.push_back(g_object_spiral); g_objects.push_back(g_object_paraboloid); g_objects.push_back(g_object_chaos); g_object = g_objects[g_object_index]; std::clog << "Number of points in the object : " << g_object.points.size() << std::endl; g_move_delta = 1.0f / MORPHING_STEPS; } void tcapplication::resize(std::size_t w, std::size_t h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(40.0, (GLdouble) w / (GLdouble) h, 1.0, 20.0); } void tcapplication::update(std::chrono::microseconds) { auto calc_next_position = [this](scene_object::point_type& src, const scene_object::point_type& end) { GLfloat deltaX = g_move_delta; GLfloat deltaY = g_move_delta; GLfloat deltaZ = g_move_delta; if(src.m_x < end.m_x) src.m_x += deltaX; else src.m_x -= deltaX; if(src.m_y < end.m_y) src.m_y += deltaY; else src.m_y -= deltaY; if(src.m_z < end.m_z) src.m_z += deltaZ; else src.m_z -= deltaZ; }; bool transform = false; for(size_t i = 0; i < g_object.points.size(); ++i) { if(!g_object.points[i].m_point.compare(g_objects[g_object_index].points[i].m_point, g_move_delta * 11 / 10)) { calc_next_position(g_object.points[i].m_point, g_objects[g_object_index].points[i].m_point); transform = true; } } g_morphing = transform; if(transform) { g_object_last = g_object; } g_yRotation += g_ySpeed; g_zRotation += g_zSpeed; } void tcapplication::info(std::ostream& os) { os << COMMENT; } void tcapplication::draw() { auto drawImpl = [this](scene_object& object, scene_object::color_type morphing_color) { glBegin(GL_POINTS); { for(size_t i = 0; i < object.points.size(); ++i) { scene_object::vertex data = object.points[i]; GLfloat x = data.m_point.m_x + MAX_POINT_DELTA / GLfloat(rand() % 10) - MAX_POINT_DELTA / 2; GLfloat y = data.m_point.m_y + MAX_POINT_DELTA / GLfloat(rand() % 10) - MAX_POINT_DELTA / 2; GLfloat z = data.m_point.m_z + MAX_POINT_DELTA / GLfloat(rand() % 10) - MAX_POINT_DELTA / 2; if(!g_morphing) { glColor4d(data.m_color.m_red, data.m_color.m_green, data.m_color.m_blue, data.m_color.m_alpha); } else { glColor4d(morphing_color.m_red, morphing_color.m_green, morphing_color.m_blue, morphing_color.m_alpha); } glVertex3f(x, y, z); } } glEnd(); }; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glRotatef(g_yRotation, 0.0, 1.0, 0.0); glRotatef(g_zRotation, 0.0, 0.0, 1.0); scene_object::color_type morphing_color(0.0, 0.8, 1.0, 1.0); scene_object::color_type morphing_color_last = morphing_color; morphing_color_last.m_alpha = morphing_color_last.m_alpha * 7 / 10; drawImpl(g_object, morphing_color); if(g_morphing) { drawImpl(g_object_last, morphing_color_last); } glPopMatrix(); glLoadIdentity(); gluLookAt(1.7, 1.5, 1.5, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0); } void tcapplication::on_event(SDL_Event const& e) { auto copy_color = [](scene_object& dst, const scene_object& src) { assert(dst.points.size() == src.points.size()); for(size_t i = 0; i < dst.points.size(); ++i) { dst.points[i].m_color = src.points[i].m_color; } }; switch (e.type) { case SDL_KEYDOWN: case SDL_KEYUP: switch (e.key.keysym.sym) { case '1': g_object_index = OBJECT_SPHERE; copy_color(g_object, g_object_sphere); break; case '2': g_object_index = OBJECT_TORUS; copy_color(g_object, g_object_torus); break; case '3': g_object_index = OBJECT_LINES; copy_color(g_object, g_object_lines); break; case '4': g_object_index = OBJECT_CUBE; copy_color(g_object, g_object_cube); break; case '5': g_object_index = OBJECT_SPIRAL; copy_color(g_object, g_object_spiral); break; case '6': g_object_index = OBJECT_PARABOLOID; copy_color(g_object, g_object_paraboloid); break; case '7': g_object_index = OBJECT_CHAOS; copy_color(g_object, g_object_chaos); break; case 'A': case 'a': g_zSpeed -=SPEED_DELTA; break; case 'D': case 'd': g_zSpeed += SPEED_DELTA; break; case 'W': case 'w': g_ySpeed -= SPEED_DELTA; break; case 'S': case 's': g_ySpeed += SPEED_DELTA; break; default: break; } } } int main( int argc, char* argv[] ) { tcapplication app(argc, argv, 640, 480); return app.run(); }
29.316265
123
0.613891
[ "object", "vector", "transform" ]
44e6a0ce60ca6b2f494f8ea7ca2d3c1ebbb42b2c
708
cpp
C++
leetcode.com/0811 Subdomain Visit Count/main.cpp
sky-bro/AC
29bfa3f13994612887e18065fa6e854b9a29633d
[ "MIT" ]
1
2020-08-20T11:02:49.000Z
2020-08-20T11:02:49.000Z
leetcode.com/0811 Subdomain Visit Count/main.cpp
sky-bro/AC
29bfa3f13994612887e18065fa6e854b9a29633d
[ "MIT" ]
null
null
null
leetcode.com/0811 Subdomain Visit Count/main.cpp
sky-bro/AC
29bfa3f13994612887e18065fa6e854b9a29633d
[ "MIT" ]
1
2022-01-01T23:23:13.000Z
2022-01-01T23:23:13.000Z
#include <iostream> #include <sstream> #include <unordered_map> #include <vector> using namespace std; class Solution { private: unordered_map<string, int> mp; public: vector<string> subdomainVisits(vector<string>& cpdomains) { mp.clear(); for (string d : cpdomains) { istringstream ISS(d); int cnt; ISS >> cnt; ISS >> d; mp[d] += cnt; int n = d.size(), i = 0; while (1) { while (i < n && d[i] != '.') ++i; if (++i > n) break; string td = d.substr(i); mp[td] += cnt; } } vector<string> res; for (auto& p : mp) { res.push_back(to_string(p.second) + " " + p.first); } return res; } };
19.666667
61
0.521186
[ "vector" ]
44eb4a1947df2de2a6c97d244ccac39da06c99fc
2,156
cpp
C++
src/services/trace/TraceBufferChunk.cpp
scalability-llnl/Caliper
3fd9a8c1d2b46db6850cc495060c9f2f6c5e59f0
[ "BSD-3-Clause" ]
4
2015-11-11T17:39:03.000Z
2015-12-08T18:13:14.000Z
src/services/trace/TraceBufferChunk.cpp
scalability-llnl/Caliper
3fd9a8c1d2b46db6850cc495060c9f2f6c5e59f0
[ "BSD-3-Clause" ]
null
null
null
src/services/trace/TraceBufferChunk.cpp
scalability-llnl/Caliper
3fd9a8c1d2b46db6850cc495060c9f2f6c5e59f0
[ "BSD-3-Clause" ]
null
null
null
// Copyright (c) 2015-2022, Lawrence Livermore National Security, LLC. // See top-level LICENSE file for details. #include "TraceBufferChunk.h" #include "caliper/Caliper.h" #include "caliper/common/Log.h" #include "caliper/common/Node.h" #include "caliper/common/RuntimeConfig.h" #include "caliper/common/c-util/vlenc.h" using namespace trace; using namespace cali; TraceBufferChunk::~TraceBufferChunk() { delete[] m_data; if (m_next) delete m_next; } void TraceBufferChunk::append(TraceBufferChunk* chunk) { if (m_next) m_next->append(chunk); else m_next = chunk; } void TraceBufferChunk::reset() { m_pos = 0; m_nrec = 0; memset(m_data, 0, m_size); delete m_next; m_next = 0; } size_t TraceBufferChunk::flush(Caliper* c, SnapshotFlushFn proc_fn) { size_t written = 0; // // local flush // size_t p = 0; for (size_t r = 0; r < m_nrec; ++r) { // decode snapshot record std::vector<Entry> rec; uint64_t n = vldec_u64(m_data + p, &p); rec.reserve(n); while (n-- > 0) rec.push_back(Entry::unpack(*c, m_data + p, &p)); // write snapshot proc_fn(*c, rec); } written += m_nrec; // // flush subsequent buffers in list // if (m_next) written += m_next->flush(c, proc_fn); return written; } void TraceBufferChunk::save_snapshot(SnapshotView s) { if (s.empty()) return; m_pos += vlenc_u64(s.size(), m_data + m_pos); for (const Entry& e : s) m_pos += e.pack(m_data + m_pos); ++m_nrec; } bool TraceBufferChunk::fits(SnapshotView rec) const { // get worst-case estimate of packed snapshot size: // 10 bytes for size indicator // n times Entry max size for data size_t max = 10 + rec.size() * Entry::MAX_PACKED_SIZE; return (m_pos + max) < m_size; } TraceBufferChunk::UsageInfo TraceBufferChunk::info() const { UsageInfo info { 0, 0, 0 }; if (m_next) info = m_next->info(); info.nchunks++; info.reserved += m_size; info.used += m_pos; return info; }
17.387097
70
0.605288
[ "vector" ]
44ecb01cd8838606d50faa6d88941df4872542d5
4,349
hpp
C++
libraries/fc/include/fc/container/flat.hpp
SophiaTX/SophiaTx-Blockchain
c964691c020962ad1aba8263c0d8a78a9fa27e45
[ "MIT" ]
8
2018-07-25T20:42:43.000Z
2019-03-11T03:14:09.000Z
libraries/fc/include/fc/container/flat.hpp
SophiaTX/SophiaTx-Blockchain
c964691c020962ad1aba8263c0d8a78a9fa27e45
[ "MIT" ]
13
2018-07-25T17:41:28.000Z
2019-01-25T13:38:11.000Z
libraries/fc/include/fc/container/flat.hpp
SophiaTX/SophiaTx-Blockchain
c964691c020962ad1aba8263c0d8a78a9fa27e45
[ "MIT" ]
11
2018-07-25T14:34:13.000Z
2019-05-03T13:29:37.000Z
#pragma once #include <fc/variant.hpp> #include <fc/container/flat_fwd.hpp> #include <boost/container/flat_map.hpp> #include <boost/container/flat_set.hpp> #include <fc/io/raw_fwd.hpp> namespace fc { namespace raw { template<typename Stream, typename T> inline void pack( Stream& s, const flat_set<T>& value ) { pack( s, unsigned_int((uint32_t)value.size()) ); auto itr = value.begin(); auto end = value.end(); while( itr != end ) { fc::raw::pack( s, *itr ); ++itr; } } template<typename Stream, typename T> inline void unpack( Stream& s, flat_set<T>& value, uint32_t depth) { FC_ASSERT( depth++ <= MAX_RECURSION_DEPTH ); unsigned_int size; unpack( s, size, depth ); value.clear(); FC_ASSERT( size.value*sizeof(T) < MAX_ARRAY_ALLOC_SIZE ); value.reserve(size.value); for( uint32_t i = 0; i < size.value; ++i ) { T tmp; fc::raw::unpack( s, tmp, depth ); value.insert( std::move(tmp) ); } } template<typename Stream, typename K, typename... V> inline void pack( Stream& s, const flat_map<K,V...>& value ) { pack( s, unsigned_int((uint32_t)value.size()) ); auto itr = value.begin(); auto end = value.end(); while( itr != end ) { fc::raw::pack( s, *itr ); ++itr; } } template<typename Stream, typename K, typename V, typename... A> inline void unpack( Stream& s, flat_map<K,V,A...>& value, uint32_t depth ) { FC_ASSERT( depth++ <= MAX_RECURSION_DEPTH ); unsigned_int size; unpack( s, size, depth ); value.clear(); FC_ASSERT( size.value*(sizeof(K)+sizeof(V)) < MAX_ARRAY_ALLOC_SIZE ); value.reserve(size.value); for( uint32_t i = 0; i < size.value; ++i ) { std::pair<K,V> tmp; fc::raw::unpack( s, tmp, depth ); value.insert( std::move(tmp) ); } } template<typename Stream, typename T, typename A> void pack( Stream& s, const bip::vector<T,A>& value ) { pack( s, unsigned_int((uint32_t)value.size()) ); if( !std::is_fundamental<T>::value ) { auto itr = value.begin(); auto end = value.end(); while( itr != end ) { fc::raw::pack( s, *itr ); ++itr; } } else { s.write( (const char*)value.data(), value.size() ); } } template<typename Stream, typename T, typename A> void unpack( Stream& s, bip::vector<T,A>& value, uint32_t depth ) { FC_ASSERT( depth++ <= MAX_RECURSION_DEPTH ); unsigned_int size; unpack( s, size, depth ); value.resize( size ); if( !std::is_fundamental<T>::value ) { for( auto& item : value ) unpack( s, item, depth ); } else { s.read( (char*)value.data(), value.size() ); } } } // namespace raw template<typename T> void to_variant( const flat_set<T>& var, variant& vo ) { std::vector<variant> vars(var.size()); size_t i = 0; for( auto itr = var.begin(); itr != var.end(); ++itr, ++i ) vars[i] = variant(*itr); vo = vars; } template<typename T> void from_variant( const variant& var, flat_set<T>& vo ) { const variants& vars = var.get_array(); vo.clear(); vo.reserve( vars.size() ); for( auto itr = vars.begin(); itr != vars.end(); ++itr ) vo.insert( itr->as<T>() ); } template<typename K, typename... T> void to_variant( const flat_map<K, T...>& var, variant& vo ) { std::vector< variant > vars(var.size()); size_t i = 0; for( auto itr = var.begin(); itr != var.end(); ++itr, ++i ) vars[i] = fc::variant(*itr); vo = vars; } template<typename K, typename T, typename... A> void from_variant( const variant& var, flat_map<K, T, A...>& vo ) { const variants& vars = var.get_array(); vo.clear(); for( auto itr = vars.begin(); itr != vars.end(); ++itr ) vo.insert( itr->as< std::pair<K,T> >() ); } }
32.94697
82
0.516211
[ "vector" ]
44eee99f3c967358b3a00fc7c53f0ee2c880e2ef
38,238
cpp
C++
shore-sm-6.0.2/src/sm/btree.cpp
glycerine/shore-mt
39f1802ba9588bc9d32d34386ed0193477f7e8d1
[ "Spencer-94", "Spencer-86", "Xnet", "Linux-OpenIB", "Spencer-99", "X11", "CECILL-B" ]
3
2016-07-15T08:22:56.000Z
2019-10-10T02:26:08.000Z
shore-sm-6.0.2/src/sm/btree.cpp
glycerine/shore-mt
39f1802ba9588bc9d32d34386ed0193477f7e8d1
[ "Spencer-94", "Spencer-86", "Xnet", "Linux-OpenIB", "Spencer-99", "X11", "CECILL-B" ]
null
null
null
shore-sm-6.0.2/src/sm/btree.cpp
glycerine/shore-mt
39f1802ba9588bc9d32d34386ed0193477f7e8d1
[ "Spencer-94", "Spencer-86", "Xnet", "Linux-OpenIB", "Spencer-99", "X11", "CECILL-B" ]
2
2020-12-23T06:49:23.000Z
2021-03-05T07:00:28.000Z
/* -*- mode:C++; c-basic-offset:4 -*- Shore-MT -- Multi-threaded port of the SHORE storage manager Copyright (c) 2007-2009 Data Intensive Applications and Systems Labaratory (DIAS) Ecole Polytechnique Federale de Lausanne All Rights Reserved. Permission to use, copy, modify and distribute this software and its documentation is hereby granted, provided that both the copyright notice and this permission notice appear in all copies of the software, derivative works or modified versions, and any portions thereof, and that both notices appear in supporting documentation. This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. */ /*<std-header orig-src='shore'> $Id: btree.cpp,v 1.288 2012/01/02 17:02:17 nhall Exp $ SHORE -- Scalable Heterogeneous Object REpository Copyright (c) 1994-99 Computer Sciences Department, University of Wisconsin -- Madison All Rights Reserved. Permission to use, copy, modify and distribute this software and its documentation is hereby granted, provided that both the copyright notice and this permission notice appear in all copies of the software, derivative works or modified versions, and any portions thereof, and that both notices appear in supporting documentation. THE AUTHORS AND THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN - MADISON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION, AND THEY DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. This software was developed with support by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518. Further funding for this work was provided by DARPA through Rome Research Laboratory Contract No. F30602-97-2-0247. */ #include "w_defines.h" /* -- do not edit anything above this line -- </std-header>*/ #define SM_SOURCE #define BTREE_C #ifdef __GNUG__ # pragma implementation "btree.h" # pragma implementation "btree_impl.old.h" #endif #include "sm_int_2.h" #include "btree_p.h" #include "btree_impl.h" #include "btcursor.h" #include "lexify.h" #include "sm_du_stats.h" #include <crash.h> #if W_DEBUG_LEVEL > 4 #define BTREE_LOG_COMMENT_ON 1 #else #define BTREE_LOG_COMMENT_ON 0 #endif static rc_t badcc() { // for the purpose of breaking in gdb return RC(smlevel_0::eBADCCLEVEL); } /********************************************************************* * * Btree manager * ********************************************************************/ smsize_t btree_m::max_entry_size() { return btree_p::max_entry_size; } /********************************************************************* * * btree_m::create(stid_t, root) * * Create a btree. Return the root page id in root. * *********************************************************************/ rc_t btree_m::create( const stid_t& stid, lpid_t& root, bool compressed ) // O- root of new btree { FUNC(btree_m::create); DBGTHRD(<<"stid " << stid); #if BTREE_LOG_COMMENT_ON { w_ostrstream s; s << "btree create " << stid; W_DO(log_comment(s.c_str())); } #endif get_latches(___s,___e); check_latches(___s,___e, ___s+___e); lsn_t anchor; xct_t* xd = xct(); check_compensated_op_nesting ccon(xd, __LINE__, __FILE__); if (xd) anchor = xd->anchor(); DBGTHRD(<<"allocating a page to store " << stid); X_DO( io->alloc_a_page(stid, lpid_t::eof, // hint root, // resulting page true, // may_realloc NL, // acquires a lock on the page in this mode true // search file ), anchor ); SSMTEST("btree.create.1"); { DBGTHRD(<<"formatting the page for store " << stid); btree_p page; /* Format/init the page: */ X_DO( page.fix(root, LATCH_EX, page.t_virgin), anchor ); btree_p::flag_t f = compressed? btree_p::t_compressed: btree_p::t_none; X_DO( page.set_hdr(root.page, 1, 0, f), anchor ); #if W_DEBUG_LEVEL > 2 if(compressed) { w_assert3(page.is_compressed()); } #endif } // page is unfixed DBGTHRD(<<"compensatng the page create for store " << stid); if (xd) { SSMTEST("btree.create.2"); xd->compensate(anchor, false/*not undoable*/ X_LOG_COMMENT_USE("btree.create.2")); } bool empty=false; W_DO(is_empty(root,empty)); check_latches(___s,___e, ___s+___e); if(!empty) { DBGTHRD(<<"eNDXNOTEMPTY"); return RC(eNDXNOTEMPTY); } DBGTHRD(<<"returning from btree_create, store " << stid); return RCOK; } /********************************************************************* * * btree_m::is_empty(root, ret) * * Return true in ret if btree at root is empty. false otherwise. * *********************************************************************/ rc_t btree_m::is_empty( const lpid_t& root, // I- root of btree bool& ret) // O- true if btree is empty { get_latches(___s,___e); check_latches(___s,___e, ___s+___e); key_type_s kc(key_type_s::b, 0, 4); cursor_t cursor(true); W_DO( fetch_init(cursor, root, 1, &kc, false, t_cc_none, cvec_t::neg_inf, // bound1 cvec_t::neg_inf, // elem of bound1 ge, // cond1 le, // cond2 cvec_t::pos_inf // bound2 )); check_latches(___s,___e, ___s+___e); W_DO( fetch(cursor) ); check_latches(___s,___e, ___s+___e); ret = (cursor.key() == 0); return RCOK; } /********************************************************************* * * btree_m::insert(root, unique, cc, key, el, split_factor) * * Insert <key, el> into the btree. Split_factor specifies * percentage factor in spliting (if it occurs): * 60 means split 60/40 with 60% in left and 40% in right page * A normal value for "split_factor" is 50. However, if I know * in advance that I am going insert a lot of sorted entries, * a high split factor would result in a more condensed btree. * *********************************************************************/ rc_t btree_m::insert( const lpid_t& root, // I- root of btree int nkc, const key_type_s* kc, bool unique, // I- true if tree is unique concurrency_t cc, // I- concurrency control const cvec_t& key, // I- which key const cvec_t& el, // I- which element int split_factor) // I- tune split in % { FUNC(btree_m::insert); DBGTHRD(<<" btree_m::insert key.size=" << key.size() << " el.size=" << el.size()); #if BTREE_LOG_COMMENT_ON { w_ostrstream s; s << "btree insert " << root; W_DO(log_comment(s.c_str())); } #endif if( (cc != t_cc_none) && (cc != t_cc_file) && (cc != t_cc_kvl) && (cc != t_cc_modkvl) && (cc != t_cc_im) ) return badcc(); w_assert1(kc && nkc > 0); if(key.size() + el.size() > btree_p::max_entry_size) { DBGTHRD(<<"RECWONTFIT: key.size=" << key.size() << " el.size=" << el.size()); return RC(eRECWONTFIT); } rc_t rc; cvec_t* real_key; DBGTHRD(<<""); W_DO(_scramble_key(real_key, key, nkc, kc)); DBGTHRD(<<""); // int retries = 0; // for debugging retry: rc = btree_impl::_insert(root, unique, cc, *real_key, el, split_factor); if(rc.is_error()) { if(rc.err_num() == eRETRY) { // retries++; // for debugging // fprintf(stderr, "-*-*-*- Retrying (%d) a btree insert!\n", // retries); goto retry; } DBGTHRD(<<"rc=" << rc); } return rc; } /********************************************************************* * * btree_m::remove_key(root, unique, cc, key, num_removed) * * Remove all occurences of "key" in the btree, and return * the number of entries removed in "num_removed". * *********************************************************************/ rc_t btree_m::remove_key( const lpid_t& root, // root of btree int nkc, const key_type_s* kc, bool unique, // true if btree is unique concurrency_t cc, // concurrency control const cvec_t& key, // which key int& num_removed ) { if( (cc != t_cc_none) && (cc != t_cc_file) && (cc != t_cc_kvl) && (cc != t_cc_modkvl) && (cc != t_cc_im) ) return badcc(); w_assert1(kc && nkc > 0); num_removed = 0; /* * We do this the dumb way ... optimization needed if this * proves to be a bottleneck. */ while (1) { /* * scan for key */ cursor_t cursor(true); W_DO( fetch_init(cursor, root, nkc, kc, unique, cc, key, cvec_t::neg_inf, ge, le, key)); W_DO( fetch(cursor) ); if (!cursor.key()) { /* * no more occurence of key ... done! */ break; } /* * call btree_m::_remove() */ const cvec_t cursor_vec_tmp(cursor.elem(), cursor.elen()); W_DO( remove(root, nkc, kc, unique, cc, key, cursor_vec_tmp)); ++num_removed; if (unique) break; } if (num_removed == 0) { fprintf(stderr, "could not find key\n" ); return RC(eNOTFOUND); } return RCOK; } /********************************************************************* * * btree_m::remove(root, unique, cc, key, el) * * Remove <key, el> from the btree. * *********************************************************************/ rc_t btree_m::remove( const lpid_t& root, // root of btree int nkc, const key_type_s* kc, bool unique, // true if btree is unique concurrency_t cc, // concurrency control const cvec_t& key, // which key const cvec_t& el) // which el { #if BTREE_LOG_COMMENT_ON { w_ostrstream s; s << "btree remove " << root; W_DO(log_comment(s.c_str())); } #endif w_assert1(kc && nkc > 0); if( (cc != t_cc_none) && (cc != t_cc_file) && (cc != t_cc_kvl) && (cc != t_cc_modkvl) && (cc != t_cc_im) ) return badcc(); cvec_t* real_key; DBGTHRD(<<""); W_DO(_scramble_key(real_key, key, nkc, kc)); DBGTHRD(<<""); retry: rc_t rc = btree_impl::_remove(root, unique, cc, *real_key, el); if(rc.is_error() && rc.err_num() == eRETRY) { //fprintf(stderr, "-*-*-*- Retrying a btree insert!\n"); goto retry; } DBGTHRD(<<"rc=" << rc); return rc; } /********************************************************************* * * btree_m::lookup(...) * * Find key in btree. If found, copy up to elen bytes of the * entry element into el. * *********************************************************************/ rc_t btree_m::lookup( const lpid_t& root, // I- root of btree int nkc, const key_type_s* kc, bool unique, // I- true if btree is unique concurrency_t cc, // I- concurrency control const cvec_t& key, // I- key we want to find void* el, // I- buffer to put el found smsize_t& elen, // IO- size of el bool& found) // O- true if key is found { if( (cc != t_cc_none) && (cc != t_cc_file) && (cc != t_cc_kvl) && (cc != t_cc_modkvl) && (cc != t_cc_im) ) return badcc(); w_assert1(kc && nkc > 0); cvec_t* real_key; DBGTHRD(<<""); W_DO(_scramble_key(real_key, key, nkc, kc)); DBGTHRD(<<""); cvec_t null; W_DO( btree_impl::_lookup(root, unique, cc, *real_key, null, found, 0, el, elen )); return RCOK; } /* * btree_m::lookup_prev() - find previous entry * * context: called by lid manager */ rc_t btree_m::lookup_prev( const lpid_t& root, // I- root of btree int nkc, const key_type_s* kc, bool unique, // I- true if btree is unique concurrency_t cc, // I- concurrency control const cvec_t& keyp, // I- find previous key for key bool& found, // O- true if a previous key is found void* key_prev, // I- is set to // nearest one less than key smsize_t& key_prev_len // IO- size of key_prev ) { // bt->print(root, sortorder::kt_b); /* set up a backward scan from the keyp */ bt_cursor_t * _btcursor = new bt_cursor_t(true); if (! _btcursor) { W_FATAL(eOUTOFMEMORY); } rc_t rc = bt->fetch_init(*_btcursor, root, nkc, kc, unique, cc, keyp, cvec_t::pos_inf, le, ge, cvec_t::neg_inf); DBGTHRD(<<"rc=" << rc); if(rc.is_error()) return RC_AUGMENT(rc); W_DO( bt->fetch(*_btcursor) ); DBGTHRD(<<""); found = (_btcursor->key() != 0); smsize_t mn = (key_prev_len > (smsize_t)_btcursor->klen()) ? (smsize_t)_btcursor->klen() : key_prev_len; key_prev_len = _btcursor->klen(); DBGTHRD(<<"klen = " << key_prev_len); if(found) { memcpy( key_prev, _btcursor->key(), mn); } delete _btcursor; return RCOK; } /********************************************************************* * * btree_m::fetch_init(cursor, root, numkeys, unique, * is-unique, cc, key, elem, * cond1, cond2, bound2) * * Initialize cursor for a scan for entries greater(less, if backward) * than or equal to <key, elem>. * *********************************************************************/ rc_t btree_m::fetch_init( cursor_t& cursor, // IO- cursor to be filled in const lpid_t& root, // I- root of the btree int nkc, const key_type_s* kc, bool unique, // I- true if btree is unique concurrency_t cc, // I- concurrency control const cvec_t& ukey, // I- <key, elem> to start const cvec_t& elem, // I- cmp_t cond1, // I- condition on lower bound cmp_t cond2, // I- condition on upper bound const cvec_t& bound2, // I- upper bound lock_mode_t mode) // I- mode to lock index keys in { if( (cc != t_cc_none) && (cc != t_cc_file) && (cc != t_cc_kvl) && (cc != t_cc_modkvl) && (cc != t_cc_im) ) return badcc(); w_assert1(kc && nkc > 0); get_latches(___s,___e); check_latches(___s,___e, ___s+___e); INC_TSTAT(bt_scan_cnt); /* * Initialize constant parts of the cursor */ cvec_t* key; cvec_t* bound2_key; DBGTHRD(<<""); W_DO(_scramble_key(bound2_key, bound2, nkc, kc)); W_DO(cursor.set_up(root, nkc, kc, unique, cc, cond2, *bound2_key, mode)); DBGTHRD(<<""); W_DO(_scramble_key(key, ukey, nkc, kc)); W_DO(cursor.set_up_part_2( cond1, *key)); /* * GROT: For scans: TODO * To handle backward scans from scan.cpp, we have to * reverse the elem in the backward case: replace it with elem = &(inclusive ? cvec_t::pos_inf : cvec_t::neg_inf); */ cursor.first_time = true; if((cc == t_cc_modkvl) ) { /* * only allow scans of the form ==x ==x * and grab a SH lock on x, whether or not * this is a unique index. */ if(cond1 != eq || cond2 != eq) { return RC(eBADSCAN); } lockid_t k; btree_impl::mk_kvl(cc, k, root.stid(), true, *key); // wait for commit-duration share lock on key W_DO (lm->lock(k, mode, t_long)); } bool found=false; smsize_t elen = elem.size(); DBGTHRD(<<"Scan is backward? " << cursor.is_backward()); W_DO (btree_impl::_lookup( cursor.root(), cursor.unique(), cursor.cc(), *key, elem, found, &cursor, cursor.elem(), elen)); DBGTHRD(<<"found=" << found); check_latches(___s,___e, ___s+___e); return RCOK; } /********************************************************************* * * btree_m::fetch_reinit(cursor) * * Reinitialize cursor for a scan. * If need be, it unconditionally grabs a share latch on the whole tree * *********************************************************************/ rc_t btree_m::fetch_reinit( cursor_t& cursor // IO- cursor to be filled in ) { smsize_t elen = cursor.elen(); bool found = false; get_latches(___s,___e); check_latches(___s,___e, ___s+___e); // reinitialize the cursor // so that the _fetch_init // will do a make_rec() to evaluate the correctness of the // slot it finds; make_rec() updates the cursor.slot(). If // don't do this, make_rec() doesn't get called in _fetch_init, // and then the cursor.slot() doesn't get updated, but the // reason our caller called us was to get cursor.slot() updated. cursor.first_time = true; cursor.keep_going = true; cvec_t* real_key; DBGTHRD(<<""); cvec_t key(cursor.key(), cursor.klen()); W_DO(_scramble_key(real_key, key, cursor.nkc(), cursor.kc())); const cvec_t cursor_vec_tmp(cursor.elem(), cursor.elen()); rc_t rc= btree_impl::_lookup( cursor.root(), cursor.unique(), cursor.cc(), *real_key, cursor_vec_tmp, found, &cursor, cursor.elem(), elen ); check_latches(___s,___e, ___s+___e); return rc; } /********************************************************************* * * btree_m::fetch(cursor) * * Fetch the next key of cursor, and advance the cursor. * This is Mohan's "fetch_next" operation. * *********************************************************************/ rc_t btree_m::fetch(cursor_t& cursor) { FUNC(btree_m::fetch); bool __eof = false; bool __found = false; get_latches(___s,___e); check_latches(___s,___e, ___s+___e); DBGTHRD(<<"first_time=" << cursor.first_time << " keep_going=" << cursor.keep_going); if (cursor.first_time) { /* * Fetch_init() already placed cursor on * first key satisfying the first condition. * Check the 2nd condition. */ cursor.first_time = false; if(cursor.key()) { // either was in_bounds or keep_going is true if( !cursor.keep_going ) { // OK- satisfies both return RCOK; } // else keep_going } else { // no key - wasn't in both bounds return RCOK; } w_assert3(cursor.keep_going); } check_latches(___s,___e, ___s+___e); /* * We now need to move cursor one slot to the right */ stid_t stid = cursor.root().stid(); slotid_t slot = -1; rc_t rc; again: DBGTHRD(<<"fetch.again is_valid=" << cursor.is_valid()); { btree_p p1, p2; w_assert3(!p2.is_fixed()); check_latches(___s,___e, ___s+___e); while (cursor.is_valid()) { /* * Fix the cursor page. If page has changed (lsn * mismatch) then call fetch_init to re-traverse. */ W_DO( p1.fix(cursor.pid(), LATCH_SH) ); if (cursor.lsn() == p1.lsn()) { break; } p1.unfix(); W_DO(fetch_reinit(cursor)); // re-traverses the tree cursor.first_time = false; // there exists a possibility for starvation here. goto again; } slot = cursor.slot(); if (cursor.is_valid()) { w_assert3(p1.pid() == cursor.pid()); btree_p* child = &p1; // child points to p1 or p2 /* * Move one slot to the right(left if backward scan) * NB: this does not do the Mohan optimizations * with all the checks, since we can't really * tell if the page is still in the btree. */ w_assert3(p1.is_fixed()); w_assert3(!p2.is_fixed()); W_DO(btree_impl::_skip_one_slot(p1, p2, child, slot, __eof, __found, cursor.is_backward())); w_assert3(child->is_fixed()); w_assert3(child->is_leaf()); if(__eof) { w_assert3(slot >= child->nrecs()); cursor.free_rec(); } else if(!__found ) { // we encountered a deleted page // grab a share latch on the tree and try again // unconditional tree_latch tree_root(child->root()); w_error_t::err_num_t rce = tree_root.get_for_smo(false, LATCH_SH, *child, LATCH_SH, false, child==&p1? &p2 : &p1, LATCH_NL); if(rce) return RC(rce); p1.unfix(); p2.unfix(); tree_root.unfix(); W_DO(fetch_reinit(cursor)); // re-traverses the tree cursor.first_time = false; DBGTHRD(<<"-->again TREE LATCH MODE " << int(tree_root.latch_mode()) ); goto again; } else { w_assert3(__found) ; w_assert3(slot >= 0); w_assert3(slot < child->nrecs()); // Found next item, and it fulfills lower bound // requirement. What about upper bound? /* * Point cursor to satisfying key */ W_DO( cursor.make_rec(*child, slot) ); if(cursor.keep_going) { // keep going until we reach the // first satisfying key. // This should only happen if we // have something like: // >= x && == y where y > x p1.unfix(); p2.unfix(); DBGTHRD(<<"->again"); goto again; // leaving scope unfixes pages } } w_assert3(child->is_fixed()); w_assert3(child->is_leaf()); if(__eof) { w_assert3(slot >= child->nrecs()); } else { w_assert3(slot < child->nrecs()); w_assert3(slot >= 0); } /* * NB: scans really shouldn't be done with the * t_cc_mod*, but we're allowing them in restricted * circumstances. */ if (cursor.cc() != t_cc_none) { /* * Get KVL locks */ lockid_t kvl; if (slot >= child->nrecs()) { btree_impl::mk_kvl_eof(cursor.cc(), kvl, stid); } else { w_assert3(slot < child->nrecs()); btrec_t r(*child, slot); btree_impl::mk_kvl(cursor.cc(), kvl, stid, cursor.unique(), r); } rc = lm->lock(kvl, SH, t_long, WAIT_IMMEDIATE); if (rc.is_error()) { DBGTHRD(<<"rc=" << rc); w_assert3((rc.err_num() == eLOCKTIMEOUT) || (rc.err_num() == eDEADLOCK)); lpid_t pid = child->pid(); lsn_t lsn = child->lsn(); p1.unfix(); p2.unfix(); W_DO( lm->lock(kvl, SH, t_long) ); W_DO( child->fix(pid, LATCH_SH) ); if (lsn == child->lsn() && child == &p1) { ; } else { DBGTHRD(<<"->again"); goto again; } } // else got lock } } // if cursor.is_valid() } DBGTHRD(<<"returning, is_valid=" << cursor.is_valid()); check_latches(___s,___e, ___s+___e); return RCOK; } /********************************************************************* * * btree_m::get_du_statistics(root, stats, audit) * *********************************************************************/ rc_t btree_m::get_du_statistics( const lpid_t& root, btree_stats_t& _stats, bool audit) { lpid_t pid = root; lpid_t child = root; child.page = 0; base_stat_t lf_cnt = 0; base_stat_t int_cnt = 0; base_stat_t level_cnt = 0; btree_p page[2]; int c = 0; /* Traverse the btree gathering stats. This traversal scans across each level of the btree starting at the root. Unfortunately, this scan misses "unlinked" pages. Unlinked pages are empty and will be free'd during the next top-down traversal that encounters them. This traversal should really be DFS so it can find "unlinked" pages, but we leave it as is for now. We account for the unlinked pages after the traversal. */ do { btree_lf_stats_t lf_stats; btree_int_stats_t int_stats; W_DO( page[c].fix(pid, LATCH_SH) ); if (page[c].level() > 1) { int_cnt++;; W_DO(page[c].int_stats(int_stats)); if (audit) { W_DO(int_stats.audit()); } _stats.int_pg.add(int_stats); } else { lf_cnt++; W_DO(page[c].leaf_stats(lf_stats)); if (audit) { W_DO(lf_stats.audit()); } _stats.leaf_pg.add(lf_stats); } if (page[c].prev() == 0) { child.page = page[c].pid0(); level_cnt++; } if (! (pid.page = page[c].next())) { pid = child; child.page = 0; } c = 1 - c; // "following" a link here means fixing the page, // which we'll do on the next loop through, if pid.page // is non-zero INC_TSTAT(bt_links); } while (pid.page); // count unallocated pages rc_t rc; bool allocated; base_stat_t alloc_cnt = 0; base_stat_t unlink_cnt = 0; base_stat_t unalloc_cnt = 0; rc = io->first_page(root.stid(), pid, &allocated); while (!rc.is_error()) { // no error yet; if (allocated) { alloc_cnt++; } else { unalloc_cnt++; } rc = io->next_page(pid, &allocated, NL); // no lock } unlink_cnt = alloc_cnt - (lf_cnt + int_cnt); if (rc.err_num() != eEOF) return rc; if (audit) { if (!((alloc_cnt+unalloc_cnt) % smlevel_0::ext_sz == 0)) { #if W_DEBUG_LEVEL > 0 fprintf(stderr, "alloc_cnt %lld + unalloc_cnt %lld not a mpl of ext size\n", (long long) alloc_cnt, (long long) unalloc_cnt); #endif return RC(fcINTERNAL); } if (!((lf_cnt + int_cnt + unlink_cnt + unalloc_cnt) % smlevel_0::ext_sz == 0)) { #if W_DEBUG_LEVEL > 0 fprintf(stderr, "lf_cnt %lld + int_cnt %lld + unlink_cnt %lld + unalloc_cnt %lld not a mpl of ext size\n", (long long) lf_cnt, (long long) int_cnt, (long long) unlink_cnt, (long long) unalloc_cnt); #endif return RC(fcINTERNAL); } // I think if audit is true, and we have the right locks, // there should be no unlinked pages if ( unlink_cnt != 0) { fprintf(stderr, " found %lu unlinked pages\n", // make it work for LP32 (unsigned long) unlink_cnt); return RC(fcINTERNAL); } } _stats.unalloc_pg_cnt += unalloc_cnt; _stats.unlink_pg_cnt += unlink_cnt; _stats.leaf_pg_cnt += lf_cnt; _stats.int_pg_cnt += int_cnt; _stats.level_cnt = MAX(_stats.level_cnt, level_cnt); return RCOK; } static __thread char scratch_space[smlevel_0::page_sz]; // page size is more than adequate and is compile-time constant. /********************************************************************* * * btree_m::_scramble_key(ret, key, nkc, kc) * btree_m::_unscramble_key(ret, key, nkc, kc) * * These functions put/pull a key into/from lexicographic order. * _scramble checks for some legitimacy of the values, too, namely * length. * *********************************************************************/ rc_t btree_m::_scramble_key( cvec_t*& ret, const cvec_t& key, int nkc, const key_type_s* kc) { FUNC(btree_m::_scramble_key); DBGTHRD(<<" SCrambling " << key ); w_assert1(kc && nkc > 0); if (&key == &key.neg_inf || &key == &key.pos_inf) { ret = (cvec_t*) &key; return RCOK; } if(key.size() == 0) { // do nothing ret = (cvec_t*) &key; return RCOK; } ret = me()->get_kc_vec(); ret->reset(); char* p = 0; for (int i = 0; i < nkc; i++) { key_type_s::type_t t = (key_type_s::type_t) kc[i].type; if ( t == key_type_s::i || t == key_type_s::I || t == key_type_s::u || t == key_type_s::U || t == key_type_s::f || t == key_type_s::F ) { p = me()->get_kc_buf(); break; } } if (! p) { // found only uninterpreted bytes (b, b*) ret->put(key); } else { // s,p are destination // key contains source -- unfortunately, // it's not necessarily contiguous. char *src=0; if(key.count() > 1) { // make it contiguous key.copy_to(scratch_space); src= scratch_space; } else { const vec_t *v = (const vec_t *)&key; src= (char *)(v->ptr(0)); } char* s = p; int key_remaining = key.size(); for (int i = 0; i < nkc; i++) { DBGTHRD(<<"len " << kc[i].length); if(!kc[i].variable) { key_remaining -= kc[i].length; if(key_remaining <0) { return RC(eBADKEY); } // Can't check and don't care for variable-length // stuff: if( (char *)(alignon(((ptrdiff_t)src), (kc[i].length))) != src) { // 8-byte things (floats) only have to be 4-byte // aligned on some machines. TODO (correctness): figure out // which allow this and which, if any, don't. /* XXX */ if(kc[i].length <= 4) { cout << "Unaligned, scramble, ptr=" << (void*)src << ", align=" << kc[i].length << endl; return RC(eALIGNPARM); } } } if( !SortOrder.lexify(&kc[i], src, s) ) { w_assert3(kc[i].variable); // must be the last item in the list w_assert3(i == nkc-1); // copy the rest DBGTHRD(<<"lexify failed-- doing memcpy of " << key.size() - (s-p) << " bytes"); memcpy(s, src, key.size() - (s-p)); } src += kc[i].length; s += kc[i].length; } src = 0; if(nkc == 1 && kc[0].type == key_type_s::b) { // prints bogosities if type isn't a string DBGTHRD(<<" ret->put(" << p << "," << (int)(s-p) << ")"); } ret->put(p, s - p); } DBGTHRD(<<" Scrambled " << key << " into " << *ret); return RCOK; } rc_t btree_m::_unscramble_key( cvec_t*& ret, const cvec_t& key, int nkc, const key_type_s* kc) { FUNC(btree_m::_unscramble_key); DBGTHRD(<<" UNscrambling " << key ); w_assert1(kc && nkc > 0); ret = me()->get_kc_vec(); ret->reset(); char* p = 0; int i; #ifdef W_TRACE for (i = 0; i < nkc; i++) { DBGTHRD(<<"key type is " << kc[i].type); } #endif for (i = 0; i < nkc; i++) { key_type_s::type_t t = (key_type_s::type_t) kc[i].type; if ( t == key_type_s::i || t == key_type_s::I || t == key_type_s::U || t == key_type_s::u || t == key_type_s::f || t == key_type_s::F ) { p = me()->get_kc_buf(); break; } } if (! p) { ret->put(key); } else { // s,p are destination // key contains source -- unfortunately, // it's not contiguous. char *src=0; if(key.count() > 1) { // make it contiguous key.copy_to(scratch_space); src= scratch_space; } else { const vec_t *v = (const vec_t *)&key; src= (char *)v->ptr(0); } char* s = p; if(src) for (i = 0; i < nkc; i++) { if(! kc[i].variable) { // Can't check and don't care for variable-length // stuff: int len = kc[i].length; // only require 4-byte alignment for doubles /* XXXX */ if(len == 8) { len = 4; } if(len == 4 && (char *)(alignon(((ptrdiff_t)src), len)) != src) { cerr << "Invalid alignment, unscramble, ptr=" << (void*)src << ", align=" << len << endl; return RC(eALIGNPARM); } } if( !SortOrder.unlexify(&kc[i], src, s) ) { w_assert3(kc[i].variable); // must be the last item in the list w_assert3(i == nkc-1); // copy the rest DBGTHRD(<<"unlexify failed-- doing memcpy of " << key.size() - (s-p) << " bytes"); memcpy(s, src, key.size() - (s-p)); } src += kc[i].length; s += kc[i].length; } src = 0; if(nkc == 1 && kc[0].type == key_type_s::b) { DBGTHRD(<<" ret->put(" << p << "," << (int)(s-p) << ")"); } ret->put(p, s - p); } DBGTHRD(<<" UNscrambled " << key << " into " << *ret); return RCOK; } /********************************************************************* * * btree_m::print(root, sortorder::keytype kt = sortorder::kt_b, * bool print_elem=false); * * Print the btree (for debugging only) * *********************************************************************/ void btree_m::print(const lpid_t& root, sortorder::keytype kt, bool print_elem ) { lpid_t nxtpid, pid0; nxtpid = pid0 = root; { btree_p page; W_COERCE( page.fix(root, LATCH_SH) ); // coerce ok-- debugging for (int i = 0; i < 5 - page.level(); i++) { cout << '\t'; } cout << (page.is_smo() ? "*" : " ") << (page.is_delete() ? "D" : " ") << " " << "LEVEL " << page.level() << ", page " << page.pid().page << ", prev " << page.prev() << ", next " << page.next() << ", nrec " << page.nrecs() << endl; page.print(kt, print_elem); cout << flush; if (page.next()) { nxtpid.page = page.next(); } if ( ! page.prev() && page.pid0()) { pid0.page = page.pid0(); } } if (nxtpid != root) { print(nxtpid, kt, print_elem); } if (pid0 != root) { print(pid0, kt, print_elem); } } /* * for use by logrecs for undo, redo */ rc_t btree_m::_insert( const lpid_t& root, bool unique, concurrency_t cc, const cvec_t& key, const cvec_t& elem, int split_factor) { return btree_impl::_insert(root,unique,cc, key, elem, split_factor); } rc_t btree_m::_remove( const lpid_t& root, bool unique, concurrency_t cc, const cvec_t& key, const cvec_t& elem) { return btree_impl::_remove(root,unique,cc, key, elem); }
31.087805
102
0.476123
[ "object" ]
602178a6324c2ae6c9cb205218080a7da943fb5a
10,833
cpp
C++
3DEngine/Source/RbCollider.cpp
PatatesIDracs/3DGameEngine
9bf1fbbea6c9d6f02174657ae41e01ea3a984858
[ "MIT" ]
4
2017-10-23T18:05:48.000Z
2017-11-29T06:57:26.000Z
3DEngine/Source/RbCollider.cpp
PatatesIDracs/3DGameEngine
9bf1fbbea6c9d6f02174657ae41e01ea3a984858
[ "MIT" ]
null
null
null
3DEngine/Source/RbCollider.cpp
PatatesIDracs/3DGameEngine
9bf1fbbea6c9d6f02174657ae41e01ea3a984858
[ "MIT" ]
null
null
null
#include "RbCollider.h" #include "RigidBody.h" #include "GameObject.h" #include "Application.h" #include "ModulePhysics.h" #include "Transform.h" #include "jpPhysicsRigidBody.h" #include "Glew\include\glew.h" RbCollider::RbCollider(GameObject * parent, bool isactive) : Component(parent, COMP_RBSHAPE, true) { if (parent != nullptr) parent->AddComponent(this); } RbCollider::~RbCollider() { if (physics_body && !rigid_body_comp) { delete physics_body; physics_body = nullptr; } if (rigid_body_comp != nullptr) { rigid_body_comp->SetColliderComp(nullptr); } } void RbCollider::UpdateTransform() { if (!rigid_body_comp && physics_body) { Quat quat = transform->GetParentQuat()*transform->CurrRotQuat()*local_quat; float3 fpos = transform->GetGlobalPos() + quat*position; physics_body->px_body->setGlobalPose(physx::PxTransform(physx::PxVec3(fpos.x, fpos.y, fpos.z), physx::PxQuat(quat.x, quat.y, quat.z, quat.w))); } } void RbCollider::DrawComponent() { ImGui::PushID(UUID); Component::DrawComponent(); if (ImGui::CollapsingHeader("Rb Collider")) { // Collider type if (ImGui::Combo("Collider", (int*)&collider_type, "Sphere\0Plane\0Capsule\0Box\0", 4) && curr_type != collider_type) { curr_type = collider_type; ChangeCollider(); } // Collider Position if (ImGui::InputFloat3("Position", &position.x, 2, ImGuiInputTextFlags_EnterReturnsTrue) && physics_body) { // Set Position float3 new_pos = transform->GetGlobalPos() + transform->GetGlobalQuat()*local_quat*position; physx::PxTransform transf = physics_body->px_body->getGlobalPose(); transf.p = physx::PxVec3(new_pos.x, new_pos.y, new_pos.z); physics_body->px_body->setGlobalPose(transf); } // Collider Angle if (ImGui::InputFloat3("Angle", &angle.x, 2, ImGuiInputTextFlags_EnterReturnsTrue) && physics_body) { // Set Good Rotation local_quat = Quat::FromEulerXYZ(angle.x*DEGTORAD, angle.y*DEGTORAD, angle.z*DEGTORAD); Quat Qg = transform->GetParentQuat()*transform->CurrRotQuat()*local_quat; physx::PxTransform transf = physics_body->px_body->getGlobalPose(); transf.q = physx::PxQuat(Qg.x, Qg.y, Qg.z, Qg.w); physics_body->px_body->setGlobalPose(transf); } // Collider switch (collider_type) { case COLL_BOX: if (ImGui::InputFloat3("Size", &size.x, 2, ImGuiInputTextFlags_EnterReturnsTrue)) UpdateCollider(); break; case COLL_SPHERE: if (ImGui::InputFloat("Radius", &rad, 0.1f, 1.f, 2, ImGuiInputTextFlags_EnterReturnsTrue)) UpdateCollider(); break; case COLL_PLANE: if (ImGui::InputFloat3("Size", &size.x, 2, ImGuiInputTextFlags_EnterReturnsTrue)) UpdateCollider(); break; case COLL_CAPSULE: if ((ImGui::InputFloat("Half height", &size.z, 0.1f, 1.f, 2, ImGuiInputTextFlags_EnterReturnsTrue)) || (ImGui::InputFloat("Radius", &rad, 0.1f, 1.f, 2, ImGuiInputTextFlags_EnterReturnsTrue))) UpdateCollider(); break; default: break; } if (ImGui::Button("Size From AABB", ImVec2(100,20))) { SetSizeFromBoundingBox(); } // Material ImGui::Text("Friction: Static/Dynamic"); if (ImGui::InputFloat2("", &material.x, 2, ImGuiInputTextFlags_EnterReturnsTrue) && physics_body) { physics_body->SetMaterial(material.x, material.y, material.z); } ImGui::Text("Restitution"); if (ImGui::InputFloat("[0,1]", &material.z, 0.1f, 1.f, 3, ImGuiInputTextFlags_EnterReturnsTrue) && physics_body) { physics_body->SetMaterial(material.x, material.y, material.z); } } ImGui::PopID(); } void RbCollider::SetRigidBodyComp(RigidBody * new_rigid_body) { rigid_body_comp = new_rigid_body; } void RbCollider::SetPhysicsBody(jpPhysicsRigidBody * new_physics_body) { if (physics_body && physics_body != new_physics_body && new_physics_body != nullptr) delete physics_body; physics_body = new_physics_body; } void RbCollider::SetSizeFromBoundingBox() { AABB box = parent->GetBoundaryBox(); if (box.IsFinite()) { size = float3(box.MaxX() - box.MinX(), box.MaxY() - box.MinY(), box.MaxZ() - box.MinZ()); rad = size.x*0.5f; UpdateCollider(); } else { size = float3(1.f, 1.f, 1.f); rad = 0.5; } } jpPhysicsRigidBody * RbCollider::GetPhysicsBody() { return physics_body; } float3 RbCollider::GetPosition() const { return position; } Quat RbCollider::GetLocalQuat() const { return local_quat; } void RbCollider::ChangeCollider() { if (physics_body) physics_body->SetGeometry(physx::PxVec3(size.x, size.y, size.z), rad, curr_type); } void RbCollider::UpdateCollider() { if (physics_body) physics_body->SetShapeScale(physx::PxVec3(size.x, size.y, size.z), rad, curr_type); } void RbCollider::ChangeParent(GameObject * new_parent) { Component::ChangeParent(new_parent); rigid_body_comp = LookForRigidBody(); if (rigid_body_comp != nullptr) { rigid_body_comp->SetColliderComp(this); physics_body = rigid_body_comp->GetPhysicsBody(); } else { physics_body = App->physics->GetNewRigidBody(0); //Set as Knimeatic(Static) by default physics_body->SetDynamic(false); } // Set Default Gemoetry to Sphere physics_body->SetGeometry(physx::PxVec3(size.x, size.y, size.z), rad, curr_type); physics_body->SetMaterial(material.x, material.y, material.z); local_quat = Quat::FromEulerXYZ(angle.x*DEGTORAD, angle.y*DEGTORAD, angle.z*DEGTORAD); transform = parent->GetTransform(); if (!transform->update_transform) transform->update_transform = true; } void RbCollider::Save(const char * buffer_data, char * cursor, int & bytes_copied) { //identifier and type int identifier = COMPONENTIDENTIFIER; uint bytes_to_copy = sizeof(identifier); memcpy(cursor, &identifier, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; bytes_to_copy = sizeof(type); memcpy(cursor, &type, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //UUID and parent UUID bytes_to_copy = sizeof(UUID); memcpy(cursor, &UUID, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; bytes_to_copy = sizeof(parent_UUID); memcpy(cursor, &parent_UUID, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //active and unique bytes_to_copy = sizeof(bool); memcpy(cursor, &active, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &unique, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; ///Collider comp bytes_to_copy = sizeof(JP_COLLIDER_TYPE); memcpy(cursor, &collider_type, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &curr_type, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //material bytes_to_copy = sizeof(float); memcpy(cursor, &material.x, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &material.y, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &material.z, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //position memcpy(cursor, &position.x, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &position.y, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &position.z, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //size memcpy(cursor, &size.x, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &size.y, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &size.z, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //angle memcpy(cursor, &angle.x, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &angle.y, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(cursor, &angle.z, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //rad memcpy(cursor, &rad, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; } void RbCollider::Load(char * cursor, int & bytes_copied) { //UUID and parentUUID uint bytes_to_copy = sizeof(int); memcpy(&UUID, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&parent_UUID, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //active and unique bytes_to_copy = sizeof(bool); memcpy(&active, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&unique, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; ///Collider comp bytes_to_copy = sizeof(JP_COLLIDER_TYPE); memcpy(&collider_type, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&curr_type, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //material bytes_to_copy = sizeof(float); memcpy(&material.x, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&material.y, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&material.z, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //position memcpy(&position.x, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&position.y, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&position.z, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //size memcpy(&size.x, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&size.y, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&size.z, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //angle memcpy(&angle.x, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&angle.y, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; memcpy(&angle.z, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; //rad memcpy(&rad, cursor, bytes_to_copy); cursor += bytes_to_copy; bytes_copied += bytes_to_copy; } void RbCollider::GetOwnBufferSize(uint & buffer_size) { Component::GetOwnBufferSize(buffer_size); buffer_size += sizeof(JP_COLLIDER_TYPE) * 2; buffer_size += sizeof(float) * 3 * 4; //4 float 3: material, pos, size and angle buffer_size += sizeof(float); //rad } RigidBody * RbCollider::LookForRigidBody() { if (parent != nullptr) { for (uint i = 0; i < parent->components.size(); i++) { if (parent->components[i]->GetType() == COMP_TYPE::COMP_RIGIDBODY) { return (RigidBody*)parent->components[i]; } } } return nullptr; }
27.776923
145
0.728145
[ "transform" ]
6022d4ab7e06988f5c102724f8fdbdfd79ae0813
4,248
cpp
C++
VisualSudokuCpp/main.cpp
holgus103/VisualSudokuSolver
4403b5fea4af580128638ccc0e17eee08dcb85e9
[ "MIT" ]
null
null
null
VisualSudokuCpp/main.cpp
holgus103/VisualSudokuSolver
4403b5fea4af580128638ccc0e17eee08dcb85e9
[ "MIT" ]
null
null
null
VisualSudokuCpp/main.cpp
holgus103/VisualSudokuSolver
4403b5fea4af580128638ccc0e17eee08dcb85e9
[ "MIT" ]
null
null
null
// reference: http://aishack.in/tutorials/sudoku-grabber-opencv-detection/ /* * File: main.cpp * Author: holgus103 * * Created on 30 mars 2018, 02:23 */ //#include <cv.h> //#include <highgui.h> #include <opencv2/highgui/highgui.hpp> #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <vector> #include <algorithm> #include <opencv2/imgproc.hpp> #include "globals.h" #include "DigitResognizer.h" using namespace std; using namespace cv; /* * */ bool xCompare(Point a, Point b){ return a.x < b.x; } void swap(vector<Point>& v, int src, int dst){ Point tmp; tmp = v[src]; v[src] = v[dst]; v[dst] = tmp; } void sortPoints(vector<Point>& v){ std::sort(v.begin(), v.end(), xCompare); Point tmp; if(v[0].y > v[1].y){ // swap swap(v, 0, 1); } if(v[2].y > v[3].y){ swap(v, 2, 3); } } void printSudoku(int (*arr)[SUDOKU_SIZE]){ for(auto i = 0; i < SUDOKU_SIZE; i++){ for(auto j = 0; j < SUDOKU_SIZE; j++){ if(arr[i][j] > 9 || arr[i][j] < 0){ std::cout <<" "; } else{ std::cout << arr[i][j] << " "; } } std::cout << std::endl; } } void show(Mat v) { imshow("Display window", v); waitKey(0); destroyAllWindows(); } bool areaCompare(std::vector<Point> a, std::vector<Point> b) { // return a.size() > b.size(); return contourArea(a) > contourArea(b); } extern "C"{ int solve(char* imgPath) { int result[SUDOKU_SIZE][SUDOKU_SIZE]; auto r = new DigitRecognizer(); r->train("train-images-idx3-ubyte", "train-labels-idx1-ubyte"); // load image auto image = imread(imgPath, 0); // create empty image auto box = Mat(image.size(), CV_8UC1); // smoothout the noise GaussianBlur(image, image, Size(11, 11), 0); // thresholding adaptiveThreshold(image, box, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 5, 2); // negate image bitwise_not(box, box); // fill cracks Mat kernel = (Mat_<uchar>(3, 3) << 0, 1, 0, 1, 1, 1, 0, 1, 0); dilate(box, box, kernel); vector<vector<Point>> contours; // find contours cv::findContours(box, contours, RETR_LIST, CHAIN_APPROX_SIMPLE); // get biggest contour std::sort(contours.begin(), contours.end(), areaCompare); vector<Point> curve; vector<vector<Point>> c; // simplify contour approxPolyDP(contours[0], curve, 0.1*arcLength(contours[0], true), true); c.push_back(curve); drawContours(box, c, 0, Scalar(255), CV_FILLED); #ifdef DRAW_CORNERS for(int i = 0; i < curve.size(); i++){ circle(image, curve[i], 5, Scalar(255)); } #endif auto persp = Mat(Size(TARGET_SQUARE_SIZE*SUDOKU_SIZE, TARGET_SQUARE_SIZE*SUDOKU_SIZE), CV_8UC1); Point2f dstPoints[] = { Point2f(0,0), Point2f(0, TARGET_SQUARE_SIZE*SUDOKU_SIZE-1), Point2f(TARGET_SQUARE_SIZE*SUDOKU_SIZE-1, 0), Point2f(TARGET_SQUARE_SIZE*SUDOKU_SIZE-1, TARGET_SQUARE_SIZE*SUDOKU_SIZE-1) }; sortPoints(curve); Point2f srcPoints[] = {curve[0], curve[1], curve[2], curve[3]}; warpPerspective(image, persp, getPerspectiveTransform(srcPoints, dstPoints), Size(TARGET_SQUARE_SIZE*SUDOKU_SIZE, TARGET_SQUARE_SIZE*SUDOKU_SIZE)); #ifdef DISPLAY_PROGRESS show(persp); #endif adaptiveThreshold(persp, persp, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 5, 2); bitwise_not(persp, persp); #ifdef DISPLAY_PROGRESS show(persp); #endif for(auto i = 0; i < SUDOKU_SIZE; i++){ for(auto j = 0; j < SUDOKU_SIZE; j++){ #ifdef DISPLAY_PROGRESS show(persp(Rect(j*TARGET_SQUARE_SIZE, i*TARGET_SQUARE_SIZE, TARGET_SQUARE_SIZE, TARGET_SQUARE_SIZE))); #endif result[i][j] = r->classify(persp(Rect(j*TARGET_SQUARE_SIZE, i*TARGET_SQUARE_SIZE, TARGET_SQUARE_SIZE, TARGET_SQUARE_SIZE))); } } printSudoku(result); return 0; } }
27.230769
155
0.578861
[ "vector" ]
602382f72a185819e40df99e64fa9e7850ed609f
471
cpp
C++
example_gamepad/src/main.cpp
dasoe/ofxPiMapper
f750a04151f15cbce3765021e9ba6eac5b310113
[ "MIT" ]
410
2015-02-04T22:26:32.000Z
2022-03-29T00:00:13.000Z
example_gamepad/src/main.cpp
victorscaff/ofxPiMapper
e79e88e21891abded8388520d4e7f5e6868bfbb7
[ "MIT" ]
162
2015-01-11T16:09:39.000Z
2022-03-14T11:24:48.000Z
example_gamepad/src/main.cpp
victorscaff/ofxPiMapper
e79e88e21891abded8388520d4e7f5e6868bfbb7
[ "MIT" ]
100
2015-02-09T06:42:31.000Z
2022-01-01T01:40:36.000Z
#include "ofMain.h" #include "ofApp.h" #include <string> #include <vector> int main(int argc, char * argv[]){ bool fullscreen = false; std::vector<std::string> arguments = std::vector<std::string>(argv, argv + argc); for(int i = 0; i < arguments.size(); ++i){ if(arguments.at(i) == "-f"){ fullscreen = true; break; } } if(fullscreen){ ofSetupOpenGL(800, 450, OF_FULLSCREEN); }else{ ofSetupOpenGL(800, 450, OF_WINDOW); } ofRunApp(new ofApp()); }
18.84
82
0.636943
[ "vector" ]
6025471734405abfa864426c0f04b3ba24cefe31
11,858
cpp
C++
src/mlpack/methods/range_search/rs_model.cpp
pratik4/mlpack
a27725526b5b0168175b3dd50b92b7121fb49c91
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-08-17T11:59:16.000Z
2021-08-17T11:59:16.000Z
src/mlpack/methods/range_search/rs_model.cpp
Shekharrajak/mlpack
066c67040a600a4600eebc6b5e0d63dc090acb8d
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
src/mlpack/methods/range_search/rs_model.cpp
Shekharrajak/mlpack
066c67040a600a4600eebc6b5e0d63dc090acb8d
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
/** * @file rs_model.cpp * @author Ryan Curtin * * Implementation of the range search model class. */ #include "rs_model.hpp" using namespace std; using namespace mlpack; using namespace mlpack::range; /** * Initialize the RSModel with the given tree type and whether or not a random * basis should be used. */ RSModel::RSModel(TreeTypes treeType, bool randomBasis) : treeType(treeType), randomBasis(randomBasis), kdTreeRS(NULL), coverTreeRS(NULL), rTreeRS(NULL), rStarTreeRS(NULL), ballTreeRS(NULL), xTreeRS(NULL), hilbertRTreeRS(NULL), rPlusTreeRS(NULL), rPlusPlusTreeRS(NULL), vpTreeRS(NULL), rpTreeRS(NULL), maxRPTreeRS(NULL), ubTreeRS(NULL) { // Nothing to do. } // Clean memory, if necessary. RSModel::~RSModel() { CleanMemory(); } void RSModel::BuildModel(arma::mat&& referenceSet, const size_t leafSize, const bool naive, const bool singleMode) { // Initialize random basis if necessary. if (randomBasis) { Log::Info << "Creating random basis..." << endl; math::RandomBasis(q, referenceSet.n_rows); } // Clean memory, if necessary. CleanMemory(); // Do we need to modify the reference set? if (randomBasis) referenceSet = q * referenceSet; if (!naive) { Timer::Start("tree_building"); Log::Info << "Building reference tree..." << endl; } switch (treeType) { case KD_TREE: // If necessary, build the tree. if (naive) { kdTreeRS = new RSType<tree::KDTree>(move(referenceSet), naive, singleMode); } else { vector<size_t> oldFromNewReferences; RSType<tree::KDTree>::Tree* kdTree = new RSType<tree::KDTree>::Tree( move(referenceSet), oldFromNewReferences, leafSize); kdTreeRS = new RSType<tree::KDTree>(kdTree, singleMode); // Give the model ownership of the tree and the mappings. kdTreeRS->treeOwner = true; kdTreeRS->oldFromNewReferences = move(oldFromNewReferences); } break; case COVER_TREE: coverTreeRS = new RSType<tree::StandardCoverTree>(move(referenceSet), naive, singleMode); break; case R_TREE: rTreeRS = new RSType<tree::RTree>(move(referenceSet), naive, singleMode); break; case R_STAR_TREE: rStarTreeRS = new RSType<tree::RStarTree>(move(referenceSet), naive, singleMode); break; case BALL_TREE: // If necessary, build the ball tree. if (naive) { ballTreeRS = new RSType<tree::BallTree>(move(referenceSet), naive, singleMode); } else { vector<size_t> oldFromNewReferences; RSType<tree::BallTree>::Tree* ballTree = new RSType<tree::BallTree>::Tree(move(referenceSet), oldFromNewReferences, leafSize); ballTreeRS = new RSType<tree::BallTree>(ballTree, singleMode); // Give the model ownership of the tree and the mappings. ballTreeRS->treeOwner = true; ballTreeRS->oldFromNewReferences = move(oldFromNewReferences); } break; case X_TREE: xTreeRS = new RSType<tree::XTree>(move(referenceSet), naive, singleMode); break; case HILBERT_R_TREE: hilbertRTreeRS = new RSType<tree::HilbertRTree>(move(referenceSet), naive, singleMode); break; case R_PLUS_TREE: rPlusTreeRS = new RSType<tree::RPlusTree>(move(referenceSet), naive, singleMode); break; case R_PLUS_PLUS_TREE: rPlusPlusTreeRS = new RSType<tree::RPlusPlusTree>(move(referenceSet), naive, singleMode); break; case VP_TREE: vpTreeRS = new RSType<tree::VPTree>(move(referenceSet), naive, singleMode); break; case RP_TREE: rpTreeRS = new RSType<tree::RPTree>(move(referenceSet), naive, singleMode); break; case MAX_RP_TREE: maxRPTreeRS = new RSType<tree::MaxRPTree>(move(referenceSet), naive, singleMode); break; case UB_TREE: ubTreeRS = new RSType<tree::UBTree>(move(referenceSet), naive, singleMode); break; } if (!naive) { Timer::Stop("tree_building"); Log::Info << "Tree built." << endl; } } // Perform range search. void RSModel::Search(arma::mat&& querySet, const math::Range& range, vector<vector<size_t>>& neighbors, vector<vector<double>>& distances) { // We may need to map the query set randomly. if (randomBasis) querySet = q * querySet; Log::Info << "Search for points in the range [" << range.Lo() << ", " << range.Hi() << "] with "; if (!Naive() && !SingleMode()) Log::Info << "dual-tree " << TreeName() << " search..." << endl; else if (!Naive()) Log::Info << "single-tree " << TreeName() << " search..." << endl; else Log::Info << "brute-force (naive) search..." << endl; switch (treeType) { case KD_TREE: if (!kdTreeRS->Naive() && !kdTreeRS->SingleMode()) { // Build a second tree and search. Timer::Start("tree_building"); Log::Info << "Building query tree..." << endl; vector<size_t> oldFromNewQueries; RSType<tree::KDTree>::Tree queryTree(move(querySet), oldFromNewQueries, leafSize); Log::Info << "Tree built." << endl; Timer::Stop("tree_building"); vector<vector<size_t>> neighborsOut; vector<vector<double>> distancesOut; kdTreeRS->Search(&queryTree, range, neighborsOut, distancesOut); // Remap the query points. neighbors.resize(queryTree.Dataset().n_cols); distances.resize(queryTree.Dataset().n_cols); for (size_t i = 0; i < queryTree.Dataset().n_cols; ++i) { neighbors[oldFromNewQueries[i]] = neighborsOut[i]; distances[oldFromNewQueries[i]] = distancesOut[i]; } } else { // Search without building a second tree. kdTreeRS->Search(querySet, range, neighbors, distances); } break; case COVER_TREE: coverTreeRS->Search(querySet, range, neighbors, distances); break; case R_TREE: rTreeRS->Search(querySet, range, neighbors, distances); break; case R_STAR_TREE: rStarTreeRS->Search(querySet, range, neighbors, distances); break; case BALL_TREE: if (!ballTreeRS->Naive() && !ballTreeRS->SingleMode()) { // Build a second tree and search. Timer::Start("tree_building"); Log::Info << "Building query tree..." << endl; vector<size_t> oldFromNewQueries; RSType<tree::BallTree>::Tree queryTree(move(querySet), oldFromNewQueries, leafSize); Log::Info << "Tree built." << endl; Timer::Stop("tree_building"); vector<vector<size_t>> neighborsOut; vector<vector<double>> distancesOut; ballTreeRS->Search(&queryTree, range, neighborsOut, distancesOut); // Remap the query points. neighbors.resize(queryTree.Dataset().n_cols); distances.resize(queryTree.Dataset().n_cols); for (size_t i = 0; i < queryTree.Dataset().n_cols; ++i) { neighbors[oldFromNewQueries[i]] = neighborsOut[i]; distances[oldFromNewQueries[i]] = distancesOut[i]; } } else { // Search without building a second tree. ballTreeRS->Search(querySet, range, neighbors, distances); } break; case X_TREE: xTreeRS->Search(querySet, range, neighbors, distances); break; case HILBERT_R_TREE: hilbertRTreeRS->Search(querySet, range, neighbors, distances); break; case R_PLUS_TREE: rPlusTreeRS->Search(querySet, range, neighbors, distances); break; case R_PLUS_PLUS_TREE: rPlusPlusTreeRS->Search(querySet, range, neighbors, distances); break; case VP_TREE: vpTreeRS->Search(querySet, range, neighbors, distances); break; case RP_TREE: rpTreeRS->Search(querySet, range, neighbors, distances); break; case MAX_RP_TREE: maxRPTreeRS->Search(querySet, range, neighbors, distances); break; case UB_TREE: ubTreeRS->Search(querySet, range, neighbors, distances); break; } } // Perform range search (monochromatic case). void RSModel::Search(const math::Range& range, vector<vector<size_t>>& neighbors, vector<vector<double>>& distances) { Log::Info << "Search for points in the range [" << range.Lo() << ", " << range.Hi() << "] with "; if (!Naive() && !SingleMode()) Log::Info << "dual-tree " << TreeName() << " search..." << endl; else if (!Naive()) Log::Info << "single-tree " << TreeName() << " search..." << endl; else Log::Info << "brute-force (naive) search..." << endl; switch (treeType) { case KD_TREE: kdTreeRS->Search(range, neighbors, distances); break; case COVER_TREE: coverTreeRS->Search(range, neighbors, distances); break; case R_TREE: rTreeRS->Search(range, neighbors, distances); break; case R_STAR_TREE: rStarTreeRS->Search(range, neighbors, distances); break; case BALL_TREE: ballTreeRS->Search(range, neighbors, distances); break; case X_TREE: xTreeRS->Search(range, neighbors, distances); break; case HILBERT_R_TREE: hilbertRTreeRS->Search(range, neighbors, distances); break; case R_PLUS_TREE: rPlusTreeRS->Search(range, neighbors, distances); break; case R_PLUS_PLUS_TREE: rPlusPlusTreeRS->Search(range, neighbors, distances); break; case VP_TREE: vpTreeRS->Search(range, neighbors, distances); break; case RP_TREE: rpTreeRS->Search(range, neighbors, distances); break; case MAX_RP_TREE: maxRPTreeRS->Search(range, neighbors, distances); break; case UB_TREE: ubTreeRS->Search(range, neighbors, distances); break; } } // Get the name of the tree type. std::string RSModel::TreeName() const { switch (treeType) { case KD_TREE: return "kd-tree"; case COVER_TREE: return "cover tree"; case R_TREE: return "R tree"; case R_STAR_TREE: return "R* tree"; case BALL_TREE: return "ball tree"; case X_TREE: return "X tree"; case HILBERT_R_TREE: return "Hilbert R tree"; case R_PLUS_TREE: return "R+ tree"; case R_PLUS_PLUS_TREE: return "R++ tree"; case VP_TREE: return "vantage point tree"; case RP_TREE: return "random projection tree (mean split)"; case MAX_RP_TREE: return "random projection tree (max split)"; case UB_TREE: return "UB tree"; default: return "unknown tree"; } } // Clean memory. void RSModel::CleanMemory() { if (kdTreeRS) delete kdTreeRS; if (coverTreeRS) delete coverTreeRS; if (rTreeRS) delete rTreeRS; if (rStarTreeRS) delete rStarTreeRS; if (ballTreeRS) delete ballTreeRS; if (xTreeRS) delete xTreeRS; if (hilbertRTreeRS) delete hilbertRTreeRS; if (rPlusTreeRS) delete rPlusTreeRS; if (rPlusPlusTreeRS) delete rPlusPlusTreeRS; if (vpTreeRS) delete vpTreeRS; if (rpTreeRS) delete rpTreeRS; if (maxRPTreeRS) delete maxRPTreeRS; if (ubTreeRS) delete ubTreeRS; kdTreeRS = NULL; coverTreeRS = NULL; rTreeRS = NULL; rStarTreeRS = NULL; ballTreeRS = NULL; xTreeRS = NULL; hilbertRTreeRS = NULL; rPlusTreeRS = NULL; rPlusPlusTreeRS = NULL; vpTreeRS = NULL; rpTreeRS = NULL; maxRPTreeRS = NULL; ubTreeRS = NULL; }
25.947484
80
0.611908
[ "vector", "model" ]
60266426cdf00a7259226ec6c9fd9174b5d0c3f4
14,984
cpp
C++
UltraDV/Source/Editors/Source/TAudioEditorView.cpp
ModeenF/UltraDV
30474c60880de541b33687c96293766fe0dc4aef
[ "Unlicense" ]
null
null
null
UltraDV/Source/Editors/Source/TAudioEditorView.cpp
ModeenF/UltraDV
30474c60880de541b33687c96293766fe0dc4aef
[ "Unlicense" ]
null
null
null
UltraDV/Source/Editors/Source/TAudioEditorView.cpp
ModeenF/UltraDV
30474c60880de541b33687c96293766fe0dc4aef
[ "Unlicense" ]
null
null
null
//--------------------------------------------------------------------- // // File: TAudioEditorView.cpp // // Author: Gene Z. Ragan // // Date: 02.19.98 // // Desc: Audio editor view. Handle display of waveform // // Copyright ©1998 mediapede Software // //--------------------------------------------------------------------- // Includes #include "BuildApp.h" #include <app/Application.h> #include <support/Debug.h> #include "AppConstants.h" #include "AppMessages.h" #include "TAudioEditor.h" #include "TAudioEditorView.h" #include "TAudioTimelineView.h" #include "TAudioEngine.h" // Constants //--------------------------------------------------------------------- // Constructor //--------------------------------------------------------------------- // // TAudioEditorView::TAudioEditorView(TAudioEditor *parent, BRect bounds) : BView(bounds, "AudioEditorView", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_FRAME_EVENTS) { // Save parent m_Parent = parent; // Set up member varibales m_UpdatePreview = true; m_PreviewBitmap = NULL; // We handle our own drawing SetViewColor(B_TRANSPARENT_32_BIT); } //--------------------------------------------------------------------- // Destructor //--------------------------------------------------------------------- // // TAudioEditorView::~TAudioEditorView() { // Clean up old preview if (m_PreviewBitmap) { m_PreviewBitmap->Lock(); BView *oldView = m_PreviewBitmap->ChildAt(0); m_PreviewBitmap->RemoveChild(oldView); delete oldView; delete m_PreviewBitmap; } } #pragma mark - #pragma mark === Mouse Handling === //--------------------------------------------------------------------- // MouseDown //--------------------------------------------------------------------- // // Handle mouse down events // void TAudioEditorView::MouseDown(BPoint where) { } //--------------------------------------------------------------------- // MouseUp //--------------------------------------------------------------------- // // Handle mouse up events // void TAudioEditorView::MouseUp(BPoint where) { } //--------------------------------------------------------------------- // MouseMoved //--------------------------------------------------------------------- // // Handle mouse moved events // void TAudioEditorView::MouseMoved( BPoint where, uint32 code, const BMessage *a_message ) { // Update Timeline. Clip the location of where.x to be within the bounds // of the channel bounds //if (where.x > Bounds().right) // where.x = Bounds().right; //BMessage *message = new BMessage(UPDATE_AUDIOTIMELINE_MSG); //message->AddPoint("Where", where); //Window()->PostMessage( message, (BHandler *)((TAudioEditor *)Window())->GetTimeline() ); //delete message; } //--------------------------------------------------------------------- // WindowActivated //--------------------------------------------------------------------- // // Handle window activated events // void TAudioEditorView::WindowActivated(bool state) { } //--------------------------------------------------------------------- // KeyDown //--------------------------------------------------------------------- // // Handle key down event // void TAudioEditorView::KeyDown(const char *bytes, int32 numBytes) { BView::KeyDown(bytes, numBytes); } //--------------------------------------------------------------------- // KeyDown //--------------------------------------------------------------------- // // Handle key up event // void TAudioEditorView::KeyUp(const char *bytes, int32 numBytes) { } #pragma mark - #pragma mark === Frame Handling === //--------------------------------------------------------------------- // FrameMoved //--------------------------------------------------------------------- // // Handle movement of frame // void TAudioEditorView::FrameMoved(BPoint new_position) { // Inform parent BView::FrameMoved(new_position); } //--------------------------------------------------------------------- // FrameResized //--------------------------------------------------------------------- // // Handle resize of frame // void TAudioEditorView::FrameResized(float new_width, float new_height) { // For now, invalidate the whole screen and get a redraw filled to the // current frame size Invalidate(); // Inform parent BView::FrameResized(new_width, new_height); } #pragma mark - #pragma mark === Message Handling === //--------------------------------------------------------------------- // MessageReceived //--------------------------------------------------------------------- // // void TAudioEditorView::MessageReceived(BMessage* message) { switch (message->what) { case AUDIO_PLAY_BUTTON_MSG: break; case AUDIO_STOP_BUTTON_MSG: break; case AUDIO_ZOOMIN_BUTTON_MSG: ZoomIn(); break; case AUDIO_ZOOMOUT_BUTTON_MSG: ZoomOut(); break; // Draw playback indicator case UPDATE_AUDIOINDICATOR_MSG: { BPoint drawPt; message->FindPoint("IndicatorPoint", &drawPt); DrawIndicatorTick(drawPt); } break; } } #pragma mark - #pragma mark === Clipping Functions === //--------------------------------------------------------------------- // Clip16Bit //--------------------------------------------------------------------- // // Clip a value within the 16 bit boundary void TAudioEditorView::Clip16Bit(int32 *theValue) { if (*theValue > 32767) *theValue = 32767; if (*theValue < -32768) *theValue = -32768; } #pragma mark - #pragma mark === Drawing Functions === //--------------------------------------------------------------------- // Draw //--------------------------------------------------------------------- // // void TAudioEditorView::Draw(BRect updateRect) { // Set up environment PushState(); SetPenSize(0.0); //const BRect bounds = Bounds(); // Do we need to update the cached waveform? if (m_UpdatePreview) { // Clean up old preview if (m_PreviewBitmap) { m_PreviewBitmap->Lock(); BView *oldView = m_PreviewBitmap->ChildAt(0); m_PreviewBitmap->RemoveChild(oldView); delete oldView; delete m_PreviewBitmap; } // Create preview bitmap the size of the view m_PreviewBitmap = new BBitmap( updateRect, B_CMAP8, true); // Create preview view BView *previewView = new BView(updateRect, "PreviewView", B_FOLLOW_ALL, 0); m_PreviewBitmap->AddChild(previewView); // Draw waveform into bitmap CreateWaveFormCache(previewView, updateRect); previewView->Looper()->Lock(); previewView->Sync(); previewView->Looper()->Unlock(); m_UpdatePreview = false; } // Draw the cached waveform bitmap BPoint drawPt(updateRect.left, updateRect.top); DrawBitmap(m_PreviewBitmap, updateRect, updateRect); // Restore environment PopState(); } //--------------------------------------------------------------------- // DrawIndicatorTick //--------------------------------------------------------------------- // // This draws the playback indicator tick mark at the appropriate // location. It also cleans up the last postion of the tick mark. // void TAudioEditorView::DrawIndicatorTick(BPoint drawPt) { BPoint startPt, endPt; BRect bounds = Bounds(); // Set up the environment rgb_color saveColor = HighColor(); drawing_mode saveMode = DrawingMode(); float oldPenSize = PenSize(); SetHighColor(kBlack); SetDrawingMode(B_OP_INVERT); // Save point into tracking member variable points m_TickPt = drawPt; // If point is at new location, go ahead and draw if (m_TickPt.x != m_OldTickPt.x) { // Erase last indicator tick. Clip out the outline lines startPt.Set(m_OldTickPt.x, bounds.top+1); endPt.Set(m_OldTickPt.x, bounds.bottom-1); StrokeLine(startPt, endPt); // Draw the new indicator tick. Clip out the outline lines startPt.Set(m_TickPt.x, bounds.top+1); endPt.Set(m_TickPt.x, bounds.bottom-1); StrokeLine(startPt, endPt); // Save tick location for next compare m_OldTickPt = m_TickPt; } // Restore environment SetPenSize(oldPenSize); SetDrawingMode(saveMode); SetHighColor(saveColor); } //--------------------------------------------------------------------- // SetAudioViewBounds //--------------------------------------------------------------------- // // Resize view based on sound file attributes // void TAudioEditorView::SetAudioViewBounds() { BPoint insertPt; // Set up bounds... BRect bounds = Bounds(); bounds.right = m_Parent->m_NumSamples / m_Parent->m_SamplesPerPixel; // Resize toolbar and view... ResizeTo( bounds.Width(), bounds.Height()); m_Parent->m_Timeline->SetTimelineViewBounds(bounds); // Adjust scroll bars m_Parent->m_HScroll->SetRange( 0, bounds.Width() ); //m_Parent->m_HScroll->SetProportion(1.0); //m_VScroll } //--------------------------------------------------------------------- // CreatePreview //--------------------------------------------------------------------- // // Render cached waveform view // void TAudioEditorView::CreateWaveFormCache(BView *previewView, const BRect bounds) { BPoint startPt, endPt; previewView->Looper()->Lock(); PushState(); // Fill background previewView->SetHighColor(kLightGrey); previewView->FillRect( Bounds() ); // Set pen color previewView->SetHighColor(kDarkGrey); /* // Get middle point of view float viewMiddle = previewView->Bounds().Height() / 2; // Don't draw past end of file if (m_Parent->m_SamplesPerPixel * (bounds.left + 1) < m_Parent->m_NumSamples) { // Get pointer to sound file BSoundFile *soundFile = m_Parent->m_Engine->m_SoundFile; // Create buffer the size of the number of pixels per sample * the sounds frame size int32 bufferSize = m_Parent->m_SamplesPerPixel * soundFile->FrameSize(); char *soundBuffer = (char *)malloc(bufferSize); // Save current position, rewind the buffer and seek to proper frame position off_t frameIndex = m_Parent->m_Engine->m_SoundFile->FrameIndex(); off_t seekVal = soundFile->SeekToFrame( bounds.left * bufferSize); if ( seekVal >= 0 ) { // reset our horizontal position int32 hPos = bounds.left; // Draw the waveform from left to right for (int32 currentPos = bounds.left; currentPos < bounds.right; currentPos++) { // Exit if we have passed the end of the file if ( m_Parent->m_SamplesPerPixel * (currentPos + 1) < m_Parent->m_NumSamples) { // Read data into buffer status_t framesRead = soundFile->ReadFrames(soundBuffer, bufferSize); // Go through each sample at this pixel and find the high and low points int32 low, high; low = 32767; high = -32768; // Make sure we have some data if (framesRead > 0) { if ( m_Parent->m_SampleSize == 1) { // Go through each sample at this pixel and find the high and low points char *ptr = (char *)soundBuffer; int32 endPt = m_Parent->m_SamplesPerPixel * m_Parent->m_NumChannels; for (int32 index = 0; index < framesRead; index++) { // Locate the lowest and highest samples in the buffer if ( *ptr < low ) low = *ptr; if ( *ptr > high ) high = *ptr; // Increment pointer ptr++; } } else { int16 *ptr = (int16 *)soundBuffer; int32 endPt = m_Parent->m_SamplesPerPixel * m_Parent->m_NumChannels; for (int32 index = 0; index < framesRead; index++) { // Locate the lowest and highest samples in the buffer if ( *ptr < low ) low = *ptr; if ( *ptr > high ) high = *ptr; // Increment pointer ptr++; } // Convert to 8 bit for drawing low >>= 8; high >>= 8; } } // Set points and draw line startPt.Set( hPos, viewMiddle - (high * viewMiddle / 128) ); endPt.Set( hPos, viewMiddle + ( -low * viewMiddle / 128) ); previewView->StrokeLine(startPt, endPt); // Increment horizontal position hPos++; } } } // Free buffer free(soundBuffer); // Restore file position soundFile->SeekToFrame(frameIndex); } // Draw center divider line previewView->SetHighColor(kBlack); previewView->MovePenTo(bounds.left, viewMiddle); endPt.Set(bounds.right, viewMiddle); previewView->StrokeLine(endPt); */ // Draw selections //LInvertRect(&selectionRect); //if (insertOn) // DrawInsert(); //if (itsEditor->isPlaying) // DrawPlayLine(lastPos); PopState(); } #pragma mark - #pragma mark === Utility Functions === //--------------------------------------------------------------------- // PixelsToSamples //--------------------------------------------------------------------- // // Coverts samples to pixels // int32 TAudioEditorView::SamplesToPixels(int32 theSamples) { return (theSamples / m_Parent->m_SamplesPerPixel); } //--------------------------------------------------------------------- // PixelsToSamples //--------------------------------------------------------------------- // // Coverts pixels to samples // int32 TAudioEditorView::PixelsToSamples(int32 thePixels) { return (thePixels * m_Parent->m_SamplesPerPixel); } //--------------------------------------------------------------------- // ZoomIn //--------------------------------------------------------------------- // // Zoom in on wave and adjust size of view and timeline // void TAudioEditorView::ZoomIn() { if ( m_Parent->m_SamplesPerPixel > 1) { // Adjust samples per pixel m_Parent->m_SamplesPerPixel /= 2; // Resize view and toolbar SetAudioViewBounds(); // Scroll to proper position //itsPane->GetPosition(&lp); //lp.h *= 2; //itsPane->ScrollTo(&lp, FALSE); // Force redraw and create main bitmap m_UpdatePreview = true; } } //--------------------------------------------------------------------- // ZoomOut //--------------------------------------------------------------------- // // Zoom out on wave and adjust size of view and timeline // void TAudioEditorView::ZoomOut() { // Zoom out if only the frame bounds is larger than the window bounds... float winWidth = Window()->Bounds().Width(); float frameWidth = Frame().Width(); if ( frameWidth >= winWidth ) //if ( Window()->Bounds().Width() > Frame().Width()) { // Adjust sample per pixel m_Parent->m_SamplesPerPixel *= 2; // Resize view and toolbar width SetAudioViewBounds(); // Halve the current position to retain the same position at the right // edge of the window. //itsPane->GetPosition(&lp); //lp.h /= 2; //itsPane->ScrollTo(&lp, FALSE); // Force redraw and create main bitmap m_UpdatePreview = true; } }
24.090032
165
0.526895
[ "render" ]
602ebd5fe147de758a87c0bf4d16e2e57c7f2379
12,762
cc
C++
RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronFromPFCandidatePlugin.cc
ahmad3213/cmssw
750b64a3cb184f702939fdafa241214c77e7f4fd
[ "Apache-2.0" ]
null
null
null
RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronFromPFCandidatePlugin.cc
ahmad3213/cmssw
750b64a3cb184f702939fdafa241214c77e7f4fd
[ "Apache-2.0" ]
null
null
null
RecoTauTag/RecoTau/plugins/PFRecoTauChargedHadronFromPFCandidatePlugin.cc
ahmad3213/cmssw
750b64a3cb184f702939fdafa241214c77e7f4fd
[ "Apache-2.0" ]
1
2019-04-03T19:23:27.000Z
2019-04-03T19:23:27.000Z
/* * PFRecoTauChargedHadronFromPFCandidatePlugin * * Build PFRecoTauChargedHadron objects * using charged PFCandidates and/or PFNeutralHadrons as input * * Author: Christian Veelken, LLR * */ #include "RecoTauTag/RecoTau/interface/PFRecoTauChargedHadronPlugins.h" #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" #include "DataFormats/VertexReco/interface/Vertex.h" #include "DataFormats/VertexReco/interface/VertexFwd.h" #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" #include "DataFormats/GsfTrackReco/interface/GsfTrack.h" #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" #include "DataFormats/MuonReco/interface/Muon.h" #include "DataFormats/MuonReco/interface/MuonFwd.h" #include "DataFormats/TauReco/interface/PFRecoTauChargedHadron.h" #include "DataFormats/JetReco/interface/PFJet.h" #include "DataFormats/Math/interface/deltaR.h" #include "DataFormats/Common/interface/RefToPtr.h" #include "RecoTauTag/RecoTau/interface/RecoTauCommonUtilities.h" #include "RecoTauTag/RecoTau/interface/RecoTauQualityCuts.h" #include "RecoTauTag/RecoTau/interface/RecoTauVertexAssociator.h" #include "RecoTauTag/RecoTau/interface/pfRecoTauChargedHadronAuxFunctions.h" #include <memory> namespace reco { namespace tau { class PFRecoTauChargedHadronFromPFCandidatePlugin : public PFRecoTauChargedHadronBuilderPlugin { public: explicit PFRecoTauChargedHadronFromPFCandidatePlugin(const edm::ParameterSet&, edm::ConsumesCollector &&iC); ~PFRecoTauChargedHadronFromPFCandidatePlugin() override; // Return type is auto_ptr<ChargedHadronVector> return_type operator()(const reco::PFJet&) const override; // Hook to update PV information void beginEvent() override; private: typedef std::vector<reco::PFCandidatePtr> PFCandPtrs; RecoTauVertexAssociator vertexAssociator_; RecoTauQualityCuts* qcuts_; std::vector<int> inputPdgIds_; // type of candidates to clusterize double dRmergeNeutralHadronWrtChargedHadron_; double dRmergeNeutralHadronWrtNeutralHadron_; double dRmergeNeutralHadronWrtElectron_; double dRmergeNeutralHadronWrtOther_; int minBlockElementMatchesNeutralHadron_; int maxUnmatchedBlockElementsNeutralHadron_; double dRmergePhotonWrtChargedHadron_; double dRmergePhotonWrtNeutralHadron_; double dRmergePhotonWrtElectron_; double dRmergePhotonWrtOther_; int minBlockElementMatchesPhoton_; int maxUnmatchedBlockElementsPhoton_; double minMergeNeutralHadronEt_; double minMergeGammaEt_; double minMergeChargedHadronPt_; int verbosity_; }; PFRecoTauChargedHadronFromPFCandidatePlugin::PFRecoTauChargedHadronFromPFCandidatePlugin(const edm::ParameterSet& pset, edm::ConsumesCollector &&iC) : PFRecoTauChargedHadronBuilderPlugin(pset,std::move(iC)), vertexAssociator_(pset.getParameter<edm::ParameterSet>("qualityCuts"),std::move(iC)), qcuts_(nullptr) { edm::ParameterSet qcuts_pset = pset.getParameterSet("qualityCuts").getParameterSet("signalQualityCuts"); qcuts_ = new RecoTauQualityCuts(qcuts_pset); inputPdgIds_ = pset.getParameter<std::vector<int> >("chargedHadronCandidatesParticleIds"); dRmergeNeutralHadronWrtChargedHadron_ = pset.getParameter<double>("dRmergeNeutralHadronWrtChargedHadron"); dRmergeNeutralHadronWrtNeutralHadron_ = pset.getParameter<double>("dRmergeNeutralHadronWrtNeutralHadron"); dRmergeNeutralHadronWrtElectron_ = pset.getParameter<double>("dRmergeNeutralHadronWrtElectron"); dRmergeNeutralHadronWrtOther_ = pset.getParameter<double>("dRmergeNeutralHadronWrtOther"); minBlockElementMatchesNeutralHadron_ = pset.getParameter<int>("minBlockElementMatchesNeutralHadron"); maxUnmatchedBlockElementsNeutralHadron_ = pset.getParameter<int>("maxUnmatchedBlockElementsNeutralHadron"); dRmergePhotonWrtChargedHadron_ = pset.getParameter<double>("dRmergePhotonWrtChargedHadron"); dRmergePhotonWrtNeutralHadron_ = pset.getParameter<double>("dRmergePhotonWrtNeutralHadron"); dRmergePhotonWrtElectron_ = pset.getParameter<double>("dRmergePhotonWrtElectron"); dRmergePhotonWrtOther_ = pset.getParameter<double>("dRmergePhotonWrtOther"); minBlockElementMatchesPhoton_ = pset.getParameter<int>("minBlockElementMatchesPhoton"); maxUnmatchedBlockElementsPhoton_ = pset.getParameter<int>("maxUnmatchedBlockElementsPhoton"); minMergeNeutralHadronEt_ = pset.getParameter<double>("minMergeNeutralHadronEt"); minMergeGammaEt_ = pset.getParameter<double>("minMergeGammaEt"); minMergeChargedHadronPt_ = pset.getParameter<double>("minMergeChargedHadronPt"); verbosity_ = pset.getParameter<int>("verbosity"); } PFRecoTauChargedHadronFromPFCandidatePlugin::~PFRecoTauChargedHadronFromPFCandidatePlugin() { delete qcuts_; } // Update the primary vertex void PFRecoTauChargedHadronFromPFCandidatePlugin::beginEvent() { vertexAssociator_.setEvent(*evt()); } namespace { std::string getPFCandidateType(reco::PFCandidate::ParticleType pfCandidateType) { if ( pfCandidateType == reco::PFCandidate::X ) return "undefined"; else if ( pfCandidateType == reco::PFCandidate::h ) return "PFChargedHadron"; else if ( pfCandidateType == reco::PFCandidate::e ) return "PFElectron"; else if ( pfCandidateType == reco::PFCandidate::mu ) return "PFMuon"; else if ( pfCandidateType == reco::PFCandidate::gamma ) return "PFGamma"; else if ( pfCandidateType == reco::PFCandidate::h0 ) return "PFNeutralHadron"; else if ( pfCandidateType == reco::PFCandidate::h_HF ) return "HF_had"; else if ( pfCandidateType == reco::PFCandidate::egamma_HF ) return "HF_em"; else assert(0); } bool isMatchedByBlockElement(const reco::PFCandidate& pfCandidate1, const reco::PFCandidate& pfCandidate2, int minMatches1, int minMatches2, int maxUnmatchedBlockElements1plus2) { reco::PFCandidate::ElementsInBlocks blockElements1 = pfCandidate1.elementsInBlocks(); int numBlocks1 = blockElements1.size(); reco::PFCandidate::ElementsInBlocks blockElements2 = pfCandidate2.elementsInBlocks(); int numBlocks2 = blockElements2.size(); int numBlocks_matched = 0; for ( reco::PFCandidate::ElementsInBlocks::const_iterator blockElement1 = blockElements1.begin(); blockElement1 != blockElements1.end(); ++blockElement1 ) { bool isMatched = false; for ( reco::PFCandidate::ElementsInBlocks::const_iterator blockElement2 = blockElements2.begin(); blockElement2 != blockElements2.end(); ++blockElement2 ) { if ( blockElement1->first.id() == blockElement2->first.id() && blockElement1->first.key() == blockElement2->first.key() && blockElement1->second == blockElement2->second ) { isMatched = true; } } if ( isMatched ) ++numBlocks_matched; } assert(numBlocks_matched <= numBlocks1); assert(numBlocks_matched <= numBlocks2); if ( numBlocks_matched >= minMatches1 && numBlocks_matched >= minMatches2 && ((numBlocks1 - numBlocks_matched) + (numBlocks2 - numBlocks_matched)) <= maxUnmatchedBlockElements1plus2 ) { return true; } else { return false; } } } PFRecoTauChargedHadronFromPFCandidatePlugin::return_type PFRecoTauChargedHadronFromPFCandidatePlugin::operator()(const reco::PFJet& jet) const { if ( verbosity_ ) { edm::LogPrint("TauChHadronFromPF") << "<PFRecoTauChargedHadronFromPFCandidatePlugin::operator()>:"; edm::LogPrint("TauChHadronFromPF") << " pluginName = " << name() ; } ChargedHadronVector output; // Get the candidates passing our quality cuts qcuts_->setPV(vertexAssociator_.associatedVertex(jet)); PFCandPtrs candsVector = qcuts_->filterCandRefs(pfCandidates(jet, inputPdgIds_)); for ( PFCandPtrs::iterator cand = candsVector.begin(); cand != candsVector.end(); ++cand ) { if ( verbosity_ ) { edm::LogPrint("TauChHadronFromPF") << "processing PFCandidate: Pt = " << (*cand)->pt() << ", eta = " << (*cand)->eta() << ", phi = " << (*cand)->phi() << " (type = " << getPFCandidateType((*cand)->particleId()) << ", charge = " << (*cand)->charge() << ")" ; } PFRecoTauChargedHadron::PFRecoTauChargedHadronAlgorithm algo = PFRecoTauChargedHadron::kUndefined; if ( std::abs((*cand)->charge()) > 0.5 ) algo = PFRecoTauChargedHadron::kChargedPFCandidate; else algo = PFRecoTauChargedHadron::kPFNeutralHadron; std::auto_ptr<PFRecoTauChargedHadron> chargedHadron(new PFRecoTauChargedHadron(**cand, algo)); if ( (*cand)->trackRef().isNonnull() ) chargedHadron->track_ = edm::refToPtr((*cand)->trackRef()); else if ( (*cand)->muonRef().isNonnull() && (*cand)->muonRef()->innerTrack().isNonnull() ) chargedHadron->track_ = edm::refToPtr((*cand)->muonRef()->innerTrack()); else if ( (*cand)->muonRef().isNonnull() && (*cand)->muonRef()->globalTrack().isNonnull() ) chargedHadron->track_ = edm::refToPtr((*cand)->muonRef()->globalTrack()); else if ( (*cand)->muonRef().isNonnull() && (*cand)->muonRef()->outerTrack().isNonnull() ) chargedHadron->track_ = edm::refToPtr((*cand)->muonRef()->outerTrack()); else if ( (*cand)->gsfTrackRef().isNonnull() ) chargedHadron->track_ = edm::refToPtr((*cand)->gsfTrackRef()); chargedHadron->chargedPFCandidate_ = (*cand); chargedHadron->addDaughter(*cand); chargedHadron->positionAtECALEntrance_ = (*cand)->positionAtECALEntrance(); reco::PFCandidate::ParticleType chargedPFCandidateType = chargedHadron->chargedPFCandidate_->particleId(); if ( chargedHadron->pt() > minMergeChargedHadronPt_ ) { std::vector<reco::PFCandidatePtr> jetConstituents = jet.getPFConstituents(); for ( std::vector<reco::PFCandidatePtr>::const_iterator jetConstituent = jetConstituents.begin(); jetConstituent != jetConstituents.end(); ++jetConstituent ) { // CV: take care of not double-counting energy in case "charged" PFCandidate is in fact a PFNeutralHadron if ( (*jetConstituent) == chargedHadron->chargedPFCandidate_ ) continue; reco::PFCandidate::ParticleType jetConstituentType = (*jetConstituent)->particleId(); if ( !(jetConstituentType == reco::PFCandidate::h0 || jetConstituentType == reco::PFCandidate::gamma) ) continue; double dR = deltaR((*jetConstituent)->positionAtECALEntrance(), chargedHadron->positionAtECALEntrance_); double dRmerge = -1.; int minBlockElementMatches = 1000; int maxUnmatchedBlockElements = 0; double minMergeEt = 1.e+6; if ( jetConstituentType == reco::PFCandidate::h0 ) { if ( chargedPFCandidateType == reco::PFCandidate::h ) dRmerge = dRmergeNeutralHadronWrtChargedHadron_; else if ( chargedPFCandidateType == reco::PFCandidate::h0 ) dRmerge = dRmergeNeutralHadronWrtNeutralHadron_; else if ( chargedPFCandidateType == reco::PFCandidate::e ) dRmerge = dRmergeNeutralHadronWrtElectron_; else dRmerge = dRmergeNeutralHadronWrtOther_; minBlockElementMatches = minBlockElementMatchesNeutralHadron_; maxUnmatchedBlockElements = maxUnmatchedBlockElementsNeutralHadron_; minMergeEt = minMergeNeutralHadronEt_; } else if ( jetConstituentType == reco::PFCandidate::gamma ) { if ( chargedPFCandidateType == reco::PFCandidate::h ) dRmerge = dRmergePhotonWrtChargedHadron_; else if ( chargedPFCandidateType == reco::PFCandidate::h0 ) dRmerge = dRmergePhotonWrtNeutralHadron_; else if ( chargedPFCandidateType == reco::PFCandidate::e ) dRmerge = dRmergePhotonWrtElectron_; else dRmerge = dRmergePhotonWrtOther_; minBlockElementMatches = minBlockElementMatchesPhoton_; maxUnmatchedBlockElements = maxUnmatchedBlockElementsPhoton_; minMergeEt = minMergeGammaEt_; } if ( (*jetConstituent)->et() > minMergeEt && (dR < dRmerge || isMatchedByBlockElement(**jetConstituent, *chargedHadron->chargedPFCandidate_, minBlockElementMatches, minBlockElementMatches, maxUnmatchedBlockElements)) ) { chargedHadron->neutralPFCandidates_.push_back(*jetConstituent); chargedHadron->addDaughter(*jetConstituent); } } } setChargedHadronP4(*chargedHadron); if ( verbosity_ ) { edm::LogPrint("TauChHadronFromPF") << *chargedHadron; } // Update the vertex if ( chargedHadron->daughterPtr(0).isNonnull() ) chargedHadron->setVertex(chargedHadron->daughterPtr(0)->vertex()); output.push_back(chargedHadron); } return output.release(); } }} // end namespace reco::tau #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_EDM_PLUGIN(PFRecoTauChargedHadronBuilderPluginFactory, reco::tau::PFRecoTauChargedHadronFromPFCandidatePlugin, "PFRecoTauChargedHadronFromPFCandidatePlugin");
49.274131
181
0.753644
[ "vector" ]
6031b226b88b1035893a0cc87dff2f04cf41748f
10,789
cpp
C++
grasp_planning_graspit/src/GraspItSimpleDBManager.cpp
hashb/graspit-pkgs
8a75ca53956bb2e0cb780752dc9e0fc013d7ea5a
[ "BSD-3-Clause" ]
48
2016-02-29T15:39:26.000Z
2022-02-11T15:56:42.000Z
grasp_planning_graspit/src/GraspItSimpleDBManager.cpp
hashb/graspit-pkgs
8a75ca53956bb2e0cb780752dc9e0fc013d7ea5a
[ "BSD-3-Clause" ]
64
2016-02-22T16:03:47.000Z
2021-01-19T22:16:22.000Z
grasp_planning_graspit/src/GraspItSimpleDBManager.cpp
hashb/graspit-pkgs
8a75ca53956bb2e0cb780752dc9e0fc013d7ea5a
[ "BSD-3-Clause" ]
23
2016-05-14T11:24:33.000Z
2022-03-22T15:41:11.000Z
/** Simple implementation of a GraspItDatabaseManager. Copyright (C) 2016 Jennifer Buehler This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include <grasp_planning_graspit/GraspItSimpleDBManager.h> #include <grasp_planning_graspit/LogBinding.h> #include <graspit/robot.h> #include <map> #include <string> #include <vector> using GraspIt::GraspItSimpleDBManager; int GraspItSimpleDBManager::loadRobotToDatabase(const std::string& filename, const std::string& robotName, const std::vector<std::string>& jointNames) { if (robotName.empty()) { PRINTERROR("You have to specify a robot name"); return -5; } UNIQUE_RECURSIVE_LOCK(dbMtx); std::map<std::string, Robot*>::iterator it = robots.find(robotName); if (it != robots.end()) { PRINTERROR("Robot with name " << robotName << " already exists in the database."); return -4; } PRINTMSG("Loading robot"); Robot * loadedRobot = NULL; { // the world object may not be changed while we briefly load the robot // and then remove it right after again. GraspItSceneManager does not support // yet to create a model without inserting it into the world at first. // This is because of methods called in the original graspit source. UNIQUE_RECURSIVE_LOCK lock = getUniqueWorldLock(); int ret = getGraspItSceneManager()->loadRobot(filename, robotName); if (ret != 0) { PRINTERROR("Could not load robot " << robotName); return ret; } // PRINTMSG("Retrieving robot object"); // get the Robot object loadedRobot = getRobot(robotName); // PRINTMSG("Removing element"); // now, we'll remove the robot from the graspit world again, because we only need the // actual Robot object to store in the database if (!removeElement(loadedRobot, false)) { PRINTERROR("FATAL: should have been able to remove the robot. System could now be insconsistent."); return -6; } } // PRINTMSG("Inserting to map"); if (!robots.insert(std::make_pair(robotName, loadedRobot)).second) { PRINTERROR("Failed to insert robot into the map"); return -6; } if (!robotJointNames.insert(std::make_pair(robotName, jointNames)).second) { PRINTERROR("Failed to insert robot joint names into the map"); return -6; } ++modelIdCounter; modelIDs.insert(std::make_pair(modelIdCounter, std::make_pair(robotName, true))); // PRINTMSG("Successfully loaded robot to database."); return modelIdCounter; } int GraspItSimpleDBManager::loadObjectToDatabase(const std::string& filename, const std::string& objectName, const bool asGraspable) { if (objectName.empty()) { PRINTERROR("You have to specify an object name"); return -5; } UNIQUE_RECURSIVE_LOCK(dbMtx); std::map<std::string, Body*>::iterator it = objects.find(objectName); if (it != objects.end()) { PRINTERROR("Object with name " << objectName << " already exists in the database."); return -4; } // PRINTMSG("Loading object"); Body * loadedObject = NULL; { // the world object may not be changed while we briefly load the robot // and then remove it right after again. GraspItSceneManager does not support // yet to create a model without inserting it into the world at first. // This is because of methods called in the original graspit source. UNIQUE_RECURSIVE_LOCK lock = getUniqueWorldLock(); int ret = getGraspItSceneManager()->loadObject(filename, objectName, asGraspable); if (ret != 0) { PRINTERROR("Could not load object " << objectName); return ret; } // PRINTMSG("Retrieving object"); // get the Object object loadedObject = getBody(objectName); // PRINTMSG("Removing element"); // now, we'll remove the object from the graspit world again, because we only need the // actual Object object to store in the database if (!removeElement(loadedObject, false)) { PRINTERROR("FATAL: should have been able to remove the object. System could now be insconsistent."); return -6; } } // PRINTMSG("Inserting to map"); if (!objects.insert(std::make_pair(objectName, loadedObject)).second) { PRINTERROR("Failed to insert object into the map"); return -6; } ++modelIdCounter; modelIDs.insert(std::make_pair(modelIdCounter, std::make_pair(objectName, false))); // PRINTMSG("Successfully loaded object to database."); return modelIdCounter; } bool GraspItSimpleDBManager::getRobotJointNames(const std::string& robotName, std::vector<std::string>& jointNames) const { jointNames.clear(); UNIQUE_RECURSIVE_LOCK(dbMtx); RobotJointNamesMap::const_iterator it = robotJointNames.find(robotName); if (it == robotJointNames.end()) { PRINTERROR("Joints for robot '" << robotName << "' not found in database."); return false; } jointNames.insert(jointNames.begin(), it->second.begin(), it->second.end()); return true; } Body * GraspItSimpleDBManager::getObjectFromDatabase(const std::string& objectName) { UNIQUE_RECURSIVE_LOCK(dbMtx); std::map<std::string, Body*>::iterator it = objects.find(objectName); if (it == objects.end()) { PRINTERROR("Object with name " << objectName << " does not exists in the database."); return NULL; } return it->second; } Robot * GraspItSimpleDBManager::getRobotFromDatabase(const std::string& robotName) { UNIQUE_RECURSIVE_LOCK(dbMtx); std::map<std::string, Robot*>::iterator it = robots.find(robotName); if (it == robots.end()) { PRINTERROR("Robot with name " << robotName << " does not exists in the database."); return NULL; } return it->second; } Body * GraspItSimpleDBManager::getObjectFromDatabase(const int modelID) { UNIQUE_RECURSIVE_LOCK(dbMtx); std::string name; bool isRobot; if (!getModelNameAndType(modelID, name, isRobot)) { PRINTERROR("Robot/Object with model ID " << modelID << " not in database."); return NULL; } if (isRobot) { PRINTERROR("Model id " << modelID << " is a robot, not an object."); return NULL; } return getObjectFromDatabase(name); } Robot * GraspItSimpleDBManager::getRobotFromDatabase(const int modelID) { UNIQUE_RECURSIVE_LOCK(dbMtx); std::string name; bool isRobot; if (!getModelNameAndType(modelID, name, isRobot)) { PRINTERROR("Robot/Object with model ID " << modelID << " not in database."); return NULL; } if (!isRobot) { PRINTERROR("Model id " << modelID << " is an object, not a robot."); return NULL; } return getRobotFromDatabase(name); } int GraspItSimpleDBManager::getModelType(const int modelID) const { std::string name; bool isRobot; if (!getModelNameAndType(modelID, name, isRobot)) { return -1; } // If robot, return 1. // For objects return 2. return isRobot ? 1 : 2; } bool GraspItSimpleDBManager::getModelNameAndType(const int modelID, std::string& name, bool& isRobot) const { UNIQUE_RECURSIVE_LOCK(dbMtx); ModelIdMap::const_iterator it = modelIDs.find(modelID); if (it == modelIDs.end()) { return false; } name = it->second.first; isRobot = it->second.second; return true; } void GraspItSimpleDBManager::getAllLoadedRobotNames(std::vector<std::string>& names) const { UNIQUE_RECURSIVE_LOCK(dbMtx); std::map<std::string, Robot*>::const_iterator it; for (it = robots.begin(); it != robots.end(); ++it) { if (readGraspItSceneManager()->isRobotLoaded(it->first)) { names.push_back(it->first); } } } void GraspItSimpleDBManager::getAllLoadedRobotIDs(std::vector<int>& ids) const { UNIQUE_RECURSIVE_LOCK(dbMtx); ModelIdMap::const_iterator it; for (it = modelIDs.begin(); it != modelIDs.end(); ++it) { bool isRobot = it->second.second; if (isRobot && readGraspItSceneManager()->isRobotLoaded(it->second.first)) { ids.push_back(it->first); } } } void GraspItSimpleDBManager::getAllLoadedObjectNames(std::vector<std::string>& names) const { UNIQUE_RECURSIVE_LOCK(dbMtx); std::map<std::string, Body*>::const_iterator it; for (it = objects.begin(); it != objects.end(); ++it) { if (readGraspItSceneManager()->isObjectLoaded(it->first)) { names.push_back(it->first); } } } void GraspItSimpleDBManager::getAllLoadedObjectIDs(std::vector<int>& ids) const { UNIQUE_RECURSIVE_LOCK(dbMtx); ModelIdMap::const_iterator it; for (it = modelIDs.begin(); it != modelIDs.end(); ++it) { bool isRobot = it->second.second; if (!isRobot && readGraspItSceneManager()->isRobotLoaded(it->second.first)) { ids.push_back(it->first); } } } bool GraspItSimpleDBManager::getRobotModelID(const std::string& robotName, int& id) const { UNIQUE_RECURSIVE_LOCK(dbMtx); ModelIdMap::const_iterator it; for (it = modelIDs.begin(); it != modelIDs.end(); ++it) { bool isRobot = it->second.second; if (isRobot && (it->second.first == robotName)) { id = it->first; return true; } } return false; } bool GraspItSimpleDBManager::getObjectModelID(const std::string& objectName, int& id) const { UNIQUE_RECURSIVE_LOCK(dbMtx); ModelIdMap::const_iterator it; for (it = modelIDs.begin(); it != modelIDs.end(); ++it) { bool isRobot = it->second.second; if (!isRobot && (it->second.first == objectName)) { id = it->first; return true; } } return false; }
29.39782
112
0.640004
[ "object", "vector", "model" ]
6032119a7bd3e9baa29dfad9a2ae4c8396b43119
44,249
cpp
C++
emulator/src/mame/video/midzeus.cpp
rjw57/tiw-computer
5ef1c79893165b8622d1114d81cd0cded58910f0
[ "MIT" ]
1
2022-01-15T21:38:38.000Z
2022-01-15T21:38:38.000Z
emulator/src/mame/video/midzeus.cpp
rjw57/tiw-computer
5ef1c79893165b8622d1114d81cd0cded58910f0
[ "MIT" ]
null
null
null
emulator/src/mame/video/midzeus.cpp
rjw57/tiw-computer
5ef1c79893165b8622d1114d81cd0cded58910f0
[ "MIT" ]
null
null
null
// license:BSD-3-Clause // copyright-holders:Aaron Giles /************************************************************************* Driver for Midway Zeus games **************************************************************************/ #include "emu.h" #include "includes/midzeus.h" #include "video/poly.h" #include "video/rgbutil.h" /************************************* * * Constants * *************************************/ #define DUMP_WAVE_RAM 0 #define WAVERAM0_WIDTH 512 #define WAVERAM0_HEIGHT 2048 #define WAVERAM1_WIDTH 512 #define WAVERAM1_HEIGHT 512 #define BLEND_OPAQUE1 0x00000000 #define BLEND_OPAQUE2 0x4b23cb00 #define BLEND_OPAQUE3 0x4b23dd00 #define BLEND_OPAQUE4 0x00004800 #define BLEND_OPAQUE5 0xdd23dd00 #define BLEND_ADD1 0x40b68800 #define BLEND_ADD2 0xc9b78800 #define BLEND_MUL1 0x4093c800 /************************************* * * Type definitions * *************************************/ struct mz_poly_extra_data { const void * palbase; const void * texbase; uint16_t solidcolor; uint16_t voffset; int16_t zoffset; uint16_t transcolor; uint16_t texwidth; uint16_t color; uint32_t alpha; uint32_t ctrl_word; bool blend_enable; bool depth_test_enable; bool depth_write_enable; uint32_t blend; uint8_t (*get_texel)(const void *, int, int, int); }; class midzeus_renderer : public poly_manager<float, mz_poly_extra_data, 4, 10000> { public: midzeus_renderer(midzeus_state &state); void render_poly(int32_t scanline, const extent_t& extent, const mz_poly_extra_data& object, int threadid); void render_poly_solid_fixedz(int32_t scanline, const extent_t& extent, const mz_poly_extra_data& object, int threadid); void zeus_draw_quad(int long_fmt, const uint32_t *databuffer, uint32_t texdata, bool logit); void zeus_draw_debug_quad(const rectangle& rect, const vertex_t* vert); private: midzeus_state& m_state; }; typedef midzeus_renderer::vertex_t poly_vertex; /************************************* * * Global variables * *************************************/ static midzeus_renderer *poly; static uint8_t log_fifo; static uint32_t zeus_fifo[20]; static uint8_t zeus_fifo_words; static int16_t zeus_matrix[3][3]; static int32_t zeus_point[3]; static int16_t zeus_light[3]; static void *zeus_renderbase; static uint32_t zeus_palbase; static uint32_t zeus_unkbase; static int zeus_enable_logging; static uint32_t zeus_objdata; static rectangle zeus_cliprect; static uint32_t *waveram[2]; static int yoffs; static int texel_width; static int is_mk4b; /************************************* * * Function prototypes * *************************************/ static inline uint8_t get_texel_4bit(const void *base, int y, int x, int width); static inline uint8_t get_texel_alt_4bit(const void *base, int y, int x, int width); static inline uint8_t get_texel_8bit(const void *base, int y, int x, int width); static inline uint8_t get_texel_alt_8bit(const void *base, int y, int x, int width); /************************************* * * Macros * *************************************/ #define WAVERAM_BLOCK0(blocknum) ((void *)((uint8_t *)waveram[0] + 8 * (blocknum))) #define WAVERAM_BLOCK1(blocknum) ((void *)((uint8_t *)waveram[1] + 8 * (blocknum))) #define WAVERAM_PTR8(base, bytenum) ((uint8_t *)(base) + BYTE4_XOR_LE(bytenum)) #define WAVERAM_READ8(base, bytenum) (*WAVERAM_PTR8(base, bytenum)) #define WAVERAM_WRITE8(base, bytenum, data) do { *WAVERAM_PTR8(base, bytenum) = (data); } while (0) #define WAVERAM_PTR16(base, wordnum) ((uint16_t *)(base) + BYTE_XOR_LE(wordnum)) #define WAVERAM_READ16(base, wordnum) (*WAVERAM_PTR16(base, wordnum)) #define WAVERAM_WRITE16(base, wordnum, data) do { *WAVERAM_PTR16(base, wordnum) = (data); } while (0) #define WAVERAM_PTR32(base, dwordnum) ((uint32_t *)(base) + (dwordnum)) #define WAVERAM_READ32(base, dwordnum) (*WAVERAM_PTR32(base, dwordnum)) #define WAVERAM_WRITE32(base, dwordnum, data) do { *WAVERAM_PTR32(base, dwordnum) = (data); } while (0) #define PIXYX_TO_WORDNUM(y, x) (((y) << 10) | (((x) & 0x1fe) << 1) | ((x) & 1)) #define DEPTHYX_TO_WORDNUM(y, x) (PIXYX_TO_WORDNUM(y, x) | 2) #define WAVERAM_PTRPIX(base, y, x) WAVERAM_PTR16(base, PIXYX_TO_WORDNUM(y, x)) #define WAVERAM_READPIX(base, y, x) (*WAVERAM_PTRPIX(base, y, x)) #define WAVERAM_WRITEPIX(base, y, x, color) do { *WAVERAM_PTRPIX(base, y, x) = (color); } while (0) #define WAVERAM_PTRDEPTH(base, y, x) WAVERAM_PTR16(base, DEPTHYX_TO_WORDNUM(y, x)) #define WAVERAM_READDEPTH(base, y, x) (*WAVERAM_PTRDEPTH(base, y, x)) #define WAVERAM_WRITEDEPTH(base, y, x, color) do { *WAVERAM_PTRDEPTH(base, y, x) = (color); } while (0) /************************************* * * Inlines for block addressing * *************************************/ static inline void *waveram0_ptr_from_block_addr(uint32_t addr) { uint32_t blocknum = (addr % WAVERAM0_WIDTH) + ((addr >> 12) % WAVERAM0_HEIGHT) * WAVERAM0_WIDTH; return WAVERAM_BLOCK0(blocknum); } static inline void *waveram0_ptr_from_expanded_addr(uint32_t addr) { uint32_t blocknum = (addr % WAVERAM0_WIDTH) + ((addr >> 16) % WAVERAM0_HEIGHT) * WAVERAM0_WIDTH; return WAVERAM_BLOCK0(blocknum); } static inline void *waveram1_ptr_from_expanded_addr(uint32_t addr) { uint32_t blocknum = (addr % WAVERAM1_WIDTH) + ((addr >> 16) % WAVERAM1_HEIGHT) * WAVERAM1_WIDTH; return WAVERAM_BLOCK1(blocknum); } static inline void *waveram0_ptr_from_texture_addr(uint32_t addr, int width) { uint32_t blocknum = (((addr & ~1) * width) / 8) % (WAVERAM0_WIDTH * WAVERAM0_HEIGHT); return WAVERAM_BLOCK0(blocknum); } /************************************* * * Inlines for rendering * *************************************/ static inline void waveram_plot_depth(int y, int x, uint16_t color, uint16_t depth) { if (zeus_cliprect.contains(x, y)) { WAVERAM_WRITEPIX(zeus_renderbase, y, x, color); WAVERAM_WRITEDEPTH(zeus_renderbase, y, x, depth); } } #ifdef UNUSED_FUNCTION static inline void waveram_plot(int y, int x, uint16_t color) { if (zeus_cliprect.contains(x, y)) WAVERAM_WRITEPIX(zeus_renderbase, y, x, color); } static inline void waveram_plot_check_depth(int y, int x, uint16_t color, uint16_t depth) { if (zeus_cliprect.contains(x, y)) { uint16_t *depthptr = WAVERAM_PTRDEPTH(zeus_renderbase, y, x); if (depth <= *depthptr) { WAVERAM_WRITEPIX(zeus_renderbase, y, x, color); *depthptr = depth; } } } static inline void waveram_plot_check_depth_nowrite(int y, int x, uint16_t color, uint16_t depth) { if (zeus_cliprect.contains(x, y)) { uint16_t *depthptr = WAVERAM_PTRDEPTH(zeus_renderbase, y, x); if (depth <= *depthptr) WAVERAM_WRITEPIX(zeus_renderbase, y, x, color); } } #endif /************************************* * * Inlines for texel accesses * *************************************/ // 4x2 block size static inline uint8_t get_texel_4bit(const void *base, int y, int x, int width) { uint32_t byteoffs = (y / 2) * (width * 2) + ((x / 8) << 3) + ((y & 1) << 2) + ((x / 2) & 3); return (WAVERAM_READ8(base, byteoffs) >> (4 * (x & 1))) & 0x0f; } static inline uint8_t get_texel_8bit(const void *base, int y, int x, int width) { uint32_t byteoffs = (y / 2) * (width * 2) + ((x / 4) << 3) + ((y & 1) << 2) + (x & 3); return WAVERAM_READ8(base, byteoffs); } // 2x2 block size static inline uint8_t get_texel_alt_4bit(const void *base, int y, int x, int width) { uint32_t byteoffs = (y / 4) * (width * 4) + ((x / 4) << 3) + ((y & 3) << 1) + ((x / 2) & 1); return (WAVERAM_READ8(base, byteoffs) >> (4 * (x & 1))) & 0x0f; } static inline uint8_t get_texel_alt_8bit(const void *base, int y, int x, int width) { uint32_t byteoffs = (y / 4) * (width * 4) + ((x / 2) << 3) + ((y & 3) << 1) + (x & 1); return WAVERAM_READ8(base, byteoffs); } /************************************* * * Video startup * *************************************/ midzeus_renderer::midzeus_renderer(midzeus_state &state) : poly_manager<float, mz_poly_extra_data, 4, 10000>(state.machine()), m_state(state) {} VIDEO_START_MEMBER(midzeus_state,midzeus) { int i; /* allocate memory for "wave" RAM */ waveram[0] = auto_alloc_array(machine(), uint32_t, WAVERAM0_WIDTH * WAVERAM0_HEIGHT * 8/4); waveram[1] = auto_alloc_array(machine(), uint32_t, WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 8/4); /* initialize a 5-5-5 palette */ for (i = 0; i < 32768; i++) m_palette->set_pen_color(i, pal5bit(i >> 10), pal5bit(i >> 5), pal5bit(i >> 0)); /* initialize polygon engine */ poly = auto_alloc(machine(), midzeus_renderer(*this)); /* we need to cleanup on exit */ machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&midzeus_state::exit_handler, this)); yoffs = 0; texel_width = 256; zeus_renderbase = waveram[1]; /* state saving */ save_item(NAME(zeus_fifo)); save_item(NAME(zeus_fifo_words)); save_item(NAME(zeus_matrix)); save_item(NAME(zeus_point)); save_item(NAME(zeus_light)); save_item(NAME(zeus_palbase)); save_item(NAME(zeus_objdata)); save_item(NAME(zeus_cliprect.min_x)); save_item(NAME(zeus_cliprect.max_x)); save_item(NAME(zeus_cliprect.min_y)); save_item(NAME(zeus_cliprect.max_y)); save_pointer(NAME(waveram[0]), WAVERAM0_WIDTH * WAVERAM0_HEIGHT * 8 / sizeof(waveram[0][0])); save_pointer(NAME(waveram[1]), WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 8 / sizeof(waveram[1][0])); /* hack */ is_mk4b = strcmp(machine().system().name, "mk4b") == 0; } void midzeus_state::exit_handler() { #if DUMP_WAVE_RAM FILE *f = fopen("waveram.dmp", "w"); int i; for (i = 0; i < WAVERAM0_WIDTH * WAVERAM0_HEIGHT; i++) { if (i % 4 == 0) fprintf(f, "%03X%03X: ", i / WAVERAM0_WIDTH, i % WAVERAM0_WIDTH); fprintf(f, " %08X %08X ", WAVERAM_READ32(waveram[0], i*2+0), WAVERAM_READ32(waveram[0], i*2+1)); if (i % 4 == 3) fprintf(f, "\n"); } fclose(f); #endif } /************************************* * * Video update * *************************************/ uint32_t midzeus_state::screen_update_midzeus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int x, y; poly->wait("VIDEO_UPDATE"); /* normal update case */ if (!machine().input().code_pressed(KEYCODE_V)) { const void *base = waveram1_ptr_from_expanded_addr(m_zeusbase[0xcc]); int xoffs = screen.visible_area().min_x; for (y = cliprect.min_y; y <= cliprect.max_y; y++) { uint16_t *dest = &bitmap.pix16(y); for (x = cliprect.min_x; x <= cliprect.max_x; x++) dest[x] = WAVERAM_READPIX(base, y, x - xoffs) & 0x7fff; } } /* waveram drawing case */ else { const void *base; if (machine().input().code_pressed(KEYCODE_DOWN)) yoffs += machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; if (machine().input().code_pressed(KEYCODE_UP)) yoffs -= machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; if (machine().input().code_pressed(KEYCODE_LEFT) && texel_width > 4) { texel_width >>= 1; while (machine().input().code_pressed(KEYCODE_LEFT)) ; } if (machine().input().code_pressed(KEYCODE_RIGHT) && texel_width < 512) { texel_width <<= 1; while (machine().input().code_pressed(KEYCODE_RIGHT)) ; } if (yoffs < 0) yoffs = 0; base = waveram0_ptr_from_block_addr(yoffs << 12); for (y = cliprect.min_y; y <= cliprect.max_y; y++) { uint16_t *dest = &bitmap.pix16(y); for (x = cliprect.min_x; x <= cliprect.max_x; x++) { uint8_t tex = get_texel_8bit(base, y, x, texel_width); dest[x] = (tex << 8) | tex; } } popmessage("offs = %06X", yoffs << 12); } return 0; } /************************************* * * Core read handler * *************************************/ READ32_MEMBER(midzeus_state::zeus_r) { bool logit = (offset < 0xb0 || offset > 0xb7); uint32_t result = m_zeusbase[offset & ~1]; switch (offset & ~1) { case 0xf0: result = m_screen->hpos(); logit = 0; break; case 0xf2: result = m_screen->vpos(); logit = 0; break; case 0xf4: result = 6; if (m_screen->vblank()) result |= 0x800; logit = 0; break; case 0xf6: // status -- they wait for this & 9 == 0 // value & $9600 must == $9600 to pass Zeus system test result = 0x9600; if (m_zeusbase[0xb6] == 0x80040000) result |= 1; logit = 0; break; } /* 32-bit mode */ if (m_zeusbase[0x80] & 0x00020000) { if (offset & 1) result >>= 16; if (logit) { if (offset & 1) logerror("%06X:zeus32_r(%02X) = %08X -- unexpected in 32-bit mode\n", m_maincpu->pc(), offset, result); else if (offset != 0xe0) logerror("%06X:zeus32_r(%02X) = %08X\n", m_maincpu->pc(), offset, result); else logerror("%06X:zeus32_r(%02X) = %08X\n", m_maincpu->pc(), offset, result); } } /* 16-bit mode */ else { if (offset & 1) result >>= 16; else result &= 0xffff; if (logit) logerror("%06X:zeus16_r(%02X) = %04X\n", m_maincpu->pc(), offset, result); } return result; } /************************************* * * Core write handler * *************************************/ WRITE32_MEMBER(midzeus_state::zeus_w) { bool logit = zeus_enable_logging || ((offset < 0xb0 || offset > 0xb7) && (offset < 0xe0 || offset > 0xe1)); if (logit) logerror("%06X:zeus_w", m_maincpu->pc()); /* 32-bit mode */ if (m_zeusbase[0x80] & 0x00020000) zeus_register32_w(offset, data, logit); /* 16-bit mode */ else zeus_register16_w(offset, data, logit); } /************************************* * * Handle writes to an internal * pointer register * *************************************/ void midzeus_state::zeus_pointer_w(uint32_t which, uint32_t data, bool logit) { switch (which & 0xffffff) { case 0x008000: case 0x018000: if (logit) logerror(" -- setptr(objdata)\n"); zeus_objdata = data; break; // case 0x00c040: -- set in model data in invasn case 0x00c040: if (logit) logerror(" -- setptr(palbase)\n"); zeus_palbase = data; break; case 0x02c0f0: if (logit) logerror(" -- setptr(unkbase)\n"); zeus_unkbase = data; break; // case 0x004040: -- set via FIFO command in mk4 (len=02) // case 0x02c0f0: -- set in model data in mk4 (len=0f) // case 0x03c0f0: -- set via FIFO command in mk4 (len=00) // case 0x02c0e7: -- set via FIFO command in mk4 (len=08) // case 0x04c09c: -- set via FIFO command in mk4 (len=08) // case 0x05c0a5: -- set via FIFO command in mk4 (len=21) // case 0x80c0a5: -- set via FIFO command in mk4 (len=3f) // case 0x81c0a5: -- set via FIFO command in mk4 (len=35) // case 0x82c0a5: -- set via FIFO command in mk4 (len=41) // case 0x00c0f0: -- set via FIFO command in invasn (len=0f) // case 0x00c0b0: -- set via FIFO command in invasn (len=3f) -- seems to be the same as c0a5 // case 0x05c0b0: -- set via FIFO command in invasn (len=21) // case 0x00c09c: -- set via FIFO command in invasn (len=06) // case 0x00c0a3: -- set via FIFO command in invasn (len=0a) default: if (logit) logerror(" -- setptr(%06X)\n", which & 0xffffff); break; } if (logit) log_waveram(data); } /************************************* * * Handle register writes * *************************************/ void midzeus_state::zeus_register16_w(offs_t offset, uint16_t data, bool logit) { /* writes to register $CC need to force a partial update */ if ((offset & ~1) == 0xcc) m_screen->update_partial(m_screen->vpos()); /* write to high part on odd addresses */ if (offset & 1) m_zeusbase[offset & ~1] = (m_zeusbase[offset & ~1] & 0x0000ffff) | (data << 16); /* write to low part on event addresses */ else m_zeusbase[offset & ~1] = (m_zeusbase[offset & ~1] & 0xffff0000) | (data & 0xffff); /* log appropriately */ if (logit) logerror("(%02X) = %04X [%08X]\n", offset, data & 0xffff, m_zeusbase[offset & ~1]); /* handle the update */ if ((offset & 1) == 0) zeus_register_update(offset); } void midzeus_state::zeus_register32_w(offs_t offset, uint32_t data, bool logit) { /* writes to register $CC need to force a partial update */ if ((offset & ~1) == 0xcc) m_screen->update_partial(m_screen->vpos()); /* always write to low word? */ m_zeusbase[offset & ~1] = data; /* log appropriately */ if (logit) { if (offset & 1) logerror("(%02X) = %08X -- unexpected in 32-bit mode\n", offset, data); else if (offset != 0xe0) logerror("(%02X) = %08X\n", offset, data); else logerror("(%02X) = %08X\n", offset, data); } /* handle the update */ if ((offset & 1) == 0) zeus_register_update(offset); } /************************************* * * Update state after a register write * *************************************/ void midzeus_state::zeus_register_update(offs_t offset) { /* handle the writes; only trigger on low accesses */ switch (offset) { case 0x52: m_zeusbase[0xb2] = m_zeusbase[0x52]; break; case 0x60: /* invasn writes here to execute a command (?) */ if (m_zeusbase[0x60] & 1) { if ((m_zeusbase[0x80] & 0xffffff) == 0x22FCFF) { // m_zeusbase[0x00] = color // m_zeusbase[0x02] = ??? = 0x000C0000 // m_zeusbase[0x04] = ??? = 0x00000E01 // m_zeusbase[0x06] = ??? = 0xFFFF0030 // m_zeusbase[0x08] = vert[0] = (y0 << 16) | x0 // m_zeusbase[0x0a] = vert[1] = (y1 << 16) | x1 // m_zeusbase[0x0c] = vert[2] = (y2 << 16) | x2 // m_zeusbase[0x0e] = vert[3] = (y3 << 16) | x3 // m_zeusbase[0x18] = ??? = 0xFFFFFFFF // m_zeusbase[0x1a] = ??? = 0xFFFFFFFF // m_zeusbase[0x1c] = ??? = 0xFFFFFFFF // m_zeusbase[0x1e] = ??? = 0xFFFFFFFF // m_zeusbase[0x20] = ??? = 0x00000000 // m_zeusbase[0x22] = ??? = 0x00000000 // m_zeusbase[0x24] = ??? = 0x00000000 // m_zeusbase[0x26] = ??? = 0x00000000 // m_zeusbase[0x40] = ??? = 0x00000000 // m_zeusbase[0x42] = ??? = 0x00000000 // m_zeusbase[0x44] = ??? = 0x00000000 // m_zeusbase[0x46] = ??? = 0x00000000 // m_zeusbase[0x4c] = ??? = 0x00808080 (brightness?) // m_zeusbase[0x4e] = ??? = 0x00808080 (brightness?) mz_poly_extra_data& extra = poly->object_data_alloc(); poly_vertex vert[4]; vert[0].x = (int16_t)m_zeusbase[0x08]; vert[0].y = (int16_t)(m_zeusbase[0x08] >> 16); vert[1].x = (int16_t)m_zeusbase[0x0a]; vert[1].y = (int16_t)(m_zeusbase[0x0a] >> 16); vert[2].x = (int16_t)m_zeusbase[0x0c]; vert[2].y = (int16_t)(m_zeusbase[0x0c] >> 16); vert[3].x = (int16_t)m_zeusbase[0x0e]; vert[3].y = (int16_t)(m_zeusbase[0x0e] >> 16); extra.solidcolor = m_zeusbase[0x00]; extra.zoffset = 0x7fff; poly->zeus_draw_debug_quad(zeus_cliprect, vert); poly->wait("Normal"); } else logerror("Execute unknown command\n"); } break; case 0x70: zeus_point[0] = m_zeusbase[0x70] << 16; break; case 0x72: zeus_point[1] = m_zeusbase[0x72] << 16; break; case 0x74: zeus_point[2] = m_zeusbase[0x74] << 16; break; case 0x80: /* this bit enables the "FIFO empty" IRQ; since our virtual FIFO is always empty, we simply assert immediately if this is enabled. invasn needs this for proper operations */ if (m_zeusbase[0x80] & 0x02000000) m_maincpu->set_input_line(2, ASSERT_LINE); else m_maincpu->set_input_line(2, CLEAR_LINE); break; case 0x84: /* MK4: Written in tandem with 0xcc */ /* MK4: Writes either 0x80 (and 0x000000 to 0xcc) or 0x00 (and 0x800000 to 0xcc) */ zeus_renderbase = waveram1_ptr_from_expanded_addr(m_zeusbase[0x84] << 16); break; case 0xb0: case 0xb2: if ((m_zeusbase[0xb6] >> 16) != 0) { if ((offset == 0xb0 && (m_zeusbase[0xb6] & 0x02000000) == 0) || (offset == 0xb2 && (m_zeusbase[0xb6] & 0x02000000) != 0)) { void *dest; if (m_zeusbase[0xb6] & 0x80000000) dest = waveram1_ptr_from_expanded_addr(m_zeusbase[0xb4]); else dest = waveram0_ptr_from_expanded_addr(m_zeusbase[0xb4]); if (m_zeusbase[0xb6] & 0x00100000) WAVERAM_WRITE16(dest, 0, m_zeusbase[0xb0]); if (m_zeusbase[0xb6] & 0x00200000) WAVERAM_WRITE16(dest, 1, m_zeusbase[0xb0] >> 16); if (m_zeusbase[0xb6] & 0x00400000) WAVERAM_WRITE16(dest, 2, m_zeusbase[0xb2]); if (m_zeusbase[0xb6] & 0x00800000) WAVERAM_WRITE16(dest, 3, m_zeusbase[0xb2] >> 16); if (m_zeusbase[0xb6] & 0x00020000) m_zeusbase[0xb4]++; } } break; case 0xb4: if (m_zeusbase[0xb6] & 0x00010000) { const uint32_t *src; if (m_zeusbase[0xb6] & 0x80000000) src = (const uint32_t *)waveram1_ptr_from_expanded_addr(m_zeusbase[0xb4]); else src = (const uint32_t *)waveram0_ptr_from_expanded_addr(m_zeusbase[0xb4]); poly->wait("vram_read"); m_zeusbase[0xb0] = WAVERAM_READ32(src, 0); m_zeusbase[0xb2] = WAVERAM_READ32(src, 1); } break; case 0xc0: case 0xc2: case 0xc4: case 0xc6: case 0xc8: case 0xca: m_screen->update_partial(m_screen->vpos()); { int vtotal = m_zeusbase[0xca] >> 16; int htotal = m_zeusbase[0xc6] >> 16; rectangle visarea(m_zeusbase[0xc6] & 0xffff, htotal - 3, 0, m_zeusbase[0xc8] & 0xffff); if (htotal > 0 && vtotal > 0 && visarea.min_x < visarea.max_x && visarea.max_y < vtotal) { m_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(MIDZEUS_VIDEO_CLOCK / 8.0 / (htotal * vtotal))); zeus_cliprect = visarea; zeus_cliprect.max_x -= zeus_cliprect.min_x; zeus_cliprect.min_x = 0; } } break; case 0xcc: m_screen->update_partial(m_screen->vpos()); log_fifo = machine().input().code_pressed(KEYCODE_L); break; case 0xe0: zeus_fifo[zeus_fifo_words++] = m_zeusbase[0xe0]; if (zeus_fifo_process(zeus_fifo, zeus_fifo_words)) zeus_fifo_words = 0; break; } } /************************************* * * Process the FIFO * *************************************/ int midzeus_state::zeus_fifo_process(const uint32_t *data, int numwords) { /* handle logging */ switch (data[0] >> 24) { /* 0x00/0x01: set pointer */ /* in model data, this is 0x0C */ case 0x00: case 0x01: if (numwords < 2 && data[0] != 0) return false; if (log_fifo) log_fifo_command(data, numwords, ""); zeus_pointer_w(data[0] & 0xffffff, data[1], log_fifo); break; /* 0x13: render model based on previously set information */ case 0x13: /* invasn */ if (log_fifo) log_fifo_command(data, numwords, ""); zeus_draw_model((m_zeusbase[0x06] << 16), log_fifo); break; /* 0x17: write 16-bit value to low registers */ case 0x17: if (log_fifo) log_fifo_command(data, numwords, " -- reg16"); zeus_register16_w((data[0] >> 16) & 0x7f, data[0], log_fifo); break; /* 0x18: write 32-bit value to low registers */ /* in model data, this is 0x19 */ case 0x18: if (numwords < 2) return false; if (log_fifo) log_fifo_command(data, numwords, " -- reg32"); zeus_register32_w((data[0] >> 16) & 0x7f, data[1], log_fifo); break; /* 0x1A/0x1B: sync pipeline(?) */ case 0x1a: case 0x1b: if (log_fifo) log_fifo_command(data, numwords, " -- sync\n"); break; /* 0x1C/0x1E: write matrix and translation vector */ case 0x1c: case 0x1e: /* single matrix form */ if ((data[0] & 0xffff) != 0x7fff) { /* requires 8 words total */ if (numwords < 8) return false; if (log_fifo) { log_fifo_command(data, numwords, ""); logerror("\n\t\tmatrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X )\n\t\tvector %8.2f %8.2f %8.5f\n", data[2] & 0xffff, data[2] >> 16, data[0] & 0xffff, data[3] & 0xffff, data[3] >> 16, data[1] >> 16, data[4] & 0xffff, data[4] >> 16, data[1] & 0xffff, (double)(int32_t)data[5] * (1.0 / 65536.0), (double)(int32_t)data[6] * (1.0 / 65536.0), (double)(int32_t)data[7] * (1.0 / (65536.0 * 512.0))); } /* extract the matrix from the raw data */ zeus_matrix[0][0] = data[2]; zeus_matrix[0][1] = data[2] >> 16; zeus_matrix[0][2] = data[0]; zeus_matrix[1][0] = data[3]; zeus_matrix[1][1] = data[3] >> 16; zeus_matrix[1][2] = data[1] >> 16; zeus_matrix[2][0] = data[4]; zeus_matrix[2][1] = data[4] >> 16; zeus_matrix[2][2] = data[1]; /* extract the translation point from the raw data */ zeus_point[0] = data[5]; zeus_point[1] = data[6]; zeus_point[2] = data[7]; } /* double matrix form */ else { int16_t matrix1[3][3]; int16_t matrix2[3][3]; /* requires 13 words total */ if (numwords < 13) return false; if (log_fifo) { log_fifo_command(data, numwords, ""); logerror("\n\t\tmatrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X )\n\t\tmatrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X )\n\t\tvector %8.2f %8.2f %8.5f\n", data[4] & 0xffff, data[4] >> 16, data[5] >> 16, data[8] & 0xffff, data[8] >> 16, data[6] >> 16, data[9] & 0xffff, data[9] >> 16, data[7] >> 16, data[1] & 0xffff, data[2] & 0xffff, data[3] & 0xffff, data[1] >> 16, data[2] >> 16, data[3] >> 16, data[5] & 0xffff, data[6] & 0xffff, data[7] & 0xffff, (double)(int32_t)data[10] * (1.0 / 65536.0), (double)(int32_t)data[11] * (1.0 / 65536.0), (double)(int32_t)data[12] * (1.0 / (65536.0 * 512.0))); } /* extract the first matrix from the raw data */ matrix1[0][0] = data[4]; matrix1[0][1] = data[4] >> 16; matrix1[0][2] = data[5] >> 16; matrix1[1][0] = data[8]; matrix1[1][1] = data[8] >> 16; matrix1[1][2] = data[6] >> 16; matrix1[2][0] = data[9]; matrix1[2][1] = data[9] >> 16; matrix1[2][2] = data[7] >> 16; /* extract the second matrix from the raw data */ matrix2[0][0] = data[1]; matrix2[0][1] = data[2]; matrix2[0][2] = data[3]; matrix2[1][0] = data[1] >> 16; matrix2[1][1] = data[2] >> 16; matrix2[1][2] = data[3] >> 16; matrix2[2][0] = data[5]; matrix2[2][1] = data[6]; matrix2[2][2] = data[7]; /* multiply them together to get the final matrix */ zeus_matrix[0][0] = ((int64_t)(matrix1[0][0] * matrix2[0][0]) + (int64_t)(matrix1[0][1] * matrix2[1][0]) + (int64_t)(matrix1[0][2] * matrix2[2][0])) >> 16; zeus_matrix[0][1] = ((int64_t)(matrix1[0][0] * matrix2[0][1]) + (int64_t)(matrix1[0][1] * matrix2[1][1]) + (int64_t)(matrix1[0][2] * matrix2[2][1])) >> 16; zeus_matrix[0][2] = ((int64_t)(matrix1[0][0] * matrix2[0][2]) + (int64_t)(matrix1[0][1] * matrix2[1][2]) + (int64_t)(matrix1[0][2] * matrix2[2][2])) >> 16; zeus_matrix[1][0] = ((int64_t)(matrix1[1][0] * matrix2[0][0]) + (int64_t)(matrix1[1][1] * matrix2[1][0]) + (int64_t)(matrix1[1][2] * matrix2[2][0])) >> 16; zeus_matrix[1][1] = ((int64_t)(matrix1[1][0] * matrix2[0][1]) + (int64_t)(matrix1[1][1] * matrix2[1][1]) + (int64_t)(matrix1[1][2] * matrix2[2][1])) >> 16; zeus_matrix[1][2] = ((int64_t)(matrix1[1][0] * matrix2[0][2]) + (int64_t)(matrix1[1][1] * matrix2[1][2]) + (int64_t)(matrix1[1][2] * matrix2[2][2])) >> 16; zeus_matrix[2][0] = ((int64_t)(matrix1[2][0] * matrix2[0][0]) + (int64_t)(matrix1[2][1] * matrix2[1][0]) + (int64_t)(matrix1[2][2] * matrix2[2][0])) >> 16; zeus_matrix[2][1] = ((int64_t)(matrix1[2][0] * matrix2[0][1]) + (int64_t)(matrix1[2][1] * matrix2[1][1]) + (int64_t)(matrix1[2][2] * matrix2[2][1])) >> 16; zeus_matrix[2][2] = ((int64_t)(matrix1[2][0] * matrix2[0][2]) + (int64_t)(matrix1[2][1] * matrix2[1][2]) + (int64_t)(matrix1[2][2] * matrix2[2][2])) >> 16; /* extract the translation point from the raw data */ zeus_point[0] = data[10]; zeus_point[1] = data[11]; zeus_point[2] = data[12]; } break; /* 0x23: some additional X,Y,Z coordinates */ /* 0x2e: same for invasn */ case 0x23: case 0x2e: if (numwords < 2) return false; if (log_fifo) { log_fifo_command(data, numwords, ""); logerror(" -- light xyz = %d,%d,%d\n", (int16_t)data[1], (int16_t)(data[1] >> 16), (int16_t)data[0]); } zeus_light[0] = (int16_t)(data[1] & 0xffff); zeus_light[1] = (int16_t)(data[1] >> 16); zeus_light[2] = (int16_t)(data[0] & 0xffff); break; /* 0x25: display control? */ /* 0x28: same for mk4b */ /* 0x30: same for invasn */ case 0x25: { /* 0x25 is used differently in mk4b. What determines this? */ if (is_mk4b) { if (numwords < 2) return false; break; } } case 0x28: case 0x30: if (numwords < 4 || ((data[0] & 0x808000) && numwords < 10)) return false; if (log_fifo) log_fifo_command(data, numwords, " -- alt. quad and hack screen clear\n"); if ((numwords < 10) && (data[0] & 0xffff7f) == 0) { /* not right -- just a hack */ int x, y; for (y = zeus_cliprect.min_y; y <= zeus_cliprect.max_y; y++) for (x = zeus_cliprect.min_x; x <= zeus_cliprect.max_x; x++) waveram_plot_depth(y, x, 0, 0x7fff); } else { uint32_t texdata = (m_zeusbase[0x06] << 16) | (m_zeusbase[0x00] >> 16); poly->zeus_draw_quad(false, data, texdata, log_fifo); } break; /* 0x2d: unknown - invasn */ /* 0x70: same for mk4 */ case 0x2d: case 0x70: if (log_fifo) log_fifo_command(data, numwords, "\n"); break; /* 0x67: render model with inline texture info */ case 0x67: if (numwords < 3) return false; if (log_fifo) log_fifo_command(data, numwords, ""); zeus_objdata = data[1]; zeus_draw_model(data[2], log_fifo); break; default: printf("Unknown command %08X\n", data[0]); if (log_fifo) log_fifo_command(data, numwords, "\n"); break; } return true; } /************************************* * * Draw a model in waveram * *************************************/ void midzeus_state::zeus_draw_model(uint32_t texdata, bool logit) { uint32_t databuffer[32]; int databufcount = 0; int model_done = false; if (logit) logerror(" -- model @ %08X\n", zeus_objdata); while (zeus_objdata != 0 && !model_done) { const void *base = waveram0_ptr_from_block_addr(zeus_objdata); int count = zeus_objdata >> 24; int curoffs; /* reset the objdata address */ zeus_objdata = 0; /* loop until we run out of data */ for (curoffs = 0; curoffs <= count; curoffs++) { int countneeded; uint8_t cmd; /* accumulate 2 words of data */ databuffer[databufcount++] = WAVERAM_READ32(base, curoffs * 2 + 0); databuffer[databufcount++] = WAVERAM_READ32(base, curoffs * 2 + 1); /* if this is enough, process the command */ cmd = databuffer[0] >> 24; countneeded = (cmd == 0x25 || cmd == 0x30 || cmd == 0x28) ? 14 : 2; if (databufcount == countneeded) { /* handle logging of the command */ if (logit) { int offs; logerror("\t"); for (offs = 0; offs < databufcount; offs++) logerror("%08X ", databuffer[offs]); logerror("-- "); } /* handle the command */ switch (cmd) { case 0x08: if (logit) logerror("end of model\n"); model_done = true; break; case 0x0c: /* mk4/invasn */ zeus_pointer_w(databuffer[0] & 0xffffff, databuffer[1], logit); break; case 0x17: /* mk4 */ if (logit) logerror("reg16"); zeus_register16_w((databuffer[0] >> 16) & 0x7f, databuffer[0], logit); if (((databuffer[0] >> 16) & 0x7f) == 0x06) texdata = (texdata & 0xffff) | (m_zeusbase[0x06] << 16); break; case 0x19: /* invasn */ if (logit) logerror("reg32"); zeus_register32_w((databuffer[0] >> 16) & 0x7f, databuffer[1], logit); if (((databuffer[0] >> 16) & 0x7f) == 0x06) texdata = (texdata & 0xffff) | (m_zeusbase[0x06] << 16); break; case 0x25: /* mk4 */ case 0x28: /* mk4r1 */ case 0x30: /* invasn */ poly->zeus_draw_quad(true, databuffer, texdata, logit); break; default: if (logit) logerror("unknown\n"); break; } /* reset the count */ databufcount = 0; } } } } /************************************* * * Draw a quad * *************************************/ void midzeus_renderer::zeus_draw_quad(int long_fmt, const uint32_t *databuffer, uint32_t texdata, bool logit) { poly_vertex clipvert[8]; poly_vertex vert[4]; uint32_t ushift, vshift; float maxy, maxx; uint32_t texbase, texwshift; uint32_t numverts; uint32_t ctrl_word = databuffer[long_fmt ? 1 : 9]; texbase = ((texdata >> 10) & 0x3f0000) | (texdata & 0xffff); texwshift = (texdata >> 22) & 7; ushift = 8 - ((m_state.m_zeusbase[0x04] >> 4) & 3); vshift = 8 - ((m_state.m_zeusbase[0x04] >> 6) & 3); int xy_offset = long_fmt ? 2 : 1; for (uint32_t i = 0; i < 4; i++) { uint32_t ixy = databuffer[xy_offset + i*2]; uint32_t iuvz = databuffer[xy_offset + 1 + i*2]; int32_t xo = (int16_t)ixy; int32_t yo = (int16_t)(ixy >> 16); int32_t zo = (int16_t)iuvz; uint8_t u = iuvz >> 16; uint8_t v = iuvz >> 24; int64_t x, y, z; x = (int64_t)(xo * zeus_matrix[0][0]) + (int64_t)(yo * zeus_matrix[0][1]) + (int64_t)(zo * zeus_matrix[0][2]) + zeus_point[0]; y = (int64_t)(xo * zeus_matrix[1][0]) + (int64_t)(yo * zeus_matrix[1][1]) + (int64_t)(zo * zeus_matrix[1][2]) + zeus_point[1]; z = (int64_t)(xo * zeus_matrix[2][0]) + (int64_t)(yo * zeus_matrix[2][1]) + (int64_t)(zo * zeus_matrix[2][2]) + zeus_point[2]; // Rounding hack x = (x + 0x00004000) & ~0x00007fffULL; y = (y + 0x00004000) & ~0x00007fffULL; z = (z + 0x00004000) & ~0x00007fffULL; // back face cull using polygon normal and first vertex if (i == 0) { int16_t normal[3]; int32_t rotnormal[3]; normal[0] = (int8_t)(databuffer[0] >> 0); normal[1] = (int8_t)(databuffer[0] >> 8); normal[2] = (int8_t)(databuffer[0] >> 16); rotnormal[0] = normal[0] * zeus_matrix[0][0] + normal[1] * zeus_matrix[0][1] + normal[2] * zeus_matrix[0][2]; rotnormal[1] = normal[0] * zeus_matrix[1][0] + normal[1] * zeus_matrix[1][1] + normal[2] * zeus_matrix[1][2]; rotnormal[2] = normal[0] * zeus_matrix[2][0] + normal[1] * zeus_matrix[2][1] + normal[2] * zeus_matrix[2][2]; int64_t dot = rotnormal[0] * x + rotnormal[1] * y + rotnormal[2] * z; if (dot >= 0) return; } if (long_fmt) { #if 0 // TODO: Lighting uint32_t inormal = databuffer[10 + i]; int32_t xn = (int32_t)(((inormal >> 0) & 0x3ff) << 22) >> 22; int32_t yn = (int32_t)(((inormal >> 10) & 0x3ff) << 22) >> 22; int32_t zn = (int32_t)(((inormal >> 20) & 0x3ff) << 22) >> 22; #endif } vert[i].x = x; vert[i].y = y; vert[i].p[0] = z; vert[i].p[1] = u << ushift; vert[i].p[2] = v << vshift; vert[i].p[3] = 0xffff; if (logit) { m_state.logerror("\t\t(%f,%f,%f) UV:(%02X,%02X) UV_SCALE:(%02X,%02X) (%03X,%03X,%03X) dot=%08X\n", (double) vert[i].x * (1.0 / 65536.0), (double) vert[i].y * (1.0 / 65536.0), (double) vert[i].p[0] * (1.0 / 65536.0), (iuvz >> 16) & 0xff, (iuvz >> 24) & 0xff, (int)(vert[i].p[1] / 256.0f), (int)(vert[i].p[2] / 256.0f), (databuffer[10 + i] >> 20) & 0x3ff, (databuffer[10 + i] >> 10) & 0x3ff, (databuffer[10 + i] >> 0) & 0x3ff, 0); } } numverts = poly->zclip_if_less(4, &vert[0], &clipvert[0], 4, 512.0f); if (numverts < 3) return; maxx = maxy = -1000.0f; for (uint32_t i = 0; i < numverts; i++) { float ooz = 512.0f / clipvert[i].p[0]; clipvert[i].x *= ooz; clipvert[i].y *= ooz; clipvert[i].x += 200.5f; clipvert[i].y += 128.5f; maxx = std::max(maxx, clipvert[i].x); maxy = std::max(maxy, clipvert[i].y); if (logit) m_state.logerror("\t\t\tTranslated=(%f,%f,%f)\n", (double) clipvert[i].x, (double) clipvert[i].y, (double) clipvert[i].p[0]); } for (uint32_t i = 0; i < numverts; i++) { if (clipvert[i].x == maxx) clipvert[i].x += 0.0005f; if (clipvert[i].y == maxy) clipvert[i].y += 0.0005f; } mz_poly_extra_data& extra = poly->object_data_alloc(); if (ctrl_word & 0x01000000) { uint32_t tex_type = (texdata >> 16) & 3; extra.texwidth = 512 >> texwshift; extra.voffset = ctrl_word & 0xffff; extra.texbase = waveram0_ptr_from_texture_addr(texbase, extra.texwidth); if (tex_type == 1) { extra.get_texel = texdata & 0x00200000 ? get_texel_8bit : get_texel_4bit; } else if (tex_type == 2) { extra.get_texel = texdata & 0x00200000 ? get_texel_alt_8bit : get_texel_alt_4bit; } else { printf("Unknown texture type: %d\n", tex_type); return; } } extra.ctrl_word = ctrl_word; extra.solidcolor = m_state.m_zeusbase[0x00] & 0x7fff; extra.zoffset = m_state.m_zeusbase[0x7e] >> 16; extra.alpha = m_state.m_zeusbase[0x4e]; extra.blend = m_state.m_zeusbase[0x5c]; extra.depth_test_enable = !(m_state.m_zeusbase[0x04] & 0x800); extra.depth_write_enable = m_state.m_zeusbase[0x04] & 0x200; extra.transcolor = ((ctrl_word >> 16) & 1) ? 0 : 0x100; extra.palbase = waveram0_ptr_from_block_addr(zeus_palbase); // Note: Before being upgraded to the new polygon rasterizing code, this function call was // a poly_render_quad_fan. It appears as though the new code defaults to a fan if // the template argument is 4, but keep an eye out for missing quads. poly->render_polygon<4>(zeus_cliprect, render_delegate(&midzeus_renderer::render_poly, this), 4, clipvert); } void midzeus_renderer::zeus_draw_debug_quad(const rectangle& rect, const vertex_t *vert) { poly->render_polygon<4>(rect, render_delegate(&midzeus_renderer::render_poly_solid_fixedz, this), 0, vert); } /************************************* * * Rasterizers * *************************************/ void midzeus_renderer::render_poly(int32_t scanline, const extent_t& extent, const mz_poly_extra_data& object, int threadid) { int32_t curz = extent.param[0].start; int32_t curu = extent.param[1].start; int32_t curv = extent.param[2].start; int32_t curi = extent.param[3].start; int32_t dzdx = extent.param[0].dpdx; int32_t dudx = extent.param[1].dpdx; int32_t dvdx = extent.param[2].dpdx; int32_t didx = extent.param[3].dpdx; const void *texbase = object.texbase; const void *palbase = object.palbase; uint16_t transcolor = object.transcolor; uint32_t texwidth = object.texwidth; for (uint32_t x = extent.startx; x < extent.stopx; x++) { uint16_t *depthptr = WAVERAM_PTRDEPTH(zeus_renderbase, scanline, x); int32_t depth = (curz >> 16) + object.zoffset; if (depth > 0x7fff) depth = 0x7fff; uint32_t i8 = curi >> 8; bool depth_pass; if (object.depth_test_enable) depth_pass = depth >= 0 && depth <= *depthptr; else depth_pass = true; if (depth_pass) { rgb_t src=0; bool src_valid = true; if ((object.ctrl_word & 0x000c0000) == 0x000c0000) { src.set_r(pal5bit(object.solidcolor >> 10)); src.set_g(pal5bit(object.solidcolor >> 5)); src.set_b(pal5bit(object.solidcolor)); } else { uint32_t u0 = curu >> 8; uint32_t v0 = object.voffset + (curv >> 8); uint32_t u1 = u0 + 1; uint32_t v1 = v0 + 1; uint8_t texels[4]; texels[0] = object.get_texel(texbase, v0, u0, texwidth); texels[1] = object.get_texel(texbase, v0, u1, texwidth); texels[2] = object.get_texel(texbase, v1, u0, texwidth); texels[3] = object.get_texel(texbase, v1, u1, texwidth); if (texels[0] != transcolor) { rgb_t color[4] = {0, 0, 0, 0}; for (uint32_t i = 0; i < 4; ++i) { uint16_t pix = WAVERAM_READ16(palbase, texels[i]); color[i].set_r(pal5bit(pix >> 10)); color[i].set_g(pal5bit(pix >> 5)); color[i].set_b(pal5bit(pix)); } src = rgbaint_t::bilinear_filter(color[0], color[1], color[2], color[3], curu & 0xff, curv & 0xff); } else { src_valid = false; } } if (src_valid) { uint32_t srcr = src.r(); uint32_t srcg = src.g(); uint32_t srcb = src.b(); uint32_t dstr = 0; uint32_t dstg = 0; uint32_t dstb = 0; uint32_t outr = 0; uint32_t outg = 0; uint32_t outb = 0; uint32_t srca = object.alpha & 0xff; uint32_t dsta = (object.alpha >> 8) & 0xff; // Destination enable? if (object.blend & 0x00800000) { uint16_t dst = WAVERAM_READPIX(zeus_renderbase, scanline, x); dstr = (dst >> 10) & 0x1f; dstg = (dst >> 5) & 0x1f; dstb = dst & 0x1f; dstr = (dstr << 3) | (dstr >> 2); dstg = (dstg << 3) | (dstg >> 2); dstb = (dstb << 3) | (dstb >> 2); } switch (object.blend) { case BLEND_OPAQUE1: { outr = srcr; outg = srcg; outb = srcb; break; } case BLEND_OPAQUE2: { outr = (srcr * i8) >> 8; outg = (srcg * i8) >> 8; outb = (srcb * i8) >> 8; break; } case BLEND_OPAQUE3: { outr = (srcr * i8) >> 8; outg = (srcg * i8) >> 8; outb = (srcb * i8) >> 8; break; } case BLEND_OPAQUE4: { outr = srcr; outg = srcg; outb = srcb; break; } case BLEND_OPAQUE5: { // TODO: Fog factor? outr = (srcr * srca) >> 8; outg = (srcg * srca) >> 8; outb = (srcb * srca) >> 8; break; } case BLEND_ADD1: { outr = ((srcr * srca) >> 8) + dstr; outg = ((srcg * srca) >> 8) + dstg; outb = ((srcb * srca) >> 8) + dstb; break; } case BLEND_ADD2: { outr = ((srcr * srca) >> 8) + ((dstr * (dsta << 1)) >> 8); outg = ((srcg * srca) >> 8) + ((dstg * (dsta << 1)) >> 8); outb = ((srcb * srca) >> 8) + ((dstb * (dsta << 1)) >> 8); break; } case BLEND_MUL1: { outr = (((srcr * (srca << 1)) >> 8) * dstr) >> 8; outg = (((srcg * (srca << 1)) >> 8) * dstg) >> 8; outb = (((srcb * (srca << 1)) >> 8) * dstb) >> 8; break; } default: { outr = srcr; outg = srcg; outb = srcb; break; } } outr = outr > 0xff ? 0xff : outr; outg = outg > 0xff ? 0xff : outg; outb = outb > 0xff ? 0xff : outb; outr >>= 3; outg >>= 3; outb >>= 3; WAVERAM_WRITEPIX(zeus_renderbase, scanline, x, (outr << 10) | (outg << 5) | outb); if (object.depth_write_enable) *depthptr = depth; } } curz += dzdx; curu += dudx; curv += dvdx; curi += didx; } } void midzeus_renderer::render_poly_solid_fixedz(int32_t scanline, const extent_t& extent, const mz_poly_extra_data& object, int threadid) { uint16_t color = object.solidcolor; uint16_t depth = object.zoffset; int x; for (x = extent.startx; x < extent.stopx; x++) waveram_plot_depth(scanline, x, color, depth); } /************************************* * * Debugging tools * *************************************/ void midzeus_state::log_fifo_command(const uint32_t *data, int numwords, const char *suffix) { int wordnum; logerror("Zeus cmd %02X :", data[0] >> 24); for (wordnum = 0; wordnum < numwords; wordnum++) logerror(" %08X", data[wordnum]); logerror("%s", suffix); } void midzeus_state::log_waveram(uint32_t length_and_base) { static struct { uint32_t lab; uint32_t checksum; } recent_entries[100]; uint32_t numoctets = (length_and_base >> 24) + 1; const uint32_t *ptr = (const uint32_t *)waveram0_ptr_from_block_addr(length_and_base); uint32_t checksum = length_and_base; int foundit = false; int i; for (i = 0; i < numoctets; i++) checksum += ptr[i*2] + ptr[i*2+1]; for (i = 0; i < ARRAY_LENGTH(recent_entries); i++) if (recent_entries[i].lab == length_and_base && recent_entries[i].checksum == checksum) { foundit = true; break; } if (i == ARRAY_LENGTH(recent_entries)) i--; if (i != 0) { memmove(&recent_entries[1], &recent_entries[0], i * sizeof(recent_entries[0])); recent_entries[0].lab = length_and_base; recent_entries[0].checksum = checksum; } if (foundit) return; for (i = 0; i < numoctets; i++) logerror("\t%02X: %08X %08X\n", i, ptr[i*2], ptr[i*2+1]); }
28.274121
187
0.590838
[ "render", "object", "vector", "model" ]
60321f49b84a0916ac9cad76cdb533b7b7b75deb
11,112
cpp
C++
src/lp_data/HighsModelBuilder.cpp
anassmeskini/HiGHS
154f86ff087f2060a1439f2b68ade5c3a570b05e
[ "MIT" ]
null
null
null
src/lp_data/HighsModelBuilder.cpp
anassmeskini/HiGHS
154f86ff087f2060a1439f2b68ade5c3a570b05e
[ "MIT" ]
null
null
null
src/lp_data/HighsModelBuilder.cpp
anassmeskini/HiGHS
154f86ff087f2060a1439f2b68ade5c3a570b05e
[ "MIT" ]
null
null
null
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the HiGHS linear optimization suite */ /* */ /* Written and engineered 2008-2019 at the University of Edinburgh */ /* */ /* Available as open-source under the MIT License */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "HighsModelBuilder.h" #include <math.h> #include "lp_data/HConst.h" HighsModelBuilder::~HighsModelBuilder() { while (this->variables.size() > 0) { HighsVar* variable; variable = this->variables.front(); this->variables.pop_front(); // find all coefficients corresponding to the variable VarConsCoefsMap::iterator it = this->variableConstraintCoefficientMap.find(variable); if (it != this->variableConstraintCoefficientMap.end()) { std::list<HighsLinearConsCoef*>* coefficients = it->second; while (coefficients->size() > 0) { HighsLinearConsCoef* coef = coefficients->front(); coefficients->pop_front(); // remove coefficient from constraint CoefConsMap::iterator iter = this->coefficientConstraintMap.find(coef); assert(iter != this->coefficientConstraintMap.end()); HighsLinearCons* constraint = iter->second; VarConsCoefMap::iterator iterator = constraint->linearCoefs.find(variable); assert(iterator != constraint->linearCoefs.end()); constraint->linearCoefs.erase(iterator); this->coefficientConstraintMap.erase(iter); delete coef; } VarConsMap::iterator iter = this->variableConstraintMap.find(variable); if (iter != variableConstraintMap.end()) { std::list<HighsLinearCons*>* conslist = iter->second; conslist->clear(); this->variableConstraintMap.erase(iter); delete conslist; } this->variableConstraintCoefficientMap.erase(it); delete coefficients; } delete variable; } while (this->linearConstraints.size() > 0) { HighsLinearCons* constraint; constraint = this->linearConstraints.front(); this->linearConstraints.pop_front(); delete constraint; } } #pragma region HighsVar HighsVar::HighsVar(const char* name, double lo, double hi, double obj, HighsVarType type) { // create a copy of the name if (name != NULL) { int namelen = strlen(name); this->name = new char[namelen + 1]; strcpy(this->name, name); } else { this->name = NULL; } // copy all remaining data this->lowerBound = fmax(-HIGHS_CONST_INF, lo); this->upperBound = fmin(HIGHS_CONST_INF, hi); this->obj = obj; this->type = type; } HighsVar::~HighsVar() { if (this->name != NULL) { delete[] this->name; } } #pragma endregion #pragma region HighsCons HighsCons::HighsCons(const char* name, double lo, double hi) { // create a copy of the name if (name != NULL) { int namelen = strlen(name); this->name = new char[namelen + 1]; strcpy(this->name, name); } else { this->name = NULL; } // copy all remaining data this->lowerBound = lo; this->upperBound = hi; } HighsCons::~HighsCons() { if (this->name != NULL) { delete[] this->name; } } #pragma endregion #pragma region HighsLinearCons HighsLinearCons::HighsLinearCons(const char* name, double lo, double hi) : HighsCons(name, lo, hi) {} HighsLinearCons::~HighsLinearCons() {} #pragma endregion #pragma region HighsLinearConsCoef HighsLinearConsCoef::HighsLinearConsCoef(HighsVar* var, double coef) { this->var = var; this->coef = coef; } HighsLinearConsCoef::~HighsLinearConsCoef() {} #pragma endregion #pragma region HighsModel #pragma region HighsModel Variables void HighsModelBuilder::HighsCreateVar(const char* name, double lo, double hi, double obj, HighsVarType type, HighsVar** var) { if (name != NULL) { // make sure name is available VarMap::iterator it = this->variableMap.find(name); if (it != this->variableMap.end()) { // name already in use // TODO: Error Message return; } } // create the new variable and add it to the model *var = new HighsVar(name, lo, hi, obj, type); this->variables.push_back(*var); if (name != NULL) { this->variableMap.insert(VarMap::value_type((*var)->name, *var)); } } void HighsModelBuilder::HighsCreateVar(const char* name, HighsVar** var) { this->HighsCreateVar(name, 0.0, HIGHS_CONST_INF, 0.0, HighsVarType::CONT, var); } void HighsModelBuilder::HighsGetOrCreateVarByName(const char* name, HighsVar** var) { this->HighsGetVarByName(name, var); if (*var == NULL) { this->HighsCreateVar(name, var); } } void HighsModelBuilder::HighsCreateVar(HighsVar** var) { this->HighsCreateVar(NULL, var); } void HighsModelBuilder::HighsGetVarByName(const char* name, HighsVar** var) { VarMap::iterator it = this->variableMap.find(name); if (it != this->variableMap.end()) { *var = it->second; } else { // variable not found // TODO: Error Message *var = NULL; } } void HighsModelBuilder::HighsRemoveVar(HighsVar* var) { // check that variable is no longer used in any constraints // TODO // remove variable from map VarMap::iterator it = this->variableMap.find(var->name); if (it == this->variableMap.end()) { // variable no longer in Model? // TODO: Error Message return; } this->variableMap.erase(var->name); // remove variable from list // TODO return; } #pragma endregion #pragma region HighsModel Constraints void HighsModelBuilder::HighsCreateLinearCons(const char* name, double lo, double hi, HighsLinearCons** cons) { if (name != NULL) { // make sure name is available ConsMap::iterator it = this->constraintMap.find(name); if (it != this->constraintMap.end()) { // name already in use // TODO: Error Message return; } } // create the new constraint and add it to the model *cons = new HighsLinearCons(name, lo, hi); this->linearConstraints.push_back(*cons); if (name != NULL) { this->constraintMap.insert(ConsMap::value_type((*cons)->name, *cons)); } } void HighsModelBuilder::HighsCreateLinearCons(const char* name, HighsLinearCons** cons) { this->HighsCreateLinearCons(name, -HIGHS_CONST_INF, HIGHS_CONST_INF, cons); } void HighsModelBuilder::HighsCreateLinearCons(HighsLinearCons** cons) { this->HighsCreateLinearCons(NULL, cons); } void HighsModelBuilder::HighsGetLinearConsByName(const char* name, HighsLinearCons** cons) {} void HighsModelBuilder::HighsDestroyLinearCons() {} #pragma endregion #pragma region HighsModel Coefficients void HighsModelBuilder::HighsCreateLinearConsCoef( HighsVar* var, double coef, HighsLinearConsCoef** consCoef) { *consCoef = new HighsLinearConsCoef(var, coef); VarConsCoefsMap::iterator it = this->variableConstraintCoefficientMap.find(var); if (it != this->variableConstraintCoefficientMap.end()) { it->second->push_back(*consCoef); ; } else { std::list<HighsLinearConsCoef*>* coefList = new std::list<HighsLinearConsCoef*>; coefList->push_back(*consCoef); this->variableConstraintCoefficientMap.insert( VarConsCoefsMap::value_type(var, coefList)); } } int HighsModelBuilder::getNumberOfVariables() { return this->variables.size(); } void HighsModelBuilder::HighsAddLinearConsCoefToCons( HighsLinearCons* cons, HighsLinearConsCoef* coef) { VarConsCoefMap::iterator it = cons->linearCoefs.find(coef->var); if (it != cons->linearCoefs.end()) { // constraint already has a coefficient for this variable } else { coefficientConstraintMap.insert(CoefConsMap::value_type(coef, cons)); cons->linearCoefs.insert(VarConsCoefMap::value_type(coef->var, coef)); VarConsMap::iterator it = this->variableConstraintMap.find(coef->var); if (it != this->variableConstraintMap.end()) { it->second->push_back(cons); } else { std::list<HighsLinearCons*>* consList = new std::list<HighsLinearCons*>; consList->push_back(cons); this->variableConstraintMap.insert( VarConsMap::value_type(coef->var, consList)); } } } #pragma endregion void HighsModelBuilder::HighsBuildTechnicalModel(HighsLp* lp) { lp->numCol_ = this->variables.size(); lp->numRow_ = this->linearConstraints.size(); // determine order of variables HighsVar** variables = new HighsVar*[lp->numCol_]; for (int i = 0; i < lp->numCol_; i++) { HighsVar* front = this->variables.front(); this->variables.pop_front(); this->variables.push_back(front); variables[i] = front; lp->colCost_.push_back(this->objSense * front->obj); lp->colLower_.push_back(front->lowerBound); lp->colUpper_.push_back(front->upperBound); } // determine order of constraints HighsLinearCons** constraints = new HighsLinearCons*[lp->numRow_]; for (int i = 0; i < lp->numRow_; i++) { HighsLinearCons* front = this->linearConstraints.front(); this->linearConstraints.pop_front(); this->linearConstraints.push_back(front); constraints[i] = front; lp->rowLower_.push_back(front->lowerBound); lp->rowUpper_.push_back(front->upperBound); } // handle constraints lp->Astart_.clear(); lp->Astart_.push_back(0); for (int var = 0; var < lp->numCol_; var++) { VarConsCoefsMap::iterator iter = this->variableConstraintCoefficientMap.find(variables[var]); if (iter != this->variableConstraintCoefficientMap.end()) { std::list<HighsLinearConsCoef*>* coefs = iter->second; int numberOfCoefficients = coefs->size(); lp->Astart_.push_back(lp->Astart_[var] + numberOfCoefficients); for (int coef = 0; coef < numberOfCoefficients; coef++) { HighsLinearConsCoef* front = coefs->front(); coefs->pop_front(); coefs->push_back(front); lp->Avalue_.push_back(front->coef); CoefConsMap::iterator it = this->coefficientConstraintMap.find(front); if (it != this->coefficientConstraintMap.end()) { // find index of constraint HighsCons* currentCons = it->second; for (int cons = 0; cons < lp->numRow_; cons++) { if (constraints[cons] == currentCons) { lp->Aindex_.push_back(cons); break; } } } else { // ERROR } } } } delete[] variables; delete[] constraints; } #pragma endregion
31.039106
80
0.62275
[ "model" ]