OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 #include "arm/codegen-arm.h" | 76 #include "arm/codegen-arm.h" |
77 #elif V8_TARGET_ARCH_MIPS | 77 #elif V8_TARGET_ARCH_MIPS |
78 #include "mips/codegen-mips.h" | 78 #include "mips/codegen-mips.h" |
79 #else | 79 #else |
80 #error Unsupported target architecture. | 80 #error Unsupported target architecture. |
81 #endif | 81 #endif |
82 | 82 |
83 namespace v8 { | 83 namespace v8 { |
84 namespace internal { | 84 namespace internal { |
85 | 85 |
86 | |
87 class CompilationInfo; | |
88 | |
89 | |
90 class CodeGenerator { | |
Sven Panne
2014/02/04 13:51:54
Hmmm, basically this is now just a namespace and s
| |
91 public: | |
92 // Printing of AST, etc. as requested by flags. | |
93 static void MakeCodePrologue(CompilationInfo* info, const char* kind); | |
94 | |
95 // Allocate and install the code. | |
96 static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm, | |
97 Code::Flags flags, | |
98 CompilationInfo* info); | |
99 | |
100 // Print the code after compiling it. | |
101 static void PrintCode(Handle<Code> code, CompilationInfo* info); | |
102 | |
103 static bool ShouldGenerateLog(Isolate* isolate, Expression* type); | |
104 | |
105 static bool RecordPositions(MacroAssembler* masm, | |
106 int pos, | |
107 bool right_here = false); | |
108 | |
109 private: | |
110 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | |
111 }; | |
112 | |
113 | |
86 // Results of the library implementation of transcendental functions may differ | 114 // Results of the library implementation of transcendental functions may differ |
87 // from the one we use in our generated code. Therefore we use the same | 115 // from the one we use in our generated code. Therefore we use the same |
88 // generated code both in runtime and compiled code. | 116 // generated code both in runtime and compiled code. |
89 typedef double (*UnaryMathFunction)(double x); | 117 typedef double (*UnaryMathFunction)(double x); |
90 | 118 |
91 UnaryMathFunction CreateExpFunction(); | 119 UnaryMathFunction CreateExpFunction(); |
92 UnaryMathFunction CreateSqrtFunction(); | 120 UnaryMathFunction CreateSqrtFunction(); |
93 | 121 |
94 | 122 |
95 class ElementsTransitionGenerator : public AllStatic { | 123 class ElementsTransitionGenerator : public AllStatic { |
(...skipping 13 matching lines...) Expand all Loading... | |
109 private: | 137 private: |
110 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionGenerator); | 138 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionGenerator); |
111 }; | 139 }; |
112 | 140 |
113 static const int kNumberDictionaryProbes = 4; | 141 static const int kNumberDictionaryProbes = 4; |
114 | 142 |
115 | 143 |
116 } } // namespace v8::internal | 144 } } // namespace v8::internal |
117 | 145 |
118 #endif // V8_CODEGEN_H_ | 146 #endif // V8_CODEGEN_H_ |
OLD | NEW |