| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // CodeGenerator::allocator | 45 // CodeGenerator::allocator |
| 46 // CodeGenerator::AddDeferred | 46 // CodeGenerator::AddDeferred |
| 47 // CodeGenerator::in_spilled_code | 47 // CodeGenerator::in_spilled_code |
| 48 // CodeGenerator::set_in_spilled_code | 48 // CodeGenerator::set_in_spilled_code |
| 49 // | 49 // |
| 50 // These methods are either used privately by the shared code or implemented as | 50 // These methods are either used privately by the shared code or implemented as |
| 51 // shared code: | 51 // shared code: |
| 52 // CodeGenerator::CodeGenerator | 52 // CodeGenerator::CodeGenerator |
| 53 // CodeGenerator::~CodeGenerator | 53 // CodeGenerator::~CodeGenerator |
| 54 // CodeGenerator::ProcessDeferred | 54 // CodeGenerator::ProcessDeferred |
| 55 // CodeGenerator::ClearDeferred |
| 55 // CodeGenerator::GenCode | 56 // CodeGenerator::GenCode |
| 56 // CodeGenerator::BuildBoilerplate | 57 // CodeGenerator::BuildBoilerplate |
| 57 // CodeGenerator::ComputeCallInitialize | 58 // CodeGenerator::ComputeCallInitialize |
| 58 // CodeGenerator::ComputeCallInitializeInLoop | 59 // CodeGenerator::ComputeCallInitializeInLoop |
| 59 // CodeGenerator::ProcessDeclarations | 60 // CodeGenerator::ProcessDeclarations |
| 60 // CodeGenerator::DeclareGlobals | 61 // CodeGenerator::DeclareGlobals |
| 61 // CodeGenerator::CheckForInlineRuntimeCall | 62 // CodeGenerator::CheckForInlineRuntimeCall |
| 62 // CodeGenerator::GenerateFastCaseSwitchStatement | 63 // CodeGenerator::GenerateFastCaseSwitchStatement |
| 63 // CodeGenerator::GenerateFastCaseSwitchCases | 64 // CodeGenerator::GenerateFastCaseSwitchCases |
| 64 // CodeGenerator::TryGenerateFastCaseSwitchStatement | 65 // CodeGenerator::TryGenerateFastCaseSwitchStatement |
| (...skipping 20 matching lines...) Expand all Loading... |
| 85 // Deferred code objects are small pieces of code that are compiled | 86 // Deferred code objects are small pieces of code that are compiled |
| 86 // out of line. They are used to defer the compilation of uncommon | 87 // out of line. They are used to defer the compilation of uncommon |
| 87 // paths thereby avoiding expensive jumps around uncommon code parts. | 88 // paths thereby avoiding expensive jumps around uncommon code parts. |
| 88 class DeferredCode: public ZoneObject { | 89 class DeferredCode: public ZoneObject { |
| 89 public: | 90 public: |
| 90 explicit DeferredCode(CodeGenerator* generator); | 91 explicit DeferredCode(CodeGenerator* generator); |
| 91 virtual ~DeferredCode() { } | 92 virtual ~DeferredCode() { } |
| 92 | 93 |
| 93 virtual void Generate() = 0; | 94 virtual void Generate() = 0; |
| 94 | 95 |
| 96 // Unuse the entry and exit targets, deallocating all virtual frames |
| 97 // held by them. It will be impossible to emit a (correct) jump |
| 98 // into or out of the deferred code after clearing. |
| 99 void Clear() { |
| 100 enter_.Unuse(); |
| 101 exit_.Unuse(); |
| 102 } |
| 103 |
| 95 MacroAssembler* masm() const { return masm_; } | 104 MacroAssembler* masm() const { return masm_; } |
| 96 CodeGenerator* generator() const { return generator_; } | 105 CodeGenerator* generator() const { return generator_; } |
| 97 | 106 |
| 98 JumpTarget* enter() { return &enter_; } | 107 JumpTarget* enter() { return &enter_; } |
| 99 void BindExit() { exit_.Bind(0); } | 108 void BindExit() { exit_.Bind(0); } |
| 100 void BindExit(Result* result) { exit_.Bind(result, 1); } | 109 void BindExit(Result* result) { exit_.Bind(result, 1); } |
| 101 void BindExit(Result* result0, Result* result1, Result* result2) { | 110 void BindExit(Result* result0, Result* result1, Result* result2) { |
| 102 exit_.Bind(result0, result1, result2, 3); | 111 exit_.Bind(result0, result1, result2, 3); |
| 103 } | 112 } |
| 104 | 113 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 PrintF("ArgumentsAccessStub (type %d)\n", type_); | 298 PrintF("ArgumentsAccessStub (type %d)\n", type_); |
| 290 } | 299 } |
| 291 #endif | 300 #endif |
| 292 }; | 301 }; |
| 293 | 302 |
| 294 | 303 |
| 295 } // namespace internal | 304 } // namespace internal |
| 296 } // namespace v8 | 305 } // namespace v8 |
| 297 | 306 |
| 298 #endif // V8_CODEGEN_H_ | 307 #endif // V8_CODEGEN_H_ |
| OLD | NEW |