libv8 3.10.8.0 → 3.11.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (215) hide show
  1. data/Rakefile +10 -3
  2. data/ext/libv8/compiler.rb +46 -0
  3. data/ext/libv8/extconf.rb +5 -1
  4. data/ext/libv8/make.rb +13 -0
  5. data/lib/libv8/version.rb +1 -1
  6. data/patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch +11 -0
  7. data/patches/src_platform-freebsd.cc.patch +10 -0
  8. data/vendor/v8/ChangeLog +124 -0
  9. data/vendor/v8/DEPS +27 -0
  10. data/vendor/v8/Makefile +7 -0
  11. data/vendor/v8/SConstruct +15 -2
  12. data/vendor/v8/build/common.gypi +129 -157
  13. data/vendor/v8/build/gyp_v8 +11 -25
  14. data/vendor/v8/build/standalone.gypi +9 -3
  15. data/vendor/v8/include/v8.h +5 -3
  16. data/vendor/v8/src/SConscript +1 -0
  17. data/vendor/v8/src/api.cc +4 -33
  18. data/vendor/v8/src/api.h +2 -2
  19. data/vendor/v8/src/arm/builtins-arm.cc +5 -4
  20. data/vendor/v8/src/arm/code-stubs-arm.cc +21 -14
  21. data/vendor/v8/src/arm/codegen-arm.cc +2 -2
  22. data/vendor/v8/src/arm/debug-arm.cc +3 -1
  23. data/vendor/v8/src/arm/full-codegen-arm.cc +3 -102
  24. data/vendor/v8/src/arm/ic-arm.cc +30 -33
  25. data/vendor/v8/src/arm/lithium-arm.cc +20 -7
  26. data/vendor/v8/src/arm/lithium-arm.h +10 -4
  27. data/vendor/v8/src/arm/lithium-codegen-arm.cc +106 -60
  28. data/vendor/v8/src/arm/macro-assembler-arm.cc +49 -39
  29. data/vendor/v8/src/arm/macro-assembler-arm.h +5 -4
  30. data/vendor/v8/src/arm/regexp-macro-assembler-arm.cc +115 -55
  31. data/vendor/v8/src/arm/regexp-macro-assembler-arm.h +7 -6
  32. data/vendor/v8/src/arm/simulator-arm.h +6 -6
  33. data/vendor/v8/src/arm/stub-cache-arm.cc +64 -19
  34. data/vendor/v8/src/array.js +7 -3
  35. data/vendor/v8/src/ast.cc +11 -6
  36. data/vendor/v8/src/bootstrapper.cc +9 -11
  37. data/vendor/v8/src/builtins.cc +61 -31
  38. data/vendor/v8/src/code-stubs.cc +23 -9
  39. data/vendor/v8/src/code-stubs.h +1 -0
  40. data/vendor/v8/src/codegen.h +3 -3
  41. data/vendor/v8/src/compiler.cc +1 -1
  42. data/vendor/v8/src/contexts.h +2 -18
  43. data/vendor/v8/src/d8.cc +94 -93
  44. data/vendor/v8/src/d8.h +1 -1
  45. data/vendor/v8/src/debug-agent.cc +3 -3
  46. data/vendor/v8/src/debug.cc +41 -1
  47. data/vendor/v8/src/debug.h +50 -0
  48. data/vendor/v8/src/elements-kind.cc +134 -0
  49. data/vendor/v8/src/elements-kind.h +210 -0
  50. data/vendor/v8/src/elements.cc +356 -190
  51. data/vendor/v8/src/elements.h +36 -28
  52. data/vendor/v8/src/factory.cc +44 -4
  53. data/vendor/v8/src/factory.h +11 -7
  54. data/vendor/v8/src/flag-definitions.h +3 -0
  55. data/vendor/v8/src/frames.h +3 -0
  56. data/vendor/v8/src/full-codegen.cc +2 -1
  57. data/vendor/v8/src/func-name-inferrer.h +2 -0
  58. data/vendor/v8/src/globals.h +3 -0
  59. data/vendor/v8/src/heap-inl.h +16 -4
  60. data/vendor/v8/src/heap.cc +38 -32
  61. data/vendor/v8/src/heap.h +3 -17
  62. data/vendor/v8/src/hydrogen-instructions.cc +28 -5
  63. data/vendor/v8/src/hydrogen-instructions.h +142 -44
  64. data/vendor/v8/src/hydrogen.cc +160 -55
  65. data/vendor/v8/src/hydrogen.h +2 -0
  66. data/vendor/v8/src/ia32/assembler-ia32.h +3 -0
  67. data/vendor/v8/src/ia32/builtins-ia32.cc +5 -4
  68. data/vendor/v8/src/ia32/code-stubs-ia32.cc +22 -16
  69. data/vendor/v8/src/ia32/codegen-ia32.cc +2 -2
  70. data/vendor/v8/src/ia32/debug-ia32.cc +29 -2
  71. data/vendor/v8/src/ia32/full-codegen-ia32.cc +8 -101
  72. data/vendor/v8/src/ia32/ic-ia32.cc +23 -19
  73. data/vendor/v8/src/ia32/lithium-codegen-ia32.cc +126 -80
  74. data/vendor/v8/src/ia32/lithium-codegen-ia32.h +2 -1
  75. data/vendor/v8/src/ia32/lithium-ia32.cc +15 -9
  76. data/vendor/v8/src/ia32/lithium-ia32.h +14 -6
  77. data/vendor/v8/src/ia32/macro-assembler-ia32.cc +50 -40
  78. data/vendor/v8/src/ia32/macro-assembler-ia32.h +5 -4
  79. data/vendor/v8/src/ia32/regexp-macro-assembler-ia32.cc +113 -43
  80. data/vendor/v8/src/ia32/regexp-macro-assembler-ia32.h +9 -4
  81. data/vendor/v8/src/ia32/simulator-ia32.h +4 -4
  82. data/vendor/v8/src/ia32/stub-cache-ia32.cc +52 -14
  83. data/vendor/v8/src/ic.cc +77 -20
  84. data/vendor/v8/src/ic.h +18 -2
  85. data/vendor/v8/src/incremental-marking-inl.h +21 -5
  86. data/vendor/v8/src/incremental-marking.cc +35 -8
  87. data/vendor/v8/src/incremental-marking.h +12 -3
  88. data/vendor/v8/src/isolate.cc +12 -2
  89. data/vendor/v8/src/isolate.h +1 -1
  90. data/vendor/v8/src/jsregexp.cc +66 -26
  91. data/vendor/v8/src/jsregexp.h +60 -31
  92. data/vendor/v8/src/list-inl.h +8 -0
  93. data/vendor/v8/src/list.h +3 -0
  94. data/vendor/v8/src/lithium.cc +5 -2
  95. data/vendor/v8/src/liveedit.cc +57 -5
  96. data/vendor/v8/src/mark-compact-inl.h +17 -11
  97. data/vendor/v8/src/mark-compact.cc +100 -143
  98. data/vendor/v8/src/mark-compact.h +44 -20
  99. data/vendor/v8/src/messages.js +131 -99
  100. data/vendor/v8/src/mips/builtins-mips.cc +5 -4
  101. data/vendor/v8/src/mips/code-stubs-mips.cc +23 -15
  102. data/vendor/v8/src/mips/codegen-mips.cc +2 -2
  103. data/vendor/v8/src/mips/debug-mips.cc +3 -1
  104. data/vendor/v8/src/mips/full-codegen-mips.cc +4 -102
  105. data/vendor/v8/src/mips/ic-mips.cc +34 -36
  106. data/vendor/v8/src/mips/lithium-codegen-mips.cc +116 -68
  107. data/vendor/v8/src/mips/lithium-mips.cc +20 -7
  108. data/vendor/v8/src/mips/lithium-mips.h +11 -4
  109. data/vendor/v8/src/mips/macro-assembler-mips.cc +50 -39
  110. data/vendor/v8/src/mips/macro-assembler-mips.h +5 -4
  111. data/vendor/v8/src/mips/regexp-macro-assembler-mips.cc +110 -50
  112. data/vendor/v8/src/mips/regexp-macro-assembler-mips.h +6 -5
  113. data/vendor/v8/src/mips/simulator-mips.h +5 -5
  114. data/vendor/v8/src/mips/stub-cache-mips.cc +66 -20
  115. data/vendor/v8/src/mksnapshot.cc +5 -1
  116. data/vendor/v8/src/objects-debug.cc +103 -6
  117. data/vendor/v8/src/objects-inl.h +215 -116
  118. data/vendor/v8/src/objects-printer.cc +13 -8
  119. data/vendor/v8/src/objects.cc +608 -331
  120. data/vendor/v8/src/objects.h +129 -94
  121. data/vendor/v8/src/parser.cc +16 -4
  122. data/vendor/v8/src/platform-freebsd.cc +1 -0
  123. data/vendor/v8/src/platform-linux.cc +9 -30
  124. data/vendor/v8/src/platform-posix.cc +28 -7
  125. data/vendor/v8/src/platform-win32.cc +15 -3
  126. data/vendor/v8/src/platform.h +2 -1
  127. data/vendor/v8/src/profile-generator-inl.h +25 -2
  128. data/vendor/v8/src/profile-generator.cc +300 -822
  129. data/vendor/v8/src/profile-generator.h +97 -214
  130. data/vendor/v8/src/regexp-macro-assembler-irregexp.cc +2 -1
  131. data/vendor/v8/src/regexp-macro-assembler-irregexp.h +2 -2
  132. data/vendor/v8/src/regexp-macro-assembler-tracer.cc +6 -5
  133. data/vendor/v8/src/regexp-macro-assembler-tracer.h +1 -1
  134. data/vendor/v8/src/regexp-macro-assembler.cc +7 -3
  135. data/vendor/v8/src/regexp-macro-assembler.h +10 -2
  136. data/vendor/v8/src/regexp.js +6 -0
  137. data/vendor/v8/src/runtime.cc +265 -212
  138. data/vendor/v8/src/runtime.h +6 -5
  139. data/vendor/v8/src/scopes.cc +20 -0
  140. data/vendor/v8/src/scopes.h +6 -3
  141. data/vendor/v8/src/spaces.cc +0 -2
  142. data/vendor/v8/src/string-stream.cc +2 -2
  143. data/vendor/v8/src/v8-counters.h +0 -2
  144. data/vendor/v8/src/v8natives.js +2 -2
  145. data/vendor/v8/src/v8utils.h +6 -3
  146. data/vendor/v8/src/version.cc +1 -1
  147. data/vendor/v8/src/x64/assembler-x64.h +2 -1
  148. data/vendor/v8/src/x64/builtins-x64.cc +5 -4
  149. data/vendor/v8/src/x64/code-stubs-x64.cc +25 -16
  150. data/vendor/v8/src/x64/codegen-x64.cc +2 -2
  151. data/vendor/v8/src/x64/debug-x64.cc +14 -1
  152. data/vendor/v8/src/x64/disasm-x64.cc +1 -1
  153. data/vendor/v8/src/x64/full-codegen-x64.cc +10 -106
  154. data/vendor/v8/src/x64/ic-x64.cc +20 -16
  155. data/vendor/v8/src/x64/lithium-codegen-x64.cc +156 -79
  156. data/vendor/v8/src/x64/lithium-codegen-x64.h +2 -1
  157. data/vendor/v8/src/x64/lithium-x64.cc +18 -8
  158. data/vendor/v8/src/x64/lithium-x64.h +7 -2
  159. data/vendor/v8/src/x64/macro-assembler-x64.cc +50 -40
  160. data/vendor/v8/src/x64/macro-assembler-x64.h +5 -4
  161. data/vendor/v8/src/x64/regexp-macro-assembler-x64.cc +122 -51
  162. data/vendor/v8/src/x64/regexp-macro-assembler-x64.h +17 -8
  163. data/vendor/v8/src/x64/simulator-x64.h +4 -4
  164. data/vendor/v8/src/x64/stub-cache-x64.cc +55 -17
  165. data/vendor/v8/test/cctest/cctest.status +1 -0
  166. data/vendor/v8/test/cctest/test-api.cc +24 -0
  167. data/vendor/v8/test/cctest/test-func-name-inference.cc +38 -0
  168. data/vendor/v8/test/cctest/test-heap-profiler.cc +21 -77
  169. data/vendor/v8/test/cctest/test-heap.cc +164 -3
  170. data/vendor/v8/test/cctest/test-list.cc +12 -0
  171. data/vendor/v8/test/cctest/test-mark-compact.cc +5 -5
  172. data/vendor/v8/test/cctest/test-regexp.cc +14 -8
  173. data/vendor/v8/test/cctest/testcfg.py +2 -0
  174. data/vendor/v8/test/mjsunit/accessor-map-sharing.js +176 -0
  175. data/vendor/v8/test/mjsunit/array-construct-transition.js +3 -3
  176. data/vendor/v8/test/mjsunit/array-literal-transitions.js +10 -10
  177. data/vendor/v8/test/mjsunit/big-array-literal.js +3 -0
  178. data/vendor/v8/test/mjsunit/compiler/inline-construct.js +4 -2
  179. data/vendor/v8/test/mjsunit/debug-liveedit-stack-padding.js +88 -0
  180. data/vendor/v8/test/mjsunit/elements-kind.js +4 -4
  181. data/vendor/v8/test/mjsunit/elements-transition-hoisting.js +2 -2
  182. data/vendor/v8/test/mjsunit/elements-transition.js +5 -5
  183. data/vendor/v8/test/mjsunit/error-constructors.js +68 -33
  184. data/vendor/v8/test/mjsunit/harmony/proxies.js +14 -6
  185. data/vendor/v8/test/mjsunit/mjsunit.status +1 -0
  186. data/vendor/v8/test/mjsunit/packed-elements.js +112 -0
  187. data/vendor/v8/test/mjsunit/regexp-capture-3.js +6 -0
  188. data/vendor/v8/test/mjsunit/regexp-global.js +132 -0
  189. data/vendor/v8/test/mjsunit/regexp.js +11 -0
  190. data/vendor/v8/test/mjsunit/regress/regress-117409.js +52 -0
  191. data/vendor/v8/test/mjsunit/regress/regress-126412.js +33 -0
  192. data/vendor/v8/test/mjsunit/regress/regress-128018.js +35 -0
  193. data/vendor/v8/test/mjsunit/regress/regress-128146.js +33 -0
  194. data/vendor/v8/test/mjsunit/regress/regress-1639-2.js +4 -1
  195. data/vendor/v8/test/mjsunit/regress/regress-1639.js +14 -8
  196. data/vendor/v8/test/mjsunit/regress/regress-1849.js +3 -3
  197. data/vendor/v8/test/mjsunit/regress/regress-1878.js +2 -2
  198. data/vendor/v8/test/mjsunit/regress/regress-2071.js +79 -0
  199. data/vendor/v8/test/mjsunit/regress/regress-2153.js +32 -0
  200. data/vendor/v8/test/mjsunit/regress/regress-crbug-122271.js +4 -4
  201. data/vendor/v8/test/mjsunit/regress/regress-crbug-126414.js +32 -0
  202. data/vendor/v8/test/mjsunit/regress/regress-smi-only-concat.js +2 -2
  203. data/vendor/v8/test/mjsunit/regress/regress-transcendental.js +49 -0
  204. data/vendor/v8/test/mjsunit/stack-traces.js +14 -0
  205. data/vendor/v8/test/mjsunit/unbox-double-arrays.js +4 -3
  206. data/vendor/v8/test/test262/testcfg.py +6 -1
  207. data/vendor/v8/tools/check-static-initializers.sh +11 -3
  208. data/vendor/v8/tools/fuzz-harness.sh +92 -0
  209. data/vendor/v8/tools/grokdump.py +658 -67
  210. data/vendor/v8/tools/gyp/v8.gyp +21 -39
  211. data/vendor/v8/tools/js2c.py +3 -3
  212. data/vendor/v8/tools/jsmin.py +2 -2
  213. data/vendor/v8/tools/presubmit.py +2 -1
  214. data/vendor/v8/tools/test-wrapper-gypbuild.py +25 -11
  215. metadata +624 -612
