summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode/ExitKind.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/bytecode/ExitKind.h
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/bytecode/ExitKind.h')
-rw-r--r--Source/JavaScriptCore/bytecode/ExitKind.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/Source/JavaScriptCore/bytecode/ExitKind.h b/Source/JavaScriptCore/bytecode/ExitKind.h
index 22a54a1a9..a9f6df6d4 100644
--- a/Source/JavaScriptCore/bytecode/ExitKind.h
+++ b/Source/JavaScriptCore/bytecode/ExitKind.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,16 +28,16 @@
namespace JSC {
-enum ExitKind : uint8_t {
+enum ExitKind {
ExitKindUnset,
BadType, // We exited because a type prediction was wrong.
- BadCell, // We exited because we made an incorrect assumption about what cell we would see. Usually used for function checks.
- BadIdent, // We exited because we made an incorrect assumption about what identifier we would see. Usually used for cached Id check in get_by_val.
+ BadFunction, // We exited because we made an incorrect assumption about what function we would see.
BadExecutable, // We exited because we made an incorrect assumption about what executable we would see.
BadCache, // We exited because an inline cache was wrong.
- BadConstantCache, // We exited because a cache on a weak constant (usually a prototype) was wrong.
+ BadWeakConstantCache, // We exited because a cache on a weak constant (usually a prototype) was wrong.
+ BadCacheWatchpoint, // Same as BadCache but from a watchpoint.
+ BadWeakConstantCacheWatchpoint, // Same as BadWeakConstantCache but from a watchpoint.
BadIndexingType, // We exited because an indexing type was wrong.
- BadTypeInfoFlags, // We exited because we made an incorrect assumption about what TypeInfo flags we would see.
Overflow, // We exited because of overflow.
NegativeZero, // We exited because we encountered negative zero.
Int52Overflow, // We exited because of an Int52 overflow.
@@ -46,20 +46,28 @@ enum ExitKind : uint8_t {
OutOfBounds, // We had an out-of-bounds access to an array.
InadequateCoverage, // We exited because we ended up in code that didn't have profiling coverage.
ArgumentsEscaped, // We exited because arguments escaped but we didn't expect them to.
- ExoticObjectMode, // We exited because some exotic object that we were accessing was in an exotic mode (like Arguments with slow arguments).
NotStringObject, // We exited because we shouldn't have attempted to optimize string object access.
- VarargsOverflow, // We exited because a varargs call passed more arguments than we expected.
- TDZFailure, // We exited because we were in the TDZ and accessed the variable.
Uncountable, // We exited for none of the above reasons, and we should not count it. Most uses of this should be viewed as a FIXME.
UncountableInvalidation, // We exited because the code block was invalidated; this means that we've already counted the reasons why the code block was invalidated.
+ UncountableWatchpoint, // We exited because of a watchpoint, which isn't counted because watchpoints do tracking themselves.
WatchdogTimerFired, // We exited because we need to service the watchdog timer.
- DebuggerEvent, // We exited because we need to service the debugger.
- ExceptionCheck, // We exited because a direct exception check showed that we threw an exception from a C call.
- GenericUnwind, // We exited because a we arrived at this OSR exit from genericUnwind.
+ DebuggerEvent // We exited because we need to service the debugger.
};
const char* exitKindToString(ExitKind);
-bool exitKindMayJettison(ExitKind);
+bool exitKindIsCountable(ExitKind);
+
+inline bool isWatchpoint(ExitKind kind)
+{
+ switch (kind) {
+ case BadCacheWatchpoint:
+ case BadWeakConstantCacheWatchpoint:
+ case UncountableWatchpoint:
+ return true;
+ default:
+ return false;
+ }
+}
} // namespace JSC