Merge branch 'goldenlayout'
Conflicts: etc/config/c++.amazon.properties static-old/gcc.css static/compiler.js static/index.htmldev/git-series/gccdum
@ -1,4 +1,6 @@
|
||||
*.swp
|
||||
/node_modules
|
||||
.npm-updated
|
||||
/.npm-updated
|
||||
/.bower-updated
|
||||
/out
|
||||
*.heapsnapshot
|
||||
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectCodeStyleSettingsManager">
|
||||
<option name="PER_PROJECT_SETTINGS">
|
||||
<value />
|
||||
</option>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</component>
|
||||
</project>
|
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="gcc-explorer node_modules" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="file://$PROJECT_DIR$" libraries="{gcc-explorer node_modules}" />
|
||||
<file url="file://$PROJECT_DIR$" libraries="{gcc-explorer/node_modules}" />
|
||||
<file url="file://$PROJECT_DIR$/static/ext/golden-layout" libraries="{gcc-explorer/static/ext/golden-layout/node_modules}" />
|
||||
<includedPredefinedLibrary name="Node.js Core" />
|
||||
</component>
|
||||
</project>
|
@ -1,15 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="gcc-explorer node_modules" type="javaScript">
|
||||
<properties>
|
||||
<option name="frameworkName" value="node_modules" />
|
||||
<sourceFilesUrls>
|
||||
<item url="file://$PROJECT_DIR$/node_modules" />
|
||||
</sourceFilesUrls>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/node_modules" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,16 @@
|
||||
({
|
||||
appDir: "static",
|
||||
baseUrl: ".",
|
||||
dir: "out/dist",
|
||||
generateSourceMaps: true,
|
||||
preserveLicenseComments: false,
|
||||
optimize: "uglify2",
|
||||
removeCombined: true,
|
||||
useStrict: true,
|
||||
mainConfigFile: "static/main.js",
|
||||
modules: [
|
||||
{
|
||||
name: "main"
|
||||
}
|
||||
]
|
||||
})
|
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "gcc-explorer",
|
||||
"description": "Interactively investigate compiler output",
|
||||
"main": "./app.js",
|
||||
"authors": [
|
||||
"Matt Godbolt"
|
||||
],
|
||||
"license": "BSD-2-Clause",
|
||||
"homepage": "https://github.com/mattgodbolt/gcc-explorer",
|
||||
"private": true,
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"codemirror": "CodeMirror#^5.17.0",
|
||||
"requirejs": "^2.2.0",
|
||||
"underscore": "^1.8.3",
|
||||
"golden-layout": "^1.5.6",
|
||||
"jquery": "^3.1.0",
|
||||
"bootstrap": "^3.3.7",
|
||||
"selectize": "^0.12.2",
|
||||
"eventEmitter": "^5.1.0",
|
||||
"lz-string": "^1.4.4",
|
||||
"clipboard": "^1.5.12",
|
||||
"raven-js": "^3.7.0"
|
||||
}
|
||||
}
|
@ -1,7 +1,11 @@
|
||||
# Matt's home development computer
|
||||
defaultCompiler=g54
|
||||
compilers=g54
|
||||
compilers=g54:g47:g48
|
||||
#compilers=localhost@20480
|
||||
compiler.g54.exe=/usr/bin/g++
|
||||
compiler.g54.name=g++ 5.4
|
||||
compiler.g47.exe=/usr/bin/g++-4.7
|
||||
compiler.g47.name=g++ 4.7
|
||||
compiler.g48.exe=/usr/bin/g++-4.8
|
||||
compiler.g48.name=g++ 4.8
|
||||
#compiler-wrapper=./c-preload/compiler-wrapper
|
||||
|
@ -1,9 +1,11 @@
|
||||
# Settings overridden for Amazon EC2 instances that power http://*.godbolt.org/
|
||||
googleApiKey=AIzaSyAaz35KJv8DA0ABoime0fEIh32NmbyYbcQ
|
||||
compileTimeoutMs=5000
|
||||
compiler-wrapper=./c-preload/compiler-wrapper
|
||||
max-asm-size=8388608
|
||||
staticMaxAgeMs=600000
|
||||
staticMaxAgeMs=30000
|
||||
cacheMb=50
|
||||
clientGoogleAnalyticsEnabled=true
|
||||
proxyRetries=300
|
||||
proxyRetryMs=500
|
||||
ravenUrl=https://4574a044b9f8442f86c2ce14490255f1@sentry.io/102028
|
@ -0,0 +1 @@
|
||||
ravenUrl=https://4574a044b9f8442f86c2ce14490255f1@sentry.io/102028
|
@ -1,2 +1,3 @@
|
||||
language=C++
|
||||
clientURLShortener=google
|
||||
ravenUrl=https://4574a044b9f8442f86c2ce14490255f1@sentry.io/102028
|
||||
|
@ -1,2 +1,6 @@
|
||||
http://localhost:10240/#%7B%22version%22%3A2%2C%22source%22%3A%22%23include%20%3Cxmmintrin.h%3E%5Cn%5Cnvoid%20f(__m128%20a%2C%20__m128%20b)%5Cn%7B%5Cn%20%20%2F%2F%20I%20am%20a%20walrus.%5Cn%7D%22%2C%22compiler%22%3A%22%2Fhome%2Fmgodbolt%2Fapps%2Fintel-icc-oss%2Fbin%2Ficc%22%2C%22options%22%3A%22-O3%20-std%3Dc%2B%2B0x%22%2C%22filterAsm%22%3A%7B%22labels%22%3Atrue%2C%22directives%22%3Atrue%7D%7D
|
||||
http://lud-ldnmg01:10240/#%7B%22version%22%3A2%2C%22source%22%3A%22%23include%20%3Cxmmintrin.h%3E%5Cn%5Cnvoid%20f(__m128%20a%2C%20__m128%20b)%5Cn%7B%5Cn%20%20%2F%2F%20I%20am%20a%20walrus.%5Cn%7D%22%2C%22compiler%22%3A%22%2Fhome%2Fmgodbolt%2Fapps%2Fintel-icc-oss%2Fbin%2Ficc%22%2C%22options%22%3A%22-O3%20-std%3Dc%2B%2B0x%22%2C%22filterAsm%22%3A%7B%22labels%22%3Atrue%2C%22directives%22%3Atrue%7D%7D
|
||||
-- should be icc, "-O3 -std=c++0x", all filters but comments
|
||||
http://lud-ldnmg01:10240/#compilers:!((compiler:g7snapshot,options:'-std%3Dc%2B%2B1z+-O3+',source:'%23include+%3Cvector%3E%0A%0Astruct+Widget+%7B%0A++int+n%3B%0A++double+x,+y%3B%0A++Widget(const+Widget%26+o)+:+x(o.x),+y(o.y),+n(o.n)+%7B%7D%0A++Widget(int+n,+double+x,+double+y)+:+n(n),+x(x),+y(y)+%7B%7D%0A%7D%3B%0A%0Astd::vector%3CWidget%3E+vector%3B%0Aconst+int+N+%3D+1002%3B%0Adouble+a+%3D+0.1%3B%0Adouble+b+%3D+0.2%3B%0A%0Avoid+demo()+%7B%0A++vector.reserve(N)%3B%0A++for+(int+i+%3D+01%3B+i+%3C+N%3B+%2B%2Bi)%0A++%7B%0A%09Widget+w+%7Bi,+a,+b%7D%3B%0A%09vector.push_back(w)%3B+//+or+vector.push_back(std::move(w))%0A++%7D%0A%7D%0A%0Aint+main()%0A%7B%0A+%0A+%0A%7D%0A')),filterAsm:(colouriseAsm:!t,commentOnly:!t,directives:!t,intel:!t,labels:!t),version:3
|
||||
-- should be GCC 7, with widgets source. Binary mode off, all other labels on. -std=c++1z -O3
|
||||
http://lud-ldnmg01:10240/#compilers:!((compiler:g474,options:'',sourcez:PQKgBALgpgzhYHsBmYDGCC2AHATrGAlggHYB0pamGUx8AFlHmEgjmADY0DmEdAXACgAhiNFjxEyVOkzZw2QsVLl85WvVrVG7TolbdB7fsMmlx0xennLNsddu37Dy0%2BenXbwx8%2B7vPo/7OfoGaIMACAgS0YBhCUQAUUfBCOFyoADSUxHBodClgICApXABuAJRgAN4CYGB4EACuOMRgAIwATADcAgC%2BQAA)),filterAsm:(binary:!t,colouriseAsm:!t,commentOnly:!t,directives:!t,intel:!t,labels:!t),version:3
|
||||
-- should be 4.7.4, no options, binary, intel, colourise.
|
||||
|
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 278 B After Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
@ -0,0 +1,363 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Compiler Explorer</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="ext/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="ext/codemirror/codemirror.css" rel="stylesheet">
|
||||
<link href="ext/golden-layout/goldenlayout-base.css" rel="stylesheet">
|
||||
<link href="ext/golden-layout/goldenlayout-light-theme.css" rel="stylesheet">
|
||||
<link href="gcc.css" rel="stylesheet">
|
||||
<script src="client-options.js"></script>
|
||||
<script src="ext/codemirror/codemirror.js"></script>
|
||||
<script src="asm-mode.js"></script>
|
||||
<script src="ext/jquery/jquery-2.2.2.min.js"></script>
|
||||
<script src="ext/golden-layout/goldenlayout.min.js"></script>
|
||||
<script src="ext/jquery-ui-1.11.4/jquery-ui.min.js"></script>
|
||||
<script src="ext/rison.js"></script>
|
||||
<script src="ext/underscore-min.js"></script>
|
||||
<script src="ext/clipboard.min.js"></script>
|
||||
<script src="compiler.js"></script>
|
||||
<script src="gcc.js"></script>
|
||||
<script src="ext/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="ext/lz-string/lz-string-1.3.3-min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', OPTIONS.googleAnalyticsAccount]);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
setTimeout(function () {
|
||||
"use strict";
|
||||
function create_script_element(id, url) {
|
||||
var el = document.createElement('script');
|
||||
el.type = 'text/javascript';
|
||||
el.async = true;
|
||||
el.id = id;
|
||||
el.src = url;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(el, s);
|
||||
}
|
||||
|
||||
create_script_element('urlshortener', 'urlshorten-' + OPTIONS.urlshortener + ".js");
|
||||
if (OPTIONS.googleAnalyticsEnabled)
|
||||
create_script_element('ga', ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js');
|
||||
if (OPTIONS.sharingEnabled) {
|
||||
create_script_element('gp', 'https://apis.google.com/js/plusone.js');
|
||||
create_script_element('twitter-wjs', '//platform.twitter.com/widgets.js');
|
||||
(function(document, i) {
|
||||
var f,s=document.getElementById(i);
|
||||
f=document.createElement('iframe');
|
||||
f.src='//api.flattr.com/button/view/?uid=mattgodbolt&button=compact&url='+encodeURIComponent(document.URL);
|
||||
f.title='Flattr';
|
||||
f.height=20;
|
||||
f.width=110;
|
||||
f.style.borderWidth=0;
|
||||
s.appendChild(f);
|
||||
}(document, 'flattr_button'));
|
||||
}
|
||||
}, 0);
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="#">Compiler Explorer - <span class="language-name"></span></a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="if-github-enabled">
|
||||
<a href="https://github.com/mattgodbolt/gcc-explorer">Source on GitHub</a>
|
||||
</li>
|
||||
<li class="dropdown if-share-enabled">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Donate<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="navbar-text"><a href="https://www.changetip.com/tipme/mattgodbolt">ChangeTip.Me</a></li>
|
||||
<li class="navbar-text" id="flattr_button"></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown if-share-enabled">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Share<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="social">
|
||||
<g:plusone annotation="inline" width="150"></g:plusone>
|
||||
</li>
|
||||
<li class="social"><a href="https://twitter.com/share" class="twitter-share-button"
|
||||
data-via="mattgodbolt">Tweet</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">About<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="https://plus.google.com/112384289668860490877" rel="publisher">Google+ page</a>
|
||||
</li>
|
||||
<li><a href="https://plus.google.com/105166465490735292917" rel="author">About Matt</a></li>
|
||||
<li><a href="mailto:matt@godbolt.org">Contact Matt</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="codeEditor" class="template">
|
||||
<textarea>// Type your code here, or load an example.</textarea>
|
||||
</div>
|
||||
|
||||
<div id="compiler" class="template">
|
||||
<div class="panel-body">
|
||||
<div class="params">
|
||||
<form class="well well-sm form-inline">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="dropdown compilers-container">
|
||||
<button type="button" title="Compiler to use" class="btn btn-default dropdown-toggle compiler-selection" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<span class="compiler">g++</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu compilers">
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<input accesskey="" title="Options to pass to compiler" class="compiler-options" placeholder="compiler options" type="text" value="" style="width:90%">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="asm">
|
||||
<textarea>Awaiting...</textarea>
|
||||
</div>
|
||||
<div class="output">
|
||||
<div class="result">
|
||||
<div class="topbar">Compiler output — <span class="compilerVersion"></span></div>
|
||||
<div class="output">
|
||||
<div class="template"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid" id="#root"><!--
|
||||
<ul id="draggablePanelList" class="list-unstyled">
|
||||
<li class="panel panel-primary col-md-3">
|
||||
<div class="panel-heading"><span class="title">Code editor</span></div>
|
||||
<div class="panel-body">
|
||||
<div id="commonParams">
|
||||
<form class="well form-inline files">
|
||||
<div>
|
||||
<label>Source: <select class="source"></select></label>
|
||||
<label>Name: <select class="filename"></select></label>
|
||||
<button id="new-slot" class="btn btn-sm" title="Open a new slot.">New slot</button>
|
||||
<button id="new-diff" class="btn btn-sm" title="Open a new diff.">New diff</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn btn-sm load">Load</button>
|
||||
<button class="btn btn-sm save">Save</button>
|
||||
<button class="btn btn-sm saveas">Save as...</button>
|
||||
<button class="btn btn-sm fulllink" title="Permanent, full URL to this page">Full link</button>
|
||||
<button class="btn btn-sm shortlink" title="Permanent link to this page as a short link">Short link</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm filter">
|
||||
<button class="btn btn-sm" type="button" value="binary"
|
||||
title="Compile to binary and disassemble the output">Binary
|
||||
</button>
|
||||
<button class="btn btn-sm active nonbinary" type="button"
|
||||
title="Filter unused labels from the output" value="labels">Unused labels
|
||||
</button>
|
||||
<button class="btn btn-sm active nonbinary" type="button"
|
||||
title="Filter all assembler directives from the output" value="directives">Directives
|
||||
</button>
|
||||
<button class="btn btn-sm active nonbinary" type="button"
|
||||
title="Remove all lines which are only comments from the output" value="commentOnly">
|
||||
Comment-only lines
|
||||
</button>
|
||||
<button class="btn btn-sm" type="button" title="Output disassembly in Intel syntax"
|
||||
value="intel">Intel syntax
|
||||
</button>
|
||||
<button class="btn btn-sm" type="button"
|
||||
title="Colourise lines so one can see how the source maps to the output"
|
||||
value="colouriseAsm">Colourise
|
||||
</button>
|
||||
</div>
|
||||
<div class="collapse permalink-collapse">
|
||||
<div class="input-group input-group-sm permalink">
|
||||
<input type="text" class="form-control input-sm" placeholder="Loading" readonly id="permalink" size="1024">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-sm btn-default clippy" type="button" data-clipboard-target="#permalink"
|
||||
title="Copy to clipboard">
|
||||
<img src="ext/clippy.svg" class="clippy" width="13px" alt="Copy to clipboard">
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="editor">
|
||||
<div class="topbar indented">
|
||||
Code editor
|
||||
<span class="pull-right input-group input-group-sm">
|
||||
<button accesskey="a" title="Automatically build when you stop typing"
|
||||
class="btn btn-default btn-sm autocompile active">
|
||||
<span class="glyphicon glyphicon-play-circle"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<textarea>// Type your code here, or load an example.</textarea>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="saveDialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<h4>Save as...</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<label>Filename: <input class="save-filename" style="width: 30em;" type="text"></label>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" data-dismiss="modal" class="btn btn-default">Cancel</a>
|
||||
<a href="#" class="btn btn-primary save">Save</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="panel panel-primary col-md-3 template slot" id="slotTemplate">
|
||||
<div class="panel-heading">
|
||||
<span class="title">Slot template (should *not* be visible)</span>
|
||||
<span class="closeButton unicodeCross unselectable characterIcon">✖</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="params">
|
||||
<form class="well well-sm form-inline">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="leaderSlotIcon unselectable characterIcon unselectedCharacterIcon">☆</p>
|
||||
<td class="dropdown compilers-container">
|
||||
<!– the accesskey is set in static/compiler.js –>
|
||||
<button accesskey="" type="button" title="Compiler to use (alt-C)" class="btn btn-default dropdown-toggle compiler-selection" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<span class="compiler">g++</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu compilers">
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<!– the accesskey is set in static/compiler.js –>
|
||||
<input accesskey="" title="Options to pass to compiler (alt-O)" class="compiler-options" placeholder="compiler options" type="text" value="" style="width:90%">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="btn-group btn-group-sm filter">
|
||||
<!– Place slot-specific buttons here. –>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="asm">
|
||||
<div class="topbar indented">Assembly output</div>
|
||||
<textarea>Awaiting...</textarea>
|
||||
</div>
|
||||
<div class="output">
|
||||
<div class="result">
|
||||
<div class="topbar">Compiler output — <span class="compilerVersion"></span></div>
|
||||
<div class="output">
|
||||
<div class="template"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<li class="panel panel-primary col-md-3 template diff" id="diffTemplate">
|
||||
<div class="panel-heading"><span class="title">Diff template (should *not* be visible)</span><span class="closeButton unicodeCross unselectable characterIcon">✖</span></div>
|
||||
<div class="panel-body">
|
||||
<div class="params">
|
||||
<form class="well well-sm form-inline">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="dropdown compilers-container before">
|
||||
<button type="button"
|
||||
title="Slot before" class="btn btn-default dropdown-toggle diff-before-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<span class="slotName">before</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu slotNameList">
|
||||
</ul>
|
||||
</td>
|
||||
<td> <span class="compilers-container unicode-arrow unselectable" >⇒</span> </td>
|
||||
<td class="dropdown compilers-container after">
|
||||
<button type="button"
|
||||
title="Slot after" class="btn btn-default dropdown-toggle diff-after-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<span class="slotName">after</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu slotNameList">
|
||||
</ul>
|
||||
</td>
|
||||
<td> <span class="compilers-container unicode-arrow reverse-diff unselectable characterIcon">⇆</span> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="diffText">
|
||||
<div class="topbar indented">Diff output</div>
|
||||
<textarea>Awaiting...</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
--></div>
|
||||
|
||||
<div class="template lang c">// Type your code here, or load an example.
|
||||
int square(int num) {
|
||||
return num * num;
|
||||
}
|
||||
</div>
|
||||
<div class="template lang rust">// Type your code here, or load an example.
|
||||
pub fn square(num: i32) -> i32 {
|
||||
num * num
|
||||
}
|
||||
</div>
|
||||
<div class="template lang go">// Type your code here, or load an example.
|
||||
// Your function name should start with a capital letter.
|
||||
package main
|
||||
|
||||
func Square(x int) int {
|
||||
return x * x
|
||||
}
|
||||
|
||||
func main() {}
|
||||
</div>
|
||||
<div class="template lang d">// Type your code here, or load an example.
|
||||
int square(int num) {
|
||||
return num * num;
|
||||
}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
if (!OPTIONS.sharingEnabled)
|
||||
$('.if-share-enabled').remove();
|
||||
|
||||
if (!OPTIONS.githubEnabled)
|
||||
$('.if-github-enabled').remove();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,31 @@
|
||||
function googleJSClientLoaded() {
|
||||
gapi.client.setApiKey(OPTIONS.gapiKey);
|
||||
gapi.client.load('urlshortener', 'v1', function () {
|
||||
shortenURL(googleJSClientLoaded.url, googleJSClientLoaded.done);
|
||||
});
|
||||
}
|
||||
|
||||
function shortenURL(url, done) {
|
||||
if (!window.gapi || !gapi.client) {
|
||||
// Load the Google APIs client library asynchronously, then the
|
||||
// urlshortener API, and finally come back here.
|
||||
googleJSClientLoaded.url = url;
|
||||
googleJSClientLoaded.done = done;
|
||||
$(document.body).append('<script src="https://apis.google.com/js/client.js?onload=googleJSClientLoaded">');
|
||||
return;
|
||||
}
|
||||
var request = gapi.client.urlshortener.url.insert({
|
||||
resource: {
|
||||
longUrl: url
|
||||
}
|
||||
});
|
||||
request.then(function (resp) {
|
||||
var id = resp.result.id;
|
||||
if (OPTIONS.googleShortLinkRewrite.length === 2) {
|
||||
id = id.replace(new RegExp(OPTIONS.googleShortLinkRewrite[0]), OPTIONS.googleShortLinkRewrite[1]);
|
||||
}
|
||||
done(id);
|
||||
}, function () {
|
||||
done(url);
|
||||
});
|
||||
}
|
@ -0,0 +1 @@
|
||||
ext
|
@ -0,0 +1,84 @@
|
||||
// Copyright (c) 2012-2016, Matt Godbolt
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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 HOLDER 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.
|
||||
|
||||
define(function (require, exports) {
|
||||
"use strict";
|
||||
var options = require('options');
|
||||
var Raven = require('raven-js');
|
||||
|
||||
if (options.raven) {
|
||||
Raven.config(options.raven).install();
|
||||
}
|
||||
|
||||
if (options.googleAnalyticsEnabled) {
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i.GoogleAnalyticsObject = r;
|
||||
i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments);
|
||||
};
|
||||
i[r].l = 1 * new Date();
|
||||
a = s.createElement(o);
|
||||
m = s.getElementsByTagName(o)[0];
|
||||
a.async = 1;
|
||||
a.src = g;
|
||||
m.parentNode.insertBefore(a, m);
|
||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||
exports.ga = window.ga;
|
||||
ga('create', options.googleAnalyticsAccount, 'auto');
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
exports.ga = function () {
|
||||
};
|
||||
}
|
||||
|
||||
exports.initialise = function () {
|
||||
setTimeout(function () {
|
||||
function create_script_element(id, url) {
|
||||
var el = document.createElement('script');
|
||||
el.type = 'text/javascript';
|
||||
el.async = true;
|
||||
el.id = id;
|
||||
el.src = url;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(el, s);
|
||||
}
|
||||
|
||||
if (options.sharingEnabled) {
|
||||
create_script_element('gp', 'https://apis.google.com/js/plusone.js');
|
||||
create_script_element('twitter-wjs', '//platform.twitter.com/widgets.js');
|
||||
(function (document, i) {
|
||||
var f, s = document.getElementById(i);
|
||||
f = document.createElement('iframe');
|
||||
f.src = '//api.flattr.com/button/view/?uid=mattgodbolt&button=compact&url=' + encodeURIComponent(document.URL);
|
||||
f.title = 'Flattr';
|
||||
f.height = 20;
|
||||
f.width = 110;
|
||||
f.style.borderWidth = 0;
|
||||
s.appendChild(f);
|
||||
}(document, 'flattr_button'));
|
||||
}
|
||||
}, 0);
|
||||
};
|
||||
});
|
@ -0,0 +1,3 @@
|
||||
<svg height="1024" width="896" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M128 768h256v64H128v-64z m320-384H128v64h320v-64z m128 192V448L384 640l192 192V704h320V576H576z m-288-64H128v64h160v-64zM128 704h160v-64H128v64z m576 64h64v128c-1 18-7 33-19 45s-27 18-45 19H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h192C256 57 313 0 384 0s128 57 128 128h192c35 0 64 29 64 64v320h-64V320H64v576h640V768zM128 256h512c0-35-29-64-64-64h-64c-35 0-64-29-64-64s-29-64-64-64-64 29-64 64-29 64-64 64h-64c-35 0-64 29-64 64z" />
|
||||
</svg>
|
After Width: | Height: | Size: 519 B |
@ -0,0 +1,51 @@
|
||||
// Copyright (c) 2012-2016, Matt Godbolt
|
||||
//
|
||||
// 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.
|
||||