Skip to content

Commit c0c4e00

Browse files
committed
Upgrade V8 to 3.6.6.24
1 parent 1bf3a14 commit c0c4e00

File tree

10 files changed

+75
-85
lines changed

10 files changed

+75
-85
lines changed

deps/v8/SConstruct

+3-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ LIBRARY_FLAGS = {
127127
'CPPDEFINES': ['__C99FEATURES__'],
128128
'CPPPATH' : ['/usr/local/include'],
129129
'LIBPATH' : ['/usr/local/lib'],
130-
'CCFLAGS': ['-ansi', '-fno-omit-frame-pointer'],
130+
'CCFLAGS': ['-ansi'],
131131
},
132132
'os:win32': {
133133
'CCFLAGS': ['-DWIN32'],
@@ -288,6 +288,7 @@ V8_EXTRA_FLAGS = {
288288
'gcc': {
289289
'all': {
290290
'WARNINGFLAGS': ['-Wall',
291+
'-Werror',
291292
'-W',
292293
'-Wno-unused-parameter',
293294
'-Wnon-virtual-dtor']
@@ -381,7 +382,7 @@ MKSNAPSHOT_EXTRA_FLAGS = {
381382
DTOA_EXTRA_FLAGS = {
382383
'gcc': {
383384
'all': {
384-
'WARNINGFLAGS': ['-Wno-uninitialized'],
385+
'WARNINGFLAGS': ['-Werror', '-Wno-uninitialized'],
385386
'CCFLAGS': GCC_DTOA_EXTRA_CCFLAGS
386387
}
387388
},

deps/v8/src/conversions-inl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace v8 {
4747
namespace internal {
4848

4949
static inline double JunkStringValue() {
50-
return std::numeric_limits<double>::quiet_NaN();
50+
return BitCast<double, uint64_t>(kQuietNaNMask);
5151
}
5252

5353

deps/v8/src/conversions.h

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
#ifndef V8_CONVERSIONS_H_
2929
#define V8_CONVERSIONS_H_
3030

31-
#include <limits>
32-
3331
#include "utils.h"
3432

3533
namespace v8 {

deps/v8/src/elements.cc

+61-67
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,17 @@ class ElementsAccessorBase : public ElementsAccessor {
7777
uint32_t key,
7878
JSObject* obj,
7979
Object* receiver) {
80-
return ElementsAccessorSubclass::Get(
80+
return ElementsAccessorSubclass::GetImpl(
8181
BackingStoreClass::cast(backing_store), key, obj, receiver);
8282
}
8383

84-
static MaybeObject* Get(BackingStoreClass* backing_store,
85-
uint32_t key,
86-
JSObject* obj,
87-
Object* receiver) {
88-
if (key < ElementsAccessorSubclass::GetCapacity(backing_store)) {
89-
return backing_store->get(key);
90-
}
91-
return backing_store->GetHeap()->the_hole_value();
84+
static MaybeObject* GetImpl(BackingStoreClass* backing_store,
85+
uint32_t key,
86+
JSObject* obj,
87+
Object* receiver) {
88+
return (key < ElementsAccessorSubclass::GetCapacityImpl(backing_store))
89+
? backing_store->get(key)
90+
: backing_store->GetHeap()->the_hole_value();
9291
}
9392

9493
virtual MaybeObject* Delete(JSObject* obj,
@@ -108,7 +107,7 @@ class ElementsAccessorBase : public ElementsAccessor {
108107
}
109108
#endif
110109
BackingStoreClass* backing_store = BackingStoreClass::cast(from);
111-
uint32_t len1 = ElementsAccessorSubclass::GetCapacity(backing_store);
110+
uint32_t len1 = ElementsAccessorSubclass::GetCapacityImpl(backing_store);
112111

113112
// Optimize if 'other' is empty.
114113
// We cannot optimize if 'this' is empty, as other may have holes.
@@ -117,14 +116,13 @@ class ElementsAccessorBase : public ElementsAccessor {
117116
// Compute how many elements are not in other.
118117
int extra = 0;
119118
for (uint32_t y = 0; y < len1; y++) {
120-
if (ElementsAccessorSubclass::HasElementAtIndex(backing_store,
121-
y,
122-
holder,
123-
receiver)) {
119+
if (ElementsAccessorSubclass::HasElementAtIndexImpl(
120+
backing_store, y, holder, receiver)) {
124121
uint32_t key =
125-
ElementsAccessorSubclass::GetKeyForIndex(backing_store, y);
122+
ElementsAccessorSubclass::GetKeyForIndexImpl(backing_store, y);
126123
MaybeObject* maybe_value =
127-
ElementsAccessorSubclass::Get(backing_store, key, holder, receiver);
124+
ElementsAccessorSubclass::GetImpl(backing_store, key,
125+
holder, receiver);
128126
Object* value;
129127
if (!maybe_value->ToObject(&value)) return maybe_value;
130128
ASSERT(!value->IsTheHole());
@@ -155,14 +153,13 @@ class ElementsAccessorBase : public ElementsAccessor {
155153
// Fill in the extra values.
156154
int index = 0;
157155
for (uint32_t y = 0; y < len1; y++) {
158-
if (ElementsAccessorSubclass::HasElementAtIndex(backing_store,
159-
y,
160-
holder,
161-
receiver)) {
156+
if (ElementsAccessorSubclass::HasElementAtIndexImpl(
157+
backing_store, y, holder, receiver)) {
162158
uint32_t key =
163-
ElementsAccessorSubclass::GetKeyForIndex(backing_store, y);
159+
ElementsAccessorSubclass::GetKeyForIndexImpl(backing_store, y);
164160
MaybeObject* maybe_value =
165-
ElementsAccessorSubclass::Get(backing_store, key, holder, receiver);
161+
ElementsAccessorSubclass::GetImpl(backing_store, key,
162+
holder, receiver);
166163
Object* value;
167164
if (!maybe_value->ToObject(&value)) return maybe_value;
168165
if (!value->IsTheHole() && !HasKey(to, value)) {
@@ -176,44 +173,42 @@ class ElementsAccessorBase : public ElementsAccessor {
176173
}
177174

178175
protected:
179-
static uint32_t GetCapacity(BackingStoreClass* backing_store) {
176+
static uint32_t GetCapacityImpl(BackingStoreClass* backing_store) {
180177
return backing_store->length();
181178
}
182179

183180
virtual uint32_t GetCapacity(FixedArrayBase* backing_store) {
184-
return ElementsAccessorSubclass::GetCapacity(
181+
return ElementsAccessorSubclass::GetCapacityImpl(
185182
BackingStoreClass::cast(backing_store));
186183
}
187184

188-
static bool HasElementAtIndex(BackingStoreClass* backing_store,
189-
uint32_t index,
190-
JSObject* holder,
191-
Object* receiver) {
185+
static bool HasElementAtIndexImpl(BackingStoreClass* backing_store,
186+
uint32_t index,
187+
JSObject* holder,
188+
Object* receiver) {
192189
uint32_t key =
193-
ElementsAccessorSubclass::GetKeyForIndex(backing_store, index);
194-
MaybeObject* element = ElementsAccessorSubclass::Get(backing_store,
195-
key,
196-
holder,
197-
receiver);
190+
ElementsAccessorSubclass::GetKeyForIndexImpl(backing_store, index);
191+
MaybeObject* element =
192+
ElementsAccessorSubclass::GetImpl(backing_store, key, holder, receiver);
198193
return !element->IsTheHole();
199194
}
200195

201196
virtual bool HasElementAtIndex(FixedArrayBase* backing_store,
202197
uint32_t index,
203198
JSObject* holder,
204199
Object* receiver) {
205-
return ElementsAccessorSubclass::HasElementAtIndex(
200+
return ElementsAccessorSubclass::HasElementAtIndexImpl(
206201
BackingStoreClass::cast(backing_store), index, holder, receiver);
207202
}
208203

209-
static uint32_t GetKeyForIndex(BackingStoreClass* backing_store,
210-
uint32_t index) {
204+
static uint32_t GetKeyForIndexImpl(BackingStoreClass* backing_store,
205+
uint32_t index) {
211206
return index;
212207
}
213208

214209
virtual uint32_t GetKeyForIndex(FixedArrayBase* backing_store,
215210
uint32_t index) {
216-
return ElementsAccessorSubclass::GetKeyForIndex(
211+
return ElementsAccessorSubclass::GetKeyForIndexImpl(
217212
BackingStoreClass::cast(backing_store), index);
218213
}
219214

@@ -297,10 +292,10 @@ class FastDoubleElementsAccessor
297292
return obj->GetHeap()->true_value();
298293
}
299294

300-
static bool HasElementAtIndex(FixedDoubleArray* backing_store,
301-
uint32_t index,
302-
JSObject* holder,
303-
Object* receiver) {
295+
static bool HasElementAtIndexImpl(FixedDoubleArray* backing_store,
296+
uint32_t index,
297+
JSObject* holder,
298+
Object* receiver) {
304299
return !backing_store->is_the_hole(index);
305300
}
306301
};
@@ -316,15 +311,14 @@ class ExternalElementsAccessor
316311
friend class ElementsAccessorBase<ExternalElementsAccessorSubclass,
317312
ExternalArray>;
318313

319-
static MaybeObject* Get(ExternalArray* backing_store,
320-
uint32_t key,
321-
JSObject* obj,
322-
Object* receiver) {
323-
if (key < ExternalElementsAccessorSubclass::GetCapacity(backing_store)) {
324-
return backing_store->get(key);
325-
} else {
326-
return backing_store->GetHeap()->undefined_value();
327-
}
314+
static MaybeObject* GetImpl(ExternalArray* backing_store,
315+
uint32_t key,
316+
JSObject* obj,
317+
Object* receiver) {
318+
return
319+
key < ExternalElementsAccessorSubclass::GetCapacityImpl(backing_store)
320+
? backing_store->get(key)
321+
: backing_store->GetHeap()->undefined_value();
328322
}
329323

330324
virtual MaybeObject* Delete(JSObject* obj,
@@ -449,10 +443,10 @@ class DictionaryElementsAccessor
449443
return DeleteCommon(obj, key, mode);
450444
}
451445

452-
static MaybeObject* Get(SeededNumberDictionary* backing_store,
453-
uint32_t key,
454-
JSObject* obj,
455-
Object* receiver) {
446+
static MaybeObject* GetImpl(SeededNumberDictionary* backing_store,
447+
uint32_t key,
448+
JSObject* obj,
449+
Object* receiver) {
456450
int entry = backing_store->FindEntry(key);
457451
if (entry != SeededNumberDictionary::kNotFound) {
458452
Object* element = backing_store->ValueAt(entry);
@@ -469,8 +463,8 @@ class DictionaryElementsAccessor
469463
return obj->GetHeap()->the_hole_value();
470464
}
471465

472-
static uint32_t GetKeyForIndex(SeededNumberDictionary* dict,
473-
uint32_t index) {
466+
static uint32_t GetKeyForIndexImpl(SeededNumberDictionary* dict,
467+
uint32_t index) {
474468
Object* key = dict->KeyAt(index);
475469
return Smi::cast(key)->value();
476470
}
@@ -484,10 +478,10 @@ class NonStrictArgumentsElementsAccessor
484478
friend class ElementsAccessorBase<NonStrictArgumentsElementsAccessor,
485479
FixedArray>;
486480

487-
static MaybeObject* Get(FixedArray* parameter_map,
488-
uint32_t key,
489-
JSObject* obj,
490-
Object* receiver) {
481+
static MaybeObject* GetImpl(FixedArray* parameter_map,
482+
uint32_t key,
483+
JSObject* obj,
484+
Object* receiver) {
491485
Object* probe = GetParameterMapArg(parameter_map, key);
492486
if (!probe->IsTheHole()) {
493487
Context* context = Context::cast(parameter_map->get(0));
@@ -526,21 +520,21 @@ class NonStrictArgumentsElementsAccessor
526520
return obj->GetHeap()->true_value();
527521
}
528522

529-
static uint32_t GetCapacity(FixedArray* parameter_map) {
523+
static uint32_t GetCapacityImpl(FixedArray* parameter_map) {
530524
FixedArrayBase* arguments = FixedArrayBase::cast(parameter_map->get(1));
531525
return Max(static_cast<uint32_t>(parameter_map->length() - 2),
532526
ForArray(arguments)->GetCapacity(arguments));
533527
}
534528

535-
static uint32_t GetKeyForIndex(FixedArray* dict,
536-
uint32_t index) {
529+
static uint32_t GetKeyForIndexImpl(FixedArray* dict,
530+
uint32_t index) {
537531
return index;
538532
}
539533

540-
static bool HasElementAtIndex(FixedArray* parameter_map,
541-
uint32_t index,
542-
JSObject* holder,
543-
Object* receiver) {
534+
static bool HasElementAtIndexImpl(FixedArray* parameter_map,
535+
uint32_t index,
536+
JSObject* holder,
537+
Object* receiver) {
544538
Object* probe = GetParameterMapArg(parameter_map, index);
545539
if (!probe->IsTheHole()) {
546540
return true;

deps/v8/src/globals.h

+4
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ const int kBinary32MinExponent = 0x01;
255255
const int kBinary32MantissaBits = 23;
256256
const int kBinary32ExponentShift = 23;
257257

258+
// Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no
259+
// other bits set.
260+
const uint64_t kQuietNaNMask = static_cast<uint64_t>(0xfff) << 51;
261+
258262
// ASCII/UC16 constants
259263
// Code-point values in Unicode 4.0 are 21 bits wide.
260264
typedef uint16_t uc16;

deps/v8/src/objects.cc

+3
Original file line numberDiff line numberDiff line change
@@ -10006,6 +10006,9 @@ template MaybeObject* Dictionary<SeededNumberDictionaryShape, uint32_t>::AtPut(
1000610006
template MaybeObject* Dictionary<UnseededNumberDictionaryShape, uint32_t>::
1000710007
AtPut(uint32_t, Object*);
1000810008

10009+
template Object* Dictionary<SeededNumberDictionaryShape, uint32_t>::
10010+
SlowReverseLookup(Object* value);
10011+
1000910012
template Object* Dictionary<UnseededNumberDictionaryShape, uint32_t>::
1001010013
SlowReverseLookup(Object* value);
1001110014

deps/v8/src/objects.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,8 @@ class Smi: public Object {
986986
void SmiVerify();
987987
#endif
988988

989-
static const int kMinValue = (-1 << (kSmiValueSize - 1));
989+
static const int kMinValue =
990+
(static_cast<unsigned int>(-1)) << (kSmiValueSize - 1);
990991
static const int kMaxValue = -(kMinValue + 1);
991992

992993
private:

deps/v8/src/v8globals.h

-4
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ const int kPageSizeBits = 13;
9898
const int kProcessorCacheLineSize = 64;
9999

100100
// Constants relevant to double precision floating point numbers.
101-
102-
// Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no
103-
// other bits set.
104-
const uint64_t kQuietNaNMask = static_cast<uint64_t>(0xfff) << 51;
105101
// If looking only at the top 32 bits, the QNaN mask is bits 19 to 30.
106102
const uint32_t kQuietNaNHighBitsMask = 0xfff << (51 - 32);
107103

deps/v8/src/version.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#define MAJOR_VERSION 3
3636
#define MINOR_VERSION 6
3737
#define BUILD_NUMBER 6
38-
#define PATCH_LEVEL 20
38+
#define PATCH_LEVEL 24
3939
// Use 1 for candidates and 0 otherwise.
4040
// (Boolean macro values are not supported by all preprocessors.)
4141
#define IS_CANDIDATE_VERSION 0

deps/v8/tools/gyp/v8.gyp

-7
Original file line numberDiff line numberDiff line change
@@ -641,13 +641,6 @@
641641
],
642642
}
643643
],
644-
['OS=="solaris"', {
645-
'sources': [
646-
'../../src/platform-solaris.cc',
647-
'../../src/platform-posix.cc'
648-
],
649-
}
650-
],
651644
['OS=="mac"', {
652645
'sources': [
653646
'../../src/platform-macos.cc',

0 commit comments

Comments
 (0)