Showing the changes to src/vm/vm_memory.cpp (1 of 12 files). Show all
Unified · Split
| @@ -7,6 +7,7 @@ · 6 unmodified lines | |||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include <atomic> | 8 | #include <atomic> |
| 9 | #include <bitset> | 9 | #include <bitset> |
| 10 | #include <cstdlib> | ||
| 10 | #include <mutex> | 11 | #include <mutex> |
| 11 | #include <limits> | 12 | #include <limits> |
| 12 | #include <vector> | 13 | #include <vector> |
| @@ -355,98 +356,98 @@ namespace · 342 unmodified lines | |||
| 355 | } | 356 | } |
| 356 | 357 | ||
| 357 | template<> | 358 | template<> |
| 358 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<byte_t>() | 359 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<byte_t>() |
| 359 | { | 360 | { |
| 360 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::byte, hidden_type_desc::deleter }; | 361 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::byte, hidden_type_desc::deleter }; |
| 361 | return t; | 362 | return t; |
| 362 | } | 363 | } |
| 363 | 364 | ||
| 364 | template<> | 365 | template<> |
| 365 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<short_word_t>() | 366 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<short_word_t>() |
| 366 | { | 367 | { |
| 367 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::short_word, hidden_type_desc::deleter }; | 368 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::short_word, hidden_type_desc::deleter }; |
| 368 | return t; | 369 | return t; |
| 369 | } | 370 | } |
| 370 | 371 | ||
| 371 | template<> | 372 | template<> |
| 372 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<word_t>() | 373 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<word_t>() |
| 373 | { | 374 | { |
| 374 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::word, hidden_type_desc::deleter }; | 375 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::word, hidden_type_desc::deleter }; |
| 375 | return t; | 376 | return t; |
| 376 | } | 377 | } |
| 377 | 378 | ||
| 378 | template<> | 379 | template<> |
| 379 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<short_real_t>() | 380 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<short_real_t>() |
| 380 | { | 381 | { |
| 381 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::short_real, hidden_type_desc::deleter }; | 382 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::short_real, hidden_type_desc::deleter }; |
| 382 | return t; | 383 | return t; |
| 383 | } | 384 | } |
| 384 | 385 | ||
| 385 | template<> | 386 | template<> |
| 386 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<real_t>() | 387 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<real_t>() |
| 387 | { | 388 | { |
| 388 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::real, hidden_type_desc::deleter }; | 389 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::real, hidden_type_desc::deleter }; |
| 389 | return t; | 390 | return t; |
| 390 | } | 391 | } |
| 391 | 392 | ||
| 392 | template<> | 393 | template<> |
| 393 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<big_t>() | 394 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<big_t>() |
| 394 | { | 395 | { |
| 395 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::big, hidden_type_desc::deleter }; | 396 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::big, hidden_type_desc::deleter }; |
| 396 | return t; | 397 | return t; |
| 397 | } | 398 | } |
| 398 | 399 | ||
| 399 | template<> | 400 | template<> |
| 400 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<pointer_t>() | 401 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<pointer_t>() |
| 401 | { | 402 | { |
| 402 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::pointer, hidden_type_desc::deleter }; | 403 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::pointer, hidden_type_desc::deleter }; |
| 403 | return t; | 404 | return t; |
| 404 | } | 405 | } |
| 405 | 406 | ||
| 406 | template<> | 407 | template<> |
| 407 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_array_t>() | 408 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_array_t>() |
| 408 | { | 409 | { |
| 409 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_array, hidden_type_desc::deleter }; | 410 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_array, hidden_type_desc::deleter }; |
| 410 | return t; | 411 | return t; |
| 411 | } | 412 | } |
| 412 | 413 | ||
| 413 | template<> | 414 | template<> |
| 414 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_list_t>() | 415 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_list_t>() |
| 415 | { | 416 | { |
| 416 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_list, hidden_type_desc::deleter }; | 417 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_list, hidden_type_desc::deleter }; |
| 417 | return t; | 418 | return t; |
| 418 | } | 419 | } |
| 419 | 420 | ||
| 420 | template<> | 421 | template<> |
| 421 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_channel_t>() | 422 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_channel_t>() |
| 422 | { | 423 | { |
| 423 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_channel, hidden_type_desc::deleter }; | 424 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_channel, hidden_type_desc::deleter }; |
| 424 | return t; | 425 | return t; |
| 425 | } | 426 | } |
| 426 | 427 | ||
| 427 | template<> | 428 | template<> |
| 428 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_string_t>() | 429 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_string_t>() |
| 429 | { | 430 | { |
| 430 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_string, hidden_type_desc::deleter }; | 431 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_string, hidden_type_desc::deleter }; |
| 431 | return t; | 432 | return t; |
| 432 | } | 433 | } |
| 433 | 434 | ||
| 434 | template<> | 435 | template<> |
| 435 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_module_ref_t>() | 436 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_module_ref_t>() |
| 436 | { | 437 | { |
| 437 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_module_ref, hidden_type_desc::deleter }; | 438 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_module_ref, hidden_type_desc::deleter }; |
| 438 | return t; | 439 | return t; |
| 439 | } | 440 | } |
| 440 | 441 | ||
| 441 | template<> | 442 | template<> |
| 442 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_stack_t>() | 443 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_stack_t>() |
| 443 | { | 444 | { |
| 444 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_stack, hidden_type_desc::deleter }; | 445 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_stack, hidden_type_desc::deleter }; |
| 445 | return t; | 446 | return t; |
| 446 | } | 447 | } |
| 447 | 448 | ||
| 448 | template<> | 449 | template<> |
| 449 | static std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_thread_t>() | 450 | std::shared_ptr<const type_descriptor_t> intrinsic_type_desc::type<vm_thread_t>() |
| 450 | { | 451 | { |
| 451 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_thread, hidden_type_desc::deleter }; | 452 | static std::shared_ptr<const type_descriptor_t> t = { &hidden_type_desc::vm_thread, hidden_type_desc::deleter }; |
| 452 | return t; | 453 | return t; |