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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 // Always wrap the receiver and call to the JSFunction. Only use this flag | 594 // Always wrap the receiver and call to the JSFunction. Only use this flag |
595 // both the receiver type and the target method are statically known. | 595 // both the receiver type and the target method are statically known. |
596 WRAP_AND_CALL | 596 WRAP_AND_CALL |
597 }; | 597 }; |
598 | 598 |
599 | 599 |
600 enum CallConstructorFlags { | 600 enum CallConstructorFlags { |
601 NO_CALL_CONSTRUCTOR_FLAGS = 0, | 601 NO_CALL_CONSTRUCTOR_FLAGS = 0, |
602 // The call target is cached in the instruction stream. | 602 // The call target is cached in the instruction stream. |
603 RECORD_CONSTRUCTOR_TARGET = 1, | 603 RECORD_CONSTRUCTOR_TARGET = 1, |
| 604 // TODO(bmeurer): Kill these SUPER_* modes and use the Construct builtin |
| 605 // directly instead; also there's no point in collecting any "targets" for |
| 606 // super constructor calls, since these are known when we optimize the |
| 607 // constructor that contains the super call. |
604 SUPER_CONSTRUCTOR_CALL = 1 << 1, | 608 SUPER_CONSTRUCTOR_CALL = 1 << 1, |
605 SUPER_CALL_RECORD_TARGET = SUPER_CONSTRUCTOR_CALL | RECORD_CONSTRUCTOR_TARGET | 609 SUPER_CALL_RECORD_TARGET = SUPER_CONSTRUCTOR_CALL | RECORD_CONSTRUCTOR_TARGET |
606 }; | 610 }; |
607 | 611 |
608 | 612 |
609 enum CacheHolderFlag { | 613 enum CacheHolderFlag { |
610 kCacheOnPrototype, | 614 kCacheOnPrototype, |
611 kCacheOnPrototypeReceiverIsDictionary, | 615 kCacheOnPrototypeReceiverIsDictionary, |
612 kCacheOnPrototypeReceiverIsPrimitive, | 616 kCacheOnPrototypeReceiverIsPrimitive, |
613 kCacheOnReceiver | 617 kCacheOnReceiver |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { | 1014 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { |
1011 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 1015 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
1012 DCHECK(IsValidFunctionKind(kind)); | 1016 DCHECK(IsValidFunctionKind(kind)); |
1013 return kind; | 1017 return kind; |
1014 } | 1018 } |
1015 } } // namespace v8::internal | 1019 } } // namespace v8::internal |
1016 | 1020 |
1017 namespace i = v8::internal; | 1021 namespace i = v8::internal; |
1018 | 1022 |
1019 #endif // V8_GLOBALS_H_ | 1023 #endif // V8_GLOBALS_H_ |
OLD | NEW |