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

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

Issue 1175963002: Make writing of frame translation platform independent. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 6 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/mips64/lithium-codegen-mips64.h ('k') | src/ppc/lithium-codegen-ppc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/lithium-codegen-mips64.cc
diff --git a/src/mips64/lithium-codegen-mips64.cc b/src/mips64/lithium-codegen-mips64.cc
index cbfc2f8351081d4aa3b2f9f4a8fe743e8c8c165a..c06d80f0a5b0c646d03c309736d45848508f98b0 100644
--- a/src/mips64/lithium-codegen-mips64.cc
+++ b/src/mips64/lithium-codegen-mips64.cc
@@ -582,85 +582,9 @@ void LCodeGen::WriteTranslation(LEnvironment* environment,
// The translation includes one command per value in the environment.
int translation_size = environment->translation_size();
- // The output frame height does not include the parameters.
- int height = translation_size - environment->parameter_count();
WriteTranslation(environment->outer(), translation);
-
- switch (environment->frame_type()) {
- case JS_FUNCTION: {
- int shared_id = DefineDeoptimizationLiteral(
- environment->entry() ? environment->entry()->shared()
- : info()->shared_info());
- translation->BeginJSFrame(environment->ast_id(), shared_id, height);
- if (info()->closure().is_identical_to(environment->closure())) {
- translation->StoreJSFrameFunction();
- } else {
- int closure_id = DefineDeoptimizationLiteral(environment->closure());
- translation->StoreLiteral(closure_id);
- }
- break;
- }
- case JS_CONSTRUCT: {
- int shared_id = DefineDeoptimizationLiteral(
- environment->entry() ? environment->entry()->shared()
- : info()->shared_info());
- translation->BeginConstructStubFrame(shared_id, translation_size);
- if (info()->closure().is_identical_to(environment->closure())) {
- translation->StoreJSFrameFunction();
- } else {
- int closure_id = DefineDeoptimizationLiteral(environment->closure());
- translation->StoreLiteral(closure_id);
- }
- break;
- }
- case JS_GETTER: {
- DCHECK(translation_size == 1);
- DCHECK(height == 0);
- int shared_id = DefineDeoptimizationLiteral(
- environment->entry() ? environment->entry()->shared()
- : info()->shared_info());
- translation->BeginGetterStubFrame(shared_id);
- if (info()->closure().is_identical_to(environment->closure())) {
- translation->StoreJSFrameFunction();
- } else {
- int closure_id = DefineDeoptimizationLiteral(environment->closure());
- translation->StoreLiteral(closure_id);
- }
- break;
- }
- case JS_SETTER: {
- DCHECK(translation_size == 2);
- DCHECK(height == 0);
- int shared_id = DefineDeoptimizationLiteral(
- environment->entry() ? environment->entry()->shared()
- : info()->shared_info());
- translation->BeginSetterStubFrame(shared_id);
- if (info()->closure().is_identical_to(environment->closure())) {
- translation->StoreJSFrameFunction();
- } else {
- int closure_id = DefineDeoptimizationLiteral(environment->closure());
- translation->StoreLiteral(closure_id);
- }
- break;
- }
- case ARGUMENTS_ADAPTOR: {
- int shared_id = DefineDeoptimizationLiteral(
- environment->entry() ? environment->entry()->shared()
- : info()->shared_info());
- translation->BeginArgumentsAdaptorFrame(shared_id, translation_size);
- if (info()->closure().is_identical_to(environment->closure())) {
- translation->StoreJSFrameFunction();
- } else {
- int closure_id = DefineDeoptimizationLiteral(environment->closure());
- translation->StoreLiteral(closure_id);
- }
- break;
- }
- case STUB:
- translation->BeginCompiledStubFrame(translation_size);
- break;
- }
+ WriteTranslationFrame(environment, translation);
int object_index = 0;
int dematerialized_index = 0;
@@ -958,16 +882,6 @@ void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) {
}
-int LCodeGen::DefineDeoptimizationLiteral(Handle<Object> literal) {
- int result = deoptimization_literals_.length();
- for (int i = 0; i < deoptimization_literals_.length(); ++i) {
- if (deoptimization_literals_[i].is_identical_to(literal)) return i;
- }
- deoptimization_literals_.Add(literal, zone());
- return result;
-}
-
-
void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() {
DCHECK_EQ(0, deoptimization_literals_.length());
for (auto function : chunk()->inlined_functions()) {
« no previous file with comments | « src/mips64/lithium-codegen-mips64.h ('k') | src/ppc/lithium-codegen-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698