| 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_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
| 6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 POLYMORPHIC, | 592 POLYMORPHIC, |
| 593 // Many receiver types have been seen. | 593 // Many receiver types have been seen. |
| 594 MEGAMORPHIC, | 594 MEGAMORPHIC, |
| 595 // A generic handler is installed and no extra typefeedback is recorded. | 595 // A generic handler is installed and no extra typefeedback is recorded. |
| 596 GENERIC, | 596 GENERIC, |
| 597 // Special state for debug break or step in prepare stubs. | 597 // Special state for debug break or step in prepare stubs. |
| 598 DEBUG_STUB | 598 DEBUG_STUB |
| 599 }; | 599 }; |
| 600 | 600 |
| 601 | 601 |
| 602 enum CallFunctionFlags { | |
| 603 NO_CALL_FUNCTION_FLAGS, | |
| 604 CALL_AS_METHOD, | |
| 605 // Always wrap the receiver and call to the JSFunction. Only use this flag | |
| 606 // both the receiver type and the target method are statically known. | |
| 607 WRAP_AND_CALL | |
| 608 }; | |
| 609 | |
| 610 | |
| 611 enum CallConstructorFlags { | 602 enum CallConstructorFlags { |
| 612 NO_CALL_CONSTRUCTOR_FLAGS = 0, | 603 NO_CALL_CONSTRUCTOR_FLAGS = 0, |
| 613 // The call target is cached in the instruction stream. | 604 // The call target is cached in the instruction stream. |
| 614 RECORD_CONSTRUCTOR_TARGET = 1, | 605 RECORD_CONSTRUCTOR_TARGET = 1, |
| 615 // TODO(bmeurer): Kill these SUPER_* modes and use the Construct builtin | 606 // TODO(bmeurer): Kill these SUPER_* modes and use the Construct builtin |
| 616 // directly instead; also there's no point in collecting any "targets" for | 607 // directly instead; also there's no point in collecting any "targets" for |
| 617 // super constructor calls, since these are known when we optimize the | 608 // super constructor calls, since these are known when we optimize the |
| 618 // constructor that contains the super call. | 609 // constructor that contains the super call. |
| 619 SUPER_CONSTRUCTOR_CALL = 1 << 1, | 610 SUPER_CONSTRUCTOR_CALL = 1 << 1, |
| 620 SUPER_CALL_RECORD_TARGET = SUPER_CONSTRUCTOR_CALL | RECORD_CONSTRUCTOR_TARGET | 611 SUPER_CALL_RECORD_TARGET = SUPER_CONSTRUCTOR_CALL | RECORD_CONSTRUCTOR_TARGET |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 1020 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
| 1030 DCHECK(IsValidFunctionKind(kind)); | 1021 DCHECK(IsValidFunctionKind(kind)); |
| 1031 return kind; | 1022 return kind; |
| 1032 } | 1023 } |
| 1033 } // namespace internal | 1024 } // namespace internal |
| 1034 } // namespace v8 | 1025 } // namespace v8 |
| 1035 | 1026 |
| 1036 namespace i = v8::internal; | 1027 namespace i = v8::internal; |
| 1037 | 1028 |
| 1038 #endif // V8_GLOBALS_H_ | 1029 #endif // V8_GLOBALS_H_ |
| OLD | NEW |