| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // CodeGenerator | 164 // CodeGenerator |
| 165 | 165 |
| 166 class CodeGenerator: public AstVisitor { | 166 class CodeGenerator: public AstVisitor { |
| 167 public: | 167 public: |
| 168 // Takes a function literal, generates code for it. This function should only | 168 // Takes a function literal, generates code for it. This function should only |
| 169 // be called by compiler.cc. | 169 // be called by compiler.cc. |
| 170 static Handle<Code> MakeCode(FunctionLiteral* fun, | 170 static Handle<Code> MakeCode(FunctionLiteral* fun, |
| 171 Handle<Script> script, | 171 Handle<Script> script, |
| 172 bool is_eval); | 172 bool is_eval); |
| 173 | 173 |
| 174 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 174 static bool ShouldGenerateLog(Expression* type); | 175 static bool ShouldGenerateLog(Expression* type); |
| 176 #endif |
| 175 | 177 |
| 176 static void SetFunctionInfo(Handle<JSFunction> fun, | 178 static void SetFunctionInfo(Handle<JSFunction> fun, |
| 177 int length, | 179 int length, |
| 178 int function_token_position, | 180 int function_token_position, |
| 179 int start_position, | 181 int start_position, |
| 180 int end_position, | 182 int end_position, |
| 181 bool is_expression, | 183 bool is_expression, |
| 182 bool is_toplevel, | 184 bool is_toplevel, |
| 183 Handle<Script> script); | 185 Handle<Script> script); |
| 184 | 186 |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 cgen_->set_in_spilled_code(false); | 516 cgen_->set_in_spilled_code(false); |
| 515 GetValue(typeof_state); | 517 GetValue(typeof_state); |
| 516 cgen_->frame()->SpillAll(); | 518 cgen_->frame()->SpillAll(); |
| 517 cgen_->set_in_spilled_code(true); | 519 cgen_->set_in_spilled_code(true); |
| 518 } | 520 } |
| 519 | 521 |
| 520 | 522 |
| 521 } } // namespace v8::internal | 523 } } // namespace v8::internal |
| 522 | 524 |
| 523 #endif // V8_CODEGEN_IA32_H_ | 525 #endif // V8_CODEGEN_IA32_H_ |
| OLD | NEW |