[DFG][FTL] Support MapSet / SetAdd intrinsics
[WebKit-https.git] / Source / JavaScriptCore / runtime / Intrinsic.h
index 33f2d62..dca7c39 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (C) 2011, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef Intrinsic_h
-#define Intrinsic_h
+#pragma once
 
 namespace JSC {
 
 
 namespace JSC {
 
-enum JS_EXPORT_PRIVATE Intrinsic {
+enum Intrinsic {
     // Call intrinsics.
     NoIntrinsic,
     AbsIntrinsic,
     // Call intrinsics.
     NoIntrinsic,
     AbsIntrinsic,
+    ACosIntrinsic,
+    ASinIntrinsic,
+    ATanIntrinsic,
+    ACoshIntrinsic,
+    ASinhIntrinsic,
+    ATanhIntrinsic,
     MinIntrinsic,
     MaxIntrinsic,
     SqrtIntrinsic,
     SinIntrinsic,
     MinIntrinsic,
     MaxIntrinsic,
     SqrtIntrinsic,
     SinIntrinsic,
+    CbrtIntrinsic,
     Clz32Intrinsic,
     CosIntrinsic,
     TanIntrinsic,
     Clz32Intrinsic,
     CosIntrinsic,
     TanIntrinsic,
+    CoshIntrinsic,
+    SinhIntrinsic,
+    TanhIntrinsic,
     ArrayPushIntrinsic,
     ArrayPopIntrinsic,
     ArrayPushIntrinsic,
     ArrayPopIntrinsic,
+    ArraySliceIntrinsic,
+    ArrayIndexOfIntrinsic,
     CharCodeAtIntrinsic,
     CharAtIntrinsic,
     FromCharCodeIntrinsic,
     CharCodeAtIntrinsic,
     CharAtIntrinsic,
     FromCharCodeIntrinsic,
@@ -49,28 +60,61 @@ enum JS_EXPORT_PRIVATE Intrinsic {
     CeilIntrinsic,
     RoundIntrinsic,
     ExpIntrinsic,
     CeilIntrinsic,
     RoundIntrinsic,
     ExpIntrinsic,
+    Expm1Intrinsic,
     LogIntrinsic,
     LogIntrinsic,
+    Log10Intrinsic,
+    Log1pIntrinsic,
+    Log2Intrinsic,
     RegExpExecIntrinsic,
     RegExpTestIntrinsic,
     RegExpTestFastIntrinsic,
     RegExpExecIntrinsic,
     RegExpTestIntrinsic,
     RegExpTestFastIntrinsic,
+    ObjectGetPrototypeOfIntrinsic,
+    ReflectGetPrototypeOfIntrinsic,
     StringPrototypeValueOfIntrinsic,
     StringPrototypeReplaceIntrinsic,
     StringPrototypeReplaceRegExpIntrinsic,
     StringPrototypeValueOfIntrinsic,
     StringPrototypeReplaceIntrinsic,
     StringPrototypeReplaceRegExpIntrinsic,
+    StringPrototypeSliceIntrinsic,
+    StringPrototypeToLowerCaseIntrinsic,
+    NumberPrototypeToStringIntrinsic,
     IMulIntrinsic,
     RandomIntrinsic,
     FRoundIntrinsic,
     TruncIntrinsic,
     IMulIntrinsic,
     RandomIntrinsic,
     FRoundIntrinsic,
     TruncIntrinsic,
-    IsRegExpObjectIntrinsic,
     IsTypedArrayViewIntrinsic,
     BoundThisNoArgsFunctionCallIntrinsic,
     JSMapGetIntrinsic,
     JSMapHasIntrinsic,
     IsTypedArrayViewIntrinsic,
     BoundThisNoArgsFunctionCallIntrinsic,
     JSMapGetIntrinsic,
     JSMapHasIntrinsic,
+    JSMapSetIntrinsic,
+    JSMapBucketHeadIntrinsic,
+    JSMapBucketNextIntrinsic,
+    JSMapBucketKeyIntrinsic,
+    JSMapBucketValueIntrinsic,
     JSSetHasIntrinsic,
     JSSetHasIntrinsic,
+    JSSetAddIntrinsic,
+    JSSetBucketHeadIntrinsic,
+    JSSetBucketNextIntrinsic,
+    JSSetBucketKeyIntrinsic,
+    JSWeakMapGetIntrinsic,
+    HasOwnPropertyIntrinsic,
+    AtomicsAddIntrinsic,
+    AtomicsAndIntrinsic,
+    AtomicsCompareExchangeIntrinsic,
+    AtomicsExchangeIntrinsic,
+    AtomicsIsLockFreeIntrinsic,
+    AtomicsLoadIntrinsic,
+    AtomicsOrIntrinsic,
+    AtomicsStoreIntrinsic,
+    AtomicsSubIntrinsic,
+    AtomicsWaitIntrinsic,
+    AtomicsWakeIntrinsic,
+    AtomicsXorIntrinsic,
+    ParseIntIntrinsic,
 
     // Getter intrinsics.
     TypedArrayLengthIntrinsic,
     TypedArrayByteLengthIntrinsic,
     TypedArrayByteOffsetIntrinsic,
 
     // Getter intrinsics.
     TypedArrayLengthIntrinsic,
     TypedArrayByteLengthIntrinsic,
     TypedArrayByteOffsetIntrinsic,
+    UnderscoreProtoIntrinsic,
 
     // Debugging intrinsics. These are meant to be used as testing hacks within
     // jsc.cpp and should never be exposed to users.
 
     // Debugging intrinsics. These are meant to be used as testing hacks within
     // jsc.cpp and should never be exposed to users.
@@ -80,8 +124,24 @@ enum JS_EXPORT_PRIVATE Intrinsic {
     SetInt32HeapPredictionIntrinsic,
     CheckInt32Intrinsic,
     FiatInt52Intrinsic,
     SetInt32HeapPredictionIntrinsic,
     CheckInt32Intrinsic,
     FiatInt52Intrinsic,
+
+    // These are used for $vm performance debugging features.
+    CPUMfenceIntrinsic,
+    CPURdtscIntrinsic,
+    CPUCpuidIntrinsic,
+    CPUPauseIntrinsic,
 };
 
 };
 
+const char* intrinsicName(Intrinsic);
+
 } // namespace JSC
 
 } // namespace JSC
 
-#endif // Intrinsic_h
+namespace WTF {
+
+class PrintStream;
+
+void printInternal(PrintStream&, JSC::Intrinsic);
+
+} // namespace WTF
+
+