Skip to content

Commit fcff66b

Browse files
committed
Upgrade v8 to 1.3.10
1 parent efb2b70 commit fcff66b

97 files changed

Lines changed: 3183 additions & 980 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deps/v8/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ Paolo Giarrusso <p.giarrusso@gmail.com>
1717
Rafal Krypa <rafal@krypa.net>
1818
Rene Rebe <rene@exactcode.de>
1919
Ryan Dahl <coldredlemur@gmail.com>
20+
Patrick Gansterer <paroga@paroga.com>

deps/v8/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2009-09-09: Version 1.3.10
2+
3+
Fixed profiler on Mac in 64-bit mode.
4+
5+
Optimized creation of objects from simple constructor functions on
6+
ARM.
7+
8+
Fixed a number of debugger issues.
9+
10+
Reduced the amount of memory consumed by V8.
11+
12+
113
2009-09-02: Version 1.3.9
214

315
Optimized stack guard checks on ARM.

deps/v8/SConstruct

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ V8_EXTRA_FLAGS = {
258258
'all': {
259259
'WARNINGFLAGS': ['/WX', '/wd4355', '/wd4800']
260260
},
261+
'library:shared': {
262+
'CPPDEFINES': ['BUILDING_V8_SHARED'],
263+
'LIBS': ['winmm', 'ws2_32']
264+
},
261265
'arch:ia32': {
262266
'WARNINGFLAGS': ['/W3']
263267
},

deps/v8/include/v8.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,9 @@ class V8EXPORT String : public Primitive {
979979
public:
980980
explicit Utf8Value(Handle<v8::Value> obj);
981981
~Utf8Value();
982-
char* operator*() const { return str_; }
983-
int length() { return length_; }
982+
char* operator*() { return str_; }
983+
const char* operator*() const { return str_; }
984+
int length() const { return length_; }
984985
private:
985986
char* str_;
986987
int length_;
@@ -1001,8 +1002,9 @@ class V8EXPORT String : public Primitive {
10011002
public:
10021003
explicit AsciiValue(Handle<v8::Value> obj);
10031004
~AsciiValue();
1004-
char* operator*() const { return str_; }
1005-
int length() { return length_; }
1005+
char* operator*() { return str_; }
1006+
const char* operator*() const { return str_; }
1007+
int length() const { return length_; }
10061008
private:
10071009
char* str_;
10081010
int length_;
@@ -1022,8 +1024,9 @@ class V8EXPORT String : public Primitive {
10221024
public:
10231025
explicit Value(Handle<v8::Value> obj);
10241026
~Value();
1025-
uint16_t* operator*() const { return str_; }
1026-
int length() { return length_; }
1027+
uint16_t* operator*() { return str_; }
1028+
const uint16_t* operator*() const { return str_; }
1029+
int length() const { return length_; }
10271030
private:
10281031
uint16_t* str_;
10291032
int length_;

deps/v8/src/SConscript

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ SOURCES = {
5656
],
5757
'arch:arm': [
5858
'arm/assembler-arm.cc', 'arm/builtins-arm.cc', 'arm/cfg-arm.cc',
59-
'arm/codegen-arm.cc', 'arm/cpu-arm.cc', 'arm/disasm-arm.cc',
60-
'arm/debug-arm.cc', 'arm/frames-arm.cc', 'arm/ic-arm.cc',
61-
'arm/jump-target-arm.cc', 'arm/macro-assembler-arm.cc',
59+
'arm/codegen-arm.cc', 'arm/constants-arm.cc', 'arm/cpu-arm.cc',
60+
'arm/disasm-arm.cc', 'arm/debug-arm.cc', 'arm/frames-arm.cc',
61+
'arm/ic-arm.cc', 'arm/jump-target-arm.cc', 'arm/macro-assembler-arm.cc',
6262
'arm/regexp-macro-assembler-arm.cc',
6363
'arm/register-allocator-arm.cc', 'arm/stub-cache-arm.cc',
6464
'arm/virtual-frame-arm.cc'

deps/v8/src/api.cc

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ void Context::Enter() {
427427
i::Handle<i::Context> env = Utils::OpenHandle(this);
428428
thread_local.EnterContext(env);
429429

430-
thread_local.SaveContext(i::GlobalHandles::Create(i::Top::context()));
430+
thread_local.SaveContext(i::Top::context());
431431
i::Top::set_context(*env);
432432
}
433433

@@ -441,9 +441,8 @@ void Context::Exit() {
441441
}
442442

443443
// Content of 'last_context' could be NULL.
444-
i::Handle<i::Object> last_context = thread_local.RestoreContext();
445-
i::Top::set_context(static_cast<i::Context*>(*last_context));
446-
i::GlobalHandles::Destroy(last_context.location());
444+
i::Context* last_context = thread_local.RestoreContext();
445+
i::Top::set_context(last_context);
447446
}
448447

449448

@@ -3700,38 +3699,37 @@ char* HandleScopeImplementer::RestoreThreadHelper(char* storage) {
37003699
}
37013700

37023701

3703-
void HandleScopeImplementer::Iterate(
3704-
ObjectVisitor* v,
3705-
List<i::Object**>* blocks,
3706-
v8::ImplementationUtilities::HandleScopeData* handle_data) {
3702+
void HandleScopeImplementer::IterateThis(ObjectVisitor* v) {
37073703
// Iterate over all handles in the blocks except for the last.
3708-
for (int i = blocks->length() - 2; i >= 0; --i) {
3709-
Object** block = blocks->at(i);
3704+
for (int i = Blocks()->length() - 2; i >= 0; --i) {
3705+
Object** block = Blocks()->at(i);
37103706
v->VisitPointers(block, &block[kHandleBlockSize]);
37113707
}
37123708

37133709
// Iterate over live handles in the last block (if any).
3714-
if (!blocks->is_empty()) {
3715-
v->VisitPointers(blocks->last(), handle_data->next);
3710+
if (!Blocks()->is_empty()) {
3711+
v->VisitPointers(Blocks()->last(), handle_scope_data_.next);
3712+
}
3713+
3714+
if (!saved_contexts_.is_empty()) {
3715+
Object** start = reinterpret_cast<Object**>(&saved_contexts_.first());
3716+
v->VisitPointers(start, start + saved_contexts_.length());
37163717
}
37173718
}
37183719

37193720

37203721
void HandleScopeImplementer::Iterate(ObjectVisitor* v) {
37213722
v8::ImplementationUtilities::HandleScopeData* current =
37223723
v8::ImplementationUtilities::CurrentHandleScope();
3723-
Iterate(v, thread_local.Blocks(), current);
3724+
thread_local.handle_scope_data_ = *current;
3725+
thread_local.IterateThis(v);
37243726
}
37253727

37263728

37273729
char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
37283730
HandleScopeImplementer* thread_local =
37293731
reinterpret_cast<HandleScopeImplementer*>(storage);
3730-
List<internal::Object**>* blocks_of_archived_thread = thread_local->Blocks();
3731-
v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread =
3732-
&thread_local->handle_scope_data_;
3733-
Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread);
3734-
3732+
thread_local->IterateThis(v);
37353733
return storage + ArchiveSpacePerThread();
37363734
}
37373735

deps/v8/src/api.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ class HandleScopeImplementer {
352352
// contexts have been entered.
353353
inline Handle<Object> LastEnteredContext();
354354

355-
inline void SaveContext(Handle<Object> context);
356-
inline Handle<Object> RestoreContext();
355+
inline void SaveContext(Context* context);
356+
inline Context* RestoreContext();
357357
inline bool HasSavedContexts();
358358

359359
inline List<internal::Object**>* Blocks() { return &blocks; }
@@ -368,14 +368,12 @@ class HandleScopeImplementer {
368368
// Used as a stack to keep track of entered contexts.
369369
List<Handle<Object> > entered_contexts_;
370370
// Used as a stack to keep track of saved contexts.
371-
List<Handle<Object> > saved_contexts_;
371+
List<Context*> saved_contexts_;
372372
bool ignore_out_of_memory;
373373
// This is only used for threading support.
374374
v8::ImplementationUtilities::HandleScopeData handle_scope_data_;
375375

376-
static void Iterate(ObjectVisitor* v,
377-
List<internal::Object**>* blocks,
378-
v8::ImplementationUtilities::HandleScopeData* handle_data);
376+
void IterateThis(ObjectVisitor* v);
379377
char* RestoreThreadHelper(char* from);
380378
char* ArchiveThreadHelper(char* to);
381379

@@ -386,12 +384,12 @@ class HandleScopeImplementer {
386384
static const int kHandleBlockSize = v8::internal::KB - 2; // fit in one page
387385

388386

389-
void HandleScopeImplementer::SaveContext(Handle<Object> context) {
387+
void HandleScopeImplementer::SaveContext(Context* context) {
390388
saved_contexts_.Add(context);
391389
}
392390

393391

394-
Handle<Object> HandleScopeImplementer::RestoreContext() {
392+
Context* HandleScopeImplementer::RestoreContext() {
395393
return saved_contexts_.RemoveLast();
396394
}
397395

0 commit comments

Comments
 (0)