| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 F(Math_exp, 1, 1) \ | 183 F(Math_exp, 1, 1) \ |
| 184 F(Math_floor, 1, 1) \ | 184 F(Math_floor, 1, 1) \ |
| 185 F(Math_log, 1, 1) \ | 185 F(Math_log, 1, 1) \ |
| 186 F(Math_pow, 2, 1) \ | 186 F(Math_pow, 2, 1) \ |
| 187 F(Math_pow_cfunction, 2, 1) \ | 187 F(Math_pow_cfunction, 2, 1) \ |
| 188 F(RoundNumber, 1, 1) \ | 188 F(RoundNumber, 1, 1) \ |
| 189 F(Math_sin, 1, 1) \ | 189 F(Math_sin, 1, 1) \ |
| 190 F(Math_sqrt, 1, 1) \ | 190 F(Math_sqrt, 1, 1) \ |
| 191 F(Math_tan, 1, 1) \ | 191 F(Math_tan, 1, 1) \ |
| 192 \ | 192 \ |
| 193 /* Float32x4 and Int32x4 */ \ |
| 194 F(AllocateFloat32x4, 0, 1) \ |
| 195 F(AllocateInt32x4, 0, 1) \ |
| 196 \ |
| 197 /* SIMD */ \ |
| 198 F(SIMDAbs, 1, 1) \ |
| 199 F(SIMDNeg, 1, 1) \ |
| 200 F(SIMDAdd, 2, 1) \ |
| 201 F(SIMDSub, 2, 1) \ |
| 202 F(SIMDMul, 2, 1) \ |
| 203 F(SIMDDiv, 2, 1) \ |
| 204 F(SIMDClamp, 3, 1) \ |
| 205 F(SIMDMin, 2, 1) \ |
| 206 F(SIMDMax, 2, 1) \ |
| 207 F(SIMDReciprocal, 1, 1) \ |
| 208 F(SIMDReciprocalSqrt, 1, 1) \ |
| 209 F(SIMDScale, 2, 1) \ |
| 210 F(SIMDSqrt, 1, 1) \ |
| 211 F(SIMDShuffle, 2, 1) \ |
| 212 F(SIMDShuffleMix, 3, 1) \ |
| 213 F(SIMDWithX, 2, 1) \ |
| 214 F(SIMDWithY, 2, 1) \ |
| 215 F(SIMDWithZ, 2, 1) \ |
| 216 F(SIMDWithW, 2, 1) \ |
| 217 F(SIMDToFloat32x4, 1, 1) \ |
| 218 F(SIMDBitsToFloat32x4, 1, 1) \ |
| 219 F(SIMDToInt32x4, 1, 1) \ |
| 220 F(SIMDBitsToInt32x4, 1, 1) \ |
| 221 F(SIMDLessThan, 2, 1) \ |
| 222 F(SIMDLessThanOrEqual, 2, 1) \ |
| 223 F(SIMDEqual, 2, 1) \ |
| 224 F(SIMDNotEqual, 2, 1) \ |
| 225 F(SIMDGreaterThanOrEqual, 2, 1) \ |
| 226 F(SIMDGreaterThan, 2, 1) \ |
| 227 F(SIMDAnd, 2, 1) \ |
| 228 F(SIMDOr, 2, 1) \ |
| 229 F(SIMDXor, 2, 1) \ |
| 230 F(SIMDNot, 1, 1) \ |
| 231 F(SIMDNegu32, 1, 1) \ |
| 232 F(SIMDAddu32, 2, 1) \ |
| 233 F(SIMDSubu32, 2, 1) \ |
| 234 F(SIMDMulu32, 2, 1) \ |
| 235 F(SIMDSelect, 3, 1) \ |
| 236 F(SIMDShuffleu32, 2, 1) \ |
| 237 F(SIMDWithXu32, 2, 1) \ |
| 238 F(SIMDWithYu32, 2, 1) \ |
| 239 F(SIMDWithZu32, 2, 1) \ |
| 240 F(SIMDWithWu32, 2, 1) \ |
| 241 F(SIMDWithFlagX, 2, 1) \ |
| 242 F(SIMDWithFlagY, 2, 1) \ |
| 243 F(SIMDWithFlagZ, 2, 1) \ |
| 244 F(SIMDWithFlagW, 2, 1) \ |
| 245 \ |
| 193 /* Regular expressions */ \ | 246 /* Regular expressions */ \ |
| 194 F(RegExpCompile, 3, 1) \ | 247 F(RegExpCompile, 3, 1) \ |
| 195 F(RegExpExec, 4, 1) \ | 248 F(RegExpExec, 4, 1) \ |
| 196 F(RegExpExecMultiple, 4, 1) \ | 249 F(RegExpExecMultiple, 4, 1) \ |
| 197 F(RegExpInitializeObject, 5, 1) \ | 250 F(RegExpInitializeObject, 5, 1) \ |
| 198 F(RegExpConstructResult, 3, 1) \ | 251 F(RegExpConstructResult, 3, 1) \ |
| 199 \ | 252 \ |
| 200 /* JSON */ \ | 253 /* JSON */ \ |
| 201 F(ParseJson, 1, 1) \ | 254 F(ParseJson, 1, 1) \ |
| 202 F(BasicJSONStringify, 1, 1) \ | 255 F(BasicJSONStringify, 1, 1) \ |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 /* Dates */ \ | 317 /* Dates */ \ |
| 265 F(DateCurrentTime, 0, 1) \ | 318 F(DateCurrentTime, 0, 1) \ |
| 266 F(DateParseString, 2, 1) \ | 319 F(DateParseString, 2, 1) \ |
| 267 F(DateLocalTimezone, 1, 1) \ | 320 F(DateLocalTimezone, 1, 1) \ |
| 268 F(DateToUTC, 1, 1) \ | 321 F(DateToUTC, 1, 1) \ |
| 269 F(DateMakeDay, 2, 1) \ | 322 F(DateMakeDay, 2, 1) \ |
| 270 F(DateSetValue, 3, 1) \ | 323 F(DateSetValue, 3, 1) \ |
| 271 \ | 324 \ |
| 272 /* Numbers */ \ | 325 /* Numbers */ \ |
| 273 \ | 326 \ |
| 327 /* Float32x4 and Int32x4 */ \ |
| 328 F(CreateFloat32x4, 4, 1) \ |
| 329 F(Float32x4GetX, 1, 1) \ |
| 330 F(Float32x4GetY, 1, 1) \ |
| 331 F(Float32x4GetZ, 1, 1) \ |
| 332 F(Float32x4GetW, 1, 1) \ |
| 333 F(Float32x4GetSignMask, 1, 1) \ |
| 334 F(CreateInt32x4, 4, 1) \ |
| 335 F(Int32x4GetX, 1, 1) \ |
| 336 F(Int32x4GetY, 1, 1) \ |
| 337 F(Int32x4GetZ, 1, 1) \ |
| 338 F(Int32x4GetW, 1, 1) \ |
| 339 F(Int32x4GetFlagX, 1, 1) \ |
| 340 F(Int32x4GetFlagY, 1, 1) \ |
| 341 F(Int32x4GetFlagZ, 1, 1) \ |
| 342 F(Int32x4GetFlagW, 1, 1) \ |
| 343 F(Int32x4GetSignMask, 1, 1) \ |
| 344 \ |
| 274 /* Globals */ \ | 345 /* Globals */ \ |
| 275 F(CompileString, 2, 1) \ | 346 F(CompileString, 2, 1) \ |
| 276 F(GlobalPrint, 1, 1) \ | 347 F(GlobalPrint, 1, 1) \ |
| 277 \ | 348 \ |
| 278 /* Eval */ \ | 349 /* Eval */ \ |
| 279 F(GlobalReceiver, 1, 1) \ | 350 F(GlobalReceiver, 1, 1) \ |
| 280 F(ResolvePossiblyDirectEval, 5, 2) \ | 351 F(ResolvePossiblyDirectEval, 5, 2) \ |
| 281 \ | 352 \ |
| 282 F(SetProperty, -1 /* 4 or 5 */, 1) \ | 353 F(SetProperty, -1 /* 4 or 5 */, 1) \ |
| 283 F(DefineOrRedefineDataProperty, 4, 1) \ | 354 F(DefineOrRedefineDataProperty, 4, 1) \ |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 F(HasNonStrictArgumentsElements, 1, 1) \ | 534 F(HasNonStrictArgumentsElements, 1, 1) \ |
| 464 F(HasExternalPixelElements, 1, 1) \ | 535 F(HasExternalPixelElements, 1, 1) \ |
| 465 F(HasExternalArrayElements, 1, 1) \ | 536 F(HasExternalArrayElements, 1, 1) \ |
| 466 F(HasExternalByteElements, 1, 1) \ | 537 F(HasExternalByteElements, 1, 1) \ |
| 467 F(HasExternalUnsignedByteElements, 1, 1) \ | 538 F(HasExternalUnsignedByteElements, 1, 1) \ |
| 468 F(HasExternalShortElements, 1, 1) \ | 539 F(HasExternalShortElements, 1, 1) \ |
| 469 F(HasExternalUnsignedShortElements, 1, 1) \ | 540 F(HasExternalUnsignedShortElements, 1, 1) \ |
| 470 F(HasExternalIntElements, 1, 1) \ | 541 F(HasExternalIntElements, 1, 1) \ |
| 471 F(HasExternalUnsignedIntElements, 1, 1) \ | 542 F(HasExternalUnsignedIntElements, 1, 1) \ |
| 472 F(HasExternalFloatElements, 1, 1) \ | 543 F(HasExternalFloatElements, 1, 1) \ |
| 544 F(HasExternalFloat32x4Elements, 1, 1) \ |
| 545 F(HasExternalInt32x4Elements, 1, 1) \ |
| 473 F(HasExternalDoubleElements, 1, 1) \ | 546 F(HasExternalDoubleElements, 1, 1) \ |
| 474 F(HasFastProperties, 1, 1) \ | 547 F(HasFastProperties, 1, 1) \ |
| 475 F(TransitionElementsKind, 2, 1) \ | 548 F(TransitionElementsKind, 2, 1) \ |
| 476 F(HaveSameMap, 2, 1) \ | 549 F(HaveSameMap, 2, 1) \ |
| 477 F(IsAccessCheckNeeded, 1, 1) | 550 F(IsAccessCheckNeeded, 1, 1) |
| 478 | 551 |
| 479 | 552 |
| 480 #ifdef ENABLE_DEBUGGER_SUPPORT | 553 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 481 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ | 554 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ |
| 482 /* Debugger support*/ \ | 555 /* Debugger support*/ \ |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 enum TypedArrayId { | 905 enum TypedArrayId { |
| 833 // arrayIds below should be synchromized with typedarray.js natives. | 906 // arrayIds below should be synchromized with typedarray.js natives. |
| 834 ARRAY_ID_UINT8 = 1, | 907 ARRAY_ID_UINT8 = 1, |
| 835 ARRAY_ID_INT8 = 2, | 908 ARRAY_ID_INT8 = 2, |
| 836 ARRAY_ID_UINT16 = 3, | 909 ARRAY_ID_UINT16 = 3, |
| 837 ARRAY_ID_INT16 = 4, | 910 ARRAY_ID_INT16 = 4, |
| 838 ARRAY_ID_UINT32 = 5, | 911 ARRAY_ID_UINT32 = 5, |
| 839 ARRAY_ID_INT32 = 6, | 912 ARRAY_ID_INT32 = 6, |
| 840 ARRAY_ID_FLOAT32 = 7, | 913 ARRAY_ID_FLOAT32 = 7, |
| 841 ARRAY_ID_FLOAT64 = 8, | 914 ARRAY_ID_FLOAT64 = 8, |
| 842 ARRAY_ID_UINT8C = 9 | 915 ARRAY_ID_UINT8C = 9, |
| 916 ARRAY_ID_FLOAT32x4 = 10, |
| 917 ARRAY_ID_INT32x4 = 11 |
| 843 }; | 918 }; |
| 844 | 919 |
| 845 static void ArrayIdToTypeAndSize(int array_id, | 920 static void ArrayIdToTypeAndSize(int array_id, |
| 846 ExternalArrayType *type, size_t *element_size); | 921 ExternalArrayType *type, size_t *element_size); |
| 847 | 922 |
| 848 // Helper functions used stubs. | 923 // Helper functions used stubs. |
| 849 static void PerformGC(Object* result, Isolate* isolate); | 924 static void PerformGC(Object* result, Isolate* isolate); |
| 850 | 925 |
| 851 // Used in runtime.cc and hydrogen's VisitArrayLiteral. | 926 // Used in runtime.cc and hydrogen's VisitArrayLiteral. |
| 852 static Handle<Object> CreateArrayLiteralBoilerplate( | 927 static Handle<Object> CreateArrayLiteralBoilerplate( |
| 853 Isolate* isolate, | 928 Isolate* isolate, |
| 854 Handle<FixedArray> literals, | 929 Handle<FixedArray> literals, |
| 855 Handle<FixedArray> elements); | 930 Handle<FixedArray> elements); |
| 856 }; | 931 }; |
| 857 | 932 |
| 858 | 933 |
| 859 //--------------------------------------------------------------------------- | 934 //--------------------------------------------------------------------------- |
| 860 // Constants used by interface to runtime functions. | 935 // Constants used by interface to runtime functions. |
| 861 | 936 |
| 862 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 937 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; |
| 863 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 938 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; |
| 864 | 939 |
| 865 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 940 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
| 866 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 941 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
| 867 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; | 942 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; |
| 868 | 943 |
| 869 } } // namespace v8::internal | 944 } } // namespace v8::internal |
| 870 | 945 |
| 871 #endif // V8_RUNTIME_H_ | 946 #endif // V8_RUNTIME_H_ |
| OLD | NEW |