Permalink
Browse files

Merge branch 'master' into msvc-spike

Conflicts:
	app.js
	etc/config/gcc-explorer.lud-ldnmg01.properties
	lib/asm.js
	lib/compile.js
	package.json
	static/asm-mode.js
	static/compiler.js
	test/test.js
2 parents 65e7678 + 96cf346 commit d11fb2c206c4bad99a343d01de0fd702c252820f @mattgodbolt committed Oct 3, 2016
Showing with 5,082 additions and 11,148 deletions.
  1. +1 −0 .bowerrc
  2. +3 −1 .gitignore
  3. +13 −0 .idea/codeStyleSettings.xml
  4. +22 −0 .idea/compiler.xml
  5. +3 −0 .idea/copyright/profiles_settings.xml
  6. +1 −2 .idea/gcc-explorer.iml
  7. +3 −1 .idea/jsLibraryMappings.xml
  8. +0 −14 .idea/libraries/gcc_explorer_node_modules.xml
  9. +4 −0 .idea/misc.xml
  10. +3 −1 .travis.yml
  11. +25 −6 Makefile
  12. +0 −16 Notes.md
  13. +29 −8 README.md
  14. +18 −0 app.build.js
  15. +75 −25 app.js
  16. +31 −0 bower.json
  17. +2 −2 c-preload/compiler-wrapper
  18. +4 −0 etc/config/aws.danger.properties
  19. +91 −27 etc/config/c++.amazon.properties
  20. +14 −33 etc/config/c++.amazon1204.properties
  21. +11 −0 etc/config/c++.danger.properties
  22. +1 −0 etc/config/c++.defaults.properties
  23. +2 −1 etc/config/c++.lud-ldnmg01.properties
  24. +11 −13 etc/config/d.amazon.properties
  25. +3 −1 etc/config/gcc-explorer.amazon.properties
  26. +1 −0 etc/config/gcc-explorer.danger.properties
  27. +4 −1 etc/config/gcc-explorer.defaults.properties
  28. +1 −0 etc/config/gcc-explorer.lud-ldnmg01.properties
  29. +1 −1 etc/config/go.amazon.properties
  30. +24 −12 etc/config/rust.amazon.properties
  31. +5 −1 etc/oldhash.txt
  32. +3 −12 examples/c++/max_array_opt.cpp
  33. +0 −5 gdb.txt
  34. +78 −22 lib/asm.js
  35. +16 −5 lib/compile.js
  36. +235 −0 lib/diff.js
  37. +5 −0 lib/properties.js
  38. +1 −1 lib/restreamer.js
  39. +4 −2 package.json
  40. +1,483 −0 static-old/compiler.js
  41. +284 −0 static-old/gcc.css
  42. +100 −15 {static → static-old}/gcc.js
  43. +363 −0 static-old/index.html
  44. 0 {static → static-old}/urlshorten-gist.js
  45. +31 −0 static-old/urlshorten-google.js
  46. 0 {static → static-old}/urlshorten-none.js
  47. +1 −0 static/.gitignore
  48. +88 −0 static/analytics.js
  49. +64 −59 static/asm-mode.js
  50. 0 static/{ext → }/clippy.svg
  51. +51 −0 static/colour.js
  52. +338 −393 static/compiler.js
  53. +324 −0 static/editor.js
  54. +65 −61 static/{gcc.css → explorer.css}
  55. +0 −587 static/ext/bootstrap/css/bootstrap-theme.css
  56. +0 −1 static/ext/bootstrap/css/bootstrap-theme.css.map
  57. +0 −6 static/ext/bootstrap/css/bootstrap-theme.min.css
  58. +0 −1 static/ext/bootstrap/css/bootstrap-theme.min.css.map
  59. +0 −6,760 static/ext/bootstrap/css/bootstrap.css
  60. +0 −1 static/ext/bootstrap/css/bootstrap.css.map
  61. +0 −6 static/ext/bootstrap/css/bootstrap.min.css
  62. +0 −1 static/ext/bootstrap/css/bootstrap.min.css.map
  63. +0 −2,363 static/ext/bootstrap/js/bootstrap.js
  64. +0 −7 static/ext/bootstrap/js/bootstrap.min.js
  65. +0 −13 static/ext/bootstrap/js/npm.js
  66. +0 −7 static/ext/clipboard.min.js
  67. +0 −336 static/ext/codemirror/codemirror.css
  68. +0 −21 static/ext/codemirror/codemirror.js
  69. +0 −4 static/ext/jquery/jquery-2.2.2.min.js
  70. +0 −1 static/ext/jquery/jquery-2.2.2.min.map
  71. +0 −1 static/ext/lz-string/lz-string-1.3.3-min.js
  72. +67 −0 static/fontscale.js
  73. +114 −0 static/hub.js
  74. +199 −237 static/index.html
  75. +66 −0 static/loadSave.js
  76. +165 −0 static/main.js
  77. +31 −0 static/options.js
  78. +108 −0 static/output.js
  79. +41 −25 static/{ext → }/rison.js
  80. +41 −0 static/sharing.js
  81. +69 −0 static/toggles.js
  82. +121 −0 static/url.js
  83. +56 −28 static/urlshorten-google.js
  84. +46 −0 test/cases/string-constant.asm
  85. +17 −0 test/cases/string-constant.asm.directives.labels.comments
  86. +1 −1 test/test.js
View
@@ -0,0 +1 @@
+{ "directory": "static/ext" }
View
@@ -1,4 +1,6 @@
*.swp
/node_modules
-.npm-updated
+/.npm-updated
+/.bower-updated
+/out
*.heapsnapshot
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectCodeStyleSettingsManager">
+ <option name="PER_PROJECT_SETTINGS">
+ <value>
+ <MarkdownNavigatorCodeStyleSettings>
+ <option name="RIGHT_MARGIN" value="72" />
+ </MarkdownNavigatorCodeStyleSettings>
+ </value>
+ </option>
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
+ </component>
+</project>
View
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <resourceExtensions />
+ <wildcardResourcePatterns>
+ <entry name="!?*.java" />
+ <entry name="!?*.form" />
+ <entry name="!?*.class" />
+ <entry name="!?*.groovy" />
+ <entry name="!?*.scala" />
+ <entry name="!?*.flex" />
+ <entry name="!?*.kt" />
+ <entry name="!?*.clj" />
+ <entry name="!?*.aj" />
+ </wildcardResourcePatterns>
+ <annotationProcessing>
+ <profile default="true" name="Default" enabled="false">
+ <processorPath useClasspath="true" />
+ </profile>
+ </annotationProcessing>
+ </component>
+</project>
@@ -0,0 +1,3 @@
+<component name="CopyrightManager">
+ <settings default="" />
+</component>
@@ -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,14 +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>
- <SOURCES />
- </library>
-</component>
View
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" assert-keyword="false" jdk-15="false" />
+</project>
View
@@ -1,4 +1,6 @@
sudo: false
+
language: node_js
+
node_js:
- - "0.12"
+ - 6
View
@@ -1,16 +1,24 @@
+ifneq "" "$(NODE_DIR)"
+NPM:=$(NODE_DIR)/bin/npm
+NODE:=$(NODE_DIR)/bin/npm
+default: run
+else
ifeq "" "$(shell which npm)"
default:
@echo "Please install node.js"
@echo "Visit http://nodejs.org/ for more details"
@echo "On Ubuntu/Debian try: sudo apt-get install nodejs npm"
exit 1
else
+NPM:= $(shell which npm)
NODE:= $(shell which node || which nodejs)
default: run
endif
+endif
-.PHONY: clean run test run-amazon c-preload optional-d-support prereqs
-prereqs: optional-d-support node_modules c-preload
+.PHONY: clean run test run-amazon c-preload optional-d-support prereqs node_modules bower_modules
+.PHONY: dist
+prereqs: optional-d-support node_modules c-preload bower_modules
ifeq "" "$(shell which gdc)"
optional-d-support:
@@ -22,25 +30,36 @@ endif
NODE_MODULES=.npm-updated
$(NODE_MODULES): package.json
- npm install
+ $(NPM) install
+ @touch $@
+
+BOWER_MODULES=.bower-updated
+$(BOWER_MODULES): bower.json $(NODE_MODULES)
+ if ! test -f "${BOWER_MODULES}"; then rm -rf static/ext; fi
+ $(NODE) ./node_modules/bower/bin/bower install
@touch $@
LANG:=C++
node_modules: $(NODE_MODULES)
+bower_modules: $(BOWER_MODULES)
test:
(cd test; $(NODE) test.js)
$(MAKE) -C c-preload test
@echo Tests pass
clean:
- rm -rf node_modules .npm-updated
+ rm -rf bower_modules node_modules .npm-updated .bower-updated out static/ext
$(MAKE) -C d clean
$(MAKE) -C c-preload clean
-run: node_modules optional-d-support c-preload
- $(NODE) ./node_modules/.bin/supervisor -e 'js|node|properties' --exec $(NODE) -- ./app.js --language $(LANG)
+run: prereqs
+ $(NODE) ./node_modules/.bin/supervisor -w app.js,lib,etc/config -e 'js|node|properties' --exec $(NODE) -- ./app.js --language $(LANG)
+
+dist: prereqs
+ $(NODE) ./node_modules/requirejs/bin/r.js -o app.build.js
c-preload:
$(MAKE) -C c-preload
+
View
@@ -1,16 +0,0 @@
-In progress
------------
-
-Currently in progress is the difference view. In order to achieve this we need two "compiler" views; an "A" and "B". I'm in the progress of splitting out all the compiler-specifics into a class of sorts in the mainline, as this is a sensible refactor anyway. In the "diffs" branch I'm sketching out the UI.
-
-Notes:
-
-* storage in both hash tag and in local storage need to change. Specifically they are too tied to the notion of a single compiler.
-* should ensure backwards compatibility: store off some hash tags and test the decode to the same view in the new scheme.
-* binary mode could be done by compiling to .o (with LTO as necessary) and then decoding result of `objdump -d -C /tmp/temp.o -l -M intel --insn-width=16` (for example).
-
-
-NB
---
-
-Bug with clicked URLs and race to get the list of compilers (null compiler)
View
@@ -1,18 +1,39 @@
-GCC Explorer
+[![Build Status](https://travis-ci.org/mattgodbolt/gcc-explorer.svg?branch=master)](https://travis-ci.org/mattgodbolt/gcc-explorer)
+[![Codewake](https://www.codewake.com/badges/ask_question.svg)](https://www.codewake.com/p/compiler-explorer)
+
+Compiler Explorer
------------
-GCC Explorer is an interactive compiler. The left-hand pane shows editable C/C++ code. The right, the assembly output of having compiled the code with a given compiler and settings.
+Compiler Explorer is an interactive compiler. The left-hand pane shows editable C/C++/Rust/Go/D code. The right, the
+assembly output of having compiled the code with a given compiler and settings. Multiple compilers are supported, and
+the UI layout is configurable (the [Golden Layout](https://www.golden-layout.com/) library is used for this).
-Try out the [demo site][demo]!
+Try out one of the demo sites: [C++][cpp], [Rust][rust], [D][d] or [Go][go].
-[demo]: http://gcc.godbolt.org/
+[cpp]: https://gcc.godbolt.org/ "Compiler Explorer for C++"
+[rust]: https://rust.godbolt.org/ "Compiler Explorer for Rust"
+[d]: https://d.godbolt.org/ "Compiler Explorer for D"
+[go]: https://go.godbolt.org/ "Compiler Explorer for Go"
### Developing
-GCC Explorer is written in node.
+Compiler Explorer is written in node.js.
+
+Assuming you have npm and node installed, simply running `make` ought to get you up and running with an Explorer
+running on port 10240 on your local machine: http://localhost:10240/
+
+The `Makefile` will automatically install all the third party libraries needed to run; using `npm` to install server-side
+components and `bower` to install all the client-facing libraries.
+
+If you want to point it at your own GCC or similar binaries,either edit the
+`etc/config/gcc-explorer.defaults.properties` or else make a new one with the name
+`gcc-explorer.YOURHOSTNAME.properties`. The config system leaves a lot to be desired,
+I'm working on porting [CCS](https://github.com/hellige/ccs-cpp) to javascript and then something more rational can be used.
-Assuming you have npm and node installed, simply running `make` ought to get you up and running with a GCC explorer running on port 10240 on your local machine: http://localhost:10240
+Feel free to raise an issue on [github](https://github.com/mattgodbolt/gcc-explorer/issues) or
+[email me directly](mailto:matt@godbolt.org) for more help.
-If you want to point it at your own GCC or similar binaries, either edit the `etc/config/gcc-explorer.defaults.properties` or else make a new one with the name `gcc-explorer.YOURHOSTNAME.properties`. The config system leaves a lot to be desired, I'm working on porting [CCS](https://github.com/hellige/ccs-cpp) to javascript and then something more rational can be used.
+### Credits
-Feel free to raise an issue on [github](https://github.com/mattgodbolt/gcc-explorer/issues) or [email me directly](mailto:matt@godbolt.org) for more help.
+Compiler Explorer is maintained by [Matt Godbolt](http://xania.org). Multiple compiler and difference view was
+implemented by [Gabriel Devillers](https://github.com/voxelf).
View
@@ -0,0 +1,18 @@
+({
+ appDir: "static",
+ baseUrl: ".",
+ dir: "out/dist",
+ generateSourceMaps: true,
+ preserveLicenseComments: false,
+ optimize: "uglify2",
+ removeCombined: true,
+ useStrict: true,
+ mainConfigFile: "static/main.js",
+ skipDirOptimize: true,
+ optimizeCss: "standard",
+ modules: [
+ {
+ name: "main"
+ }
+ ]
+})
Oops, something went wrong.

0 comments on commit d11fb2c

Please sign in to comment.