Revision: 12638
Author: [email protected]
Date: Mon Oct 1 04:44:26 2012
Log: Revert merges of r12531 and r12562 from 3.12 branch, going back
to 3.12.19.12
Fix casting error for receiver of interceptors.
Fix LBoundsCheck on x64 to handle (stack slot + constant) correctly.
BUG=chromium:149912,150729
Review URL: https://codereview.chromium.org/11024005
http://code.google.com/p/v8/source/detail?r=12638
Deleted:
/branches/3.12/test/mjsunit/regress/regress-crbug-150729.js
Modified:
/branches/3.12/src/objects.cc
/branches/3.12/src/objects.h
/branches/3.12/src/version.cc
/branches/3.12/src/x64/lithium-codegen-x64.cc
/branches/3.12/test/cctest/test-api.cc
=======================================
--- /branches/3.12/test/mjsunit/regress/regress-crbug-150729.js Tue Sep 25
10:29:23 2012
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012 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:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Flags: --allow-natives-syntax
-
-var t = 0;
-function burn() {
- i = [t, 1];
- var M = [i[0], Math.cos(t) + i[7074959]];
- t += .05;
-}
-for (var j = 0; j < 5; j++) {
- if (j == 2) %OptimizeFunctionOnNextCall(burn);
- burn();
-}
=======================================
--- /branches/3.12/src/objects.cc Tue Sep 25 10:29:23 2012
+++ /branches/3.12/src/objects.cc Mon Oct 1 04:44:26 2012
@@ -650,9 +650,11 @@
receiver, result->GetCallbackObject(), name);
case HANDLER:
return result->proxy()->GetPropertyWithHandler(receiver, name);
- case INTERCEPTOR:
+ case INTERCEPTOR: {
+ JSObject* recvr = JSObject::cast(receiver);
return result->holder()->GetPropertyWithInterceptor(
- receiver, name, attributes);
+ recvr, name, attributes);
+ }
case TRANSITION:
case NONEXISTENT:
UNREACHABLE();
@@ -10237,7 +10239,7 @@
MaybeObject* JSObject::GetPropertyPostInterceptor(
- Object* receiver,
+ JSReceiver* receiver,
String* name,
PropertyAttributes* attributes) {
// Check local property in holder, ignore interceptor.
@@ -10255,7 +10257,7 @@
MaybeObject* JSObject::GetLocalPropertyPostInterceptor(
- Object* receiver,
+ JSReceiver* receiver,
String* name,
PropertyAttributes* attributes) {
// Check local property in holder, ignore interceptor.
@@ -10269,13 +10271,13 @@
MaybeObject* JSObject::GetPropertyWithInterceptor(
- Object* receiver,
+ JSReceiver* receiver,
String* name,
PropertyAttributes* attributes) {
Isolate* isolate = GetIsolate();
InterceptorInfo* interceptor = GetNamedInterceptor();
HandleScope scope(isolate);
- Handle<Object> receiver_handle(receiver);
+ Handle<JSReceiver> receiver_handle(receiver);
Handle<JSObject> holder_handle(this);
Handle<String> name_handle(name);
=======================================
--- /branches/3.12/src/objects.h Tue Sep 25 10:29:23 2012
+++ /branches/3.12/src/objects.h Mon Oct 1 04:44:26 2012
@@ -1683,15 +1683,15 @@
String* name,
PropertyAttributes* attributes);
MUST_USE_RESULT MaybeObject* GetPropertyWithInterceptor(
- Object* receiver,
+ JSReceiver* receiver,
String* name,
PropertyAttributes* attributes);
MUST_USE_RESULT MaybeObject* GetPropertyPostInterceptor(
- Object* receiver,
+ JSReceiver* receiver,
String* name,
PropertyAttributes* attributes);
MUST_USE_RESULT MaybeObject* GetLocalPropertyPostInterceptor(
- Object* receiver,
+ JSReceiver* receiver,
String* name,
PropertyAttributes* attributes);
=======================================
--- /branches/3.12/src/version.cc Fri Sep 28 02:40:58 2012
+++ /branches/3.12/src/version.cc Mon Oct 1 04:44:26 2012
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 12
#define BUILD_NUMBER 19
-#define PATCH_LEVEL 14
+#define PATCH_LEVEL 15
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
=======================================
--- /branches/3.12/src/x64/lithium-codegen-x64.cc Tue Sep 25 10:29:23 2012
+++ /branches/3.12/src/x64/lithium-codegen-x64.cc Mon Oct 1 04:44:26 2012
@@ -3643,17 +3643,11 @@
__ cmpq(reg, reg2);
}
} else {
- Operand length = ToOperand(instr->length());
if (instr->index()->IsConstantOperand()) {
- int constant_index =
- ToInteger32(LConstantOperand::cast(instr->index()));
- if (instr->hydrogen()->length()->representation().IsTagged()) {
- __ Cmp(length, Smi::FromInt(constant_index));
- } else {
- __ cmpq(length, Immediate(constant_index));
- }
+ __ cmpq(ToOperand(instr->length()),
+
Immediate(ToInteger32(LConstantOperand::cast(instr->index()))));
} else {
- __ cmpq(length, ToRegister(instr->index()));
+ __ cmpq(ToOperand(instr->length()), ToRegister(instr->index()));
}
}
DeoptimizeIf(below_equal, instr->environment());
=======================================
--- /branches/3.12/test/cctest/test-api.cc Tue Sep 25 10:29:23 2012
+++ /branches/3.12/test/cctest/test-api.cc Mon Oct 1 04:44:26 2012
@@ -17182,13 +17182,3 @@
CompileRun("try { throw new Error(); } finally { gc(); }");
CHECK(try_catch.HasCaught());
}
-
-
-THREADED_TEST(Regress149912) {
- v8::HandleScope scope;
- LocalContext context;
- Handle<FunctionTemplate> templ = FunctionTemplate::New();
- AddInterceptor(templ, EmptyInterceptorGetter, EmptyInterceptorSetter);
- context->Global()->Set(v8_str("Bug"), templ->GetFunction());
- CompileRun("Number.prototype.__proto__ = new Bug; var x = 0; x.foo();");
-}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev