| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 F(HasExternalUint8ClampedElements, 1, 1) \ | 461 F(HasExternalUint8ClampedElements, 1, 1) \ |
| 462 F(HasExternalArrayElements, 1, 1) \ | 462 F(HasExternalArrayElements, 1, 1) \ |
| 463 F(HasExternalInt8Elements, 1, 1) \ | 463 F(HasExternalInt8Elements, 1, 1) \ |
| 464 F(HasExternalUint8Elements, 1, 1) \ | 464 F(HasExternalUint8Elements, 1, 1) \ |
| 465 F(HasExternalInt16Elements, 1, 1) \ | 465 F(HasExternalInt16Elements, 1, 1) \ |
| 466 F(HasExternalUint16Elements, 1, 1) \ | 466 F(HasExternalUint16Elements, 1, 1) \ |
| 467 F(HasExternalInt32Elements, 1, 1) \ | 467 F(HasExternalInt32Elements, 1, 1) \ |
| 468 F(HasExternalUint32Elements, 1, 1) \ | 468 F(HasExternalUint32Elements, 1, 1) \ |
| 469 F(HasExternalFloat32Elements, 1, 1) \ | 469 F(HasExternalFloat32Elements, 1, 1) \ |
| 470 F(HasExternalFloat64Elements, 1, 1) \ | 470 F(HasExternalFloat64Elements, 1, 1) \ |
| 471 F(HasFixedUint8ClampedElements, 1, 1) \ | |
| 472 F(HasFixedInt8Elements, 1, 1) \ | |
| 473 F(HasFixedUint8Elements, 1, 1) \ | |
| 474 F(HasFixedInt16Elements, 1, 1) \ | |
| 475 F(HasFixedUint16Elements, 1, 1) \ | |
| 476 F(HasFixedInt32Elements, 1, 1) \ | |
| 477 F(HasFixedUint32Elements, 1, 1) \ | |
| 478 F(HasFixedFloat32Elements, 1, 1) \ | |
| 479 F(HasFixedFloat64Elements, 1, 1) \ | |
| 480 F(HasFastProperties, 1, 1) \ | 471 F(HasFastProperties, 1, 1) \ |
| 481 F(TransitionElementsKind, 2, 1) \ | 472 F(TransitionElementsKind, 2, 1) \ |
| 482 F(HaveSameMap, 2, 1) \ | 473 F(HaveSameMap, 2, 1) \ |
| 483 F(IsAccessCheckNeeded, 1, 1) | 474 F(IsAccessCheckNeeded, 1, 1) |
| 484 | 475 |
| 485 | 476 |
| 486 #ifdef ENABLE_DEBUGGER_SUPPORT | 477 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 487 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ | 478 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ |
| 488 /* Debugger support*/ \ | 479 /* Debugger support*/ \ |
| 489 F(DebugBreak, 0, 1) \ | 480 F(DebugBreak, 0, 1) \ |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 F(StringCompare, 2, 1) \ | 656 F(StringCompare, 2, 1) \ |
| 666 F(RegExpExec, 4, 1) \ | 657 F(RegExpExec, 4, 1) \ |
| 667 F(RegExpConstructResult, 3, 1) \ | 658 F(RegExpConstructResult, 3, 1) \ |
| 668 F(GetFromCache, 2, 1) \ | 659 F(GetFromCache, 2, 1) \ |
| 669 F(NumberToString, 1, 1) \ | 660 F(NumberToString, 1, 1) \ |
| 670 F(DoubleHi, 1, 1) \ | 661 F(DoubleHi, 1, 1) \ |
| 671 F(DoubleLo, 1, 1) \ | 662 F(DoubleLo, 1, 1) \ |
| 672 F(ConstructDouble, 2, 1) \ | 663 F(ConstructDouble, 2, 1) \ |
| 673 F(TypedArrayInitialize, 5, 1) \ | 664 F(TypedArrayInitialize, 5, 1) \ |
| 674 F(DataViewInitialize, 4, 1) \ | 665 F(DataViewInitialize, 4, 1) \ |
| 675 F(MaxSmi, 0, 1) \ | 666 F(MaxSmi, 0, 1) |
| 676 F(TypedArrayMaxSizeInHeap, 0, 1) | |
| 677 | 667 |
| 678 | 668 |
| 679 //--------------------------------------------------------------------------- | 669 //--------------------------------------------------------------------------- |
| 680 // Runtime provides access to all C++ runtime functions. | 670 // Runtime provides access to all C++ runtime functions. |
| 681 | 671 |
| 682 class RuntimeState { | 672 class RuntimeState { |
| 683 public: | 673 public: |
| 684 StaticResource<ConsStringIteratorOp>* string_iterator() { | 674 StaticResource<ConsStringIteratorOp>* string_iterator() { |
| 685 return &string_iterator_; | 675 return &string_iterator_; |
| 686 } | 676 } |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 ARRAY_ID_UINT16 = 3, | 845 ARRAY_ID_UINT16 = 3, |
| 856 ARRAY_ID_INT16 = 4, | 846 ARRAY_ID_INT16 = 4, |
| 857 ARRAY_ID_UINT32 = 5, | 847 ARRAY_ID_UINT32 = 5, |
| 858 ARRAY_ID_INT32 = 6, | 848 ARRAY_ID_INT32 = 6, |
| 859 ARRAY_ID_FLOAT32 = 7, | 849 ARRAY_ID_FLOAT32 = 7, |
| 860 ARRAY_ID_FLOAT64 = 8, | 850 ARRAY_ID_FLOAT64 = 8, |
| 861 ARRAY_ID_UINT8_CLAMPED = 9 | 851 ARRAY_ID_UINT8_CLAMPED = 9 |
| 862 }; | 852 }; |
| 863 | 853 |
| 864 static void ArrayIdToTypeAndSize(int array_id, | 854 static void ArrayIdToTypeAndSize(int array_id, |
| 865 ExternalArrayType *type, | 855 ExternalArrayType *type, size_t *element_size); |
| 866 ElementsKind* external_elements_kind, | |
| 867 ElementsKind* fixed_elements_kind, | |
| 868 size_t *element_size); | |
| 869 | 856 |
| 870 // Helper functions used stubs. | 857 // Helper functions used stubs. |
| 871 static void PerformGC(Object* result, Isolate* isolate); | 858 static void PerformGC(Object* result, Isolate* isolate); |
| 872 | 859 |
| 873 // Used in runtime.cc and hydrogen's VisitArrayLiteral. | 860 // Used in runtime.cc and hydrogen's VisitArrayLiteral. |
| 874 static Handle<Object> CreateArrayLiteralBoilerplate( | 861 static Handle<Object> CreateArrayLiteralBoilerplate( |
| 875 Isolate* isolate, | 862 Isolate* isolate, |
| 876 Handle<FixedArray> literals, | 863 Handle<FixedArray> literals, |
| 877 Handle<FixedArray> elements); | 864 Handle<FixedArray> elements); |
| 878 }; | 865 }; |
| 879 | 866 |
| 880 | 867 |
| 881 //--------------------------------------------------------------------------- | 868 //--------------------------------------------------------------------------- |
| 882 // Constants used by interface to runtime functions. | 869 // Constants used by interface to runtime functions. |
| 883 | 870 |
| 884 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 871 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; |
| 885 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 872 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; |
| 886 | 873 |
| 887 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 874 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
| 888 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 875 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
| 889 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; | 876 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; |
| 890 | 877 |
| 891 } } // namespace v8::internal | 878 } } // namespace v8::internal |
| 892 | 879 |
| 893 #endif // V8_RUNTIME_H_ | 880 #endif // V8_RUNTIME_H_ |
| OLD | NEW |