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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // CodeGenerator | 140 // CodeGenerator |
141 | 141 |
142 class CodeGenerator: public AstVisitor { | 142 class CodeGenerator: public AstVisitor { |
143 public: | 143 public: |
144 // Takes a function literal, generates code for it. This function should only | 144 // Takes a function literal, generates code for it. This function should only |
145 // be called by compiler.cc. | 145 // be called by compiler.cc. |
146 static Handle<Code> MakeCode(FunctionLiteral* fun, | 146 static Handle<Code> MakeCode(FunctionLiteral* fun, |
147 Handle<Script> script, | 147 Handle<Script> script, |
148 bool is_eval); | 148 bool is_eval); |
149 | 149 |
| 150 // Printing of AST, etc. as requested by flags. |
| 151 static void MakeCodePrologue(FunctionLiteral* fun); |
| 152 |
| 153 // Allocate and install the code. |
| 154 static Handle<Code> MakeCodeEpilogue(FunctionLiteral* fun, |
| 155 MacroAssembler* masm, |
| 156 Code::Flags flags, |
| 157 Handle<Script> script); |
| 158 |
150 #ifdef ENABLE_LOGGING_AND_PROFILING | 159 #ifdef ENABLE_LOGGING_AND_PROFILING |
151 static bool ShouldGenerateLog(Expression* type); | 160 static bool ShouldGenerateLog(Expression* type); |
152 #endif | 161 #endif |
153 | 162 |
154 static void SetFunctionInfo(Handle<JSFunction> fun, | 163 static void SetFunctionInfo(Handle<JSFunction> fun, |
155 FunctionLiteral* lit, | 164 FunctionLiteral* lit, |
156 bool is_toplevel, | 165 bool is_toplevel, |
157 Handle<Script> script); | 166 Handle<Script> script); |
158 | 167 |
159 // Accessors | 168 // Accessors |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 constant_rhs_); | 514 constant_rhs_); |
506 } | 515 } |
507 } | 516 } |
508 #endif | 517 #endif |
509 }; | 518 }; |
510 | 519 |
511 | 520 |
512 } } // namespace v8::internal | 521 } } // namespace v8::internal |
513 | 522 |
514 #endif // V8_ARM_CODEGEN_ARM_H_ | 523 #endif // V8_ARM_CODEGEN_ARM_H_ |
OLD | NEW |