OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 // CodeGenerator | 287 // CodeGenerator |
288 | 288 |
289 class CodeGenerator: public AstVisitor { | 289 class CodeGenerator: public AstVisitor { |
290 public: | 290 public: |
291 // Takes a function literal, generates code for it. This function should only | 291 // Takes a function literal, generates code for it. This function should only |
292 // be called by compiler.cc. | 292 // be called by compiler.cc. |
293 static Handle<Code> MakeCode(FunctionLiteral* fun, | 293 static Handle<Code> MakeCode(FunctionLiteral* fun, |
294 Handle<Script> script, | 294 Handle<Script> script, |
295 bool is_eval); | 295 bool is_eval); |
296 | 296 |
| 297 // Printing of AST, etc. as requested by flags. |
| 298 static void MakeCodePrologue(FunctionLiteral* fun); |
| 299 |
| 300 // Allocate and install the code. |
| 301 static Handle<Code> MakeCodeEpilogue(FunctionLiteral* fun, |
| 302 MacroAssembler* masm, |
| 303 Code::Flags flags, |
| 304 Handle<Script> script); |
| 305 |
297 #ifdef ENABLE_LOGGING_AND_PROFILING | 306 #ifdef ENABLE_LOGGING_AND_PROFILING |
298 static bool ShouldGenerateLog(Expression* type); | 307 static bool ShouldGenerateLog(Expression* type); |
299 #endif | 308 #endif |
300 | 309 |
301 static void SetFunctionInfo(Handle<JSFunction> fun, | 310 static void SetFunctionInfo(Handle<JSFunction> fun, |
302 FunctionLiteral* lit, | 311 FunctionLiteral* lit, |
303 bool is_toplevel, | 312 bool is_toplevel, |
304 Handle<Script> script); | 313 Handle<Script> script); |
305 | 314 |
306 // Accessors | 315 // Accessors |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 | FlagBits::encode(flags_) | 681 | FlagBits::encode(flags_) |
673 | SSE3Bits::encode(use_sse3_); | 682 | SSE3Bits::encode(use_sse3_); |
674 } | 683 } |
675 void Generate(MacroAssembler* masm); | 684 void Generate(MacroAssembler* masm); |
676 }; | 685 }; |
677 | 686 |
678 | 687 |
679 } } // namespace v8::internal | 688 } } // namespace v8::internal |
680 | 689 |
681 #endif // V8_X64_CODEGEN_X64_H_ | 690 #endif // V8_X64_CODEGEN_X64_H_ |
OLD | NEW |