Permalink
Browse files

Version 3.18.3

Exposed the GC under a name that is less collision prone than window.gc. (issue 2641)

Do not emit double values at their use sites. (Chromium issue 234101)

Added methods to allow resuming execution after calling TerminateExecution(). (issue 2361)

Performance and stability improvements on all platforms.

git-svn-id: https://v8.googlecode.com/svn/trunk@14404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information...
1 parent e69e154 commit 0fa757349da3e63d51e12d38821f90a0465054ee ulan@chromium.org committed Apr 24, 2013
Showing with 2,264 additions and 1,953 deletions.
  1. +1 −0 AUTHORS
  2. +13 −0 ChangeLog
  3. +6 −63 build/README.txt
  4. +2 −4 build/gyp_v8
  5. +100 −16 include/v8.h
  6. +120 −67 src/api.cc
  7. +6 −2 src/arm/assembler-arm.cc
  8. +114 −502 src/arm/code-stubs-arm.cc
  9. +0 −136 src/arm/code-stubs-arm.h
  10. +3 −5 src/arm/deoptimizer-arm.cc
  11. +1 −7 src/arm/ic-arm.cc
  12. +5 −0 src/arm/lithium-arm.cc
  13. +12 −4 src/arm/lithium-arm.h
  14. +78 −80 src/arm/lithium-codegen-arm.cc
  15. +12 −2 src/arm/lithium-codegen-arm.h
  16. +152 −83 src/arm/macro-assembler-arm.cc
  17. +57 −35 src/arm/macro-assembler-arm.h
  18. +8 −8 src/arm/regexp-macro-assembler-arm.cc
  19. +2 −0 src/arm/regexp-macro-assembler-arm.h
  20. +53 −80 src/arm/stub-cache-arm.cc
  21. +2 −2 src/assembler.cc
  22. +1 −1 src/assembler.h
  23. +18 −10 src/code-stubs-hydrogen.cc
  24. +4 −0 src/code.h
  25. +6 −0 src/compiler.cc
  26. +294 −76 src/d8.cc
  27. +13 −0 src/d8.h
  28. +0 −1 src/debug.cc
  29. +1 −0 src/deoptimizer.h
  30. +7 −0 src/execution.cc
  31. +1 −0 src/execution.h
  32. +10 −3 src/extensions/gc-extension.cc
  33. +1 −3 src/extensions/gc-extension.h
  34. +2 −0 src/factory.cc
  35. +7 −0 src/flag-definitions.h
  36. +37 −12 src/handles-inl.h
  37. +16 −4 src/handles.h
  38. +7 −0 src/heap.cc
  39. +5 −0 src/heap.h
  40. +21 −10 src/hydrogen-instructions.cc
  41. +75 −22 src/hydrogen-instructions.h
  42. +14 −75 src/hydrogen.cc
  43. +16 −21 src/hydrogen.h
  44. +15 −1 src/ia32/assembler-ia32-inl.h
  45. +3 −3 src/ia32/assembler-ia32.cc
  46. +4 −0 src/ia32/assembler-ia32.h
  47. +4 −4 src/ia32/code-stubs-ia32.cc
  48. +3 −5 src/ia32/deoptimizer-ia32.cc
  49. +88 −92 src/ia32/lithium-codegen-ia32.cc
  50. +12 −2 src/ia32/lithium-codegen-ia32.h
  51. +30 −11 src/ia32/lithium-ia32.cc
  52. +12 −4 src/ia32/lithium-ia32.h
  53. +5 −2 src/ia32/macro-assembler-ia32.cc
  54. +2 −0 src/ia32/macro-assembler-ia32.h
  55. +12 −12 src/ia32/regexp-macro-assembler-ia32.cc
  56. +3 −0 src/ia32/regexp-macro-assembler-ia32.h
  57. +21 −13 src/ia32/stub-cache-ia32.cc
  58. +54 −11 src/isolate.cc
  59. +9 −4 src/isolate.h
  60. +3 −2 src/lithium.cc
  61. +5 −1 src/mips/assembler-mips.cc
  62. +23 −21 src/mips/code-stubs-mips.cc
  63. +3 −5 src/mips/deoptimizer-mips.cc
  64. +91 −84 src/mips/lithium-codegen-mips.cc
  65. +12 −2 src/mips/lithium-codegen-mips.h
  66. +14 −2 src/mips/lithium-mips.cc
  67. +12 −4 src/mips/lithium-mips.h
  68. +6 −2 src/mips/macro-assembler-mips.cc
  69. +6 −4 src/mips/macro-assembler-mips.h
  70. +2 −2 src/mips/regexp-macro-assembler-mips.cc
  71. +1 −0 src/mips/regexp-macro-assembler-mips.h
  72. +46 −49 src/mips/stub-cache-mips.cc
  73. +4 −3 src/objects.cc
  74. +2 −1 src/objects.h
  75. +3 −2 src/profile-generator.cc
  76. 0 src/scanner.cc
  77. +1 −1 src/serialize.cc
  78. +5 −5 src/version.cc
  79. +1 −0 src/x64/assembler-x64.cc
  80. +8 −9 src/x64/code-stubs-x64.cc
  81. +6 −9 src/x64/deoptimizer-x64.cc
  82. +85 −84 src/x64/lithium-codegen-x64.cc
  83. +12 −2 src/x64/lithium-codegen-x64.h
  84. +37 −14 src/x64/lithium-x64.cc
  85. +12 −4 src/x64/lithium-x64.h
  86. +11 −5 src/x64/macro-assembler-x64.cc
  87. +2 −0 src/x64/macro-assembler-x64.h
  88. +10 −10 src/x64/regexp-macro-assembler-x64.cc
  89. +2 −0 src/x64/regexp-macro-assembler-x64.h
  90. +21 −14 src/x64/stub-cache-x64.cc
  91. +4 −0 test/cctest/test-parsing.cc
  92. +37 −0 test/cctest/test-thread-termination.cc
  93. +62 −0 test/mjsunit/bugs/bug-proto.js
  94. +42 −0 test/mjsunit/regress/regress-234101.js
  95. +37 −0 test/mjsunit/regress/regress-2646.js
  96. +47 −0 test/mjsunit/regress/regress-2653.js
  97. +0 −1 tools/check-static-initializers.sh
  98. +1 −1 tools/gcmole/README
  99. +0 −2 tools/gcmole/gcmole.cc
  100. +6 −1 tools/gcmole/gcmole.lua
  101. +2 −2 tools/js2c.py
  102. +0 −9 tools/test-server.py
  103. +0 −98 tools/utils.py
View
@@ -9,6 +9,7 @@ ARM Ltd.
Hewlett-Packard Development Company, LP
Igalia, S.L.
Joyent, Inc.
+Bloomberg Finance L.P.
Akinori MUSHA <knu@FreeBSD.org>
Alexander Botero-Lowry <alexbl@FreeBSD.org>
View
@@ -1,3 +1,16 @@
+2013-04-24: Version 3.18.3
+
+ Exposed the GC under a name that is less collision prone than window.gc.
+ (issue 2641)
+
+ Do not emit double values at their use sites. (Chromium issue 234101)
+
+ Added methods to allow resuming execution after calling
+ TerminateExecution(). (issue 2361)
+
+ Performance and stability improvements on all platforms.
+
+
2013-04-22: Version 3.18.2
OS::MemMove/OS::MemCopy: Don't call through to generated code when size
View
@@ -1,66 +1,9 @@
-This directory contains the V8 GYP files used to generate actual project files
-for different build systems.
+For build instructions, please refer to:
-This is currently work in progress but this is expected to replace the SCons
-based build system.
+https://code.google.com/p/v8/wiki/BuildingWithGYP
-To use this a checkout of GYP is needed inside this directory. From the root of
-the V8 project do the following:
+TL;DR version on *nix:
+$ make dependencies # Only needed once.
+$ make ia32.release -j8
+$ make ia32.release.check # Optionally: run tests.
-$ svn co http://gyp.googlecode.com/svn/trunk build/gyp
-
-Note for the command lines below that Debug is the default configuration,
-so specifying that on the command lines is not required.
-
-
-To generate Makefiles on Linux:
--------------------------------
-
-$ build/gyp_v8
-
-This will build makefiles for ia32, x64 and the ARM simulator with names
-Makefile-ia32, Makefile-x64 and Makefile-armu respectively.
-
-To build and run for ia32 in debug and release version do:
-
-$ make -f Makefile-ia32
-$ out/Debug/shell
-$ make -f Makefile-ia32 BUILDTYPE=Release
-$ out/Release/shell
-
-Change the makefile to build and run for the other architectures.
-
-
-To generate Xcode project files on Mac OS:
-------------------------------------------
-
-$ build/gyp_v8
-
-This will make an Xcode project for the ia32 architecture. To build and run do:
-
-$ xcodebuild -project build/all.xcodeproj
-$ samples/build/Debug/shell
-$ xcodebuild -project build/all.xcodeproj -configuration Release
-$ samples/build/Release/shell
-
-
-To generate Visual Studio solution and project files on Windows:
-----------------------------------------------------------------
-
-On Windows an additional third party component is required. This is cygwin in
-the same version as is used by the Chromium project. This can be checked out
-from the Chromium repository. From the root of the V8 project do the following:
-
-> svn co http://src.chromium.org/svn/trunk/deps/third_party/cygwin@66844 third_party/cygwin
-
-To run GYP Python is required and it is recommended to use the same version as
-is used by the Chromium project. This can also be checked out from the Chromium
-repository. From the root of the V8 project do the following:
-
-> svn co http://src.chromium.org/svn/trunk/tools/third_party/python_26@89111 third_party/python_26
-
-Now generate Visual Studio solution and project files for the ia32 architecture:
-
-> third_party\python_26\python build/gyp_v8
-
-Now open build\All.sln in Visual Studio.
View
@@ -32,6 +32,7 @@
import glob
import os
+import platform
import shlex
import sys
@@ -43,9 +44,6 @@ if __name__ == '__main__':
script_dir = os.path.dirname(__file__)
v8_root = '.'
-sys.path.insert(0, os.path.join(v8_root, 'tools'))
-import utils
-
sys.path.insert(0, os.path.join(v8_root, 'build', 'gyp', 'pylib'))
import gyp
@@ -164,6 +162,6 @@ if __name__ == '__main__':
# Generate for the architectures supported on the given platform.
gyp_args = list(args)
- if utils.GuessOS() == 'linux':
+ if platform.system() == 'Linux':
gyp_args.append('--generator-output=out')
run_gyp(gyp_args)
View
@@ -1326,22 +1326,48 @@ class V8EXPORT String : public Primitive {
V8_INLINE(static String* Cast(v8::Value* obj));
+ // TODO(dcarney): deprecate
/**
* Allocates a new string from either UTF-8 encoded or ASCII data.
* The second parameter 'length' gives the buffer length. If omitted,
* the function calls 'strlen' to determine the buffer length.
*/
- static Local<String> New(const char* data, int length = -1);
+ V8_INLINE(static Local<String> New(const char* data, int length = -1));
+ // TODO(dcarney): deprecate
/** Allocates a new string from 16-bit character codes.*/
- static Local<String> New(const uint16_t* data, int length = -1);
+ V8_INLINE(static Local<String> New(const uint16_t* data, int length = -1));
+ // TODO(dcarney): deprecate
/**
* Creates an internalized string (historically called a "symbol",
* not to be confused with ES6 symbols). Returns one if it exists already.
- * TODO(rossberg): Deprecate me when the new string API is here.
*/
- static Local<String> NewSymbol(const char* data, int length = -1);
+ V8_INLINE(static Local<String> NewSymbol(const char* data, int length = -1));
+
+ enum NewStringType {
+ kNormalString, kInternalizedString, kUndetectableString
+ };
+
+ /** Allocates a new string from UTF-8 data.*/
+ static Local<String> NewFromUtf8(Isolate* isolate,
+ const char* data,
+ NewStringType type = kNormalString,
+ int length = -1);
+
+ /** Allocates a new string from Latin-1 data.*/
+ static Local<String> NewFromOneByte(
+ Isolate* isolate,
+ const uint8_t* data,
+ NewStringType type = kNormalString,
+ int length = -1);
+
+ /** Allocates a new string from UTF-16 data.*/
+ static Local<String> NewFromTwoByte(
+ Isolate* isolate,
+ const uint16_t* data,
+ NewStringType type = kNormalString,
+ int length = -1);
/**
* Creates a new string by concatenating the left and the right strings
@@ -1396,11 +1422,15 @@ class V8EXPORT String : public Primitive {
*/
bool CanMakeExternal();
+ // TODO(dcarney): deprecate
/** Creates an undetectable string from the supplied ASCII or UTF-8 data.*/
- static Local<String> NewUndetectable(const char* data, int length = -1);
+ V8_INLINE(
+ static Local<String> NewUndetectable(const char* data, int length = -1));
+ // TODO(dcarney): deprecate
/** Creates an undetectable string from the supplied 16-bit character codes.*/
- static Local<String> NewUndetectable(const uint16_t* data, int length = -1);
+ V8_INLINE(static Local<String> NewUndetectable(
+ const uint16_t* data, int length = -1));
/**
* Converts an object to a UTF-8-encoded character array. Useful if
@@ -3675,6 +3705,24 @@ class V8EXPORT V8 {
*/
static bool IsExecutionTerminating(Isolate* isolate = NULL);
+ /**
+ * Resume execution capability in the given isolate, whose execution
+ * was previously forcefully terminated using TerminateExecution().
+ *
+ * When execution is forcefully terminated using TerminateExecution(),
+ * the isolate can not resume execution until all JavaScript frames
+ * have propagated the uncatchable exception which is generated. This
+ * method allows the program embedding the engine to handle the
+ * termination event and resume execution capability, even if
+ * JavaScript frames remain on the stack.
+ *
+ * This method can be used by any thread even if that thread has not
+ * acquired the V8 lock with a Locker object.
+ *
+ * \param isolate The isolate in which to resume execution capability.
+ */
+ static void CancelTerminateExecution(Isolate* isolate);
+
/**
* Releases any resources used by v8 and stops any utility threads
* that may be running. Note that disposing v8 is permanent, it
@@ -3785,20 +3833,29 @@ class V8EXPORT TryCatch {
bool HasCaught() const;
/**
- * For certain types of exceptions, it makes no sense to continue
- * execution.
- *
- * Currently, the only type of exception that can be caught by a
- * TryCatch handler and for which it does not make sense to continue
- * is termination exception. Such exceptions are thrown when the
- * TerminateExecution methods are called to terminate a long-running
- * script.
+ * For certain types of exceptions, it makes no sense to continue execution.
*
- * If CanContinue returns false, the correct action is to perform
- * any C++ cleanup needed and then return.
+ * If CanContinue returns false, the correct action is to perform any C++
+ * cleanup needed and then return. If CanContinue returns false and
+ * HasTerminated returns true, it is possible to call
+ * CancelTerminateExecution in order to continue calling into the engine.
*/
bool CanContinue() const;
+ /**
+ * Returns true if an exception has been caught due to script execution
+ * being terminated.
+ *
+ * There is no JavaScript representation of an execution termination
+ * exception. Such exceptions are thrown when the TerminateExecution
+ * methods are called to terminate a long-running script.
+ *
+ * If such an exception has been thrown, HasTerminated will return true,
+ * indicating that it is possible to call CancelTerminateExecution in order
+ * to continue calling into the engine.
+ */
+ bool HasTerminated() const;
+
/**
* Throws the exception caught by this TryCatch in a way that avoids
* it being caught again by this same TryCatch. As with ThrowException
@@ -3874,6 +3931,7 @@ class V8EXPORT TryCatch {
bool can_continue_ : 1;
bool capture_message_ : 1;
bool rethrow_ : 1;
+ bool has_terminated_ : 1;
friend class v8::internal::Isolate;
};
@@ -4839,6 +4897,32 @@ Local<String> String::Empty(Isolate* isolate) {
}
+Local<String> String::New(const char* data, int length) {
+ return NewFromUtf8(Isolate::GetCurrent(), data, kNormalString, length);
+}
+
+
+Local<String> String::New(const uint16_t* data, int length) {
+ return NewFromTwoByte(Isolate::GetCurrent(), data, kNormalString, length);
+}
+
+
+Local<String> String::NewSymbol(const char* data, int length) {
+ return NewFromUtf8(Isolate::GetCurrent(), data, kInternalizedString, length);
+}
+
+
+Local<String> String::NewUndetectable(const char* data, int length) {
+ return NewFromUtf8(Isolate::GetCurrent(), data, kUndetectableString, length);
+}
+
+
+Local<String> String::NewUndetectable(const uint16_t* data, int length) {
+ return NewFromTwoByte(
+ Isolate::GetCurrent(), data, kUndetectableString, length);
+}
+
+
String::ExternalStringResource* String::GetExternalStringResource() const {
typedef internal::Object O;
typedef internal::Internals I;
Oops, something went wrong.

0 comments on commit 0fa7573

Please sign in to comment.