data/Rakefile CHANGED
@@ -7,14 +7,21 @@ RSpec::Core::RakeTask.new(:spec)
7
7
  V8_Version = Libv8::VERSION.gsub(/\.\d$/,'')
8
8
  V8_Source = File.expand_path '../vendor/v8', __FILE__
9
9
 
10
+ require File.expand_path '../ext/libv8/make.rb', __FILE__
11
+ include Libv8::Make
12
+
10
13
  desc "setup the vendored v8 source to correspond to the libv8 gem version and prepare deps"
11
14
  task :checkout do
12
15
  sh "git submodule update --init"
13
16
  Dir.chdir(V8_Source) do
14
17
  sh "git fetch"
15
18
  sh "git checkout #{V8_Version} -f"
16
- sh "make dependencies"
19
+ sh "#{make} dependencies"
17
20
  end
21
+
22
+ # Fix gyp trying to build platform-linux on FreeBSD 9 and FreeBSD 10.
23
+ # Based on: https://chromiumcodereview.appspot.com/10079030/patch/1/2
24
+ sh "patch -N -p0 -d vendor/v8 < patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch"
18
25
  end
19
26
 
20
27
  desc "compile v8 via the ruby extension mechanism"
@@ -28,7 +35,7 @@ task :manual_compile do
28
35
  require File.expand_path '../ext/libv8/arch.rb', __FILE__
