| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 34fd089cc679b1d16487793ca9d08be826a2c02e..05fcb062f330704b8eef4c3f536a3586fb8bf7a3 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -2598,7 +2598,7 @@ RUNTIME_FUNCTION(MaybeObject*,
|
| }
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpExec) {
|
| +RUNTIME_FUNCTION(MaybeObject*, RuntimeHidden_RegExpExec) {
|
| HandleScope scope(isolate);
|
| ASSERT(args.length() == 4);
|
| CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
|
| @@ -2619,7 +2619,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpExec) {
|
| }
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpConstructResult) {
|
| +RUNTIME_FUNCTION(MaybeObject*, RuntimeHidden_RegExpConstructResult) {
|
| SealHandleScope shs(isolate);
|
| ASSERT(args.length() == 3);
|
| CONVERT_SMI_ARG_CHECKED(elements_count, 0);
|
| @@ -3281,7 +3281,7 @@ MUST_USE_RESULT static MaybeObject* CharFromCode(Isolate* isolate,
|
| }
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_StringCharCodeAt) {
|
| +RUNTIME_FUNCTION(MaybeObject*, RuntimeHidden_StringCharCodeAt) {
|
| SealHandleScope shs(isolate);
|
| ASSERT(args.length() == 2);
|
|
|
| @@ -4551,7 +4551,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringLocaleCompare) {
|
| }
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_SubString) {
|
| +RUNTIME_FUNCTION(MaybeObject*, RuntimeHidden_SubString) {
|
| HandleScope scope(isolate);
|
| ASSERT(args.length() == 3);
|
|
|
| @@ -6915,7 +6915,7 @@ bool Runtime::IsUpperCaseChar(RuntimeState* runtime_state, uint16_t ch) {
|
| }
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToString) {
|
| +RUNTIME_FUNCTION(MaybeObject*, RuntimeHidden_NumberToString) {
|
| SealHandleScope shs(isolate);
|
| ASSERT(args.length() == 1);
|
|
|
| @@ -7119,7 +7119,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberImul) {
|
| }
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_StringAdd) {
|
| +RUNTIME_FUNCTION(MaybeObject*, RuntimeHidden_StringAdd) {
|
| HandleScope scope(isolate);
|
| ASSERT(args.length() == 2);
|
| CONVERT_ARG_HANDLE_CHECKED(String, str1, 0);
|
| @@ -7742,7 +7742,7 @@ static Object* FlatStringCompare(String* x, String* y) {
|
| }
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_StringCompare) {
|
| +RUNTIME_FUNCTION(MaybeObject*, RuntimeHidden_StringCompare) {
|
| SealHandleScope shs(isolate);
|
| ASSERT(args.length() == 2);
|
|
|
| @@ -14584,7 +14584,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_TryMigrateInstance) {
|
| }
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFromCache) {
|
| +RUNTIME_FUNCTION(MaybeObject*, RuntimeHidden_GetFromCache) {
|
| SealHandleScope shs(isolate);
|
| // This is only called from codegen, so checks might be more lax.
|
| CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0);
|
| @@ -14706,6 +14706,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ListNatives) {
|
| #define COUNT_ENTRY(Name, argc, ressize) + 1
|
| int entry_count = 0
|
| RUNTIME_FUNCTION_LIST(COUNT_ENTRY)
|
| + RUNTIME_HIDDEN_FUNCTION_LIST(COUNT_ENTRY)
|
| INLINE_FUNCTION_LIST(COUNT_ENTRY);
|
| #undef COUNT_ENTRY
|
| Factory* factory = isolate->factory();
|
| @@ -14732,6 +14733,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ListNatives) {
|
| }
|
| inline_runtime_functions = false;
|
| RUNTIME_FUNCTION_LIST(ADD_ENTRY)
|
| + // Calling hidden runtime functions should just throw.
|
| + RUNTIME_HIDDEN_FUNCTION_LIST(ADD_ENTRY)
|
| inline_runtime_functions = true;
|
| INLINE_FUNCTION_LIST(ADD_ENTRY)
|
| #undef ADD_ENTRY
|
| @@ -14742,7 +14745,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ListNatives) {
|
| #endif
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_Log) {
|
| +RUNTIME_FUNCTION(MaybeObject*, RuntimeHidden_Log) {
|
| HandleScope handle_scope(isolate);
|
| ASSERT(args.length() == 2);
|
| CONVERT_ARG_HANDLE_CHECKED(String, format, 0);
|
| @@ -15098,16 +15101,31 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_MaxSmi) {
|
| FUNCTION_ADDR(Runtime_##name), number_of_args, result_size },
|
|
|
|
|
| +#define FH(name, number_of_args, result_size) \
|
| + { Runtime::kHidden##name, Runtime::RUNTIME_HIDDEN, NULL, \
|
| + FUNCTION_ADDR(RuntimeHidden_##name), number_of_args, result_size },
|
| +
|
| +
|
| #define I(name, number_of_args, result_size) \
|
| { Runtime::kInline##name, Runtime::INLINE, \
|
| "_" #name, NULL, number_of_args, result_size },
|
|
|
| +
|
| +#define IO(name, number_of_args, result_size) \
|
| + { Runtime::kInlineOptimized##name, Runtime::INLINE_OPTIMIZED, \
|
| + "_" #name, FUNCTION_ADDR(Runtime_##name), number_of_args, result_size },
|
| +
|
| +
|
| static const Runtime::Function kIntrinsicFunctions[] = {
|
| RUNTIME_FUNCTION_LIST(F)
|
| + RUNTIME_HIDDEN_FUNCTION_LIST(FH)
|
| INLINE_FUNCTION_LIST(I)
|
| + INLINE_OPTIMIZED_FUNCTION_LIST(IO)
|
| };
|
|
|
| +#undef IO
|
| #undef I
|
| +#undef FH
|
| #undef F
|
|
|
|
|
| @@ -15116,9 +15134,11 @@ MaybeObject* Runtime::InitializeIntrinsicFunctionNames(Heap* heap,
|
| ASSERT(dictionary != NULL);
|
| ASSERT(NameDictionary::cast(dictionary)->NumberOfElements() == 0);
|
| for (int i = 0; i < kNumFunctions; ++i) {
|
| + const char* name = kIntrinsicFunctions[i].name;
|
| + if (name == NULL) continue;
|
| Object* name_string;
|
| { MaybeObject* maybe_name_string =
|
| - heap->InternalizeUtf8String(kIntrinsicFunctions[i].name);
|
| + heap->InternalizeUtf8String(name);
|
| if (!maybe_name_string->ToObject(&name_string)) return maybe_name_string;
|
| }
|
| NameDictionary* name_dictionary = NameDictionary::cast(dictionary);
|
|
|