| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 Label* false_target_; | 186 Label* false_target_; |
| 187 CodeGenState* previous_; | 187 CodeGenState* previous_; |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 | 190 |
| 191 | 191 |
| 192 | 192 |
| 193 // ------------------------------------------------------------------------- | 193 // ------------------------------------------------------------------------- |
| 194 // CodeGenerator | 194 // CodeGenerator |
| 195 | 195 |
| 196 class CodeGenerator: public Visitor { | 196 class CodeGenerator: public AstVisitor { |
| 197 public: | 197 public: |
| 198 // Takes a function literal, generates code for it. This function should only | 198 // Takes a function literal, generates code for it. This function should only |
| 199 // be called by compiler.cc. | 199 // be called by compiler.cc. |
| 200 static Handle<Code> MakeCode(FunctionLiteral* fun, | 200 static Handle<Code> MakeCode(FunctionLiteral* fun, |
| 201 Handle<Script> script, | 201 Handle<Script> script, |
| 202 bool is_eval); | 202 bool is_eval); |
| 203 | 203 |
| 204 static void SetFunctionInfo(Handle<JSFunction> fun, | 204 static void SetFunctionInfo(Handle<JSFunction> fun, |
| 205 int length, | 205 int length, |
| 206 int function_token_position, | 206 int function_token_position, |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 friend class VirtualFrame; | 428 friend class VirtualFrame; |
| 429 friend class Reference; | 429 friend class Reference; |
| 430 | 430 |
| 431 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 431 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
| 432 }; | 432 }; |
| 433 | 433 |
| 434 | 434 |
| 435 } } // namespace v8::internal | 435 } } // namespace v8::internal |
| 436 | 436 |
| 437 #endif // V8_CODEGEN_IA32_H_ | 437 #endif // V8_CODEGEN_IA32_H_ |
| OLD | NEW |