Reviewers: Weiliang, arv,

Message:
WL.
PTAL.


Description:
X87: Classes: Add super support in methods and accessors

port r24976.

original commit message:

  Classes: Add super support in methods and accessors
  This is done by installing the [[HomeObject]] on the method and the
  accessor functions.

BUG=

Please review this at https://codereview.chromium.org/687273005/

Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge

Affected files (+4, -11 lines):
  M src/x87/full-codegen-x87.cc


Index: src/x87/full-codegen-x87.cc
diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc
index 1cc8caa1ac408f1f533013ba8359010033de0164..7e8ece481393140f077bef0e670409801847a4b5 100644
--- a/src/x87/full-codegen-x87.cc
+++ b/src/x87/full-codegen-x87.cc
@@ -2431,29 +2431,22 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
       __ push(Operand(esp, 0));  // prototype
     }
     VisitForStackValue(key);
+    VisitForStackValue(value);

     switch (property->kind()) {
       case ObjectLiteral::Property::CONSTANT:
       case ObjectLiteral::Property::MATERIALIZED_LITERAL:
       case ObjectLiteral::Property::COMPUTED:
       case ObjectLiteral::Property::PROTOTYPE:
-        VisitForStackValue(value);
-        __ push(Immediate(Smi::FromInt(NONE)));
-        __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
+        __ CallRuntime(Runtime::kDefineClassMethod, 3);
         break;

       case ObjectLiteral::Property::GETTER:
-        VisitForStackValue(value);
-        __ push(Immediate(isolate()->factory()->null_value()));
-        __ push(Immediate(Smi::FromInt(NONE)));
-        __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
+        __ CallRuntime(Runtime::kDefineClassGetter, 3);
         break;

       case ObjectLiteral::Property::SETTER:
-        __ push(Immediate(isolate()->factory()->null_value()));
-        VisitForStackValue(value);
-        __ push(Immediate(Smi::FromInt(NONE)));
-        __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
+        __ CallRuntime(Runtime::kDefineClassSetter, 3);
         break;

       default:


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to