| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 F(IS_VAR, 1, 1) \ | 454 F(IS_VAR, 1, 1) \ |
| 455 \ | 455 \ |
| 456 /* expose boolean functions from objects-inl.h */ \ | 456 /* expose boolean functions from objects-inl.h */ \ |
| 457 F(HasFastSmiElements, 1, 1) \ | 457 F(HasFastSmiElements, 1, 1) \ |
| 458 F(HasFastSmiOrObjectElements, 1, 1) \ | 458 F(HasFastSmiOrObjectElements, 1, 1) \ |
| 459 F(HasFastObjectElements, 1, 1) \ | 459 F(HasFastObjectElements, 1, 1) \ |
| 460 F(HasFastDoubleElements, 1, 1) \ | 460 F(HasFastDoubleElements, 1, 1) \ |
| 461 F(HasFastHoleyElements, 1, 1) \ | 461 F(HasFastHoleyElements, 1, 1) \ |
| 462 F(HasDictionaryElements, 1, 1) \ | 462 F(HasDictionaryElements, 1, 1) \ |
| 463 F(HasNonStrictArgumentsElements, 1, 1) \ | 463 F(HasNonStrictArgumentsElements, 1, 1) \ |
| 464 F(HasExternalPixelElements, 1, 1) \ | 464 F(HasExternalUint8ClampedElements, 1, 1) \ |
| 465 F(HasExternalArrayElements, 1, 1) \ | 465 F(HasExternalArrayElements, 1, 1) \ |
| 466 F(HasExternalByteElements, 1, 1) \ | 466 F(HasExternalInt8Elements, 1, 1) \ |
| 467 F(HasExternalUnsignedByteElements, 1, 1) \ | 467 F(HasExternalUint8Elements, 1, 1) \ |
| 468 F(HasExternalShortElements, 1, 1) \ | 468 F(HasExternalInt16Elements, 1, 1) \ |
| 469 F(HasExternalUnsignedShortElements, 1, 1) \ | 469 F(HasExternalUint16Elements, 1, 1) \ |
| 470 F(HasExternalIntElements, 1, 1) \ | 470 F(HasExternalInt32Elements, 1, 1) \ |
| 471 F(HasExternalUnsignedIntElements, 1, 1) \ | 471 F(HasExternalUint32Elements, 1, 1) \ |
| 472 F(HasExternalFloatElements, 1, 1) \ | 472 F(HasExternalFloat32Elements, 1, 1) \ |
| 473 F(HasExternalDoubleElements, 1, 1) \ | 473 F(HasExternalFloat64Elements, 1, 1) \ |
| 474 F(HasFastProperties, 1, 1) \ | 474 F(HasFastProperties, 1, 1) \ |
| 475 F(TransitionElementsKind, 2, 1) \ | 475 F(TransitionElementsKind, 2, 1) \ |
| 476 F(HaveSameMap, 2, 1) \ | 476 F(HaveSameMap, 2, 1) \ |
| 477 F(IsAccessCheckNeeded, 1, 1) | 477 F(IsAccessCheckNeeded, 1, 1) |
| 478 | 478 |
| 479 | 479 |
| 480 #ifdef ENABLE_DEBUGGER_SUPPORT | 480 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 481 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ | 481 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ |
| 482 /* Debugger support*/ \ | 482 /* Debugger support*/ \ |
| 483 F(DebugBreak, 0, 1) \ | 483 F(DebugBreak, 0, 1) \ |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 enum TypedArrayId { | 832 enum TypedArrayId { |
| 833 // arrayIds below should be synchromized with typedarray.js natives. | 833 // arrayIds below should be synchromized with typedarray.js natives. |
| 834 ARRAY_ID_UINT8 = 1, | 834 ARRAY_ID_UINT8 = 1, |
| 835 ARRAY_ID_INT8 = 2, | 835 ARRAY_ID_INT8 = 2, |
| 836 ARRAY_ID_UINT16 = 3, | 836 ARRAY_ID_UINT16 = 3, |
| 837 ARRAY_ID_INT16 = 4, | 837 ARRAY_ID_INT16 = 4, |
| 838 ARRAY_ID_UINT32 = 5, | 838 ARRAY_ID_UINT32 = 5, |
| 839 ARRAY_ID_INT32 = 6, | 839 ARRAY_ID_INT32 = 6, |
| 840 ARRAY_ID_FLOAT32 = 7, | 840 ARRAY_ID_FLOAT32 = 7, |
| 841 ARRAY_ID_FLOAT64 = 8, | 841 ARRAY_ID_FLOAT64 = 8, |
| 842 ARRAY_ID_UINT8C = 9 | 842 ARRAY_ID_UINT8_CLAMPED = 9 |
| 843 }; | 843 }; |
| 844 | 844 |
| 845 static void ArrayIdToTypeAndSize(int array_id, | 845 static void ArrayIdToTypeAndSize(int array_id, |
| 846 ExternalArrayType *type, size_t *element_size); | 846 ExternalArrayType *type, size_t *element_size); |
| 847 | 847 |
| 848 // Helper functions used stubs. | 848 // Helper functions used stubs. |
| 849 static void PerformGC(Object* result, Isolate* isolate); | 849 static void PerformGC(Object* result, Isolate* isolate); |
| 850 | 850 |
| 851 // Used in runtime.cc and hydrogen's VisitArrayLiteral. | 851 // Used in runtime.cc and hydrogen's VisitArrayLiteral. |
| 852 static Handle<Object> CreateArrayLiteralBoilerplate( | 852 static Handle<Object> CreateArrayLiteralBoilerplate( |
| 853 Isolate* isolate, | 853 Isolate* isolate, |
| 854 Handle<FixedArray> literals, | 854 Handle<FixedArray> literals, |
| 855 Handle<FixedArray> elements); | 855 Handle<FixedArray> elements); |
| 856 }; | 856 }; |
| 857 | 857 |
| 858 | 858 |
| 859 //--------------------------------------------------------------------------- | 859 //--------------------------------------------------------------------------- |
| 860 // Constants used by interface to runtime functions. | 860 // Constants used by interface to runtime functions. |
| 861 | 861 |
| 862 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 862 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; |
| 863 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 863 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; |
| 864 | 864 |
| 865 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 865 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
| 866 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 866 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
| 867 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; | 867 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; |
| 868 | 868 |
| 869 } } // namespace v8::internal | 869 } } // namespace v8::internal |
| 870 | 870 |
| 871 #endif // V8_RUNTIME_H_ | 871 #endif // V8_RUNTIME_H_ |
| OLD | NEW |