29
36
  include Libv8::Arch
30
37
  Dir.chdir(V8_Source) do
31
- sh %Q{make -j2 #{libv8_arch}.release GYPFLAGS="-Dhost_arch=#{libv8_arch}"}
38
+ sh %Q{#{make} -j2 #{libv8_arch}.release GYPFLAGS="-Dhost_arch=#{libv8_arch}"}
32
39
  end
33
40
  end
34
41
 
@@ -55,4 +62,4 @@ task :clean do
55
62
  end
56
63
 
57
64
  task :default => [:checkout, :compile, :spec]
58
- task :build => [:clean, :checkout]
65
+ task :build => [:clean, :checkout]
@@ -0,0 +1,46 @@
1
+ module Libv8
2
+ module Compiler
3
+ module_function
4
+
5
+ def compiler
6
+ unless defined?(@compiler)
7
+ cc = check_gcc_compiler "g++"
8
+
9
+ # Check alternative GCC names
10
+ # These are common on BSD's after
11
+ # GCC has been installed by a port
12
+ cc ||= check_gcc_compiler "g++44"
13
+ cc ||= check_gcc_compiler "g++46"
14
+ cc ||= check_gcc_compiler "g++48"
15
+
16
+ if cc.nil?
17
+ warn "Unable to find a compiler officially supported by v8."
18
+ warn "It is recommended to use GCC v4.4 or higher"
19
+ @compiler = cc = 'g++'
20
+ end
21
+
22
+ puts "Using compiler: #{cc}"
23
+ @compiler = cc
24
+ end
25
+
26
+ @compiler
27
+ end
28
+
29
+ def check_gcc_compiler(name)
30
+ compiler = `which #{name}`
31
+ return nil unless $?.success?
32
+
33
+ compiler.chomp!
34
+ return nil unless `#{compiler} --version` =~ /([0-9]\.[0-9]\.[0-9])/
35
+
36
+ return nil if $1 < "4.4"
37
+ compiler
38
+ end
39
+
40
+ def check_clang_compiler(name)
41
+ compiler = `which #{name}`
42
+ return nil unless $?.success?
43
+ compiler.chomp
44
+ end
45
+ end
46
+ end
@@ -1,9 +1,13 @@
1
1
  require 'mkmf'
2
2
  create_makefile('libv8')
3
3
  require File.expand_path '../arch.rb', __FILE__
4
+ require File.expand_path '../make.rb', __FILE__
5
+ require File.expand_path '../compiler.rb', __FILE__
4
6
 
5
7
  include Libv8::Arch
8
+ include Libv8::Make
9
+ include Libv8::Compiler
6
10
 
7
11
  Dir.chdir(File.expand_path '../../../vendor/v8', __FILE__) do
8
- puts `make #{libv8_arch}.release GYPFLAGS="-Dhost_arch=#{libv8_arch}"`
12
+ puts `env CXX=#{compiler} LINK=#{compiler} #{make} #{libv8_arch}.release GYPFLAGS="-Dhost_arch=#{libv8_arch}"`
9
13
  end
@@ -0,0 +1,13 @@
1
+ module Libv8
2
+ module Make
3
+ module_function
4
+
5
+ def make
6
+ unless defined?(@make)
7
+ @make = `which gmake`.chomp
8
+ @make = `which make`.chomp unless $?.success?
9
+ end
10
+ @make
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Libv8
2
- VERSION = "3.10.8.0"
2
+ VERSION = "3.11.8.0"
3
3
  end
@@ -0,0 +1,11 @@
1
+ --- build/gyp/pylib/gyp/common.py.orig 2012-05-12 15:36:46.235280559 +0100
2
+ +++ build/gyp/pylib/gyp/common.py 2012-05-12 15:37:10.315754125 +0100
3
+ @@ -355,6 +355,8 @@
4
+ 'sunos5': 'solaris',
5
+ 'freebsd7': 'freebsd',
6
+ 'freebsd8': 'freebsd',
7
+ + 'freebsd9': 'freebsd',
8
+ + 'freebsd10': 'freebsd',
9
+ }
10
+ flavor = flavors.get(sys.platform, 'linux')
11
+ return params.get('flavor', flavor)
@@ -0,0 +1,10 @@
1
+ --- src/platform-freebsd.cc.orig 2012-05-12 16:47:50.556202492 +0100
2
+ +++ src/platform-freebsd.cc 2012-05-12 16:37:59.924934272 +0100
3
+ @@ -554,6 +554,7 @@
4
+ ASSERT(result == 0);
5
+ result = pthread_mutex_init(&mutex_, &attrs);
6
+ ASSERT(result == 0);
7
+ + USE(result);
8
+ }
9
+
10
+ virtual ~FreeBSDMutex() { pthread_mutex_destroy(&mutex_); }
@@ -1,3 +1,127 @@
1
+ 2012-05-31: Version 3.11.8
2
+
3
+ Avoid overdeep recursion in regexp where a guarded expression with a
4
+ minimum repetition count is inside another quantifier.
5
+ (Chromium issue 129926)
6
+
7
+ Fixed missing write barrier in store field stub.
8
+ (issues 2143, 1465, Chromium issue 129355)
9
+
10
+ Proxies: Fixed receiver for setters inherited from proxies.
11
+ Proxies: Fixed ToStringArray function so that it does not reject some
12
+ keys.
13
+ (issue 1543)
14
+
15
+ Performance and stability improvements on all platforms.
16
+
17
+
18
+ 2012-05-29: Version 3.11.7
19
+
20
+ Get better function names in stack traces.
21
+
22
+ Performance and stability improvements on all platforms.
23
+
24
+
25
+ 2012-05-24: Version 3.11.6
26
+
27
+ Fixed RegExp.prototype.toString for incompatible receivers
28
+ (issue 1981).
29
+
30
+ Performance and stability improvements on all platforms.
31
+
32
+
33
+ 2012-05-23: Version 3.11.5
34
+
35
+ Performance and stability improvements on all platforms.
36
+
37
+
38
+ 2012-05-22: Version 3.11.4
39
+
40
+ Some cleanup to common.gypi. This fixes some host/target combinations
41
+ that weren't working in the Make build on Mac.
42
+
43
+ Handle EINTR in socket functions and continue incomplete sends.
44
+ (issue 2098)
45
+
46
+ Fixed python deprecations. (issue 1391)
47
+
48
+ Made socket send and receive more robust and return 0 on failure.
49
+ (Chromium issue 15719)
50
+
51
+ Fixed GCC 4.7 (C++11) compilation. (issue 2136)
52
+
53
+ Set '-m32' option for host and target platforms
54
+
55
+ Performance and stability improvements on all platforms.
56
+
57
+
58
+ 2012-05-18: Version 3.11.3
59
+
60
+ Disable optimization for functions that have scopes that cannot be
61
+ reconstructed from the context chain. (issue 2071)
62
+
63
+ Define V8_EXPORT to nothing for clients of v8. (Chromium issue 90078)
64
+
65
+ Correctly check for native error objects. (Chromium issue 2138)
66
+
67
+ Performance and stability improvements on all platforms.
68
+
69
+
70
+ 2012-05-16: Version 3.11.2
71
+
72
+ Revert r11496. (Chromium issue 128146)
73
+
74
+ Implement map collection for incremental marking. (issue 1465)
75
+
76
+ Add toString method to CallSite (which describes a frame of the
77
+ stack trace).
78
+
79
+
80
+ 2012-05-15: Version 3.11.1
81
+
82
+ Added a readbuffer function to d8 that reads a file into an ArrayBuffer.
83
+
84
+ Fix freebsd build. (V8 issue 2126)
85
+
86
+ Performance and stability improvements on all platforms.
87
+
88
+
89
+ 2012-05-11: Version 3.11.0
90
+
91
+ Fixed compose-discard crasher from r11524 (issue 2123).
92
+
93
+ Activated new global semantics by default. Global variables can
94
+ now shadow properties of the global object (ES5.1 erratum).
95
+
96
+ Properly set ElementsKind of empty FAST_DOUBLE_ELEMENTS arrays when
97
+ transitioning (Chromium issue 117409).
98
+
99
+ Made Error.prototype.name writable again, as required by the spec and
100
+ the web (Chromium issue 69187).
101
+
102
+ Implemented map collection with incremental marking (issue 1465).
103
+
104
+ Regexp: Fixed overflow in min-match-length calculation
105
+ (Chromium issue 126412).
106
+
107
+ MIPS: Fixed illegal instruction use on Loongson in code for
108
+ Math.random() (issue 2115).
109
+
110
+ Fixed crash bug in VisitChoice (Chromium issue 126272).
111
+
112
+ Fixed unsigned-Smi check in MappedArgumentsLookup
113
+ (Chromium issue 126414).
114
+
115
+ Fixed LiveEdit for function with no locals (issue 825).
116
+
117
+ Fixed register clobbering in LoadIC for interceptors
118
+ (Chromium issue 125988).
119
+
120
+ Implemented clearing of CompareICs (issue 2102).
121
+
122
+ Performance and stability improvements on all platforms.
123
+
124
+
1
125
  2012-05-03: Version 3.10.8
