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/ast.h" | 10 #include "src/ast/ast.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 #elif V8_TARGET_ARCH_PPC | 89 #elif V8_TARGET_ARCH_PPC |
90 static const int kCodeSizeMultiplier = 200; | 90 static const int kCodeSizeMultiplier = 200; |
91 #elif V8_TARGET_ARCH_MIPS | 91 #elif V8_TARGET_ARCH_MIPS |
92 static const int kCodeSizeMultiplier = 149; | 92 static const int kCodeSizeMultiplier = 149; |
93 #elif V8_TARGET_ARCH_MIPS64 | 93 #elif V8_TARGET_ARCH_MIPS64 |
94 static const int kCodeSizeMultiplier = 149; | 94 static const int kCodeSizeMultiplier = 149; |
95 #else | 95 #else |
96 #error Unsupported target architecture. | 96 #error Unsupported target architecture. |
97 #endif | 97 #endif |
98 | 98 |
| 99 static Register result_register(); |
| 100 |
99 private: | 101 private: |
100 class Breakable; | 102 class Breakable; |
101 class Iteration; | 103 class Iteration; |
102 class TryFinally; | 104 class TryFinally; |
103 | 105 |
104 class TestContext; | 106 class TestContext; |
105 | 107 |
106 class NestedStatement BASE_EMBEDDED { | 108 class NestedStatement BASE_EMBEDDED { |
107 public: | 109 public: |
108 explicit NestedStatement(FullCodeGenerator* codegen) : codegen_(codegen) { | 110 explicit NestedStatement(FullCodeGenerator* codegen) : codegen_(codegen) { |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 Isolate* isolate() const { return isolate_; } | 735 Isolate* isolate() const { return isolate_; } |
734 Zone* zone() const { return zone_; } | 736 Zone* zone() const { return zone_; } |
735 Handle<Script> script() { return info_->script(); } | 737 Handle<Script> script() { return info_->script(); } |
736 bool is_eval() { return info_->is_eval(); } | 738 bool is_eval() { return info_->is_eval(); } |
737 bool is_native() { return info_->is_native(); } | 739 bool is_native() { return info_->is_native(); } |
738 LanguageMode language_mode() { return literal()->language_mode(); } | 740 LanguageMode language_mode() { return literal()->language_mode(); } |
739 bool has_simple_parameters() { return info_->has_simple_parameters(); } | 741 bool has_simple_parameters() { return info_->has_simple_parameters(); } |
740 FunctionLiteral* literal() const { return info_->literal(); } | 742 FunctionLiteral* literal() const { return info_->literal(); } |
741 Scope* scope() { return scope_; } | 743 Scope* scope() { return scope_; } |
742 | 744 |
743 static Register result_register(); | |
744 static Register context_register(); | 745 static Register context_register(); |
745 | 746 |
746 // Set fields in the stack frame. Offsets are the frame pointer relative | 747 // Set fields in the stack frame. Offsets are the frame pointer relative |
747 // offsets defined in, e.g., StandardFrameConstants. | 748 // offsets defined in, e.g., StandardFrameConstants. |
748 void StoreToFrameField(int frame_offset, Register value); | 749 void StoreToFrameField(int frame_offset, Register value); |
749 | 750 |
750 // Load a value from the current context. Indices are defined as an enum | 751 // Load a value from the current context. Indices are defined as an enum |
751 // in v8::internal::Context. | 752 // in v8::internal::Context. |
752 void LoadContextField(Register dst, int context_index); | 753 void LoadContextField(Register dst, int context_index); |
753 | 754 |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 Address start_; | 1091 Address start_; |
1091 Address instruction_start_; | 1092 Address instruction_start_; |
1092 uint32_t length_; | 1093 uint32_t length_; |
1093 }; | 1094 }; |
1094 | 1095 |
1095 | 1096 |
1096 } // namespace internal | 1097 } // namespace internal |
1097 } // namespace v8 | 1098 } // namespace v8 |
1098 | 1099 |
1099 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 1100 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
OLD | NEW |