Fix issues with commit r3839
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 18 Feb 2010 09:41:47 +0000 (09:41 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 18 Feb 2010 09:41:47 +0000 (09:41 +0000)
Fix broken condition.
Fixe some style issues.
Re-enabel part of a test which was turned off.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/647007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects.cc
test/cctest/test-api.cc
test/mjsunit/setter-on-constructor-prototype.js

index 86a1f0be5a71b5ca12247a34be425f01539d72a8..e241c1fa35f46c73e09dbe2d6a902b83114f2c25 100644 (file)
@@ -4829,7 +4829,7 @@ bool SharedFunctionInfo::CanGenerateInlineConstructor(Object* prototype) {
   // Check the basic conditions for generating inline constructor code.
   if (!FLAG_inline_new
       || !has_only_simple_this_property_assignments()
-      || !this_property_assignments_count() > 0) {
+      || this_property_assignments_count() == 0) {
     return false;
   }
 
@@ -4840,7 +4840,7 @@ bool SharedFunctionInfo::CanGenerateInlineConstructor(Object* prototype) {
   }
 
   // Traverse the proposed prototype chain looking for setters for properties of
-  // the same names as are set by the inline constructor..
+  // the same names as are set by the inline constructor.
   for (Object* obj = prototype;
        obj != Heap::null_value();
        obj = obj->GetPrototype()) {
index d2e3ab9deaf54ed0ba6cf5c9193500209fd278d2..888adf1c335d87a1eacb12217a150d3cb3f304cd 100644 (file)
@@ -9630,10 +9630,7 @@ THREADED_TEST(SetterOnConstructorPrototype) {
              "  this.x = 23"
              "};"
              "C2.prototype = { };"
-             "C2.prototype.__proto__ = P;"
-             ""
-             ""
-             "");
+             "C2.prototype.__proto__ = P;");
 
   v8::Local<v8::Script> script;
   script = v8::Script::Compile(v8_str("new C1();"));
@@ -9682,10 +9679,7 @@ THREADED_TEST(InterceptorOnConstructorPrototype) {
              "  this.x = 23"
              "};"
              "C2.prototype = { };"
-             "C2.prototype.__proto__ = P;"
-             ""
-             ""
-             "");
+             "C2.prototype.__proto__ = P;");
 
   v8::Local<v8::Script> script;
   script = v8::Script::Compile(v8_str("new C1();"));
index 430c61ff51b1a7e3c94cb5ec57f0d1f897e81ee0..d5718f9c9be8c2c5cc1e3fbdfbb53baf066818d9 100644 (file)
@@ -108,4 +108,4 @@ function RunTest(ensure_fast_case) {
 }
 
 RunTest(false);
-//RunTest(true);
+RunTest(true);