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

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

Issue 1266573003: Move final parts of class literal setup into a single runtime call (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/mips64/full-codegen-mips64.cc
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc
index 89c5593790dd88498819fbe442f0552a09e1cebc..b1ab1906c2680136f0479e34b20716bff8dfb631 100644
--- a/src/full-codegen/mips64/full-codegen-mips64.cc
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc
@@ -2558,23 +2558,12 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit,
}
}
- // prototype
- __ CallRuntime(Runtime::kToFastProperties, 1);
-
- // constructor
- __ CallRuntime(Runtime::kToFastProperties, 1);
-
- if (is_strong(language_mode())) {
- __ ld(scratch,
- FieldMemOperand(v0, JSFunction::kPrototypeOrInitialMapOffset));
- __ Push(v0, scratch);
- // TODO(conradw): It would be more efficient to define the properties with
- // the right attributes the first time round.
- // Freeze the prototype.
- __ CallRuntime(Runtime::kObjectFreeze, 1);
- // Freeze the constructor.
- __ CallRuntime(Runtime::kObjectFreeze, 1);
- }
+ // Set both the prototype and constructor to have fast properties, and also
+ // freeze them in strong mode.
+ __ CallRuntime(is_strong(language_mode())
+ ? Runtime::kFinalizeClassDefinitionStrong
+ : Runtime::kFinalizeClassDefinition,
+ 2);
}
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698