Merge pull request #408 from jaredwy/jw/use-big-int

Update to use bigint library to be able to properly display greater t…
This commit is contained in:
Matt Godbolt
2017-04-30 08:59:36 -05:00
committed by GitHub
5 changed files with 12 additions and 11 deletions
+1
View File
@@ -29,6 +29,7 @@
"es6-promise": "^4.0.5",
"lru-cache": "2.7.3",
"seiyria-bootstrap-slider": "9.7.x",
"big-integer": "https://github.com/peterolson/BigInteger.js.git#^1.6.22",
"file-saver": "filesaver#^1.3.3"
}
}
+10 -4
View File
@@ -36,6 +36,7 @@ define(function (require) {
var LruCache = require('lru-cache');
var monaco = require('monaco');
var Alert = require('alert');
var bigInt = require('big-integer');
require('asm-mode');
require('selectize');
@@ -233,7 +234,7 @@ define(function (require) {
}, this));
this.container.layoutManager.createDragSource(
this.domRoot.optButton, createOptView.bind(this));
this.optButton, createOptView.bind(this));
this.optButton.click(_.bind(function () {
var insertPoint = hub.findParentRowOrColumn(this.container) ||
@@ -619,9 +620,14 @@ define(function (require) {
function getNumericToolTip(value) {
var match = hexLike.exec(value);
if (match) return value + ' = ' + parseInt(match[2], 16).toString();
match = decimalLike.exec(value);
if (match) return value + ' = 0x' + parseInt(match[2]).toString(16);
if (match) {
return value + ' = ' + bigInt(match[2], 16).toString(10);
}
match = decimalLike.exec(value);
if (match) {
return value + ' = 0x' + bigInt(match[2]).toString(16).toUpperCase();
}
return null;
}
+1
View File
@@ -35,6 +35,7 @@ require.config({
events: 'ext/eventEmitter/EventEmitter',
lzstring: 'ext/lz-string/libs/lz-string',
clipboard: 'ext/clipboard/dist/clipboard',
'big-integer': 'ext/big-integer/BigInteger.min',
'raven-js': 'ext/raven-js/dist/raven',
'es6-promise': 'ext/es6-promise/es6-promise',
'lru-cache': 'ext/lru-cache/lib/lru-cache',
-1
View File
@@ -30,7 +30,6 @@ define(function (require) {
var FontScale = require('fontscale');
function Output(hub, container, state) {
var self = this;
this.container = container;
this.compilerId = state.compiler;
this.editorId = state.editor;
-6
View File
@@ -62,12 +62,6 @@ define(function (require) {
}
}
function getItemsByComponent(layout, component) {
return layout.root.getItemsByFilter(function (o) {
return o.type === "component" && o.componentName === component;
});
}
function getEmbeddedUrl(layout, readOnly) {
var location = window.location.origin + window.location.pathname;
if (location[location.length - 1] !== '/') location += '/';