Skip to content

Commit

Permalink
Version 1.3.6
Browse files Browse the repository at this point in the history
Add support for forceful termination of JavaScript execution.

Add low memory notification to the API. The embedding host can signal a low memory situation to V8.

Changed the handling of global handles (persistent handles in the API sense) to avoid issues regarding allocation of new global handles during weak handle callbacks.

Changed the growth policy of the young space.

Fixed a GC issue introduced in version 1.3.5.



git-svn-id: https://v8.googlecode.com/svn/trunk@3024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information
sgjesse@chromium.org committed Oct 7, 2009
1 parent 91a38a5 commit 1c011fb
Show file tree
Hide file tree
Showing 116 changed files with 3,166 additions and 4,259 deletions.
43 changes: 43 additions & 0 deletions ChangeLog
@@ -1,3 +1,46 @@
2009-10-07: Version 1.3.14

Added GetRealNamedProperty to the API to lookup real properties
located on the object or in the prototype chain skipping any
interceptors.

Fix the stack limits setting API to work correctly with threads. The
stack limit now needs to be set to each thread thich is used with V8.

Remove the high-priority flag from IdleNotification()

Ensure V8 is initialized before locking and unlocking threads.

Implemented a new JavaScript minifier for compressing the source of
the built-in JavaScript. This Remove non-Open Source code from Douglas
Crockford from the project.

Added a missing optimization in StringCharAt.

Fixed some flaky socket tests.

Change by Alexander Botero-Lowry to fix profiler sampling on FreeBSD
in 64-bit mode.

Fixed memory leaks in the thread management code.

Fixed the result of assignment to a pixel array. The assigned value
is now the result.

Error reporting for invalid left-hand sides in for-in statements, pre-
and postfix count expressions, and assignments now matches the JSC
behavior in Safari 4.

Follow the spec in disallowing function declarations without a name.

Always allocate code objects within a 2 GB range. On x64 architecture
this is used to use near calls (32-bit displacement) in Code objects.

Optimized array construction ported to x64 and ARM architectures.

[ES5] Changed Object.keys to return strings for element indices.


2009-09-23: Version 1.3.13

Fixed uninitialized memory problem.
Expand Down
7 changes: 0 additions & 7 deletions LICENSE
Expand Up @@ -21,13 +21,6 @@ are:
This code is copyrighted by Sun Microsystems Inc. and released
under a 3-clause BSD license.

- JSMin JavaScript minifier, located at tools/jsmin.py. This code is
copyrighted by Douglas Crockford and Baruch Even and released under
an MIT license.

- Valgrind client API header, located at third_party/valgrind/valgrind.h
This is release under the BSD license.

- Valgrind client API header, located at third_party/valgrind/valgrind.h
This is release under the BSD license.

Expand Down
70 changes: 38 additions & 32 deletions include/v8.h
@@ -1,4 +1,4 @@
// Copyright 2007-2008 the V8 project authors. All rights reserved.
// Copyright 2007-2009 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
Expand Down Expand Up @@ -130,6 +130,7 @@ class Data;
namespace internal {

class Object;
class Arguments;

}

