| OLD | NEW |
| 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 12 matching lines...) Expand all Loading... |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_FULL_CODEGEN_H_ | 28 #ifndef V8_FULL_CODEGEN_H_ |
| 29 #define V8_FULL_CODEGEN_H_ | 29 #define V8_FULL_CODEGEN_H_ |
| 30 | 30 |
| 31 #include "v8.h" | 31 #include "v8.h" |
| 32 | 32 |
| 33 #include "allocation.h" |
| 33 #include "ast.h" | 34 #include "ast.h" |
| 34 #include "code-stubs.h" | 35 #include "code-stubs.h" |
| 35 #include "codegen.h" | 36 #include "codegen.h" |
| 36 #include "compiler.h" | 37 #include "compiler.h" |
| 37 | 38 |
| 38 namespace v8 { | 39 namespace v8 { |
| 39 namespace internal { | 40 namespace internal { |
| 40 | 41 |
| 41 // Forward declarations. | 42 // Forward declarations. |
| 42 class JumpPatchSite; | 43 class JumpPatchSite; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // operation. | 293 // operation. |
| 293 bool ShouldInlineSmiCase(Token::Value op); | 294 bool ShouldInlineSmiCase(Token::Value op); |
| 294 | 295 |
| 295 // Helper function to convert a pure value into a test context. The value | 296 // Helper function to convert a pure value into a test context. The value |
| 296 // is expected on the stack or the accumulator, depending on the platform. | 297 // is expected on the stack or the accumulator, depending on the platform. |
| 297 // See the platform-specific implementation for details. | 298 // See the platform-specific implementation for details. |
| 298 void DoTest(Label* if_true, Label* if_false, Label* fall_through); | 299 void DoTest(Label* if_true, Label* if_false, Label* fall_through); |
| 299 | 300 |
| 300 // Helper function to split control flow and avoid a branch to the | 301 // Helper function to split control flow and avoid a branch to the |
| 301 // fall-through label if it is set up. | 302 // fall-through label if it is set up. |
| 303 #ifdef V8_TARGET_ARCH_MIPS |
| 304 void Split(Condition cc, |
| 305 Register lhs, |
| 306 const Operand& rhs, |
| 307 Label* if_true, |
| 308 Label* if_false, |
| 309 Label* fall_through); |
| 310 #else // All non-mips arch. |
| 302 void Split(Condition cc, | 311 void Split(Condition cc, |
| 303 Label* if_true, | 312 Label* if_true, |
| 304 Label* if_false, | 313 Label* if_false, |
| 305 Label* fall_through); | 314 Label* fall_through); |
| 315 #endif // V8_TARGET_ARCH_MIPS |
| 306 | 316 |
| 307 void Move(Slot* dst, Register source, Register scratch1, Register scratch2); | 317 void Move(Slot* dst, Register source, Register scratch1, Register scratch2); |
| 308 void Move(Register dst, Slot* source); | 318 void Move(Register dst, Slot* source); |
| 309 | 319 |
| 310 // Return an operand used to read/write to a known (ie, non-LOOKUP) slot. | 320 // Return an operand used to read/write to a known (ie, non-LOOKUP) slot. |
| 311 // May emit code to traverse the context chain, destroying the scratch | 321 // May emit code to traverse the context chain, destroying the scratch |
| 312 // register. | 322 // register. |
| 313 MemOperand EmitSlotSearch(Slot* slot, Register scratch); | 323 MemOperand EmitSlotSearch(Slot* slot, Register scratch); |
| 314 | 324 |
| 315 // Forward the bailout responsibility for the given expression to | 325 // Forward the bailout responsibility for the given expression to |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 | 762 |
| 753 friend class NestedStatement; | 763 friend class NestedStatement; |
| 754 | 764 |
| 755 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); | 765 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); |
| 756 }; | 766 }; |
| 757 | 767 |
| 758 | 768 |
| 759 } } // namespace v8::internal | 769 } } // namespace v8::internal |
| 760 | 770 |
| 761 #endif // V8_FULL_CODEGEN_H_ | 771 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |