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

Unified Diff: src/full-codegen/mips/full-codegen-mips.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/mips/full-codegen-mips.cc
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
index a0032767af25c321a64f49955c05fae3ba48e800..c7c710f015db2dc5466191ef9aa05ac904521e67 100644
--- a/src/full-codegen/mips/full-codegen-mips.cc
+++ b/src/full-codegen/mips/full-codegen-mips.cc
@@ -2004,62 +2004,6 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
}
-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 = a1;
- if (property->is_static()) {
- __ lw(scratch, MemOperand(sp, kPointerSize)); // constructor
- } else {
- __ lw(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(v0);
- }
-
- 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) {
__ mov(a0, result_register());
PopOperand(a1);

Powered by Google App Engine
This is Rietveld 408576698