OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 5 #ifndef V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
10 #include "src/ast.h" | 10 #include "src/ast.h" |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 | 689 |
690 MacroAssembler* masm() const { return masm_; } | 690 MacroAssembler* masm() const { return masm_; } |
691 | 691 |
692 class ExpressionContext; | 692 class ExpressionContext; |
693 const ExpressionContext* context() { return context_; } | 693 const ExpressionContext* context() { return context_; } |
694 void set_new_context(const ExpressionContext* context) { context_ = context; } | 694 void set_new_context(const ExpressionContext* context) { context_ = context; } |
695 | 695 |
696 Handle<Script> script() { return info_->script(); } | 696 Handle<Script> script() { return info_->script(); } |
697 bool is_eval() { return info_->is_eval(); } | 697 bool is_eval() { return info_->is_eval(); } |
698 bool is_native() { return info_->is_native(); } | 698 bool is_native() { return info_->is_native(); } |
699 LanguageMode language_mode() { return function()->language_mode(); } | 699 LanguageMode language_mode() { return literal()->language_mode(); } |
700 bool has_simple_parameters() { return info_->has_simple_parameters(); } | 700 bool has_simple_parameters() { return info_->has_simple_parameters(); } |
701 // TODO(titzer): rename this to literal(). | 701 FunctionLiteral* literal() { return info_->literal(); } |
702 FunctionLiteral* function() { return info_->literal(); } | |
703 Scope* scope() { return scope_; } | 702 Scope* scope() { return scope_; } |
704 | 703 |
705 static Register result_register(); | 704 static Register result_register(); |
706 static Register context_register(); | 705 static Register context_register(); |
707 | 706 |
708 // Set fields in the stack frame. Offsets are the frame pointer relative | 707 // Set fields in the stack frame. Offsets are the frame pointer relative |
709 // offsets defined in, e.g., StandardFrameConstants. | 708 // offsets defined in, e.g., StandardFrameConstants. |
710 void StoreToFrameField(int frame_offset, Register value); | 709 void StoreToFrameField(int frame_offset, Register value); |
711 | 710 |
712 // Load a value from the current context. Indices are defined as an enum | 711 // Load a value from the current context. Indices are defined as an enum |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 | 1078 |
1080 Address start_; | 1079 Address start_; |
1081 Address instruction_start_; | 1080 Address instruction_start_; |
1082 uint32_t length_; | 1081 uint32_t length_; |
1083 }; | 1082 }; |
1084 | 1083 |
1085 | 1084 |
1086 } } // namespace v8::internal | 1085 } } // namespace v8::internal |
1087 | 1086 |
1088 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 1087 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
OLD | NEW |