OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 case TOS_REG: return "TOS_REG"; | 115 case TOS_REG: return "TOS_REG"; |
116 } | 116 } |
117 UNREACHABLE(); | 117 UNREACHABLE(); |
118 return NULL; | 118 return NULL; |
119 } | 119 } |
120 | 120 |
121 static const int kMaxBackEdgeWeight = 127; | 121 static const int kMaxBackEdgeWeight = 127; |
122 | 122 |
123 // Platform-specific code size multiplier. | 123 // Platform-specific code size multiplier. |
124 #if V8_TARGET_ARCH_IA32 | 124 #if V8_TARGET_ARCH_IA32 |
125 static const int kCodeSizeMultiplier = 116; | 125 static const int kCodeSizeMultiplier = 100; |
126 #elif V8_TARGET_ARCH_X64 | 126 #elif V8_TARGET_ARCH_X64 |
127 static const int kCodeSizeMultiplier = 188; | 127 static const int kCodeSizeMultiplier = 162; |
128 #elif V8_TARGET_ARCH_ARM | 128 #elif V8_TARGET_ARCH_ARM |
129 static const int kCodeSizeMultiplier = 165; | 129 static const int kCodeSizeMultiplier = 142; |
130 #elif V8_TARGET_ARCH_ARM64 | 130 #elif V8_TARGET_ARCH_ARM64 |
131 // TODO(all): Copied ARM value. Check this is sensible for ARM64. | 131 // TODO(all): Copied ARM value. Check this is sensible for ARM64. |
132 static const int kCodeSizeMultiplier = 165; | 132 static const int kCodeSizeMultiplier = 142; |
133 #elif V8_TARGET_ARCH_MIPS | 133 #elif V8_TARGET_ARCH_MIPS |
134 static const int kCodeSizeMultiplier = 142; | 134 static const int kCodeSizeMultiplier = 142; |
135 #else | 135 #else |
136 #error Unsupported target architecture. | 136 #error Unsupported target architecture. |
137 #endif | 137 #endif |
138 | 138 |
139 private: | 139 private: |
140 class Breakable; | 140 class Breakable; |
141 class Iteration; | 141 class Iteration; |
142 | 142 |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 478 |
479 // Emit code to pop values from the stack associated with nested statements | 479 // Emit code to pop values from the stack associated with nested statements |
480 // like try/catch, try/finally, etc, running the finallies and unwinding the | 480 // like try/catch, try/finally, etc, running the finallies and unwinding the |
481 // handlers as needed. | 481 // handlers as needed. |
482 void EmitUnwindBeforeReturn(); | 482 void EmitUnwindBeforeReturn(); |
483 | 483 |
484 // Platform-specific return sequence | 484 // Platform-specific return sequence |
485 void EmitReturnSequence(); | 485 void EmitReturnSequence(); |
486 | 486 |
487 // Platform-specific code sequences for calls | 487 // Platform-specific code sequences for calls |
488 void EmitCall(Call* expr, CallIC::CallType = CallIC::FUNCTION); | 488 void EmitCallWithStub(Call* expr); |
489 void EmitCallWithLoadIC(Call* expr); | 489 void EmitCallWithIC(Call* expr); |
490 void EmitKeyedCallWithLoadIC(Call* expr, Expression* key); | 490 void EmitKeyedCallWithIC(Call* expr, Expression* key); |
491 | 491 |
492 // Platform-specific code for inline runtime calls. | 492 // Platform-specific code for inline runtime calls. |
493 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); | 493 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); |
494 | 494 |
495 void EmitInlineRuntimeCall(CallRuntime* expr); | 495 void EmitInlineRuntimeCall(CallRuntime* expr); |
496 | 496 |
497 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \ | 497 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \ |
498 void Emit##name(CallRuntime* expr); | 498 void Emit##name(CallRuntime* expr); |
499 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) | 499 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) |
500 #undef EMIT_INLINE_RUNTIME_CALL | 500 #undef EMIT_INLINE_RUNTIME_CALL |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 | 960 |
961 Address start_; | 961 Address start_; |
962 Address instruction_start_; | 962 Address instruction_start_; |
963 uint32_t length_; | 963 uint32_t length_; |
964 }; | 964 }; |
965 | 965 |
966 | 966 |
967 } } // namespace v8::internal | 967 } } // namespace v8::internal |
968 | 968 |
969 #endif // V8_FULL_CODEGEN_H_ | 969 #endif // V8_FULL_CODEGEN_H_ |
OLD | NEW |