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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 TypeofState typeof_state_; | 180 TypeofState typeof_state_; |
181 Label* true_target_; | 181 Label* true_target_; |
182 Label* false_target_; | 182 Label* false_target_; |
183 CodeGenState* previous_; | 183 CodeGenState* previous_; |
184 }; | 184 }; |
185 | 185 |
186 | 186 |
187 // ------------------------------------------------------------------------- | 187 // ------------------------------------------------------------------------- |
188 // CodeGenerator | 188 // CodeGenerator |
189 | 189 |
190 class CodeGenerator: public Visitor { | 190 class CodeGenerator: public AstVisitor { |
191 public: | 191 public: |
192 // Takes a function literal, generates code for it. This function should only | 192 // Takes a function literal, generates code for it. This function should only |
193 // be called by compiler.cc. | 193 // be called by compiler.cc. |
194 static Handle<Code> MakeCode(FunctionLiteral* fun, | 194 static Handle<Code> MakeCode(FunctionLiteral* fun, |
195 Handle<Script> script, | 195 Handle<Script> script, |
196 bool is_eval); | 196 bool is_eval); |
197 | 197 |
198 static void SetFunctionInfo(Handle<JSFunction> fun, | 198 static void SetFunctionInfo(Handle<JSFunction> fun, |
199 int length, | 199 int length, |
200 int function_token_position, | 200 int function_token_position, |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 | 401 |
402 friend class VirtualFrame; | 402 friend class VirtualFrame; |
403 friend class Reference; | 403 friend class Reference; |
404 | 404 |
405 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 405 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
406 }; | 406 }; |
407 | 407 |
408 } } // namespace v8::internal | 408 } } // namespace v8::internal |
409 | 409 |
410 #endif // V8_CODEGEN_ARM_H_ | 410 #endif // V8_CODEGEN_ARM_H_ |
OLD | NEW |