Permalink
Browse files

Merge remote-tracking branch 'upstream/master' into object-observe

  • Loading branch information...
2 parents 6f52553 + de6b563 commit 9001dc0a94cd4b8688f0c1d1b81bcc431842a10a @ajklein ajklein committed Oct 24, 2012
Showing with 2,383 additions and 527 deletions.
  1. +3 −3 .gitignore
  2. +21 −0 ChangeLog
  3. +10 −10 Makefile
  4. +33 −14 SConstruct
  5. +0 −1 build/common.gypi
  6. +53 −11 include/v8.h
  7. +66 −17 src/api.cc
  8. +118 −18 src/arm/assembler-arm-inl.h
  9. +100 −52 src/arm/assembler-arm.cc
  10. +72 −20 src/arm/assembler-arm.h
  11. +2 −1 src/arm/code-stubs-arm.cc
  12. +12 −3 src/arm/constants-arm.h
  13. +2 −2 src/arm/debug-arm.cc
  14. +1 −13 src/arm/deoptimizer-arm.cc
  15. +2 −3 src/arm/disasm-arm.cc
  16. +8 −3 src/arm/full-codegen-arm.cc
  17. +1 −1 src/arm/ic-arm.cc
  18. +1 −3 src/arm/lithium-arm.cc
  19. +2 −4 src/arm/lithium-arm.h
  20. +20 −14 src/arm/lithium-codegen-arm.cc
  21. +12 −8 src/arm/lithium-codegen-arm.h
  22. +30 −19 src/arm/macro-assembler-arm.cc
  23. +11 −5 src/arm/macro-assembler-arm.h
  24. +1 −1 src/array.js
  25. +3 −5 src/assembler.h
  26. +10 −2 src/contexts.cc
  27. +2 −2 src/debug.cc
  28. +48 −0 src/deoptimizer.cc
  29. +4 −0 src/deoptimizer.h
  30. +3 −0 src/flag-definitions.h
  31. +8 −0 src/global-handles.cc
  32. +3 −0 src/global-handles.h
  33. +5 −2 src/heap-inl.h
  34. +28 −5 src/heap.cc
  35. +4 −0 src/heap.h
  36. +5 −0 src/ia32/assembler-ia32-inl.h
  37. +2 −2 src/ia32/assembler-ia32.cc
  38. +5 −0 src/ia32/assembler-ia32.h
  39. +1 −13 src/ia32/deoptimizer-ia32.cc
  40. +1 −1 src/ia32/lithium-ia32.cc
  41. +13 −5 src/ia32/macro-assembler-ia32.cc
  42. +1 −1 src/ic-inl.h
  43. +1 −1 src/ic.cc
  44. +107 −80 src/json-parser.h
  45. +686 −0 src/json-stringifier.h
  46. +3 −1 src/json.js
  47. +38 −20 src/mark-compact.cc
  48. +10 −5 src/mark-compact.h
  49. +11 −4 src/messages.cc
  50. +5 −0 src/mips/assembler-mips-inl.h
  51. +6 −0 src/mips/assembler-mips.h
  52. +1 −13 src/mips/deoptimizer-mips.cc
  53. +2 −2 src/mips/full-codegen-mips.cc
  54. +1 −2 src/mips/lithium-codegen-mips.cc
  55. +1 −3 src/mips/lithium-mips.cc
  56. +2 −4 src/mips/lithium-mips.h
  57. +1 −2 src/mips/macro-assembler-mips.cc
  58. +1 −3 src/mips/macro-assembler-mips.h
  59. +8 −1 src/objects-inl.h
  60. +8 −10 src/objects.cc
  61. +25 −8 src/objects.h
  62. +6 −0 src/platform-cygwin.cc
  63. +6 −0 src/platform-freebsd.cc
  64. +23 −0 src/platform-linux.cc
  65. +5 −0 src/platform-macos.cc
  66. +12 −1 src/platform-nullos.cc
  67. +6 −0 src/platform-openbsd.cc
  68. +8 −6 src/platform-solaris.cc
  69. +6 −0 src/platform-win32.cc
  70. +8 −0 src/platform.h
  71. +9 −0 src/runtime.cc
  72. +1 −0 src/runtime.h
  73. +13 −0 src/spaces-inl.h
  74. +48 −0 src/spaces.cc
  75. +25 −1 src/spaces.h
  76. +5 −0 src/transitions-inl.h
  77. +8 −0 src/v8globals.h
  78. +1 −1 src/version.cc
  79. +6 −0 src/x64/assembler-x64-inl.h
  80. +5 −0 src/x64/assembler-x64.h
  81. +1 −13 src/x64/deoptimizer-x64.cc
  82. +3 −5 src/x64/lithium-codegen-x64.cc
  83. +1 −3 src/x64/lithium-x64.cc
  84. +6 −11 src/x64/lithium-x64.h
  85. +13 −5 src/x64/macro-assembler-x64.cc
  86. +1 −2 src/x64/macro-assembler-x64.h
  87. +3 −0 test/cctest/cctest.status
  88. +149 −10 test/cctest/test-api.cc
  89. +90 −24 test/cctest/test-heap.cc
  90. +9 −5 test/cctest/testcfg.py
  91. +44 −0 test/mjsunit/json-recursive.js
  92. +38 −2 test/mjsunit/json.js
  93. +2 −0 test/mjsunit/mjsunit.status
  94. +29 −0 test/mjsunit/regress/regress-2373.js
  95. +33 −0 test/mjsunit/regress/regress-2374.js
  96. +38 −0 test/mjsunit/regress/regress-builtin-array-op.js
  97. +41 −0 test/mjsunit/regress/regress-json-stringify-gc.js
  98. +1 −2 test/mjsunit/testcfg.py
  99. +5 −0 test/preparser/preparser.status
  100. +24 −10 tools/run-tests.py
  101. +1 −0 tools/testrunner/local/commands.py
  102. +5 −3 tools/testrunner/local/execution.py
  103. +1 −0 tools/testrunner/local/progress.py
