daedalus-core 0.5.0 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/daedalus.rb +40 -0
  3. data/lib/daedalus/version.rb +1 -1
  4. metadata +11 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 327e0c902f3cd052f4b41bf0255f058148960209
4
- data.tar.gz: f21877accdf61bc6f2acb276ae56d27bd254ac21
3
+ metadata.gz: eb568ae793d1465fd93871cf7405e53735bfd723
4
+ data.tar.gz: ad15e9874523e393217a35c8930dd08cd054ccc6
5
5
  SHA512:
6
- metadata.gz: f57c705d430a28e8d08f394cfb9c371c441a6357211069c5e50db5e1d4d1aa9d6284c924bb454a21f1f1db53c5bec32088931b1e0ea2df8b63071f3ed1a120c5
7
- data.tar.gz: 6bc6725d615cdd22c8daa82f8580d6da50d98c2d1b22322209c75a0cc508f067a10a24de7ee2c55e29cc9ece83fd9cece112df3401bb20cfe18e4aa44f0268f4
6
+ metadata.gz: 7f34910a0c15c910753c42a095d57363f8ada6ff57fb1cb7fed6b2af2c4152aebccd35441a7d017617069aab6051a917c495f84d90d178c085e53dc19deb1865
7
+ data.tar.gz: 347ce6b97068a06020e5b269efd6e0c2bf10dff68346c1a78ece1ecd114d7145a3275f1a5f2d3cc28d3343917adac8fecfcfadebd0890bb77d61369821fb61de
@@ -473,6 +473,46 @@ module Daedalus
473
473
  end
474
474
  end
475
475
 
476
+ class InstructionSourceFile < SourceFile
477
+ def ll_compile(ctx, source, object)
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
+
481
+ re = %r[tail call i64 %\d+\(%"class.rubinius::State"\*( nonnull)? %state, %"struct.rubinius::CallFrame"*( nonnull)? %call_frame, i64\* %opcodes\)]
482
+
483
+ lines = File.readlines object
484
+ lines.each do |line|
485
+ if re =~ line
486
+ line.sub!(/tail call/, "musttail call")
487
+ end
488
+ end
489
+
490
+ File.open object, "w" do |insn_file|
491
+ lines.each { |line| insn_file.print line }
492
+ end
493
+ end
494
+
495
+ def cxx_compile(ctx, source, object)
496
+ ctx.log.show "CXX", source
497
+
498
+ flags = (ctx.cflags + ctx.cxxflags).join(" ").gsub(/-I[^ ]*/, "")
499
+ ctx.log.command "#{ctx.cxx} #{flags} -c -o #{object} #{source}"
500
+ end
501
+
502
+ def build(ctx)
503
+ ctx.log.inc!
504
+
505
+ @data[:sha1] = sha1(ctx)
506
+
507
+ ll_path = path.sub(/cpp$/, "ll")
508
+
509
+ ll_compile ctx, path, ll_path
510
+ cxx_compile ctx, ll_path, object_path
511
+
512
+ save!
513
+ end
514
+ end
515
+
476
516
  class ExternalLibrary
477
517
  def initialize(path)
478
518
  @path = path
@@ -1,3 +1,3 @@
1
1
  module Daedalus
2
- VERSION = "0.5.0"
2
+ VERSION = "1.0"
3
3
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daedalus-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-17 00:00:00.000000000 Z
11
+ date: 2016-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- version_requirements: !ruby/object:Gem::Requirement
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
19
  version: '0.9'
19
- name: rake
20
+ type: :development
20
21
  prerelease: false
21
- requirement: !ruby/object:Gem::Requirement
22
+ version_requirements: !ruby/object:Gem::Requirement
22
23
  requirements:
23
24
  - - "~>"
24
25
  - !ruby/object:Gem::Version
25
26
  version: '0.9'
26
- type: :development
27
27
  - !ruby/object:Gem::Dependency
28
- version_requirements: !ruby/object:Gem::Requirement
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - "~>"
31
32
  - !ruby/object:Gem::Version
32
33
  version: '2.8'
33
- name: rspec
34
+ type: :development
34
35
  prerelease: false
35
- requirement: !ruby/object:Gem::Requirement
36
+ version_requirements: !ruby/object:Gem::Requirement
36
37
  requirements:
37
38
  - - "~>"
38
39
  - !ruby/object:Gem::Version
39
40
  version: '2.8'
40
- type: :development
41
41
  description: |
42
42
  Daedalus is a build system based on years of attempting to build Rubinus with a collection of Rake tasks. Rubinius is a complex system. It has dependencies on external C libraries (some of which are vendored), internal C/C++ libraries, Ruby C-extensions, and compiled Ruby code. The Rubinius bytecode compiler is written in Ruby, so we have to bootstrap compiling it.
43
43
 
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project:
85
- rubygems_version: 2.4.6
85
+ rubygems_version: 2.5.1
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Daedalus is a build system extracted from Rubinius. Almost no functionality