OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 }; | 845 }; |
846 | 846 |
847 | 847 |
848 void DeferredStackCheck::Generate() { | 848 void DeferredStackCheck::Generate() { |
849 StackCheckStub stub; | 849 StackCheckStub stub; |
850 __ CallStub(&stub); | 850 __ CallStub(&stub); |
851 } | 851 } |
852 | 852 |
853 | 853 |
854 void CodeGenerator::CheckStack() { | 854 void CodeGenerator::CheckStack() { |
855 if (FLAG_check_stack) { | 855 DeferredStackCheck* deferred = new DeferredStackCheck; |
856 DeferredStackCheck* deferred = new DeferredStackCheck; | 856 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); |
857 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); | 857 deferred->Branch(below); |
858 deferred->Branch(below); | 858 deferred->BindExit(); |
859 deferred->BindExit(); | |
860 } | |
861 } | 859 } |
862 | 860 |
863 | 861 |
864 void CodeGenerator::VisitAndSpill(Statement* statement) { | 862 void CodeGenerator::VisitAndSpill(Statement* statement) { |
865 // TODO(X64): No architecture specific code. Move to shared location. | 863 // TODO(X64): No architecture specific code. Move to shared location. |
866 ASSERT(in_spilled_code()); | 864 ASSERT(in_spilled_code()); |
867 set_in_spilled_code(false); | 865 set_in_spilled_code(false); |
868 Visit(statement); | 866 Visit(statement); |
869 if (frame_ != NULL) { | 867 if (frame_ != NULL) { |
870 frame_->SpillAll(); | 868 frame_->SpillAll(); |
(...skipping 7004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7875 masm.GetCode(&desc); | 7873 masm.GetCode(&desc); |
7876 // Call the function from C++. | 7874 // Call the function from C++. |
7877 return FUNCTION_CAST<ModuloFunction>(buffer); | 7875 return FUNCTION_CAST<ModuloFunction>(buffer); |
7878 } | 7876 } |
7879 | 7877 |
7880 #endif | 7878 #endif |
7881 | 7879 |
7882 #undef __ | 7880 #undef __ |
7883 | 7881 |
7884 } } // namespace v8::internal | 7882 } } // namespace v8::internal |
OLD | NEW |