Browse Source

v8: update to 3.14.5.9

v0.10.8-release
Timothy J Fontaine 12 years ago
parent
commit
279361b277
  1. 11
      deps/v8/build/common.gypi
  2. 2
      deps/v8/src/flag-definitions.h
  3. 15
      deps/v8/src/isolate.cc
  4. 7
      deps/v8/src/json-parser.h
  5. 3
      deps/v8/src/objects-inl.h
  6. 7
      deps/v8/src/objects.h
  7. 4
      deps/v8/src/parser.cc
  8. 5
      deps/v8/src/parser.h
  9. 17
      deps/v8/src/platform-posix.cc
  10. 8
      deps/v8/src/stub-cache.cc
  11. 2
      deps/v8/src/v8utils.h
  12. 2
      deps/v8/src/version.cc
  13. 15
      deps/v8/tools/gen-postmortem-metadata.py

11
deps/v8/build/common.gypi

@ -157,7 +157,7 @@
[ 'v8_use_arm_eabi_hardfloat=="true"', { [ 'v8_use_arm_eabi_hardfloat=="true"', {
'defines': [ 'defines': [
'USE_EABI_HARDFLOAT=1', 'USE_EABI_HARDFLOAT=1',
'CAN_USE_VFP2_INSTRUCTIONS', 'CAN_USE_VFP3_INSTRUCTIONS',
], ],
'target_conditions': [ 'target_conditions': [
['_toolset=="target"', { ['_toolset=="target"', {
@ -378,6 +378,15 @@
'conditions': [ 'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \
or OS=="android"', { or OS=="android"', {
'cflags!': [
'-O2',
'-Os',
],
'cflags': [
'-fdata-sections',
'-ffunction-sections',
'-O3',
],
'conditions': [ 'conditions': [
[ 'gcc_version==44 and clang==0', { [ 'gcc_version==44 and clang==0', {
'cflags': [ 'cflags': [

2
deps/v8/src/flag-definitions.h

@ -449,6 +449,8 @@ DEFINE_int(sim_stack_alignment, 8,
"Stack alingment in bytes in simulator (4 or 8, 8 is default)") "Stack alingment in bytes in simulator (4 or 8, 8 is default)")
// isolate.cc // isolate.cc
DEFINE_bool(abort_on_uncaught_exception, false,
"abort program (dump core) when an uncaught exception is thrown")
DEFINE_bool(trace_exception, false, DEFINE_bool(trace_exception, false,
"print stack trace when throwing exceptions") "print stack trace when throwing exceptions")
DEFINE_bool(preallocate_message_memory, false, DEFINE_bool(preallocate_message_memory, false,

15
deps/v8/src/isolate.cc

@ -1080,6 +1080,7 @@ bool Isolate::IsErrorObject(Handle<Object> obj) {
return false; return false;
} }
static int fatal_exception_depth = 0;
void Isolate::DoThrow(Object* exception, MessageLocation* location) { void Isolate::DoThrow(Object* exception, MessageLocation* location) {
ASSERT(!has_pending_exception()); ASSERT(!has_pending_exception());
@ -1150,6 +1151,20 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) {
thread_local_top()->pending_message_start_pos_ = location->start_pos(); thread_local_top()->pending_message_start_pos_ = location->start_pos();
thread_local_top()->pending_message_end_pos_ = location->end_pos(); thread_local_top()->pending_message_end_pos_ = location->end_pos();
} }
// If the abort-on-uncaught-exception flag is specified, abort on any
// exception not caught by JavaScript, even when an external handler is
// present. This flag is intended for use by JavaScript developers, so
// print a user-friendly stack trace (not an internal one).
if (fatal_exception_depth == 0 &&
FLAG_abort_on_uncaught_exception &&
(report_exception || can_be_caught_externally)) {
fatal_exception_depth++;
fprintf(stderr, "%s\n\nFROM\n",
*MessageHandler::GetLocalizedMessage(this, message_obj));
PrintCurrentStackTrace(stderr);
OS::Abort();
}
} else if (location != NULL && !location->script().is_null()) { } else if (location != NULL && !location->script().is_null()) {
// We are bootstrapping and caught an error where the location is set // We are bootstrapping and caught an error where the location is set
// and we have a script for the location. // and we have a script for the location.

7
deps/v8/src/json-parser.h

@ -287,7 +287,6 @@ Handle<Object> JsonParser<seq_ascii>::ParseJsonValue() {
// Parse a JSON object. Position must be right at '{'. // Parse a JSON object. Position must be right at '{'.
template <bool seq_ascii> template <bool seq_ascii>
Handle<Object> JsonParser<seq_ascii>::ParseJsonObject() { Handle<Object> JsonParser<seq_ascii>::ParseJsonObject() {
HandleScope scope;
Handle<Object> prototype; Handle<Object> prototype;
Handle<JSObject> json_object = Handle<JSObject> json_object =
factory()->NewJSObject(object_constructor()); factory()->NewJSObject(object_constructor());
@ -361,13 +360,12 @@ Handle<Object> JsonParser<seq_ascii>::ParseJsonObject() {
if (!prototype.is_null()) SetPrototype(json_object, prototype); if (!prototype.is_null()) SetPrototype(json_object, prototype);
} }
AdvanceSkipWhitespace(); AdvanceSkipWhitespace();
return scope.CloseAndEscape(json_object); return json_object;
} }
// Parse a JSON array. Position must be right at '['. // Parse a JSON array. Position must be right at '['.
template <bool seq_ascii> template <bool seq_ascii>
Handle<Object> JsonParser<seq_ascii>::ParseJsonArray() { Handle<Object> JsonParser<seq_ascii>::ParseJsonArray() {
HandleScope scope;
ZoneScope zone_scope(zone(), DELETE_ON_EXIT); ZoneScope zone_scope(zone(), DELETE_ON_EXIT);
ZoneList<Handle<Object> > elements(4, zone()); ZoneList<Handle<Object> > elements(4, zone());
ASSERT_EQ(c0_, '['); ASSERT_EQ(c0_, '[');
@ -390,8 +388,7 @@ Handle<Object> JsonParser<seq_ascii>::ParseJsonArray() {
for (int i = 0, n = elements.length(); i < n; i++) { for (int i = 0, n = elements.length(); i < n; i++) {
fast_elements->set(i, *elements[i]); fast_elements->set(i, *elements[i]);
} }
Handle<Object> json_array = factory()->NewJSArrayWithElements(fast_elements); return factory()->NewJSArrayWithElements(fast_elements);
return scope.CloseAndEscape(json_array);
} }

3
deps/v8/src/objects-inl.h

@ -3500,9 +3500,8 @@ Code::Flags Code::ComputeFlags(Kind kind,
kind == CALL_IC || kind == CALL_IC ||
kind == STORE_IC || kind == STORE_IC ||
kind == KEYED_STORE_IC); kind == KEYED_STORE_IC);
ASSERT(argc <= Code::kMaxArguments);
// Compute the bit mask. // Compute the bit mask.
unsigned int bits = KindField::encode(kind) int bits = KindField::encode(kind)
| ICStateField::encode(ic_state) | ICStateField::encode(ic_state)
| TypeField::encode(type) | TypeField::encode(type)
| ExtraICStateField::encode(extra_ic_state) | ExtraICStateField::encode(extra_ic_state)

7
deps/v8/src/objects.h

@ -4180,8 +4180,8 @@ class Code: public HeapObject {
// FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that // FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that
// enumeration type has correct value range (see Issue 830 for more details). // enumeration type has correct value range (see Issue 830 for more details).
enum Flags { enum Flags {
FLAGS_MIN_VALUE = 0, FLAGS_MIN_VALUE = kMinInt,
FLAGS_MAX_VALUE = kMaxUInt32 FLAGS_MAX_VALUE = kMaxInt
}; };
#define CODE_KIND_LIST(V) \ #define CODE_KIND_LIST(V) \
@ -4644,9 +4644,6 @@ class Code: public HeapObject {
// Signed field cannot be encoded using the BitField class. // Signed field cannot be encoded using the BitField class.
static const int kArgumentsCountShift = 14; static const int kArgumentsCountShift = 14;
static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1); static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1);
static const int kArgumentsBits =
PlatformSmiTagging::kSmiValueSize - Code::kArgumentsCountShift + 1;
static const int kMaxArguments = (1 << kArgumentsBits) - 1;
// This constant should be encodable in an ARM instruction. // This constant should be encodable in an ARM instruction.
static const int kFlagsNotUsedInLookup = static const int kFlagsNotUsedInLookup =

4
deps/v8/src/parser.cc

@ -4243,7 +4243,7 @@ ZoneList<Expression*>* Parser::ParseArguments(bool* ok) {
while (!done) { while (!done) {
Expression* argument = ParseAssignmentExpression(true, CHECK_OK); Expression* argument = ParseAssignmentExpression(true, CHECK_OK);
result->Add(argument, zone()); result->Add(argument, zone());
if (result->length() > Code::kMaxArguments) { if (result->length() > kMaxNumFunctionParameters) {
ReportMessageAt(scanner().location(), "too_many_arguments", ReportMessageAt(scanner().location(), "too_many_arguments",
Vector<const char*>::empty()); Vector<const char*>::empty());
*ok = false; *ok = false;
@ -4420,7 +4420,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> function_name,
top_scope_->DeclareParameter(param_name, VAR); top_scope_->DeclareParameter(param_name, VAR);
num_parameters++; num_parameters++;
if (num_parameters > Code::kMaxArguments) { if (num_parameters > kMaxNumFunctionParameters) {
ReportMessageAt(scanner().location(), "too_many_parameters", ReportMessageAt(scanner().location(), "too_many_parameters",
Vector<const char*>::empty()); Vector<const char*>::empty());
*ok = false; *ok = false;

5
deps/v8/src/parser.h

@ -449,6 +449,11 @@ class Parser {
Vector<Handle<String> > args); Vector<Handle<String> > args);
private: private:
// Limit on number of function parameters is chosen arbitrarily.
// Code::Flags uses only the low 17 bits of num-parameters to
// construct a hashable id, so if more than 2^17 are allowed, this
// should be checked.
static const int kMaxNumFunctionParameters = 32766;
static const int kMaxNumFunctionLocals = 131071; // 2^17-1 static const int kMaxNumFunctionLocals = 131071; // 2^17-1
enum Mode { enum Mode {

17
deps/v8/src/platform-posix.cc

@ -109,26 +109,11 @@ void* OS::GetRandomMmapAddr() {
raw_addr &= V8_UINT64_C(0x3ffffffff000); raw_addr &= V8_UINT64_C(0x3ffffffff000);
#else #else
uint32_t raw_addr = V8::RandomPrivate(isolate); uint32_t raw_addr = V8::RandomPrivate(isolate);
raw_addr &= 0x3ffff000;
# ifdef __sun
// For our Solaris/illumos mmap hint, we pick a random address in the bottom
// half of the top half of the address space (that is, the third quarter).
// Because we do not MAP_FIXED, this will be treated only as a hint -- the
// system will not fail to mmap() because something else happens to already
// be mapped at our random address. We deliberately set the hint high enough
// to get well above the system's break (that is, the heap); Solaris and
// illumos will try the hint and if that fails allocate as if there were
// no hint at all. The high hint prevents the break from getting hemmed in
// at low values, ceding half of the address space to the system heap.
raw_addr += 0x80000000;
# else
// The range 0x20000000 - 0x60000000 is relatively unpopulated across a // The range 0x20000000 - 0x60000000 is relatively unpopulated across a
// variety of ASLR modes (PAE kernel, NX compat mode, etc) and on macos // variety of ASLR modes (PAE kernel, NX compat mode, etc) and on macos
// 10.6 and 10.7. // 10.6 and 10.7.
raw_addr &= 0x3ffff000;
raw_addr += 0x20000000; raw_addr += 0x20000000;
# endif
#endif #endif
return reinterpret_cast<void*>(raw_addr); return reinterpret_cast<void*>(raw_addr);
} }

8
deps/v8/src/stub-cache.cc

@ -617,7 +617,7 @@ Handle<Code> StubCache::ComputeCallConstant(int argc,
Handle<Code> code = Handle<Code> code =
compiler.CompileCallConstant(object, holder, function, name, check); compiler.CompileCallConstant(object, holder, function, name, check);
code->set_check_type(check); code->set_check_type(check);
ASSERT(flags == code->flags()); ASSERT_EQ(flags, code->flags());
PROFILE(isolate_, PROFILE(isolate_,
CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name));
GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code));
@ -655,7 +655,7 @@ Handle<Code> StubCache::ComputeCallField(int argc,
Handle<Code> code = Handle<Code> code =
compiler.CompileCallField(Handle<JSObject>::cast(object), compiler.CompileCallField(Handle<JSObject>::cast(object),
holder, index, name); holder, index, name);
ASSERT(flags == code->flags()); ASSERT_EQ(flags, code->flags());
PROFILE(isolate_, PROFILE(isolate_,
CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name));
GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code));
@ -692,7 +692,7 @@ Handle<Code> StubCache::ComputeCallInterceptor(int argc,
Handle<Code> code = Handle<Code> code =
compiler.CompileCallInterceptor(Handle<JSObject>::cast(object), compiler.CompileCallInterceptor(Handle<JSObject>::cast(object),
holder, name); holder, name);
ASSERT(flags == code->flags()); ASSERT_EQ(flags, code->flags());
PROFILE(isolate(), PROFILE(isolate(),
CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name));
GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code));
@ -721,7 +721,7 @@ Handle<Code> StubCache::ComputeCallGlobal(int argc,
CallStubCompiler compiler(isolate(), argc, kind, extra_state, cache_holder); CallStubCompiler compiler(isolate(), argc, kind, extra_state, cache_holder);
Handle<Code> code = Handle<Code> code =
compiler.CompileCallGlobal(receiver, holder, cell, function, name); compiler.CompileCallGlobal(receiver, holder, cell, function, name);
ASSERT(flags == code->flags()); ASSERT_EQ(flags, code->flags());
PROFILE(isolate(), PROFILE(isolate(),
CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name)); CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), *code, *name));
GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code)); GDBJIT(AddCode(GDBJITInterface::CALL_IC, *name, *code));

2
deps/v8/src/v8utils.h

@ -209,8 +209,6 @@ INLINE(void CopyChars(sinkchar* dest, const sourcechar* src, int chars));
template <typename sourcechar, typename sinkchar> template <typename sourcechar, typename sinkchar>
void CopyChars(sinkchar* dest, const sourcechar* src, int chars) { void CopyChars(sinkchar* dest, const sourcechar* src, int chars) {
ASSERT(chars >= 0);
if (chars == 0) return;
sinkchar* limit = dest + chars; sinkchar* limit = dest + chars;
#ifdef V8_HOST_CAN_READ_UNALIGNED #ifdef V8_HOST_CAN_READ_UNALIGNED
if (sizeof(*dest) == sizeof(*src)) { if (sizeof(*dest) == sizeof(*src)) {

2
deps/v8/src/version.cc

@ -35,7 +35,7 @@
#define MAJOR_VERSION 3 #define MAJOR_VERSION 3
#define MINOR_VERSION 14 #define MINOR_VERSION 14
#define BUILD_NUMBER 5 #define BUILD_NUMBER 5
#define PATCH_LEVEL 8 #define PATCH_LEVEL 9
// Use 1 for candidates and 0 otherwise. // Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.) // (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0 #define IS_CANDIDATE_VERSION 0

15
deps/v8/tools/gen-postmortem-metadata.py

@ -76,23 +76,16 @@ consts_misc = [
{ 'name': 'SmiTag', 'value': 'kSmiTag' }, { 'name': 'SmiTag', 'value': 'kSmiTag' },
{ 'name': 'SmiTagMask', 'value': 'kSmiTagMask' }, { 'name': 'SmiTagMask', 'value': 'kSmiTagMask' },
{ 'name': 'SmiValueShift', 'value': 'kSmiTagSize' }, { 'name': 'SmiValueShift', 'value': 'kSmiTagSize' },
{ 'name': 'SmiShiftSize', 'value': 'kSmiShiftSize' },
{ 'name': 'PointerSizeLog2', 'value': 'kPointerSizeLog2' }, { 'name': 'PointerSizeLog2', 'value': 'kPointerSizeLog2' },
{ 'name': 'prop_desc_key', { 'name': 'prop_idx_transitions',
'value': 'DescriptorArray::kDescriptorKey' }, 'value': 'DescriptorArray::kTransitionsIndex' },
{ 'name': 'prop_desc_details',
'value': 'DescriptorArray::kDescriptorDetails' },
{ 'name': 'prop_desc_value',
'value': 'DescriptorArray::kDescriptorValue' },
{ 'name': 'prop_desc_size',
'value': 'DescriptorArray::kDescriptorSize' },
{ 'name': 'prop_idx_first', { 'name': 'prop_idx_first',
'value': 'DescriptorArray::kFirstIndex' }, 'value': 'DescriptorArray::kFirstIndex' },
{ 'name': 'prop_type_field', { 'name': 'prop_type_field',
'value': 'FIELD' }, 'value': 'FIELD' },
{ 'name': 'prop_type_first_phantom', { 'name': 'prop_type_first_phantom',
'value': 'Code::MAP_TRANSITION' }, 'value': 'MAP_TRANSITION' },
{ 'name': 'prop_type_mask', { 'name': 'prop_type_mask',
'value': 'PropertyDetails::TypeField::kMask' }, 'value': 'PropertyDetails::TypeField::kMask' },
@ -114,7 +107,7 @@ extras_accessors = [
'JSObject, elements, Object, kElementsOffset', 'JSObject, elements, Object, kElementsOffset',
'FixedArray, data, uintptr_t, kHeaderSize', 'FixedArray, data, uintptr_t, kHeaderSize',
'Map, instance_attributes, int, kInstanceAttributesOffset', 'Map, instance_attributes, int, kInstanceAttributesOffset',
'Map, transitions, uintptr_t, kTransitionsOrBackPointerOffset', 'Map, instance_descriptors, int, kInstanceDescriptorsOrBitField3Offset',
'Map, inobject_properties, int, kInObjectPropertiesOffset', 'Map, inobject_properties, int, kInObjectPropertiesOffset',
'Map, instance_size, int, kInstanceSizeOffset', 'Map, instance_size, int, kInstanceSizeOffset',
'HeapNumber, value, double, kValueOffset', 'HeapNumber, value, double, kValueOffset',

Loading…
Cancel
Save