From b4981c69f149cf970dff67e91c29aac6985fab14 Mon Sep 17 00:00:00 2001 From: "weiliang.lin@intel.com" Date: Thu, 30 Oct 2014 02:01:19 +0000 Subject: [PATCH] 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= R=weiliang.lin@intel.com Review URL: https://codereview.chromium.org/687273005 Patch from Chunyang Dai . Cr-Commit-Position: refs/heads/master@{#24999} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/x87/full-codegen-x87.cc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc index 1cc8caa1ac..7e8ece4813 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: