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

Side by Side Diff: src/fast-codegen.cc

Issue 651031: Begin using a list of bailouts instead of a singleton in the fast code generator. (Closed)
Patch Set: Created 10 years, 10 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 fast_cgen.Generate(info); 449 fast_cgen.Generate(info);
450 if (fast_cgen.HasStackOverflow()) { 450 if (fast_cgen.HasStackOverflow()) {
451 ASSERT(!Top::has_pending_exception()); 451 ASSERT(!Top::has_pending_exception());
452 return Handle<Code>::null(); 452 return Handle<Code>::null();
453 } 453 }
454 454
455 // Generate the full code for the function in bailout mode, using the same 455 // Generate the full code for the function in bailout mode, using the same
456 // macro assembler. 456 // macro assembler.
457 CodeGenerator cgen(&masm); 457 CodeGenerator cgen(&masm);
458 CodeGeneratorScope scope(&cgen); 458 CodeGeneratorScope scope(&cgen);
459 cgen.Generate(info, CodeGenerator::SECONDARY); 459 info->set_mode(CompilationInfo::SECONDARY);
460 cgen.Generate(info);
460 if (cgen.HasStackOverflow()) { 461 if (cgen.HasStackOverflow()) {
461 ASSERT(!Top::has_pending_exception()); 462 ASSERT(!Top::has_pending_exception());
462 return Handle<Code>::null(); 463 return Handle<Code>::null();
463 } 464 }
464 465
465 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP); 466 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP);
466 return CodeGenerator::MakeCodeEpilogue(&masm, flags, info); 467 return CodeGenerator::MakeCodeEpilogue(&masm, flags, info);
467 } 468 }
468 469
469 470
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 742
742 743
743 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) { 744 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) {
744 UNREACHABLE(); 745 UNREACHABLE();
745 } 746 }
746 747
747 #undef __ 748 #undef __
748 749
749 750
750 } } // namespace v8::internal 751 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698