Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: src/code-factory.h

Issue 2638393002: [builtins] Add String.prototype.indexOf fast path in TF (Closed)
Patch Set: update comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/code-factory.h
diff --git a/src/code-factory.h b/src/code-factory.h
index 2500ebd27435b24931f4ffc8944254943630394c..46f9b806f18cd79f5f16d1fdb4ed27ba852bf2f0 100644
--- a/src/code-factory.h
+++ b/src/code-factory.h
@@ -69,75 +69,31 @@ class V8_EXPORT_PRIVATE CodeFactory final {
// Code stubs. Add methods here as needed to reduce dependency on
// code-stubs.h.
- static Callable InstanceOf(Isolate* isolate);
- static Callable OrdinaryHasInstance(Isolate* isolate);
-
- static Callable StringFromCharCode(Isolate* isolate);
-
- static Callable GetProperty(Isolate* isolate);
-
- static Callable ToBoolean(Isolate* isolate);
-
- static Callable ToNumber(Isolate* isolate);
- static Callable NonNumberToNumber(Isolate* isolate);
- static Callable StringToNumber(Isolate* isolate);
- static Callable ToString(Isolate* isolate);
- static Callable ToName(Isolate* isolate);
- static Callable ToInteger(Isolate* isolate);
- static Callable ToLength(Isolate* isolate);
- static Callable ToObject(Isolate* isolate);
- static Callable NonPrimitiveToPrimitive(
- Isolate* isolate, ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
- static Callable OrdinaryToPrimitive(Isolate* isolate,
- OrdinaryToPrimitiveHint hint);
- static Callable NumberToString(Isolate* isolate);
-
- static Callable RegExpExec(Isolate* isolate);
-
static Callable Add(Isolate* isolate);
- static Callable Subtract(Isolate* isolate);
- static Callable Multiply(Isolate* isolate);
- static Callable Divide(Isolate* isolate);
- static Callable Modulus(Isolate* isolate);
- static Callable ShiftRight(Isolate* isolate);
- static Callable ShiftRightLogical(Isolate* isolate);
- static Callable ShiftLeft(Isolate* isolate);
+ static Callable AllocateHeapNumber(Isolate* isolate);
+ static Callable ArgumentAdaptor(Isolate* isolate);
+ static Callable ArrayPush(Isolate* isolate);
static Callable BitwiseAnd(Isolate* isolate);
static Callable BitwiseOr(Isolate* isolate);
static Callable BitwiseXor(Isolate* isolate);
- static Callable LessThan(Isolate* isolate);
- static Callable LessThanOrEqual(Isolate* isolate);
- static Callable GreaterThan(Isolate* isolate);
- static Callable GreaterThanOrEqual(Isolate* isolate);
+ static Callable CallFunction(
+ Isolate* isolate, ConvertReceiverMode mode = ConvertReceiverMode::kAny);
+ static Callable Call(Isolate* isolate,
+ ConvertReceiverMode mode = ConvertReceiverMode::kAny,
+ TailCallMode tail_call_mode = TailCallMode::kDisallow);
+ static Callable ConstructFunction(Isolate* isolate);
+ static Callable Construct(Isolate* isolate);
+ static Callable CopyFastSmiOrObjectElements(Isolate* isolate);
+ static Callable CreateIterResultObject(Isolate* isolate);
+ static Callable Divide(Isolate* isolate);
static Callable Equal(Isolate* isolate);
- static Callable NotEqual(Isolate* isolate);
- static Callable StrictEqual(Isolate* isolate);
- static Callable StrictNotEqual(Isolate* isolate);
-
- static Callable StringAdd(Isolate* isolate, StringAddFlags flags,
- PretenureFlag pretenure_flag);
- static Callable StringCharAt(Isolate* isolate);
- static Callable StringCharCodeAt(Isolate* isolate);
- static Callable StringCompare(Isolate* isolate, Token::Value token);
- static Callable StringEqual(Isolate* isolate);
- static Callable StringNotEqual(Isolate* isolate);
- static Callable StringLessThan(Isolate* isolate);
- static Callable StringLessThanOrEqual(Isolate* isolate);
- static Callable StringGreaterThan(Isolate* isolate);
- static Callable StringGreaterThanOrEqual(Isolate* isolate);
- static Callable SubString(Isolate* isolate);
-
- static Callable Typeof(Isolate* isolate);
- static Callable GetSuperConstructor(Isolate* isolate);
-
static Callable FastCloneRegExp(Isolate* isolate);
static Callable FastCloneShallowArray(Isolate* isolate,
AllocationSiteMode allocation_mode);
static Callable FastCloneShallowObject(Isolate* isolate, int length);
-
+ static Callable FastNewClosure(Isolate* isolate);
static Callable FastNewFunctionContext(Isolate* isolate,
ScopeType scope_type);
- static Callable FastNewClosure(Isolate* isolate);
static Callable FastNewObject(Isolate* isolate);
static Callable FastNewRestParameter(Isolate* isolate,
bool skip_stub_frame = false);
@@ -145,44 +101,74 @@ class V8_EXPORT_PRIVATE CodeFactory final {
bool skip_stub_frame = false);
static Callable FastNewStrictArguments(Isolate* isolate,
bool skip_stub_frame = false);
-
- static Callable CopyFastSmiOrObjectElements(Isolate* isolate);
+ static Callable ForInFilter(Isolate* isolate);
+ static Callable FunctionPrototypeBind(Isolate* isolate);
+ static Callable GetProperty(Isolate* isolate);
+ static Callable GetSuperConstructor(Isolate* isolate);
+ static Callable GreaterThan(Isolate* isolate);
+ static Callable GreaterThanOrEqual(Isolate* isolate);
static Callable GrowFastDoubleElements(Isolate* isolate);
static Callable GrowFastSmiOrObjectElements(Isolate* isolate);
-
- static Callable NewUnmappedArgumentsElements(Isolate* isolate);
- static Callable NewRestParameterElements(Isolate* isolate);
-
- static Callable AllocateHeapNumber(Isolate* isolate);
-#define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \
- static Callable Allocate##Type(Isolate* isolate);
- SIMD128_TYPES(SIMD128_ALLOC)
-#undef SIMD128_ALLOC
-
- static Callable ArgumentAdaptor(Isolate* isolate);
- static Callable Call(Isolate* isolate,
- ConvertReceiverMode mode = ConvertReceiverMode::kAny,
- TailCallMode tail_call_mode = TailCallMode::kDisallow);
- static Callable CallFunction(
- Isolate* isolate, ConvertReceiverMode mode = ConvertReceiverMode::kAny);
- static Callable Construct(Isolate* isolate);
- static Callable ConstructFunction(Isolate* isolate);
- static Callable CreateIterResultObject(Isolate* isolate);
static Callable HasProperty(Isolate* isolate);
- static Callable ForInFilter(Isolate* isolate);
-
+ static Callable InstanceOf(Isolate* isolate);
+ static Callable InterpreterCEntry(Isolate* isolate, int result_size = 1);
+ static Callable InterpreterOnStackReplacement(Isolate* isolate);
static Callable InterpreterPushArgsAndCall(
Isolate* isolate, TailCallMode tail_call_mode,
CallableType function_type = CallableType::kAny);
+ static Callable InterpreterPushArgsAndConstructArray(Isolate* isolate);
static Callable InterpreterPushArgsAndConstruct(
Isolate* isolate, CallableType function_type = CallableType::kAny);
- static Callable InterpreterPushArgsAndConstructArray(Isolate* isolate);
- static Callable InterpreterCEntry(Isolate* isolate, int result_size = 1);
- static Callable InterpreterOnStackReplacement(Isolate* isolate);
-
- static Callable ArrayPush(Isolate* isolate);
- static Callable FunctionPrototypeBind(Isolate* isolate);
+ static Callable LessThan(Isolate* isolate);
+ static Callable LessThanOrEqual(Isolate* isolate);
+ static Callable Modulus(Isolate* isolate);
+ static Callable Multiply(Isolate* isolate);
+ static Callable NewRestParameterElements(Isolate* isolate);
+ static Callable NewUnmappedArgumentsElements(Isolate* isolate);
+ static Callable NonNumberToNumber(Isolate* isolate);
+ static Callable NonPrimitiveToPrimitive(
+ Isolate* isolate, ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
+ static Callable NotEqual(Isolate* isolate);
+ static Callable NumberToString(Isolate* isolate);
+ static Callable OrdinaryHasInstance(Isolate* isolate);
+ static Callable OrdinaryToPrimitive(Isolate* isolate,
+ OrdinaryToPrimitiveHint hint);
static Callable PromiseHandleReject(Isolate* isolate);
+ static Callable RegExpExec(Isolate* isolate);
+ static Callable ShiftLeft(Isolate* isolate);
+ static Callable ShiftRight(Isolate* isolate);
+ static Callable ShiftRightLogical(Isolate* isolate);
+ static Callable StrictEqual(Isolate* isolate);
+ static Callable StrictNotEqual(Isolate* isolate);
+ static Callable StringAdd(Isolate* isolate, StringAddFlags flags,
+ PretenureFlag pretenure_flag);
+ static Callable StringCharAt(Isolate* isolate);
+ static Callable StringCharCodeAt(Isolate* isolate);
+ static Callable StringCompare(Isolate* isolate, Token::Value token);
+ static Callable StringEqual(Isolate* isolate);
+ static Callable StringFromCharCode(Isolate* isolate);
+ static Callable StringGreaterThan(Isolate* isolate);
+ static Callable StringGreaterThanOrEqual(Isolate* isolate);
+ static Callable StringIndexOf(Isolate* isolate);
+ static Callable StringLessThan(Isolate* isolate);
+ static Callable StringLessThanOrEqual(Isolate* isolate);
+ static Callable StringNotEqual(Isolate* isolate);
+ static Callable StringToNumber(Isolate* isolate);
+ static Callable SubString(Isolate* isolate);
+ static Callable Subtract(Isolate* isolate);
+ static Callable ToBoolean(Isolate* isolate);
+ static Callable ToInteger(Isolate* isolate);
+ static Callable ToLength(Isolate* isolate);
+ static Callable ToName(Isolate* isolate);
+ static Callable ToNumber(Isolate* isolate);
+ static Callable ToObject(Isolate* isolate);
+ static Callable ToString(Isolate* isolate);
+ static Callable Typeof(Isolate* isolate);
+
+#define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \
+ static Callable Allocate##Type(Isolate* isolate);
+ SIMD128_TYPES(SIMD128_ALLOC)
+#undef SIMD128_ALLOC
};
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698