blob: efa85c9882e0618f3fb7ae2c1924d2a27946911d [file] [log] [blame] [raw]
<!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="explorer.css" rel="stylesheet">
<script data-main="main" src="ext/requirejs/require.js"></script>
</head>
<body>
<div class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Compiler Explorer &dash; <span class="language-name"></span></a>
</div>
<li class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="if-github-enabled">
<a href="https://github.com/mattgodbolt/compiler-explorer">Source on GitHub</a>
</li>
<li><a href="#" id="share">Share</a></li>
<li class="dropdown if-share-enabled">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Social<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">Help<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="https://github.com/mattgodbolt/compiler-explorer/wiki">Wiki</a></li>
<li><a href="https://github.com/mattgodbolt/compiler-explorer/issues">Report an issue</a></li>
<li class="divider"></li>
<li><a href="#" id="ui-reset">Reset UI layout</a></li>
<li class="divider"></li>
<li><a href="http://xania.org/201609/how-compiler-explorer-runs-on-amazon">How it works</a></li>
<li><a href="mailto:matt@godbolt.org">Contact the author</a></li>
<li><a href="http://xania.org/MattGodbolt" rel="author">About the author</a></li>
</ul>
</li>
</ul>
</li>
</div>
</div>
<div id="root"></div>
<div class="gl_keep template">
<div id="codeEditor">
<div class="top-bar btn-toolbar" role="toolbar">
<div class="btn-group btn-group-sm options" role="group">
<button title="Colourise lines so one can see how the source maps to the output"
class="btn btn-default btn-sm active" data-bind="colouriseAsm">
<span class="glyphicon glyphicon-adjust"></span>
</button>
<button title="Run the compilers automatically as you type"
class="btn btn-default btn-sm active" data-bind="compileOnChange">
<span class="glyphicon glyphicon-play-circle"></span>
</button>
</div>
<div class="btn-group btn-group-sm">
<button title="Decrease font size"
class="btn btn-default btn-sm decrease-font-size">
<span class="glyphicon glyphicon-sm glyphicon-font"></span>
</button>
<button title="Reset font size"
class="btn btn-default btn-sm reset-font-size">
<span class="glyphicon glyphicon-sm glyphicon-font"></span>
</button>
<button title="Increase font size"
class="btn btn-default btn-sm increase-font-size">
<span class="glyphicon glyphicon-sm glyphicon-font"></span>
</button>
</div>
<div class="btn-group btn-group-sm">
<button title="Load text from an example"
class="btn btn-default btn-sm load-save">
<span class="glyphicon glyphicon-floppy-save"></span>
</button>
<button title="Get URLs for sharing"
class="btn btn-default btn-sm share">
<span class="glyphicon glyphicon-share"></span>
</button>
<button title="Add a new compiler for this source (click or drag)"
class="btn btn-default btn-sm add-compiler">
<span class="glyphicon glyphicon-open"></span>
</button>
</div>
</div>
<div class="monaco-placeholder"></div>
</div>
<div id="compiler">
<div class="top-bar">
<table>
<tr>
<td><select class="compiler-picker" placeholder="Select a compiler..."></select></td>
<td><input class="options form-control" type="text" placeholder="compiler options..."
size="256"></td>
</tr>
</table>
<div class="btn-group btn-group-sm filters" data-toggle="buttons">
<button class="btn btn-sm" title="Compile to binary and disassemble the output"
data-bind="binary">
<span>11010</span>
</button>
<button class="btn btn-sm active nonbinary" title="Filter unused labels from the output"
data-bind="labels">
<span>.LX0:</span>
</button>
<button class="btn btn-sm active nonbinary" title="Filter all assembler directives from the output"
data-bind="directives">
<span>.text</span>
</button>
<button class="btn btn-sm active nonbinary"
title="Remove all lines which are only comments from the output"
data-bind="commentOnly">
<span>//</span>
</button>
<button class="btn btn-sm active" title="Output disassembly in Intel syntax"
data-bind="intel">
<span>Intel</span>
</button>
</div>
<div class="btn-group btn-group-sm">
<button title="Decrease font size"
class="btn btn-default btn-sm decrease-font-size">
<span class="glyphicon glyphicon-sm glyphicon-font"></span>
</button>
<button title="Reset font size"
class="btn btn-default btn-sm reset-font-size">
<span class="glyphicon glyphicon-sm glyphicon-font"></span>
</button>
<button title="Increase font size"
class="btn btn-default btn-sm increase-font-size">
<span class="glyphicon glyphicon-sm glyphicon-font"></span>
</button>
</div>
<div class="btn-group btn-group-sm">
<button title="Clone this compiler window (click or drag)"
class="btn btn-default btn-sm add-compiler">
<span class="glyphicon glyphicon-new-window"></span>
</button>
</div>
</div>
<div class="monaco-placeholder"></div>
<div class="bottom-bar">
<div class="btn-group btn-group-sm">
<button><span class="glyphicon glyphicon-alert status"></span></button>
</div>
<span class="full-compiler-name"></span>
<span class="compile-time"></span>
</div>
</div>
<div id="compiler-output">
<pre class="content"></pre>
</div>
<div class="urls">
<div class="input-group urls-container">
<div class="input-group-btn">
<div class="btn-group btn-group-sm">
<button type="button" class="btn btn-sm dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="current">Short</span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu sources">
<li><a href="#" class="get-short-link" data-bind="Short">Short</a></li>
<li><a href="#" data-bind="Full">Full</a></li>
<li><a href="#" data-bind="Embed">Embed</a></li>
</ul>
</div>
</div>
<input type="text"
class="form-control input-sm permalink"
placeholder="Loading"
readonly size="1024">
<span class="input-group-btn">
<button class="btn btn-sm clippy" type="button"
data-clipboard-target=".popover .permalink"
title="Copy to clipboard">
<img src="assets/clippy.svg" class="clippy" width="13px" alt="Copy to clipboard">
</button>
</span>
</div>
</div>
<pre class="template lang c">// Type your code here, or load an example.
int square(int num) {
return num * num;
}</pre>
<pre class="template lang rust">// Type your code here, or load an example.
pub fn square(num: i32) -&gt; i32 {
num * num
}</pre>
<pre 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() {}</pre>
<pre class="template lang d">// Type your code here, or load an example.
int square(int num) {
return num * num;
}</pre>
</div>
<div class="modal fade gl_keep" id="load-save">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Load and save editor text</h4>
</div>
<div class="modal-body">
<h5>Load from examples:</h5>
<ul class="examples">
<li class="template example"><a href="#"></a></li>
</ul>
</div>
<!-- model-body -->
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<div class="modal fade gl_keep" id="alert">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Something alert worthy</h4>
</div>
<div class="modal-body">
</div>
<!-- model-body -->
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
</body>
</html>