2
126
 
3
127
  Enabled MIPS cross-compilation.
@@ -0,0 +1,27 @@
1
+ # Note: The buildbots evaluate this file with CWD set to the parent
2
+ # directory and assume that the root of the checkout is in ./v8/, so
3
+ # all paths in here must match this assumption.
4
+
5
+ deps = {
6
+ # Remember to keep the revision in sync with the Makefile.
7
+ "v8/build/gyp":
8
+ "http://gyp.googlecode.com/svn/trunk@1282",
9
+ }
10
+
11
+ deps_os = {
12
+ "win": {
13
+ "v8/third_party/cygwin":
14
+ "http://src.chromium.org/svn/trunk/deps/third_party/cygwin@66844",
15
+
16
+ "v8/third_party/python_26":
17
+ "http://src.chromium.org/svn/trunk/tools/third_party/python_26@89111",
18
+ }
19
+ }
20
+
21
+ hooks = [
22
+ {
23
+ # A change to a .gyp, .gypi, or to GYP itself should run the generator.
24
+ "pattern": ".",
25
+ "action": ["python", "v8/build/gyp_v8"],
26
+ },
27
+ ]
@@ -137,6 +137,12 @@ ENVFILE = $(OUTDIR)/environment
137
137
  # Target definitions. "all" is the default.
