| 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_H_ | 5 #ifndef V8_FULL_CODEGEN_H_ |
| 6 #define V8_FULL_CODEGEN_H_ | 6 #define V8_FULL_CODEGEN_H_ |
| 7 | 7 |
| 8 #include "v8.h" | 8 #include "v8.h" |
| 9 | 9 |
| 10 #include "allocation.h" | 10 #include "allocation.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 case TOS_REG: return "TOS_REG"; | 92 case TOS_REG: return "TOS_REG"; |
| 93 } | 93 } |
| 94 UNREACHABLE(); | 94 UNREACHABLE(); |
| 95 return NULL; | 95 return NULL; |
| 96 } | 96 } |
| 97 | 97 |
| 98 static const int kMaxBackEdgeWeight = 127; | 98 static const int kMaxBackEdgeWeight = 127; |
| 99 | 99 |
| 100 // Platform-specific code size multiplier. | 100 // Platform-specific code size multiplier. |
| 101 #if V8_TARGET_ARCH_IA32 | 101 #if V8_TARGET_ARCH_IA32 |
| 102 static const int kCodeSizeMultiplier = 100; | 102 static const int kCodeSizeMultiplier = 105; |
| 103 static const int kBootCodeSizeMultiplier = 100; | 103 static const int kBootCodeSizeMultiplier = 100; |
| 104 #elif V8_TARGET_ARCH_X64 | 104 #elif V8_TARGET_ARCH_X64 |
| 105 static const int kCodeSizeMultiplier = 162; | 105 static const int kCodeSizeMultiplier = 170; |
| 106 static const int kBootCodeSizeMultiplier = 140; | 106 static const int kBootCodeSizeMultiplier = 140; |
| 107 #elif V8_TARGET_ARCH_ARM | 107 #elif V8_TARGET_ARCH_ARM |
| 108 static const int kCodeSizeMultiplier = 142; | 108 static const int kCodeSizeMultiplier = 149; |
| 109 static const int kBootCodeSizeMultiplier = 110; | 109 static const int kBootCodeSizeMultiplier = 110; |
| 110 #elif V8_TARGET_ARCH_ARM64 | 110 #elif V8_TARGET_ARCH_ARM64 |
| 111 // TODO(all): Copied ARM value. Check this is sensible for ARM64. | 111 // TODO(all): Copied ARM value. Check this is sensible for ARM64. |
| 112 static const int kCodeSizeMultiplier = 142; | 112 static const int kCodeSizeMultiplier = 149; |
| 113 static const int kBootCodeSizeMultiplier = 110; | 113 static const int kBootCodeSizeMultiplier = 110; |
| 114 #elif V8_TARGET_ARCH_MIPS | 114 #elif V8_TARGET_ARCH_MIPS |
| 115 static const int kCodeSizeMultiplier = 142; | 115 static const int kCodeSizeMultiplier = 149; |
| 116 static const int kBootCodeSizeMultiplier = 120; | 116 static const int kBootCodeSizeMultiplier = 120; |
| 117 #else | 117 #else |
| 118 #error Unsupported target architecture. | 118 #error Unsupported target architecture. |
| 119 #endif | 119 #endif |
| 120 | 120 |
| 121 private: | 121 private: |
| 122 class Breakable; | 122 class Breakable; |
| 123 class Iteration; | 123 class Iteration; |
| 124 | 124 |
| 125 class TestContext; | 125 class TestContext; |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 | 457 |
| 458 // Emit code to pop values from the stack associated with nested statements | 458 // Emit code to pop values from the stack associated with nested statements |
| 459 // like try/catch, try/finally, etc, running the finallies and unwinding the | 459 // like try/catch, try/finally, etc, running the finallies and unwinding the |
| 460 // handlers as needed. | 460 // handlers as needed. |
| 461 void EmitUnwindBeforeReturn(); | 461 void EmitUnwindBeforeReturn(); |
| 462 | 462 |
| 463 // Platform-specific return sequence | 463 // Platform-specific return sequence |
| 464 void EmitReturnSequence(); | 464 void EmitReturnSequence(); |
| 465 | 465 |
| 466 // Platform-specific code sequences for calls | 466 // Platform-specific code sequences for calls |
| 467 void EmitCallWithStub(Call* expr); | 467 void EmitCall(Call* expr, CallIC::CallType = CallIC::FUNCTION); |
| 468 void EmitCallWithIC(Call* expr); | 468 void EmitCallWithLoadIC(Call* expr); |
| 469 void EmitKeyedCallWithIC(Call* expr, Expression* key); | 469 void EmitKeyedCallWithLoadIC(Call* expr, Expression* key); |
| 470 | 470 |
| 471 // Platform-specific code for inline runtime calls. | 471 // Platform-specific code for inline runtime calls. |
| 472 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); | 472 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); |
| 473 | 473 |
| 474 void EmitInlineRuntimeCall(CallRuntime* expr); | 474 void EmitInlineRuntimeCall(CallRuntime* expr); |
| 475 | 475 |
| 476 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \ | 476 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \ |
| 477 void Emit##name(CallRuntime* expr); | 477 void Emit##name(CallRuntime* expr); |
| 478 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) | 478 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) |
| 479 #undef EMIT_INLINE_RUNTIME_CALL | 479 #undef EMIT_INLINE_RUNTIME_CALL |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 | 938 |
| 939 Address start_; | 939 Address start_; |
| 940 Address instruction_start_; | 940 Address instruction_start_; |
| 941 uint32_t length_; | 941 uint32_t length_; |
| 942 }; | 942 }; |
| 943 | 943 |
| 944 | 944 |
| 945 } } // namespace v8::internal | 945 } } // namespace v8::internal |
| 946 | 946 |
| 947 #endif // V8_FULL_CODEGEN_H_ | 947 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |