// Just jump to runtime to create the sub string.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kSubString, 3, 1);
+ __ TailCallRuntime(Runtime::kSubStringRT, 3, 1);
__ bind(&single_char);
// r0: original string
// Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
} else {
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
__ bind(&miss);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
} else {
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
__ Bind(&miss);
__ Ret();
__ Bind(&runtime);
- __ TailCallRuntime(Runtime::kSubString, 3, 1);
+ __ TailCallRuntime(Runtime::kSubStringRT, 3, 1);
__ bind(&single_char);
// x1: result_length
// Call the runtime.
// Returns -1 (less), 0 (equal), or 1 (greater) tagged as a small integer.
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
void RegExpConstructResultStub::InitializeDescriptor(
CodeStubDescriptor* descriptor) {
descriptor->Initialize(
- Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry);
+ Runtime::FunctionForId(Runtime::kRegExpConstructResultRT)->entry);
}
void StringAddStub::InitializeDescriptor(CodeStubDescriptor* descriptor) {
- descriptor->Initialize(Runtime::FunctionForId(Runtime::kStringAdd)->entry);
+ descriptor->Initialize(Runtime::FunctionForId(Runtime::kStringAddRT)->entry);
}
case Runtime::kPushCatchContext:
case Runtime::kReThrow:
case Runtime::kSetProperty: // TODO(jarin): Is it safe?
- case Runtime::kStringCompare:
+ case Runtime::kStringCompareRT:
case Runtime::kStringEquals:
case Runtime::kToFastProperties: // TODO(jarin): Is it safe?
case Runtime::kTraceEnter:
Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) {
CEntryStub stub(jsgraph()->isolate(), 1);
Runtime::FunctionId f =
- requires_ordering ? Runtime::kStringCompare : Runtime::kStringEquals;
+ requires_ordering ? Runtime::kStringCompareRT : Runtime::kStringEquals;
ExternalReference ref(f, jsgraph()->isolate());
Operator::Properties props = node->op()->properties();
// TODO(mstarzinger): We should call StringCompareStub here instead, once an
{
// Fallback to the runtime to add the two strings.
Add<HPushArguments>(left, right);
- Push(Add<HCallRuntime>(
- isolate()->factory()->empty_string(),
- Runtime::FunctionForId(Runtime::kStringAdd),
- 2));
+ Push(Add<HCallRuntime>(isolate()->factory()->empty_string(),
+ Runtime::FunctionForId(Runtime::kStringAddRT), 2));
}
if_sameencodingandsequential.End();
}
// Just jump to runtime to create the sub string.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kSubString, 3, 1);
+ __ TailCallRuntime(Runtime::kSubStringRT, 3, 1);
__ bind(&single_char);
// eax: string
// Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
} else {
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
__ bind(&miss);
// Just jump to runtime to create the sub string.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kSubString, 3, 1);
+ __ TailCallRuntime(Runtime::kSubStringRT, 3, 1);
__ bind(&single_char);
// v0: original string
StringHelper::GenerateCompareFlatOneByteStrings(masm, a1, a0, a2, a3, t0, t1);
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
} else {
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
__ bind(&miss);
// Just jump to runtime to create the sub string.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kSubString, 3, 1);
+ __ TailCallRuntime(Runtime::kSubStringRT, 3, 1);
__ bind(&single_char);
// v0: original string
StringHelper::GenerateCompareFlatOneByteStrings(masm, a1, a0, a2, a3, a4, a5);
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
} else {
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
__ bind(&miss);
// Just jump to runtime to create the sub string.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kSubString, 3, 1);
+ __ TailCallRuntime(Runtime::kSubStringRT, 3, 1);
__ bind(&single_char);
// r3: original string
// Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
} else {
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
__ bind(&miss);
}
-RUNTIME_FUNCTION(Runtime_RegExpConstructResult) {
+RUNTIME_FUNCTION(Runtime_RegExpConstructResultRT) {
HandleScope handle_scope(isolate);
DCHECK(args.length() == 3);
CONVERT_SMI_ARG_CHECKED(size, 0);
}
+RUNTIME_FUNCTION(Runtime_RegExpConstructResult) {
+ SealHandleScope shs(isolate);
+ return __RT_impl_Runtime_RegExpConstructResultRT(args, isolate);
+}
+
+
static JSRegExp::Flags RegExpFlagsFromString(Handle<String> flags,
bool* success) {
uint32_t value = JSRegExp::NONE;
}
-RUNTIME_FUNCTION(Runtime_SubString) {
+RUNTIME_FUNCTION(Runtime_SubStringRT) {
HandleScope scope(isolate);
DCHECK(args.length() == 3);
}
-RUNTIME_FUNCTION(Runtime_StringAdd) {
+RUNTIME_FUNCTION(Runtime_SubString) {
+ SealHandleScope shs(isolate);
+ return __RT_impl_Runtime_SubStringRT(args, isolate);
+}
+
+
+RUNTIME_FUNCTION(Runtime_StringAddRT) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(String, str1, 0);
}
+RUNTIME_FUNCTION(Runtime_StringAdd) {
+ SealHandleScope shs(isolate);
+ return __RT_impl_Runtime_StringAddRT(args, isolate);
+}
+
+
RUNTIME_FUNCTION(Runtime_InternalizeString) {
HandleScope handles(isolate);
RUNTIME_ASSERT(args.length() == 1);
}
-RUNTIME_FUNCTION(Runtime_StringCompare) {
+RUNTIME_FUNCTION(Runtime_StringCompareRT) {
HandleScope handle_scope(isolate);
DCHECK(args.length() == 2);
}
+RUNTIME_FUNCTION(Runtime_StringCompare) {
+ SealHandleScope shs(isolate);
+ return __RT_impl_Runtime_StringCompareRT(args, isolate);
+}
+
+
RUNTIME_FUNCTION(Runtime_StringBuilderConcat) {
HandleScope scope(isolate);
DCHECK(args.length() == 3);
static const Runtime::Function kIntrinsicFunctions[] = {
- RUNTIME_FUNCTION_LIST(F) INLINE_OPTIMIZED_FUNCTION_LIST(F)
- INLINE_FUNCTION_LIST(I) INLINE_OPTIMIZED_FUNCTION_LIST(I)};
+ RUNTIME_FUNCTION_LIST(F) INLINE_FUNCTION_LIST(F)
+ INLINE_OPTIMIZED_FUNCTION_LIST(F) INLINE_FUNCTION_LIST(I)
+ INLINE_OPTIMIZED_FUNCTION_LIST(I)};
#undef I
#undef F
#define RUNTIME_FUNCTION_LIST_ALWAYS_3(F) \
/* String and Regexp */ \
F(NumberToStringRT, 1, 1) \
- F(RegExpConstructResult, 3, 1) \
+ F(RegExpConstructResultRT, 3, 1) \
F(RegExpExecRT, 4, 1) \
- F(StringAdd, 2, 1) \
- F(SubString, 3, 1) \
+ F(StringAddRT, 2, 1) \
+ F(SubStringRT, 3, 1) \
F(InternalizeString, 1, 1) \
- F(StringCompare, 2, 1) \
+ F(StringCompareRT, 2, 1) \
F(StringCharCodeAtRT, 2, 1) \
F(GetFromCacheRT, 2, 1) \
\
public:
enum FunctionId {
#define F(name, nargs, ressize) k##name,
- RUNTIME_FUNCTION_LIST(F) INLINE_OPTIMIZED_FUNCTION_LIST(F)
+#define I(name, nargs, ressize) kInline##name,
+ RUNTIME_FUNCTION_LIST(F) INLINE_FUNCTION_LIST(F)
+ INLINE_OPTIMIZED_FUNCTION_LIST(F) INLINE_FUNCTION_LIST(I)
+ INLINE_OPTIMIZED_FUNCTION_LIST(I)
+#undef I
#undef F
-#define F(name, nargs, ressize) kInline##name,
- INLINE_FUNCTION_LIST(F) INLINE_OPTIMIZED_FUNCTION_LIST(F)
-#undef F
- kNumFunctions,
+ kNumFunctions,
// TODO(svenpanne) The values below are cruel hacks, remove them!
kFirstInlineFunction = kInlineIsSmi,
kLastInlineFunction = kInlineDebugIsActive
// Just jump to runtime to create the sub string.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kSubString, 3, 1);
+ __ TailCallRuntime(Runtime::kSubStringRT, 3, 1);
__ bind(&single_char);
// rax: string
// Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
} else {
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
__ bind(&miss);
// Just jump to runtime to create the sub string.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kSubString, 3, 1);
+ __ TailCallRuntime(Runtime::kSubStringRT, 3, 1);
__ bind(&single_char);
// eax: string
// Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ bind(&runtime);
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
} else {
- __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
+ __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
}
__ bind(&miss);
// Flags: --allow-natives-syntax
-assertEquals(-1, %StringCompare("abc\u0102", "abc\u0201"));
+assertEquals(-1, %StringCompareRT("abc\u0102", "abc\u0201"));