| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 } | 524 } |
| 525 | 525 |
| 526 MacroAssembler* masm() { return masm_; } | 526 MacroAssembler* masm() { return masm_; } |
| 527 | 527 |
| 528 class ExpressionContext; | 528 class ExpressionContext; |
| 529 const ExpressionContext* context() { return context_; } | 529 const ExpressionContext* context() { return context_; } |
| 530 void set_new_context(const ExpressionContext* context) { context_ = context; } | 530 void set_new_context(const ExpressionContext* context) { context_ = context; } |
| 531 | 531 |
| 532 Handle<Script> script() { return info_->script(); } | 532 Handle<Script> script() { return info_->script(); } |
| 533 bool is_eval() { return info_->is_eval(); } | 533 bool is_eval() { return info_->is_eval(); } |
| 534 bool is_strict() { return function()->strict_mode(); } |
| 535 StrictModeFlag strict_mode_flag() { |
| 536 return is_strict() ? kStrictMode : kNonStrictMode; |
| 537 } |
| 534 FunctionLiteral* function() { return info_->function(); } | 538 FunctionLiteral* function() { return info_->function(); } |
| 535 Scope* scope() { return info_->scope(); } | 539 Scope* scope() { return info_->scope(); } |
| 536 | 540 |
| 537 static Register result_register(); | 541 static Register result_register(); |
| 538 static Register context_register(); | 542 static Register context_register(); |
| 539 | 543 |
| 540 // Helper for calling an IC stub. | 544 // Helper for calling an IC stub. |
| 541 void EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode); | 545 void EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode); |
| 542 | 546 |
| 543 // Calling an IC stub with a patch site. Passing NULL for patch_site | 547 // Calling an IC stub with a patch site. Passing NULL for patch_site |
| 544 // indicates no inlined smi code and emits a nop after the IC call. | 548 // or non NULL patch_site which is not activated indicates no inlined smi code |
| 549 // and emits a nop after the IC call. |
| 545 void EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site); | 550 void EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site); |
| 546 | 551 |
| 547 // Set fields in the stack frame. Offsets are the frame pointer relative | 552 // Set fields in the stack frame. Offsets are the frame pointer relative |
| 548 // offsets defined in, e.g., StandardFrameConstants. | 553 // offsets defined in, e.g., StandardFrameConstants. |
| 549 void StoreToFrameField(int frame_offset, Register value); | 554 void StoreToFrameField(int frame_offset, Register value); |
| 550 | 555 |
| 551 // Load a value from the current context. Indices are defined as an enum | 556 // Load a value from the current context. Indices are defined as an enum |
| 552 // in v8::internal::Context. | 557 // in v8::internal::Context. |
| 553 void LoadContextField(Register dst, int context_index); | 558 void LoadContextField(Register dst, int context_index); |
| 554 | 559 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 | 772 |
| 768 friend class NestedStatement; | 773 friend class NestedStatement; |
| 769 | 774 |
| 770 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); | 775 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); |
| 771 }; | 776 }; |
| 772 | 777 |
| 773 | 778 |
| 774 } } // namespace v8::internal | 779 } } // namespace v8::internal |
| 775 | 780 |
| 776 #endif // V8_FULL_CODEGEN_H_ | 781 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |