Skip to content

Commit b404893

Browse files
committed
Version 3.30.16 (based on bleeding_edge revision r24788)
Remove v8stdint.h, it doesn't serve a purpose anymore. Performance and stability improvements on all platforms. git-svn-id: https://v8.googlecode.com/svn/trunk@24791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
1 parent 233fccf commit b404893

130 files changed

Lines changed: 2551 additions & 869 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.

BUILD.gn

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ action("js2c_experimental") {
245245
"src/harmony-array.js",
246246
"src/harmony-typedarray.js",
247247
"src/harmony-classes.js",
248+
"src/harmony-tostring.js"
248249
]
249250

250251
outputs = [
@@ -433,6 +434,8 @@ source_set("v8_base") {
433434
"src/assembler.h",
434435
"src/assert-scope.h",
435436
"src/assert-scope.cc",
437+
"src/ast-numbering.cc",
438+
"src/ast-numbering.h",
436439
"src/ast-value-factory.cc",
437440
"src/ast-value-factory.h",
438441
"src/ast.cc",
@@ -580,6 +583,8 @@ source_set("v8_base") {
580583
"src/compiler/value-numbering-reducer.h",
581584
"src/compiler/verifier.cc",
582585
"src/compiler/verifier.h",
586+
"src/compiler/zone-pool.cc",
587+
"src/compiler/zone-pool.h",
583588
"src/compiler.cc",
584589
"src/compiler.h",
585590
"src/contexts.cc",

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2014-10-22: Version 3.30.16
2+
3+
Remove v8stdint.h, it doesn't serve a purpose anymore.
4+
5+
Performance and stability improvements on all platforms.
6+
7+
18
2014-10-21: Version 3.30.15
29

310
Avoid the Marsaglia effect in 3D (Chromium issue 423311).

include/v8.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
#ifndef V8_H_
1616
#define V8_H_
1717

18-
#include "v8stdint.h"
18+
#include <stddef.h>
19+
#include <stdint.h>
20+
#include <stdio.h>
21+
22+
#include "v8config.h"
1923

2024
// We reserve the V8_* prefix for macros defined in V8 public API and
2125
// assume there are no name conflicts with the embedder's code.
@@ -2126,6 +2130,7 @@ class V8_EXPORT Symbol : public Name {
21262130
// Well-known symbols
21272131
static Local<Symbol> GetIterator(Isolate* isolate);
21282132
static Local<Symbol> GetUnscopables(Isolate* isolate);
2133+
static Local<Symbol> GetToStringTag(Isolate* isolate);
21292134

21302135
V8_INLINE static Symbol* Cast(v8::Value* obj);
21312136

@@ -2502,15 +2507,6 @@ class V8_EXPORT Object : public Value {
25022507
Local<Value> GetHiddenValue(Handle<String> key);
25032508
bool DeleteHiddenValue(Handle<String> key);
25042509

2505-
/**
2506-
* Returns true if this is an instance of an api function (one
2507-
* created from a function created from a function template) and has
2508-
* been modified since it was created. Note that this method is
2509-
* conservative and may return true for objects that haven't actually
2510-
* been modified.
2511-
*/
2512-
bool IsDirty();
2513-
25142510
/**
25152511
* Clone this object with a fast but shallow copy. Values will point
25162512
* to the same values as the original object.

include/v8stdint.h

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/api.cc

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3409,6 +3409,37 @@ Local<Array> v8::Object::GetOwnPropertyNames() {
34093409
}
34103410

34113411

3412+
static bool GetPredefinedToString(i::Handle<i::String> tag,
3413+
Local<String>* result) {
3414+
i::Isolate* i_isolate = tag->GetIsolate();
3415+
Isolate* isolate = reinterpret_cast<Isolate*>(i_isolate);
3416+
i::Factory* factory = i_isolate->factory();
3417+
3418+
if (i::String::Equals(tag, factory->Arguments_string())) {
3419+
*result = v8::String::NewFromUtf8(isolate, "[object ~Arguments]");
3420+
} else if (i::String::Equals(tag, factory->Array_string())) {
3421+
*result = v8::String::NewFromUtf8(isolate, "[object ~Array]");
3422+
} else if (i::String::Equals(tag, factory->Boolean_string())) {
3423+
*result = v8::String::NewFromUtf8(isolate, "[object ~Boolean]");
3424+
} else if (i::String::Equals(tag, factory->Date_string())) {
3425+
*result = v8::String::NewFromUtf8(isolate, "[object ~Date]");
3426+
} else if (i::String::Equals(tag, factory->Error_string())) {
3427+
*result = v8::String::NewFromUtf8(isolate, "[object ~Error]");
3428+
} else if (i::String::Equals(tag, factory->Function_string())) {
3429+
*result = v8::String::NewFromUtf8(isolate, "[object ~Function]");
3430+
} else if (i::String::Equals(tag, factory->Number_string())) {
3431+
*result = v8::String::NewFromUtf8(isolate, "[object ~Number]");
3432+
} else if (i::String::Equals(tag, factory->RegExp_string())) {
3433+
*result = v8::String::NewFromUtf8(isolate, "[object ~RegExp]");
3434+
} else if (i::String::Equals(tag, factory->String_string())) {
3435+
*result = v8::String::NewFromUtf8(isolate, "[object ~String]");
3436+
} else {
3437+
return false;
3438+
}
3439+
return true;
3440+
}
3441+
3442+
34123443
Local<String> v8::Object::ObjectProtoToString() {
34133444
i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate();
34143445
Isolate* isolate = reinterpret_cast<Isolate*>(i_isolate);
@@ -3418,6 +3449,7 @@ Local<String> v8::Object::ObjectProtoToString() {
34183449
i::Handle<i::JSObject> self = Utils::OpenHandle(this);
34193450

34203451
i::Handle<i::Object> name(self->class_name(), i_isolate);
3452+
i::Handle<i::Object> tag;
34213453

34223454
// Native implementation of Object.prototype.toString (v8natives.js):
34233455
// var c = %_ClassOf(this);
@@ -3432,6 +3464,27 @@ Local<String> v8::Object::ObjectProtoToString() {
34323464
i_isolate->factory()->Arguments_string())) {
34333465
return v8::String::NewFromUtf8(isolate, "[object Object]");
34343466
} else {
3467+
if (internal::FLAG_harmony_tostring) {
3468+
i::Handle<i::Symbol> toStringTag =
3469+
Utils::OpenHandle(*Symbol::GetToStringTag(isolate));
3470+
EXCEPTION_PREAMBLE(i_isolate);
3471+
has_pending_exception =
3472+
!i::Runtime::GetObjectProperty(i_isolate, self, toStringTag)
3473+
.ToHandle(&tag);
3474+
EXCEPTION_BAILOUT_CHECK(i_isolate, Local<v8::String>());
3475+
3476+
if (!tag->IsUndefined()) {
3477+
if (!tag->IsString())
3478+
return v8::String::NewFromUtf8(isolate, "[object ???]");
3479+
i::Handle<i::String> tag_name = i::Handle<i::String>::cast(tag);
3480+
if (!i::String::Equals(class_name, tag_name)) {
3481+
Local<String> result;
3482+
if (GetPredefinedToString(tag_name, &result)) return result;
3483+
3484+
class_name = tag_name;
3485+
}
3486+
}
3487+
}
34353488
const char* prefix = "[object ";
34363489
Local<String> str = Utils::ToLocal(class_name);
34373490
const char* postfix = "]";
@@ -3774,11 +3827,6 @@ void v8::Object::TurnOnAccessCheck() {
37743827
}
37753828

37763829

3777-
bool v8::Object::IsDirty() {
3778-
return Utils::OpenHandle(this)->IsDirty();
3779-
}
3780-
3781-
37823830
Local<v8::Object> v8::Object::Clone() {
37833831
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
37843832
ON_BAILOUT(isolate, "v8::Object::Clone()", return Local<Object>());
@@ -6250,6 +6298,11 @@ Local<Symbol> v8::Symbol::GetUnscopables(Isolate* isolate) {
62506298
}
62516299

62526300

6301+
Local<Symbol> v8::Symbol::GetToStringTag(Isolate* isolate) {
6302+
return GetWellKnownSymbol(isolate, "Symbol.toStringTag");
6303+
}
6304+
6305+
62536306
Local<Private> v8::Private::New(Isolate* isolate, Local<String> name) {
62546307
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
62556308
LOG_API(i_isolate, "Private::New()");

src/arm64/full-codegen-arm64.cc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -299,24 +299,24 @@ void FullCodeGenerator::Generate() {
299299
}
300300
VisitDeclarations(scope()->declarations());
301301
}
302-
}
303302

304-
{ Comment cmnt(masm_, "[ Stack check");
305-
PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS);
306-
Label ok;
307-
DCHECK(jssp.Is(__ StackPointer()));
308-
__ CompareRoot(jssp, Heap::kStackLimitRootIndex);
309-
__ B(hs, &ok);
310-
PredictableCodeSizeScope predictable(masm_,
311-
Assembler::kCallSizeWithRelocation);
312-
__ Call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET);
313-
__ Bind(&ok);
314-
}
303+
{ Comment cmnt(masm_, "[ Stack check");
304+
PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS);
305+
Label ok;
306+
DCHECK(jssp.Is(__ StackPointer()));
307+
__ CompareRoot(jssp, Heap::kStackLimitRootIndex);
308+
__ B(hs, &ok);
309+
PredictableCodeSizeScope predictable(masm_,
310+
Assembler::kCallSizeWithRelocation);
311+
__ Call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET);
312+
__ Bind(&ok);
313+
}
315314

316-
{ Comment cmnt(masm_, "[ Body");
317-
DCHECK(loop_depth() == 0);
318-
VisitStatements(function()->body());
319-
DCHECK(loop_depth() == 0);
315+
{ Comment cmnt(masm_, "[ Body");
316+
DCHECK(loop_depth() == 0);
317+
VisitStatements(function()->body());
318+
DCHECK(loop_depth() == 0);
319+
}
320320
}
321321

322322
// Always emit a 'return undefined' in case control fell off the end of

src/array.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ function SimpleSlice(array, start_i, del_count, len, deleted_elements) {
286286
// prototype.
287287
var current = array[index];
288288
if (!IS_UNDEFINED(current) || index in array) {
289-
deleted_elements[i] = current;
289+
// The spec requires [[DefineOwnProperty]] here, %AddElement is close
290+
// enough (in that it ignores the prototype).
291+
%AddElement(deleted_elements, i, current, NONE);
290292
}
291293
}
292294
}
@@ -349,7 +351,7 @@ function ArrayToString() {
349351
func = array.join;
350352
}
351353
if (!IS_SPEC_FUNCTION(func)) {
352-
return %_CallFunction(array, ObjectToString);
354+
return %_CallFunction(array, NoSideEffectsObjectToString);
353355
}
354356
return %_CallFunction(array, func);
355357
}

src/arraybuffer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ function SetUpArrayBuffer() {
7777
%AddNamedProperty(
7878
$ArrayBuffer.prototype, "constructor", $ArrayBuffer, DONT_ENUM);
7979

80+
%AddNamedProperty($ArrayBuffer.prototype,
81+
symbolToStringTag, "ArrayBuffer", DONT_ENUM | READ_ONLY);
82+
8083
InstallGetter($ArrayBuffer.prototype, "byteLength", ArrayBufferGetByteLen);
8184

8285
InstallFunctions($ArrayBuffer, DONT_ENUM, $Array(

src/assert-scope.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#ifndef V8_ASSERT_SCOPE_H_
66
#define V8_ASSERT_SCOPE_H_
77

8-
#include "include/v8stdint.h"
8+
#include <stdint.h>
99
#include "src/base/macros.h"
1010

1111
namespace v8 {

0 commit comments

Comments
 (0)