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 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 | 28 |
29 #ifndef V8_CODEGEN_INL_H_ | 29 #ifndef V8_CODEGEN_INL_H_ |
30 #define V8_CODEGEN_INL_H_ | 30 #define V8_CODEGEN_INL_H_ |
31 | 31 |
32 #include "codegen.h" | 32 #include "codegen.h" |
| 33 #include "compiler.h" |
33 #include "register-allocator-inl.h" | 34 #include "register-allocator-inl.h" |
34 | 35 |
35 #if V8_TARGET_ARCH_IA32 | 36 #if V8_TARGET_ARCH_IA32 |
36 #include "ia32/codegen-ia32-inl.h" | 37 #include "ia32/codegen-ia32-inl.h" |
37 #elif V8_TARGET_ARCH_X64 | 38 #elif V8_TARGET_ARCH_X64 |
38 #include "x64/codegen-x64-inl.h" | 39 #include "x64/codegen-x64-inl.h" |
39 #elif V8_TARGET_ARCH_ARM | 40 #elif V8_TARGET_ARCH_ARM |
40 #include "arm/codegen-arm-inl.h" | 41 #include "arm/codegen-arm-inl.h" |
41 #else | 42 #else |
42 #error Unsupported target architecture. | 43 #error Unsupported target architecture. |
43 #endif | 44 #endif |
44 | 45 |
45 | 46 |
46 namespace v8 { | 47 namespace v8 { |
47 namespace internal { | 48 namespace internal { |
48 | 49 |
49 #define __ ACCESS_MASM(masm_) | 50 #define __ ACCESS_MASM(masm_) |
50 | 51 |
| 52 Handle<Script> CodeGenerator::script() { return info_->script(); } |
| 53 bool CodeGenerator::is_eval() { return info_->is_eval(); } |
| 54 |
| 55 |
51 // ----------------------------------------------------------------------------- | 56 // ----------------------------------------------------------------------------- |
52 // Support for "structured" code comments. | 57 // Support for "structured" code comments. |
53 // | 58 // |
54 // By selecting matching brackets in disassembler output, | 59 // By selecting matching brackets in disassembler output, |
55 // code segments can be identified more easily. | 60 // code segments can be identified more easily. |
56 | 61 |
57 #ifdef DEBUG | 62 #ifdef DEBUG |
58 | 63 |
59 class Comment BASE_EMBEDDED { | 64 class Comment BASE_EMBEDDED { |
60 public: | 65 public: |
(...skipping 18 matching lines...) Expand all Loading... |
79 }; | 84 }; |
80 | 85 |
81 #endif // DEBUG | 86 #endif // DEBUG |
82 | 87 |
83 #undef __ | 88 #undef __ |
84 | 89 |
85 | 90 |
86 } } // namespace v8::internal | 91 } } // namespace v8::internal |
87 | 92 |
88 #endif // V8_CODEGEN_INL_H_ | 93 #endif // V8_CODEGEN_INL_H_ |
OLD | NEW |