| 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 static Register context_register(); | 414 static Register context_register(); |
| 415 | 415 |
| 416 // Set fields in the stack frame. Offsets are the frame pointer relative | 416 // Set fields in the stack frame. Offsets are the frame pointer relative |
| 417 // offsets defined in, e.g., StandardFrameConstants. | 417 // offsets defined in, e.g., StandardFrameConstants. |
| 418 void StoreToFrameField(int frame_offset, Register value); | 418 void StoreToFrameField(int frame_offset, Register value); |
| 419 | 419 |
| 420 // Load a value from the current context. Indices are defined as an enum | 420 // Load a value from the current context. Indices are defined as an enum |
| 421 // in v8::internal::Context. | 421 // in v8::internal::Context. |
| 422 void LoadContextField(Register dst, int context_index); | 422 void LoadContextField(Register dst, int context_index); |
| 423 | 423 |
| 424 void EmitCallRuntime(Runtime::FunctionId id, int arg_count); |
| 425 void EmitCallRuntime(Runtime::Function* f, int arg_count); |
| 426 |
| 427 |
| 424 // AST node visit functions. | 428 // AST node visit functions. |
| 425 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); | 429 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); |
| 426 AST_NODE_LIST(DECLARE_VISIT) | 430 AST_NODE_LIST(DECLARE_VISIT) |
| 427 #undef DECLARE_VISIT | 431 #undef DECLARE_VISIT |
| 428 // Handles the shortcutted logical binary operations in VisitBinaryOperation. | 432 // Handles the shortcutted logical binary operations in VisitBinaryOperation. |
| 429 void EmitLogicalOperation(BinaryOperation* expr); | 433 void EmitLogicalOperation(BinaryOperation* expr); |
| 430 | 434 |
| 431 MacroAssembler* masm_; | 435 MacroAssembler* masm_; |
| 432 CompilationInfo* info_; | 436 CompilationInfo* info_; |
| 433 | 437 |
| 434 Label return_label_; | 438 Label return_label_; |
| 435 NestedStatement* nesting_stack_; | 439 NestedStatement* nesting_stack_; |
| 436 int loop_depth_; | 440 int loop_depth_; |
| 437 | 441 |
| 438 Expression::Context context_; | 442 Expression::Context context_; |
| 439 Location location_; | 443 Location location_; |
| 440 Label* true_label_; | 444 Label* true_label_; |
| 441 Label* false_label_; | 445 Label* false_label_; |
| 442 | 446 |
| 443 friend class NestedStatement; | 447 friend class NestedStatement; |
| 444 | 448 |
| 445 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); | 449 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); |
| 446 }; | 450 }; |
| 447 | 451 |
| 448 | 452 |
| 449 } } // namespace v8::internal | 453 } } // namespace v8::internal |
| 450 | 454 |
| 451 #endif // V8_FULL_CODEGEN_H_ | 455 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |