Skip to content

Instantly share code, notes, and snippets.

View Matthewacon's full-sized avatar
🔥
"everything is a type if you're brave enough"

Matthewacon Matthewacon

🔥
"everything is a type if you're brave enough"
View GitHub Profile
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 1bdad771a..c3ad37e12 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -3602,6 +3602,11 @@ findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj,
return handler.failed();
}
+ bool IsAssignment = false;
+ if (auto *ASE = dyn_cast<CXXOperatorCallExpr>(E)) {
@Matthewacon
Matthewacon / arch-luks-zfs-efistub-install.sh
Last active May 27, 2024 23:52
Arch install with ZFS root on LUKS and EFISTUB
# Create your partition layout (using GPT)
# 1 - ESP (FAT32, 128M)
# 2 - Linux (luks, any size)
# Format your partitions
mkfs.fat -F32 /dev/sdx1
cryptsetup luksFormat --key-size 512 --cipher aes-xts-plain64 /dev/sdx2
# Open your luks partition
cryptsetup open /dev/sdx2 luks_root
#include <cstdio>
#include <stdlib.h>
//Stub environment
struct Environment {
int GetRegister(int i) const {
printf("GetRegister(%d)\n", i);
return i;
}
};
╰─❱ ./examples
DEBUG: '(embedded)' contains no JNI linkage
DEBUG: '(embedded)' contains no Agent linkage
WARNING: Neither JNI nor Agent hooks were found for library: '(embedded)'!
DEBUG: Created library: '(embedded)'
DEBUG: Registered library: '(embedded)'
terminate called after throwing an instance of 'std::runtime_error'
what(): FATAL: Tried to start JVM instance twice!
FATAL: Fatal error thrown on Jvm instance 'LPKrVcjBblSEfxKCiRGRXTmyUBFxugAc' with message:
Received fatal signal: Aborted
#include <cstdio>
#include <cstdint>
#include <cstring>
#include <initializer_list>
#include <stdexcept>
#include "cx.h"
struct member_ptr_align_t {
void *reserved1;
jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env, jvmtiEventMode mode, jvmtiEvent event_type, jthread event_thread, ...);
void *reserved3;
jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env, jint* threads_count_ptr, jthread** threads_ptr);
jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env, jthread thread);
jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env, jthread thread);
jvmtiError (JNICALL *StopThread) (jvmtiEnv* env, jthread thread, jobject exception);
jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env, jthread thread);
jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env, jthread thread, jvmtiThreadInfo* info_ptr);
jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env, jthread thread, jint* owned_monitor_count_ptr, jobject** owned_monitors_ptr);
@Matthewacon
Matthewacon / GuessingGame.java
Last active October 20, 2017 16:18
ICS3UH Second assignment...
/**Pseudocode...
bestGame[] = null
worstGame[] = null
avgGuesses=0
totalGuesses=0
BEGIN_METHOD calculateGuessStatistics List<Integer[]> guessStatistics
bestGame = guessStatistics.get(0)
worstGame = guessStatistics.get(0)
I = 0
@Matthewacon
Matthewacon / GuessingGame.java
Created October 11, 2017 15:55
My second assignment in ICS3UH
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Scanner;
import java.util.stream.IntStream;
public class GuessingGame {
public static void main(String[] args) {
System.out.println("Welcome to Matthew Barichello's guessing game!");
/**The index of an <code>Integer[]</code> in the <code>List games</code> coincides with the game number.
@Matthewacon
Matthewacon / Main.java
Created September 22, 2017 00:38
ICS3UH Course Assignment #1...
/**Imports the global input and output streams from <code>java.lang.System</code> so that they may be
* referenced within this file, without having to write out the canonical name each time they are needed.
*/
import static java.lang.System.out;
import static java.lang.System.in;
//More convenient, considering the number of classes used out of the "java.util" package
import java.util.*;
public class Main {
//General purpose interface for defining a currency
@Matthewacon
Matthewacon / TrickyInheritance.cpp
Last active September 1, 2017 06:05
A class that **loosely enforces** both static and non-static member function implementation. See comments for more.
#include <iostream>
#include <iomanip>
#include "assert.h"
//Forward declare templated class
template<typename T> class TestingStuff;
//Templated superclass
template<typename T>
class TestingStuff {