You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

342 lines
16 KiB

<!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">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#navbar-collapse" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#" title="Compiler Explorer">Compiler Explorer &dash; <span
class="language-name"></span></a>
</div>
<li class="navbar-collapse collapse" id="navbar-collapse">
<ul class="nav navbar-nav navbar-left">
<li><a href="#" data-target="#settings" data-toggle="modal">Settings</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://www.patreon.com/mattgodbolt">
<img height="20" width="20" src="assets/patreon_logo.png">&nbsp;
Become a Patron</a></li>
<li class="if-github-enabled">
<a href="https://github.com/mattgodbolt/compiler-explorer">
<img height="20" width="20" src="assets/GitHub-Mark-20px.png">&nbsp;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="#" id="thanks-to">Thanks to...</a></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">
<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 or save text" class="btn btn-default btn-sm load-save">
<span class="glyphicon glyphicon-floppy-disk"></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>
<button title="Add a diff view (click or drag)"
class="btn btn-default btn-sm add-diff">
<span class="glyphicon glyphicon-tree-deciduous"></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 id="diff">
<div class="top-bar">
<table>
<tr>
<td><select class="diff-picker lhs" placeholder="Select compiler output..."></select></td>
<td><select class="diff-picker rhs" placeholder="Select compiler output..."></select></td>
<td style="padding-left: 1em">
<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>
</td>
</tr>
</table>
</div>
<div class="monaco-placeholder"></div>
</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>
<h3 class="modal-title">Load and save editor text</h3>
</div>
<div class="modal-body">
<div class="form-group">
<h4>Load from examples:</h4>
<ul class="examples">
<li class="template example"><a href="#"></a></li>
</ul>
</div>
<div class="form-group">
<label class="btn btn-default btn-file">Load from a local file
<input style="display:none" type="file" class="local-file"
accept=".cpp,.cxx,.c,.h,.hpp,.hxx"></label>
</div>
</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>
<h3 class="modal-title">Something alert worthy</h3>
</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>
<div class="modal fade gl_keep" id="settings">
<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>
<h3 class="modal-title">Compiler Explorer Settings</h3>
</div>
<div class="modal-body">
<div>These settings control how Compiler Explorer acts for you. They are not preserved as part of shared
URLs, and are persisted locally using browser local storage.
</div>
<h4>Editor</h4>
<div class="form-group" role="group">
<div class="form-control checkbox"><label><input type="checkbox" class="autoCloseBrackets">
Automatically insert matching brackets and parentheses</label></div>
<div class="form-control">Delay before compiling:&nbsp;<b>Disabled</b>
<div class="slider slider-horizontal delay"></div>
<b>3s</b></div>
</div>
<h4>Compilation</h4>
<div class="form-group" role="group">
<div class="form-control checkbox"><label><input type="checkbox" class="colourise">Colourise lines
so one can see how the source maps to the output</label></div>
<div class="form-control"><label>Colour scheme: <select class="colourScheme"></select></label></div>
</div>
</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>