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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 // Loop nesting counter. | 284 // Loop nesting counter. |
285 int loop_depth() { return loop_depth_; } | 285 int loop_depth() { return loop_depth_; } |
286 void increment_loop_depth() { loop_depth_++; } | 286 void increment_loop_depth() { loop_depth_++; } |
287 void decrement_loop_depth() { | 287 void decrement_loop_depth() { |
288 ASSERT(loop_depth_ > 0); | 288 ASSERT(loop_depth_ > 0); |
289 loop_depth_--; | 289 loop_depth_--; |
290 } | 290 } |
291 | 291 |
292 MacroAssembler* masm() { return masm_; } | 292 MacroAssembler* masm() { return masm_; } |
293 static Register result_register(); | 293 static Register result_register(); |
294 static Register context_register(); | |
Kevin Millikin (Chromium)
2009/12/14 16:35:47
This seems like going overboard to avoid platform-
Lasse Reichstein
2009/12/16 13:40:31
The context_register() function is used in generic
| |
295 | |
296 // Set fields in the stack frame. Offsets are the ones defined in, e.g., | |
297 // StandardFrameConstants. | |
298 void StoreFrameField(int frame_offset, Register value); | |
Kevin Millikin (Chromium)
2009/12/14 16:35:47
Not all of the constants in frames-{arm,ia32,x64}.
Lasse Reichstein
2009/12/16 13:40:31
Will mention exceptions and change name to StoreTo
| |
299 | |
300 // Load a value from the current context. Indices are defined as an enum | |
301 // in v8::internal::Context. | |
302 void LoadContextField(Register dst, int context_index); | |
Kevin Millikin (Chromium)
2009/12/14 16:35:47
We have a lot of uses of this (or a similar) patte
Lasse Reichstein
2009/12/16 13:40:31
I actually think ContextOperand is the correct lev
| |
294 | 303 |
295 // AST node visit functions. | 304 // AST node visit functions. |
296 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); | 305 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); |
297 AST_NODE_LIST(DECLARE_VISIT) | 306 AST_NODE_LIST(DECLARE_VISIT) |
298 #undef DECLARE_VISIT | 307 #undef DECLARE_VISIT |
299 // Handles the shortcutted logical binary operations in VisitBinaryOperation. | 308 // Handles the shortcutted logical binary operations in VisitBinaryOperation. |
300 void EmitLogicalOperation(BinaryOperation* expr); | 309 void EmitLogicalOperation(BinaryOperation* expr); |
301 | 310 |
302 MacroAssembler* masm_; | 311 MacroAssembler* masm_; |
303 FunctionLiteral* function_; | 312 FunctionLiteral* function_; |
304 Handle<Script> script_; | 313 Handle<Script> script_; |
305 bool is_eval_; | 314 bool is_eval_; |
306 Label return_label_; | 315 Label return_label_; |
307 NestedStatement* nesting_stack_; | 316 NestedStatement* nesting_stack_; |
308 int loop_depth_; | 317 int loop_depth_; |
309 | 318 |
310 Label* true_label_; | 319 Label* true_label_; |
311 Label* false_label_; | 320 Label* false_label_; |
312 | 321 |
313 friend class NestedStatement; | 322 friend class NestedStatement; |
314 | 323 |
315 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); | 324 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); |
316 }; | 325 }; |
317 | 326 |
318 | 327 |
319 } } // namespace v8::internal | 328 } } // namespace v8::internal |
320 | 329 |
321 #endif // V8_FAST_CODEGEN_H_ | 330 #endif // V8_FAST_CODEGEN_H_ |
OLD | NEW |