Expand Down Expand Up @@ -1408,17 +1409,13 @@ class V8EXPORT Arguments {
*/
class V8EXPORT AccessorInfo {
public:
inline AccessorInfo(Local<Object> self,
Local<Value> data,
Local<Object> holder)
: self_(self), data_(data), holder_(holder) { }
inline AccessorInfo(internal::Object** args)
: args_(args) { }
inline Local<Value> Data() const;
inline Local<Object> This() const;
inline Local<Object> Holder() const;
private:
Local<Object> self_;
Local<Value> data_;
Local<Object> holder_;
internal::Object** args_;
};


Expand Down Expand Up @@ -1574,7 +1571,10 @@ typedef bool (*IndexedSecurityCallback)(Local<Object> host,
/**
* A FunctionTemplate is used to create functions at runtime. There
* can only be one function created from a FunctionTemplate in a
* context.
* context. The lifetime of the created function is equal to the
* lifetime of the context. So in case the embedder needs to create
* temporary functions that can be collected using Scripts is
* preferred.
*
* A FunctionTemplate can have properties, these properties are added to the
* function object when it is created.
Expand Down Expand Up @@ -1981,8 +1981,13 @@ Handle<Boolean> V8EXPORT False();


/**
* A set of constraints that specifies the limits of the runtime's
* memory use.
* A set of constraints that specifies the limits of the runtime's memory use.
* You must set the heap size before initializing the VM - the size cannot be
* adjusted after the VM is initialized.
*
* If you are using threads then you should hold the V8::Locker lock while
* setting the stack limit and you must set a non-default stack limit separately
* for each thread.
*/
class V8EXPORT ResourceConstraints {
public:
Expand All @@ -1992,6 +1997,7 @@ class V8EXPORT ResourceConstraints {
int max_old_space_size() const { return max_old_space_size_; }
void set_max_old_space_size(int value) { max_old_space_size_ = value; }
uint32_t* stack_limit() const { return stack_limit_; }
// Sets an address beyond which the VM's stack may not grow.
void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
private:
int max_young_space_size_;
Expand Down Expand Up @@ -2199,7 +2205,8 @@ class V8EXPORT V8 {

/**
* Initializes from snapshot if possible. Otherwise, attempts to
* initialize from scratch.
* initialize from scratch. This function is called implicitly if
* you use the API without calling it first.
*/
static bool Initialize();

Expand Down Expand Up @@ -2342,12 +2349,11 @@ class V8EXPORT V8 {
* 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.
* \param is_high_priority tells whether the embedder is high priority.
* Returns true if the embedder should stop calling IdleNotification
* until real work has been done. This indicates that V8 has done
* as much cleanup as it will be able to do.
*/
static bool IdleNotification(bool is_high_priority);
static bool IdleNotification();

/**
* Optional notification that the system is running low on memory.
Expand Down Expand Up @@ -2749,15 +2755,15 @@ class Internals {
return ((reinterpret_cast<intptr_t>(value) & kHeapObjectTagMask) ==
kHeapObjectTag);
}

static inline bool HasSmiTag(internal::Object* value) {
return ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag);
}

static inline int SmiValue(internal::Object* value) {
return static_cast<int>(reinterpret_cast<intptr_t>(value)) >> kSmiTagSize;
}

static inline bool IsExternalTwoByteString(int instance_type) {
int representation = (instance_type & kFullStringRepresentationMask);
return representation == kExternalTwoByteRepresentationTag;
Expand Down Expand Up @@ -2870,21 +2876,6 @@ int Arguments::Length() const {
}


Local<Value> AccessorInfo::Data() const {
return data_;
}


Local<Object> AccessorInfo::This() const {
return self_;
}


Local<Object> AccessorInfo::Holder() const {
return holder_;
}


template <class T>
Local<T> HandleScope::Close(Handle<T> value) {
internal::Object** before = reinterpret_cast<internal::Object**>(*value);
Expand Down Expand Up @@ -3082,6 +3073,21 @@ External* External::Cast(v8::Value* value) {
}


Local<Value> AccessorInfo::Data() const {
return Local<Value>(reinterpret_cast<Value*>(&args_[-3]));
}


Local<Object> AccessorInfo::This() const {
return Local<Object>(reinterpret_cast<Object*>(&args_[0]));
}


Local<Object> AccessorInfo::Holder() const {
return Local<Object>(reinterpret_cast<Object*>(&args_[-1]));
}


/**
* \example shell.cc
* A simple shell that takes a list of expressions on the
Expand Down
61 changes: 30 additions & 31 deletions src/SConscript
Expand Up @@ -36,49 +36,48 @@ Import('context')
SOURCES = {
'all': [
'accessors.cc', 'allocation.cc', 'api.cc', 'assembler.cc', 'ast.cc',
'bootstrapper.cc', 'builtins.cc', 'checks.cc', 'cfg.cc',
'code-stubs.cc', 'codegen.cc', 'compilation-cache.cc', 'compiler.cc',
'contexts.cc', 'conversions.cc', 'counters.cc', 'dateparser.cc',
'debug.cc', 'debug-agent.cc', 'disassembler.cc', 'execution.cc',
'factory.cc', 'flags.cc', 'frame-element.cc', 'frames.cc',
'func-name-inferrer.cc', 'global-handles.cc', 'handles.cc',
'hashmap.cc', 'heap.cc', 'heap-profiler.cc', 'ic.cc',
'interpreter-irregexp.cc', 'jsregexp.cc', 'jump-target.cc',
'log.cc', 'log-utils.cc', 'mark-compact.cc', 'messages.cc',
'objects.cc', 'oprofile-agent.cc', 'parser.cc', 'property.cc',
'regexp-macro-assembler.cc', 'regexp-macro-assembler-irregexp.cc',
'regexp-stack.cc', 'register-allocator.cc', 'rewriter.cc',
'runtime.cc', 'scanner.cc', 'scopeinfo.cc', 'scopes.cc',
'serialize.cc', 'snapshot-common.cc', 'spaces.cc',
'string-stream.cc', 'stub-cache.cc', 'token.cc', 'top.cc',
'bootstrapper.cc', 'builtins.cc', 'checks.cc', 'code-stubs.cc',
'codegen.cc', 'compilation-cache.cc', 'compiler.cc', 'contexts.cc',
'conversions.cc', 'counters.cc', 'dateparser.cc', 'debug.cc',
'debug-agent.cc', 'disassembler.cc', 'execution.cc', 'factory.cc',
'flags.cc', 'frame-element.cc', 'frames.cc', 'func-name-inferrer.cc',
'global-handles.cc', 'handles.cc', 'hashmap.cc', 'heap.cc',
'heap-profiler.cc', 'ic.cc', 'interpreter-irregexp.cc', 'jsregexp.cc',
'jump-target.cc', 'log.cc', 'log-utils.cc', 'mark-compact.cc',
'messages.cc', 'objects.cc', 'oprofile-agent.cc', 'parser.cc',
'property.cc', 'regexp-macro-assembler.cc',
'regexp-macro-assembler-irregexp.cc', 'regexp-stack.cc',
'register-allocator.cc', 'rewriter.cc', 'runtime.cc', 'scanner.cc',
'scopeinfo.cc', 'scopes.cc', 'serialize.cc', 'snapshot-common.cc',
'spaces.cc', 'string-stream.cc', 'stub-cache.cc', 'token.cc', 'top.cc',
'unicode.cc', 'usage-analyzer.cc', 'utils.cc', 'v8-counters.cc',
'v8.cc', 'v8threads.cc', 'variables.cc', 'version.cc',
'virtual-frame.cc', 'zone.cc'
],
'arch:arm': [
'arm/assembler-arm.cc', 'arm/builtins-arm.cc', 'arm/cfg-arm.cc',
'arm/codegen-arm.cc', 'arm/constants-arm.cc', 'arm/cpu-arm.cc',
'arm/disasm-arm.cc', 'arm/debug-arm.cc', 'arm/frames-arm.cc',
'arm/ic-arm.cc', 'arm/jump-target-arm.cc', 'arm/macro-assembler-arm.cc',
'arm/regexp-macro-assembler-arm.cc',
'arm/register-allocator-arm.cc', 'arm/stub-cache-arm.cc',
'arm/virtual-frame-arm.cc'
'arm/assembler-arm.cc', 'arm/builtins-arm.cc', 'arm/codegen-arm.cc',
'arm/constants-arm.cc', 'arm/cpu-arm.cc', 'arm/disasm-arm.cc',
'arm/debug-arm.cc', 'arm/frames-arm.cc', 'arm/ic-arm.cc',
'arm/jump-target-arm.cc', 'arm/macro-assembler-arm.cc',
'arm/regexp-macro-assembler-arm.cc', 'arm/register-allocator-arm.cc',
'arm/stub-cache-arm.cc', 'arm/virtual-frame-arm.cc'
],
'arch:ia32': [
'ia32/assembler-ia32.cc', 'ia32/builtins-ia32.cc', 'ia32/cfg-ia32.cc',
'ia32/assembler-ia32.cc', 'ia32/builtins-ia32.cc',
'ia32/codegen-ia32.cc', 'ia32/cpu-ia32.cc', 'ia32/disasm-ia32.cc',
'ia32/debug-ia32.cc', 'ia32/frames-ia32.cc', 'ia32/ic-ia32.cc',
'ia32/jump-target-ia32.cc', 'ia32/macro-assembler-ia32.cc',
'ia32/regexp-macro-assembler-ia32.cc', 'ia32/register-allocator-ia32.cc',
'ia32/stub-cache-ia32.cc', 'ia32/virtual-frame-ia32.cc'
'ia32/regexp-macro-assembler-ia32.cc',
'ia32/register-allocator-ia32.cc', 'ia32/stub-cache-ia32.cc',
'ia32/virtual-frame-ia32.cc'
],
'arch:x64': [
'x64/assembler-x64.cc', 'x64/builtins-x64.cc', 'x64/cfg-x64.cc',
'x64/codegen-x64.cc', 'x64/cpu-x64.cc', 'x64/disasm-x64.cc',
'x64/debug-x64.cc', 'x64/frames-x64.cc', 'x64/ic-x64.cc',
'x64/jump-target-x64.cc', 'x64/macro-assembler-x64.cc',
'x64/regexp-macro-assembler-x64.cc', 'x64/register-allocator-x64.cc',
'x64/stub-cache-x64.cc', 'x64/virtual-frame-x64.cc'
'x64/assembler-x64.cc', 'x64/builtins-x64.cc', 'x64/codegen-x64.cc',
'x64/cpu-x64.cc', 'x64/disasm-x64.cc', 'x64/debug-x64.cc',
'x64/frames-x64.cc', 'x64/ic-x64.cc', 'x64/jump-target-x64.cc',
'x64/macro-assembler-x64.cc', 'x64/regexp-macro-assembler-x64.cc',
'x64/register-allocator-x64.cc', 'x64/stub-cache-x64.cc',
'x64/virtual-frame-x64.cc'
],
'simulator:arm': ['arm/simulator-arm.cc'],
'os:freebsd': ['platform-freebsd.cc', 'platform-posix.cc'],
Expand Down

0 comments on commit 1c011fb

Please sign in to comment.