Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: src/full-codegen/s390/full-codegen-s390.cc

Issue 2142333002: Refactor class declaration logic to the parser and runtime Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: minor cleanup per Adam Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/full-codegen/s390/full-codegen-s390.cc
diff --git a/src/full-codegen/s390/full-codegen-s390.cc b/src/full-codegen/s390/full-codegen-s390.cc
index d63d108cca6b1cb6264f4a28ab1c9cfe31cb848f..0d2ed60a06661174e897c660c0647c647376d83b 100644
--- a/src/full-codegen/s390/full-codegen-s390.cc
+++ b/src/full-codegen/s390/full-codegen-s390.cc
@@ -1966,61 +1966,6 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
context()->Plug(r2);
}
-void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
- for (int i = 0; i < lit->properties()->length(); i++) {
- ObjectLiteral::Property* property = lit->properties()->at(i);
- Expression* value = property->value();
-
- Register scratch = r3;
- if (property->is_static()) {
- __ LoadP(scratch, MemOperand(sp, kPointerSize)); // constructor
- } else {
- __ LoadP(scratch, MemOperand(sp, 0)); // prototype
- }
- PushOperand(scratch);
- EmitPropertyKey(property, lit->GetIdForProperty(i));
-
- // The static prototype property is read only. We handle the non computed
- // property name case in the parser. Since this is the only case where we
- // need to check for an own read only property we special case this so we do
- // not need to do this for every property.
- if (property->is_static() && property->is_computed_name()) {
- __ CallRuntime(Runtime::kThrowIfStaticPrototype);
- __ push(r2);
- }
-
- VisitForStackValue(value);
- if (NeedsHomeObject(value)) {
- EmitSetHomeObject(value, 2, property->GetSlot());
- }
-
- switch (property->kind()) {
- case ObjectLiteral::Property::CONSTANT:
- case ObjectLiteral::Property::MATERIALIZED_LITERAL:
- case ObjectLiteral::Property::PROTOTYPE:
- UNREACHABLE();
- case ObjectLiteral::Property::COMPUTED:
- PushOperand(Smi::FromInt(DONT_ENUM));
- PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
- CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
- break;
-
- case ObjectLiteral::Property::GETTER:
- PushOperand(Smi::FromInt(DONT_ENUM));
- CallRuntimeWithOperands(Runtime::kDefineGetterPropertyUnchecked);
- break;
-
- case ObjectLiteral::Property::SETTER:
- PushOperand(Smi::FromInt(DONT_ENUM));
- CallRuntimeWithOperands(Runtime::kDefineSetterPropertyUnchecked);
- break;
-
- default:
- UNREACHABLE();
- }
- }
-}
-
void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
PopOperand(r3);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();

Powered by Google App Engine
This is Rietveld 408576698