mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 06:59:45 -06:00
fix of function filter
This commit is contained in:
+7
-11
@@ -33,17 +33,17 @@ var InstructionType_conditionalJmpInst = 1;
|
||||
var InstructionType_notRetInst = 2;
|
||||
var InstructionType_retInst = 3;
|
||||
|
||||
var isFunctionName = function (x) {
|
||||
return x.text.trim().indexOf('.') !== 0 &&
|
||||
!x.text.includes(' for ');// deal with typeinfo name for, typeinfo for, vtable for
|
||||
};
|
||||
|
||||
|
||||
// this mess is intended to be ported to another file.
|
||||
function separateCodeFromData(asmArr) {
|
||||
|
||||
var jmpLabelRegex = /\.L{1}\d+:/;
|
||||
|
||||
var isFunctionName = function (x) {
|
||||
return !x.text.includes('.') &&
|
||||
!x.text.includes(' for ');// deal with typeinfo name for, typeinfo for, vtable for
|
||||
};
|
||||
|
||||
var isCode = function (x) {
|
||||
return x && x.text && (x.source !== null || jmpLabelRegex.test(x.text) ||
|
||||
isFunctionName(x));
|
||||
@@ -87,14 +87,10 @@ var gccX86 = {
|
||||
function separateCodeFromData_(asmArr) {
|
||||
|
||||
var jmpLabelRegex = /\.LBB\d+_\d+:/;
|
||||
var isFunctionName = function (x) {
|
||||
var functionNameRegex = /((\w|\(|\))*): # @\1/;
|
||||
return functionNameRegex.test(x);
|
||||
};
|
||||
|
||||
|
||||
var isCode = function (x) {
|
||||
return x && x.text && (x.source !== null || jmpLabelRegex.test(x.text) ||
|
||||
isFunctionName(x.text));
|
||||
isFunctionName(x));
|
||||
};
|
||||
|
||||
var removeComments = function (x) {
|
||||
|
||||
Reference in New Issue
Block a user