daedalus-core 1.0 → 1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/daedalus.rb +26 -7
- data/lib/daedalus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dfabb584ca953d43b3e2fbaef94117cf8d6ad7c
|
4
|
+
data.tar.gz: 16389e1ba87675ed97edd176e3124631d08291cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55eafc6b2e96945051c4fdbab5ffde89c62149e93f2e49681d6e8af53b2785b22ce8f94c35d6e310416612050953b109e748d13730e6bd6121d7b1650d3730f7
|
7
|
+
data.tar.gz: 24815340a8e9209643a49d0db24a5071b0458b1d5c0667372f8a9fcacf24fcabc1e407e39ae3bffc0a2ddd5f597f62306af68e3089f6313b76cabc969bc5b39d
|
data/lib/daedalus.rb
CHANGED
@@ -476,26 +476,45 @@ module Daedalus
|
|
476
476
|
class InstructionSourceFile < SourceFile
|
477
477
|
def ll_compile(ctx, source, object)
|
478
478
|
ctx.log.show "LL", source
|
479
|
-
ctx.log.command "#{ctx.cxx} -S -emit-llvm #{ctx.cflags.join(" ")} #{ctx.cxxflags.join(" ")} -c -o #{object} #{source}"
|
480
479
|
|
481
|
-
|
480
|
+
flags = (ctx.cflags + ctx.cxxflags).join(" ").
|
481
|
+
gsub(/-g[^ ]*/, "").
|
482
|
+
gsub(/-O.?/, "")
|
483
|
+
flags << " -glldb -gline-tables-only -Oz"
|
484
|
+
|
485
|
+
ctx.log.command "#{ctx.cxx} -S -emit-llvm #{flags} -c -o #{object} #{source}"
|
486
|
+
|
487
|
+
re = %r[tail call i64 %\d+\(%"class.rubinius::State"\*( nonnull)? %state, %"struct.rubinius::CallFrame"\*( nonnull)? %call_frame, i64\*( nonnull)? %opcodes\)]
|
482
488
|
|
483
489
|
lines = File.readlines object
|
484
|
-
|
490
|
+
|
491
|
+
i = 0
|
492
|
+
t = lines.size
|
493
|
+
|
494
|
+
while i < t
|
495
|
+
line = lines[i]
|
485
496
|
if re =~ line
|
486
|
-
|
497
|
+
if next_line = lines[i+1] and next_line =~ /^\s+ret\s/
|
498
|
+
line.sub!(/tail call/, "musttail call")
|
499
|
+
end
|
487
500
|
end
|
501
|
+
i += 1
|
488
502
|
end
|
489
503
|
|
490
|
-
File.open object, "
|
491
|
-
lines.each { |
|
504
|
+
File.open object, "wb" do |insn_file|
|
505
|
+
lines.each { |l| insn_file.print l }
|
492
506
|
end
|
493
507
|
end
|
494
508
|
|
495
509
|
def cxx_compile(ctx, source, object)
|
496
510
|
ctx.log.show "CXX", source
|
497
511
|
|
498
|
-
flags = (ctx.cflags + ctx.cxxflags).join(" ").
|
512
|
+
flags = (ctx.cflags + ctx.cxxflags).join(" ").
|
513
|
+
gsub(/-I\s?[^ ]*/, "").
|
514
|
+
gsub(/-g[^ ]*/, "").
|
515
|
+
gsub(/-O.?/, "")
|
516
|
+
flags << " -glldb -gline-tables-only -Oz"
|
517
|
+
|
499
518
|
ctx.log.command "#{ctx.cxx} #{flags} -c -o #{object} #{source}"
|
500
519
|
end
|
501
520
|
|
data/lib/daedalus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daedalus-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Shirai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|