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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 Isolate* isolate() const { return isolate_; } | 736 Isolate* isolate() const { return isolate_; } |
735 Zone* zone() const { return zone_; } | 737 Zone* zone() const { return zone_; } |
736 Handle<Script> script() { return info_->script(); } | 738 Handle<Script> script() { return info_->script(); } |
737 bool is_eval() { return info_->is_eval(); } | 739 bool is_eval() { return info_->is_eval(); } |
738 bool is_native() { return info_->is_native(); } | 740 bool is_native() { return info_->is_native(); } |
739 LanguageMode language_mode() { return literal()->language_mode(); } | 741 LanguageMode language_mode() { return literal()->language_mode(); } |
740 bool has_simple_parameters() { return info_->has_simple_parameters(); } | 742 bool has_simple_parameters() { return info_->has_simple_parameters(); } |
741 FunctionLiteral* literal() const { return info_->literal(); } | 743 FunctionLiteral* literal() const { return info_->literal(); } |
742 Scope* scope() { return scope_; } | 744 Scope* scope() { return scope_; } |
743 | 745 |
744 static Register result_register(); | |
745 static Register context_register(); | 746 static Register context_register(); |
746 | 747 |
747 // Set fields in the stack frame. Offsets are the frame pointer relative | 748 // Set fields in the stack frame. Offsets are the frame pointer relative |
748 // offsets defined in, e.g., StandardFrameConstants. | 749 // offsets defined in, e.g., StandardFrameConstants. |
749 void StoreToFrameField(int frame_offset, Register value); | 750 void StoreToFrameField(int frame_offset, Register value); |
750 | 751 |
751 // Load a value from the current context. Indices are defined as an enum | 752 // Load a value from the current context. Indices are defined as an enum |
752 // in v8::internal::Context. | 753 // in v8::internal::Context. |
753 void LoadContextField(Register dst, int context_index); | 754 void LoadContextField(Register dst, int context_index); |
754 | 755 |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 Address start_; | 1092 Address start_; |
1092 Address instruction_start_; | 1093 Address instruction_start_; |
1093 uint32_t length_; | 1094 uint32_t length_; |
1094 }; | 1095 }; |
1095 | 1096 |
1096 | 1097 |
1097 } // namespace internal | 1098 } // namespace internal |
1098 } // namespace v8 | 1099 } // namespace v8 |
1099 | 1100 |
1100 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 1101 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
OLD | NEW |