138
138
  all: $(MODES)
139
139
 
140
+ # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile
141
+ # having been created before.
142
+ buildbot:
143
+ $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \
144
+ builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)"
145
+
140
146
  # Compile targets. MODES and ARCHES are convenience targets.
141
147
  .SECONDEXPANSION:
142
148
  $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
@@ -222,6 +228,7 @@ $(OUTDIR)/Makefile.android: $(GYPFILES) $(ENVFILE) build/android.gypi \
222
228
  must-set-ANDROID_NDK_ROOT
223
229
  GYP_GENERATORS=make \
224
230
  CC="${ANDROID_TOOL_PREFIX}-gcc" \
231
+ CXX="${ANDROID_TOOL_PREFIX}-g++" \
225
232
  build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
226
233
  -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \
227
234
  -S.android $(GYPFLAGS)
@@ -101,14 +101,14 @@ LIBRARY_FLAGS = {
101
101
  'os:linux': {
102
102
  'CCFLAGS': ['-ansi'] + GCC_EXTRA_CCFLAGS,
103
103
  'library:shared': {
104
- 'CPPDEFINES': ['V8_SHARED'],
104
+ 'CPPDEFINES': ['V8_SHARED', 'BUILDING_V8_SHARED'],
105
105
  'LIBS': ['pthread']
106
106
  }
107
107
  },
108
108
  'os:macos': {
109
109
  'CCFLAGS': ['-ansi', '-mmacosx-version-min=10.4'],
110
110
  'library:shared': {
111
- 'CPPDEFINES': ['V8_SHARED']
111
+ 'CPPDEFINES': ['V8_SHARED', 'BUILDING_V8_SHARED'],
112
112
  }
113
113
  },
114
114
  'os:freebsd': {
@@ -1601,4 +1601,17 @@ except:
1601
1601
  pass
1602
1602
 
1603
1603
 
1604
+ def WarnAboutDeprecation():
1605
+ print """
1606
+ #######################################################
1607
+ # WARNING: Building V8 with SCons is deprecated and #
1608
+ # will not work much longer. Please switch to using #
1609
+ # the GYP-based build now. Instructions are at #
1610
+ # http://code.google.com/p/v8/wiki/BuildingWithGYP. #
1611
+ #######################################################
1612
+ """
1613
+
1614
+ WarnAboutDeprecation()
1615
+ import atexit
1616
+ atexit.register(WarnAboutDeprecation)
1604
1617
  Build()
@@ -110,151 +110,117 @@
110
110
  ['v8_enable_gdbjit==1', {
111
111
  'defines': ['ENABLE_GDB_JIT_INTERFACE',],
112
112
  }],
113
- ['OS!="mac"', {
114
- # TODO(mark): The OS!="mac" conditional is temporary. It can be
115
- # removed once the Mac Chromium build stops setting target_arch to
116
- # ia32 and instead sets it to mac. Other checks in this file for
117
- # OS=="mac" can be removed at that time as well. This can be cleaned
118
- # up once http://crbug.com/44205 is fixed.
113
+ ['v8_target_arch=="arm"', {
114
+ 'defines': [
115
+ 'V8_TARGET_ARCH_ARM',
116
+ ],
119
117
  'conditions': [
120
- ['v8_target_arch=="arm"', {
118
+ [ 'v8_can_use_unaligned_accesses=="true"', {
121
119
  'defines': [
122
- 'V8_TARGET_ARCH_ARM',
120
+ 'CAN_USE_UNALIGNED_ACCESSES=1',
123
121
  ],
124
- 'conditions': [
125
- [ 'v8_can_use_unaligned_accesses=="true"', {
126
- 'defines': [
127
- 'CAN_USE_UNALIGNED_ACCESSES=1',
128
- ],
129
- }],
130
- [ 'v8_can_use_unaligned_accesses=="false"', {
131
- 'defines': [
132
- 'CAN_USE_UNALIGNED_ACCESSES=0',
133
- ],
134
- }],
135
- [ 'v8_can_use_vfp_instructions=="true"', {
136
- 'defines': [
137
- 'CAN_USE_VFP_INSTRUCTIONS',
138
- ],
139
- }],
140
- [ 'v8_use_arm_eabi_hardfloat=="true"', {
141
- 'defines': [
142
- 'USE_EABI_HARDFLOAT=1',
143
- 'CAN_USE_VFP_INSTRUCTIONS',
144
- ],
145
- 'target_conditions': [
146
- ['_toolset=="target"', {
147
- 'cflags': ['-mfloat-abi=hard',],
148
- }],
149
- ],
150
- }, {
151
- 'defines': [
152
- 'USE_EABI_HARDFLOAT=0',
153
- ],
154
- }],
155
- # The ARM assembler assumes the host is 32 bits,
156
- # so force building 32-bit host tools.
157
- ['host_arch=="x64" or OS=="android"', {
158
- 'target_conditions': [
159
- ['_toolset=="host"', {
160
- 'cflags': ['-m32'],
161
- 'ldflags': ['-m32'],
162
- }],
163
- ],
164
- }],
122
+ }],
123
+ [ 'v8_can_use_unaligned_accesses=="false"', {
124
+ 'defines': [
125
+ 'CAN_USE_UNALIGNED_ACCESSES=0',
165
126
  ],
166
127
  }],
167
- ['v8_target_arch=="ia32"', {
128
+ [ 'v8_can_use_vfp_instructions=="true"', {
168
129
  'defines': [
169
- 'V8_TARGET_ARCH_IA32',
130
+ 'CAN_USE_VFP_INSTRUCTIONS',
170
131
  ],
171
132
  }],
172
- ['v8_target_arch=="mips"', {
133
+ [ 'v8_use_arm_eabi_hardfloat=="true"', {
173
134
  'defines': [
174
- 'V8_TARGET_ARCH_MIPS',
135
+ 'USE_EABI_HARDFLOAT=1',
136
+ 'CAN_USE_VFP_INSTRUCTIONS',
175
137
  ],
176
- 'variables': {
177
- 'mipscompiler': '<!($(echo ${CXX:-$(which g++)}) -v 2>&1 | grep -q "^Target: mips-" && echo "yes" || echo "no")',
178
- },
179
- 'conditions': [
180
- ['mipscompiler=="yes"', {
181
- 'target_conditions': [
182
- ['_toolset=="target"', {
183
- 'cflags': ['-EL'],
184
- 'ldflags': ['-EL'],
185
- 'conditions': [
186
- [ 'v8_use_mips_abi_hardfloat=="true"', {
187
- 'cflags': ['-mhard-float'],
188
- 'ldflags': ['-mhard-float'],
189
- }, {
190
- 'cflags': ['-msoft-float'],
191
- 'ldflags': ['-msoft-float'],
192
- }],
193
- ['mips_arch_variant=="mips32r2"', {
194
- 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
195
- }],
196
- ['mips_arch_variant=="loongson"', {
197
- 'cflags': ['-mips3', '-Wa,-mips3'],
198
- }, {
199
- 'cflags': ['-mips32', '-Wa,-mips32'],
200
- }],
201
- ],
202
- }],
203
- ],
204
- }],
205
- [ 'v8_can_use_fpu_instructions=="true"', {
206
- 'defines': [
207
- 'CAN_USE_FPU_INSTRUCTIONS',
208
- ],
209
- }],
210
- [ 'v8_use_mips_abi_hardfloat=="true"', {
211
- 'defines': [
212
- '__mips_hard_float=1',
213
- 'CAN_USE_FPU_INSTRUCTIONS',
214
- ],
215
- }, {
216
- 'defines': [
217
- '__mips_soft_float=1'
218
- ],
219
- }],
220
- ['mips_arch_variant=="mips32r2"', {
221
- 'defines': ['_MIPS_ARCH_MIPS32R2',],
222
- }],
223
- ['mips_arch_variant=="loongson"', {
224
- 'defines': ['_MIPS_ARCH_LOONGSON',],
138
+ 'target_conditions': [
139
+ ['_toolset=="target"', {
140
+ 'cflags': ['-mfloat-abi=hard',],
225
141
  }],
226
- # The MIPS assembler assumes the host is 32 bits,
227
- # so force building 32-bit host tools.
228
- ['host_arch=="x64"', {
229
- 'target_conditions': [
230
- ['_toolset=="host"', {
231
- 'cflags': ['-m32'],
232
- 'ldflags': ['-m32'],
142
+ ],
143
+ }, {
144
+ 'defines': [
145
+ 'USE_EABI_HARDFLOAT=0',
146
+ ],
147
+ }],
148
+ ],
149
+ }], # v8_target_arch=="arm"
150
+ ['v8_target_arch=="ia32"', {
151
+ 'defines': [
152
+ 'V8_TARGET_ARCH_IA32',
153
+ ],
154
+ }], # v8_target_arch=="ia32"
155
+ ['v8_target_arch=="mips"', {
156
+ 'defines': [
157
+ 'V8_TARGET_ARCH_MIPS',
158
+ ],
159
+ 'variables': {
160
+ 'mipscompiler': '<!($(echo ${CXX:-$(which g++)}) -v 2>&1 | grep -q "^Target: mips-" && echo "yes" || echo "no")',
161
+ },
162
+ 'conditions': [
163
+ ['mipscompiler=="yes"', {
164
+ 'target_conditions': [
165
+ ['_toolset=="target"', {
166
+ 'cflags': ['-EL'],
167
+ 'ldflags': ['-EL'],
168
+ 'conditions': [
169
+ [ 'v8_use_mips_abi_hardfloat=="true"', {
170
+ 'cflags': ['-mhard-float'],
171
+ 'ldflags': ['-mhard-float'],
172
+ }, {
173
+ 'cflags': ['-msoft-float'],
174
+ 'ldflags': ['-msoft-float'],
175
+ }],
176
+ ['mips_arch_variant=="mips32r2"', {
177
+ 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
178
+ }],
179
+ ['mips_arch_variant=="loongson"', {
180
+ 'cflags': ['-mips3', '-Wa,-mips3'],
181
+ }, {
182
+ 'cflags': ['-mips32', '-Wa,-mips32'],
233
183
  }],
234
184
  ],
235
185
  }],
236
186
  ],
237
187
  }],
238
- ['v8_target_arch=="x64"', {
188
+ [ 'v8_can_use_fpu_instructions=="true"', {
239
189
  'defines': [
240
- 'V8_TARGET_ARCH_X64',
190
+ 'CAN_USE_FPU_INSTRUCTIONS',
241
191
  ],
242
192
  }],
243
- ],
244
- }, { # Section for OS=="mac".
245
- 'conditions': [
246
- ['target_arch=="ia32"', {
247
- 'xcode_settings': {
248
- 'ARCHS': ['i386'],
249
- }
193
+ [ 'v8_use_mips_abi_hardfloat=="true"', {
194
+ 'defines': [
195
+ '__mips_hard_float=1',
196
+ 'CAN_USE_FPU_INSTRUCTIONS',
197
+ ],
198
+ }, {
199
+ 'defines': [
200
+ '__mips_soft_float=1'
201
+ ],
250
202
  }],
251
- ['target_arch=="x64"', {
252
- 'xcode_settings': {
253
- 'ARCHS': ['x86_64'],
254
- }
203
+ ['mips_arch_variant=="mips32r2"', {
204
+ 'defines': ['_MIPS_ARCH_MIPS32R2',],
205
+ }],
206
+ ['mips_arch_variant=="loongson"', {
207
+ 'defines': ['_MIPS_ARCH_LOONGSON',],
255
208
  }],
256
209
  ],
257
- }],
210
+ }], # v8_target_arch=="mips"
211
+ ['v8_target_arch=="x64"', {
212
+ 'defines': [
213
+ 'V8_TARGET_ARCH_X64',
214
+ ],
215
+ 'xcode_settings': {
216
+ 'ARCHS': [ 'x86_64' ],
217
+ },
218
+ 'msvs_settings': {
219
+ 'VCLinkerTool': {
220
+ 'StackReserveSize': '2097152',
221
+ },
222
+ },
223
+ }], # v8_target_arch=="x64"
258
224
  ['v8_use_liveobjectlist=="true"', {
259
225
  'defines': [
260
226
  'ENABLE_DEBUGGER_SUPPORT',
@@ -272,6 +238,11 @@
272
238
  'defines': [
273
239
  'WIN32',
274
240
  ],
241
+ 'msvs_configuration_attributes': {
242
+ 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
243
+ 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
244
+ 'CharacterSet': '1',
245
+ },
275
246
  }],
276
247
  ['OS=="win" and v8_enable_prof==1', {
277
248
  'msvs_settings': {
@@ -283,14 +254,6 @@
283
254
  ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
284
255
  or OS=="netbsd"', {
285
256
  'conditions': [
286
- [ 'v8_target_arch!="x64"', {
287
- # Pass -m32 to the compiler iff it understands the flag.
288
- 'variables': {
289
- 'm32flag': '<!((echo | $(echo ${CXX:-$(which g++)}) -m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)',
290
- },
291
- 'cflags': [ '<(m32flag)' ],
292
- 'ldflags': [ '<(m32flag)' ],
293
- }],
294
257
  [ 'v8_no_strict_aliasing==1', {
295
258
  'cflags': [ '-fno-strict-aliasing' ],
296
259
  }],
@@ -299,6 +262,41 @@
299
262
  ['OS=="solaris"', {
300
263
  'defines': [ '__C99FEATURES__=1' ], # isinf() etc.
301
264
  }],
265
+ ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
266
+ or OS=="netbsd" or OS=="mac" or OS=="android") and \
267
+ (v8_target_arch=="arm" or v8_target_arch=="ia32" or \
268
+ v8_target_arch=="mips")', {
269
+ # Check whether the host compiler and target compiler support the
270
+ # '-m32' option and set it if so.
271
+ 'target_conditions': [
272
+ ['_toolset=="host"', {
273
+ 'variables': {
274
+ 'm32flag': '<!((echo | $(echo ${CXX_host:-$(which g++)}) -m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)',
275
+ },
276
+ 'cflags': [ '<(m32flag)' ],
277
+ 'ldflags': [ '<(m32flag)' ],
278
+ 'xcode_settings': {
279
+ 'ARCHS': [ 'i386' ],
280
+ },
281
+ }],
282
+ ['_toolset=="target"', {
283
+ 'variables': {
284
+ 'm32flag': '<!((echo | $(echo ${CXX_target:-${CXX:-$(which g++)}}) -m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)',
285
+ },
286
+ 'cflags': [ '<(m32flag)' ],
287
+ 'ldflags': [ '<(m32flag)' ],
288
+ 'xcode_settings': {
289
+ 'ARCHS': [ 'i386' ],
290
+ },
291
+ }],
292
+ ],
293
+ }],
294
+ ['OS=="freebsd" or OS=="openbsd"', {
295
+ 'cflags': [ '-I/usr/local/include' ],
296
+ }],
297
+ ['OS=="netbsd"', {
298
+ 'cflags': [ '-I/usr/pkg/include' ],
299
+ }],
302
300
  ], # conditions
303
301
  'configurations': {
304
302
  'Debug': {
@@ -322,19 +320,9 @@
322
320
  },
323
321
  'VCLinkerTool': {
324
322
  'LinkIncremental': '2',
325
- # For future reference, the stack size needs to be increased
326
- # when building for Windows 64-bit, otherwise some test cases
327
- # can cause stack overflow.
328
- # 'StackReserveSize': '297152',
329
323
  },
330
324
  },
331
325
  'conditions': [
332
- ['OS=="freebsd" or OS=="openbsd"', {
333
- 'cflags': [ '-I/usr/local/include' ],
334
- }],
335
- ['OS=="netbsd"', {
336
- 'cflags': [ '-I/usr/pkg/include' ],
337
- }],
338
326
  ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
339
327
  'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
340
328
  '-Wnon-virtual-dtor', '-Woverloaded-virtual' ],
@@ -364,12 +352,6 @@
364
352
  }],
365
353
  ],
366
354
  }],
367
- ['OS=="freebsd" or OS=="openbsd"', {
368
- 'cflags': [ '-I/usr/local/include' ],
369
- }],
370
- ['OS=="netbsd"', {
371
- 'cflags': [ '-I/usr/pkg/include' ],
372
- }],
373
355
  ['OS=="mac"', {
374
356
  'xcode_settings': {
375
357
  'GCC_OPTIMIZATION_LEVEL': '3', # -O3
@@ -382,11 +364,6 @@
382
364
  },
383
365
  }], # OS=="mac"
384
366
  ['OS=="win"', {
385
- 'msvs_configuration_attributes': {
386
- 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
387
- 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
388
- 'CharacterSet': '1',
389
- },
390
367
  'msvs_settings': {
391
368
  'VCCLCompilerTool': {
392
369
  'Optimization': '2',
@@ -407,12 +384,7 @@
407
384
  'VCLinkerTool': {
408
385
  'LinkIncremental': '1',
409
386
  'OptimizeReferences': '2',
410
- 'OptimizeForWindows98': '1',
411
387
  'EnableCOMDATFolding': '2',
412
- # For future reference, the stack size needs to be
413
- # increased when building for Windows 64-bit, otherwise
414
- # some test cases can cause stack overflow.
415
- # 'StackReserveSize': '297152',
416
388
  },
417
389
  },
418
390
  }], # OS=="win"