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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 6390001: Add support for deoptimization on x64. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/deoptimizer-x64.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 Translation translation(&translations_, frame_count); 560 Translation translation(&translations_, frame_count);
561 WriteTranslation(environment, &translation); 561 WriteTranslation(environment, &translation);
562 int deoptimization_index = deoptimizations_.length(); 562 int deoptimization_index = deoptimizations_.length();
563 environment->Register(deoptimization_index, translation.index()); 563 environment->Register(deoptimization_index, translation.index());
564 deoptimizations_.Add(environment); 564 deoptimizations_.Add(environment);
565 } 565 }
566 } 566 }
567 567
568 568
569 void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) { 569 void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) {
570 Abort("Unimplemented: %s", "Deoptimiz"); 570 RegisterEnvironmentForDeoptimization(environment);
571 ASSERT(environment->HasBeenRegistered());
572 int id = environment->deoptimization_index();
573 Address entry = Deoptimizer::GetDeoptimizationEntry(id, Deoptimizer::EAGER);
574 ASSERT(entry != NULL);
575 if (entry == NULL) {
576 Abort("bailout was not prepared");
577 return;
578 }
579
580 if (cc == no_condition) {
581 __ Jump(entry, RelocInfo::RUNTIME_ENTRY);
582 } else {
583 __ j(cc, entry, RelocInfo::RUNTIME_ENTRY);
584 }
571 } 585 }
572 586
573 587
574 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { 588 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) {
575 int length = deoptimizations_.length(); 589 int length = deoptimizations_.length();
576 if (length == 0) return; 590 if (length == 0) return;
577 ASSERT(FLAG_deopt); 591 ASSERT(FLAG_deopt);
578 Handle<DeoptimizationInputData> data = 592 Handle<DeoptimizationInputData> data =
579 Factory::NewDeoptimizationInputData(length, TENURED); 593 Factory::NewDeoptimizationInputData(length, TENURED);
580 594
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 1946
1933 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 1947 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
1934 Abort("Unimplemented: %s", "DoOsrEntry"); 1948 Abort("Unimplemented: %s", "DoOsrEntry");
1935 } 1949 }
1936 1950
1937 #undef __ 1951 #undef __
1938 1952
1939 } } // namespace v8::internal 1953 } } // namespace v8::internal
1940 1954
1941 #endif // V8_TARGET_ARCH_X64 1955 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/deoptimizer-x64.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698