View
@@ -25,8 +25,8 @@ shell_g
/build/Debug
/build/gyp
/build/Release
-/obj/
-/out/
+/obj
+/out
/test/cctest/cctest.status2
/test/es5conform/data
/test/message/message.status2
@@ -47,6 +47,6 @@ shell_g
/tools/oom_dump/oom_dump.o
/tools/visual_studio/Debug
/tools/visual_studio/Release
-/xcodebuild/
+/xcodebuild
TAGS
*.Makefile
View
@@ -1,3 +1,24 @@
+2012-10-22: Version 3.14.5
+
+ Killed off the SCons based build.
+
+ Added a faster API for creating v8::Integer objects.
+
+ Speeded up function deoptimization by avoiding quadratic pass over
+ optimized function list. (Chromium issue 155270)
+
+ Always invoke the default Array.sort functions from builtin functions.
+ (issue 2372)
+
+ Reverted recent CPU profiler changes because they broke --prof.
+ (issue 2364)
+
+ Switched code flushing to use different JSFunction field.
+ (issue 1609)
+
+ Performance and stability improvements on all platforms.
+
+
2012-10-15: Version 3.14.4
Allow evals for debugger even if they are prohibited in the debugee
View
@@ -30,7 +30,7 @@
CXX ?= g++
LINK ?= g++
OUTDIR ?= out
-TESTJOBS ?= -j16
+TESTJOBS ?=
GYPFLAGS ?=
TESTFLAGS ?=
ANDROID_NDK_ROOT ?=
@@ -83,9 +83,9 @@ ifeq ($(liveobjectlist), on)
endif
# vfp3=off
ifeq ($(vfp3), off)
- GYPFLAGS += -Dv8_can_use_vfp_instructions=false
+ GYPFLAGS += -Dv8_can_use_vfp3_instructions=false
else
- GYPFLAGS += -Dv8_can_use_vfp_instructions=true
+ GYPFLAGS += -Dv8_can_use_vfp3_instructions=true
endif
# debuggersupport=off
ifeq ($(debuggersupport), off)
@@ -203,37 +203,37 @@ $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
# Test targets.
check: all
- @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
+ @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
$(TESTFLAGS)
$(addsuffix .check,$(MODES)): $$(basename $$@)
- @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
+ @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
--mode=$(basename $@) $(TESTFLAGS)
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
- @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
+ @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch=$(basename $@) $(TESTFLAGS)
$(CHECKS): $$(basename $$@)
- @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
+ @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch-and-mode=$(basename $@) $(TESTFLAGS)
$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
@tools/android-sync.sh $(basename $@) $(OUTDIR) \
$(shell pwd) $(ANDROID_V8)
$(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync
- @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
+ @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch-and-mode=$(basename $@) \
--timeout=600 \
- --special-command="tools/android-run.py @"
+ --command-prefix="tools/android-run.py"
$(addsuffix .check, $(ANDROID_ARCHES)): \
$(addprefix $$(basename $$@).,$(MODES)).check
native.check: native
- @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
+ @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
--arch-and-mode=. $(TESTFLAGS)
# Clean targets. You can clean each architecture individually, or everything.
View
@@ -1157,6 +1157,11 @@ SIMPLE_OPTIONS = {
'default': 'on',
'help': 'use fpu instructions when building the snapshot [MIPS only]'
},
+ 'I_know_I_should_build_with_GYP': {
+ 'values': ['yes', 'no'],
+ 'default': 'no',
+ 'help': 'grace period: temporarily override SCons deprecation'
+ }
}
@@ -1257,7 +1262,35 @@ def IsLegal(env, option, values):
return True
+def WarnAboutDeprecation():
+ print """
+ #####################################################################
+ # #
+ # LAST WARNING: Building V8 with SCons is deprecated. #
+ # #
+ # This only works because you have overridden the kill switch. #
+ # #
+ # MIGRATE TO THE GYP-BASED BUILD NOW! #
+ # #
+ # Instructions: http://code.google.com/p/v8/wiki/BuildingWithGYP. #
+ # #
+ #####################################################################
+ """
+
+
def VerifyOptions(env):
+ if env['I_know_I_should_build_with_GYP'] != 'yes':
+ Abort("Building V8 with SCons is no longer supported. Please use GYP "
+ "instead; you can find instructions are at "
+ "http://code.google.com/p/v8/wiki/BuildingWithGYP.\n\n"
+ "Quitting.\n\n"
+ "For a limited grace period, you can specify "
+ "\"I_know_I_should_build_with_GYP=yes\" to override.")
+ else:
+ WarnAboutDeprecation()
+ import atexit
+ atexit.register(WarnAboutDeprecation)
+
if not IsLegal(env, 'mode', ['debug', 'release']):
return False
if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]):
@@ -1600,18 +1633,4 @@ try:
except:
pass
-
-def WarnAboutDeprecation():
- print """
-#######################################################
-# WARNING: Building V8 with SCons is deprecated and #
-# will not work much longer. Please switch to using #
-# the GYP-based build now. Instructions are at #
-# http://code.google.com/p/v8/wiki/BuildingWithGYP. #
-#######################################################
- """
-
-WarnAboutDeprecation()
-import atexit
-atexit.register(WarnAboutDeprecation)
Build()
View
@@ -357,7 +357,6 @@
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
'-Wnon-virtual-dtor', '-Woverloaded-virtual' ],
- 'defines': ['ENABLE_GDB_JIT_INTERFACE',],
}],
['OS=="android"', {
'variables': {
View
@@ -390,7 +390,7 @@ template <class T> class Persistent : public Handle<T> {
*/
inline void MakeWeak(void* parameters, WeakReferenceCallback callback);
- /** Clears the weak reference to this object.*/
+ /** Clears the weak reference to this object. */
inline void ClearWeak();
/**
@@ -402,14 +402,13 @@ template <class T> class Persistent : public Handle<T> {
*/
inline void MarkIndependent();
- /**
- *Checks if the handle holds the only reference to an object.
- */
+ /** Returns true if this handle was previously marked as independent. */
+ inline bool IsIndependent() const;
+
+ /** Checks if the handle holds the only reference to an object. */
inline bool IsNearDeath() const;
- /**
- * Returns true if the handle's reference is weak.
- */
+ /** Returns true if the handle's reference is weak. */
inline bool IsWeak() const;
/**
@@ -418,6 +417,12 @@ template <class T> class Persistent : public Handle<T> {
*/
inline void SetWrapperClassId(uint16_t class_id);
+ /**
+ * Returns the class ID previously assigned to this handle or 0 if no class
+ * ID was previously assigned.
+ */
+ inline uint16_t WrapperClassId() const;
+
private:
friend class ImplementationUtilities;
friend class ObjectTemplate;
@@ -1384,6 +1389,8 @@ class Integer : public Number {
public:
V8EXPORT static Local<Integer> New(int32_t value);
V8EXPORT static Local<Integer> NewFromUnsigned(uint32_t value);
+ V8EXPORT static Local<Integer> New(int32_t value, Isolate*);
+ V8EXPORT static Local<Integer> NewFromUnsigned(uint32_t value, Isolate*);
V8EXPORT int64_t Value() const;
static inline Integer* Cast(v8::Value* obj);
private:
@@ -2653,7 +2660,7 @@ bool V8EXPORT SetResourceConstraints(ResourceConstraints* constraints);
typedef void (*FatalErrorCallback)(const char* location, const char* message);
-typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> data);
+typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> error);
/**
@@ -2766,6 +2773,7 @@ class V8EXPORT HeapStatistics {
HeapStatistics();
size_t total_heap_size() { return total_heap_size_; }
size_t total_heap_size_executable() { return total_heap_size_executable_; }
+ size_t total_physical_size() { return total_physical_size_; }
size_t used_heap_size() { return used_heap_size_; }
size_t heap_size_limit() { return heap_size_limit_; }
@@ -2774,11 +2782,15 @@ class V8EXPORT HeapStatistics {
void set_total_heap_size_executable(size_t size) {
total_heap_size_executable_ = size;
}
+ void set_total_physical_size(size_t size) {
+ total_physical_size_ = size;
+ }
void set_used_heap_size(size_t size) { used_heap_size_ = size; }
void set_heap_size_limit(size_t size) { heap_size_limit_ = size; }
size_t total_heap_size_;
size_t total_heap_size_executable_;
+ size_t total_physical_size_;
size_t used_heap_size_;
size_t heap_size_limit_;
@@ -3011,7 +3023,7 @@ typedef void (*JitCodeEventHandler)(const JitCodeEvent* event);
/**
- * Interface for iterating though all external resources in the heap.
+ * Interface for iterating through all external resources in the heap.
*/
class V8EXPORT ExternalResourceVisitor { // NOLINT
public:
@@ -3021,6 +3033,17 @@ class V8EXPORT ExternalResourceVisitor { // NOLINT
/**
+ * Interface for iterating through all the persistent handles in the heap.
+ */
+class V8EXPORT PersistentHandleVisitor { // NOLINT
+ public:
+ virtual ~PersistentHandleVisitor() {}
+ virtual void VisitPersistentHandle(Persistent<Value> value,
+ uint16_t class_id) {}
+};
+
+
+/**
* Container class for static utility functions.
*/
class V8EXPORT V8 {
@@ -3085,8 +3108,7 @@ class V8EXPORT V8 {
* The same message listener can be added more than once and in that
* case it will be called more than once for each message.
*/
- static bool AddMessageListener(MessageCallback that,
- Handle<Value> data = Handle<Value>());
+ static bool AddMessageListener(MessageCallback that);
/**
* Remove all message listeners from the specified callback function.
@@ -3428,6 +3450,12 @@ class V8EXPORT V8 {
static void VisitExternalResources(ExternalResourceVisitor* visitor);
/**
+ * Iterates through all the persistent handles in the current isolate's heap
+ * that have class_ids.
+ */
+ static void VisitHandlesWithClassIds(PersistentHandleVisitor* visitor);
+
+ /**
* Optional notification that the embedder is idle.
* V8 uses the notification to reduce memory footprint.
* This call can be used repeatedly if the embedder remains idle.
@@ -3467,10 +3495,12 @@ class V8EXPORT V8 {
WeakReferenceCallback);
static void ClearWeak(internal::Object** global_handle);
static void MarkIndependent(internal::Object** global_handle);
+ static bool IsGlobalIndependent(internal::Object** global_handle);
static bool IsGlobalNearDeath(internal::Object** global_handle);
static bool IsGlobalWeak(internal::Object** global_handle);
static void SetWrapperClassId(internal::Object** global_handle,
uint16_t class_id);
+ static uint16_t GetWrapperClassId(internal::Object** global_handle);
template <class T> friend class Handle;
template <class T> friend class Local;
@@ -4188,6 +4218,13 @@ Persistent<T> Persistent<T>::New(Handle<T> that) {
template <class T>
+bool Persistent<T>::IsIndependent() const {
+ if (this->IsEmpty()) return false;
+ return V8::IsGlobalIndependent(reinterpret_cast<internal::Object**>(**this));
+}
+
+
+template <class T>
bool Persistent<T>::IsNearDeath() const {
if (this->IsEmpty()) return false;
return V8::IsGlobalNearDeath(reinterpret_cast<internal::Object**>(**this));
@@ -4233,6 +4270,11 @@ void Persistent<T>::SetWrapperClassId(uint16_t class_id) {
V8::SetWrapperClassId(reinterpret_cast<internal::Object**>(**this), class_id);
}
+template <class T>
+uint16_t Persistent<T>::WrapperClassId() const {
+ return V8::GetWrapperClassId(reinterpret_cast<internal::Object**>(**this));
+}
+
Arguments::Arguments(internal::Object** implicit_args,
internal::Object** values, int length,
bool is_construct_call)
Oops, something went wrong. Retry.

0 comments on commit 9001dc0

Please sign in to comment.