| Index: src/runtime/runtime.cc
|
| diff --git a/src/runtime/runtime.cc b/src/runtime/runtime.cc
|
| index a490327af5266b5aac5e4cbe99a0f73cfa0a4797..af53c265b753e27afee5ce03d0fdde3dd4b9252b 100644
|
| --- a/src/runtime/runtime.cc
|
| +++ b/src/runtime/runtime.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "src/runtime/runtime.h"
|
|
|
| +#include "src/contexts.h"
|
| #include "src/handles-inl.h"
|
| #include "src/heap/heap.h"
|
| #include "src/isolate.h"
|
| @@ -26,25 +27,35 @@ FOR_EACH_INTRINSIC_RETURN_PAIR(P)
|
| #undef P
|
|
|
|
|
| -#define F(name, number_of_args, result_size) \
|
| - { \
|
| - Runtime::k##name, Runtime::RUNTIME, #name, FUNCTION_ADDR(Runtime_##name), \
|
| - number_of_args, result_size \
|
| - } \
|
| +#define F(name, number_of_args, result_size) \
|
| + { \
|
| + Runtime::k##name, Runtime::RUNTIME, #name, \
|
| + {FUNCTION_ADDR(Runtime_##name)}, number_of_args, result_size \
|
| + } \
|
| ,
|
|
|
|
|
| -#define I(name, number_of_args, result_size) \
|
| - { \
|
| - Runtime::kInline##name, Runtime::INLINE, "_" #name, \
|
| - FUNCTION_ADDR(Runtime_##name), number_of_args, result_size \
|
| - } \
|
| +#define I(name, number_of_args, result_size) \
|
| + { \
|
| + Runtime::kInline##name, Runtime::INLINE, "_" #name, \
|
| + {FUNCTION_ADDR(Runtime_##name)}, number_of_args, result_size \
|
| + } \
|
| ,
|
|
|
| +#define C(index, type, name) \
|
| + { \
|
| + Runtime::kContext_##name, Runtime::CONTEXT, #name, \
|
| + {reinterpret_cast<Address>(Context::index)}, -1, 0 \
|
| + } \
|
| + ,
|
|
|
| static const Runtime::Function kIntrinsicFunctions[] = {
|
| - FOR_EACH_INTRINSIC(F) FOR_EACH_INTRINSIC(I)};
|
| + FOR_EACH_INTRINSIC(F)
|
| + FOR_EACH_INTRINSIC(I)
|
| + NATIVE_CONTEXT_IMPORTED_FIELDS(C)
|
| +};
|
|
|
| +#undef C
|
| #undef I
|
| #undef F
|
|
|
| @@ -79,7 +90,8 @@ const Runtime::Function* Runtime::FunctionForName(Handle<String> name) {
|
|
|
| const Runtime::Function* Runtime::FunctionForEntry(Address entry) {
|
| for (size_t i = 0; i < arraysize(kIntrinsicFunctions); ++i) {
|
| - if (entry == kIntrinsicFunctions[i].entry) {
|
| + if (kIntrinsicFunctions[i].intrinsic_type == RUNTIME &&
|
| + entry == kIntrinsicFunctions[i].entry) {
|
| return &(kIntrinsicFunctions[i]);
|
| }
|
| }
|
|
|