Chromium Code Reviews| Index: src/runtime/runtime.h |
| diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h |
| index 4048cfb9bbbd02bc169bcbd143be1187972b9eb3..637106f30810e4d6632e7f2e8b839c26b4802599 100644 |
| --- a/src/runtime/runtime.h |
| +++ b/src/runtime/runtime.h |
| @@ -6,6 +6,7 @@ |
| #define V8_RUNTIME_RUNTIME_H_ |
| #include "src/allocation.h" |
| +#include "src/contexts.h" |
| #include "src/objects.h" |
| #include "src/unicode.h" |
| #include "src/zone.h" |
| @@ -303,8 +304,7 @@ namespace internal { |
| #define FOR_EACH_INTRINSIC_INTERNAL(F) \ |
| F(CheckIsBootstrapping, 0, 1) \ |
| F(ExportPrivateSymbols, 1, 1) \ |
| - F(ImportToRuntime, 1, 1) \ |
| - F(ImportExperimentalToRuntime, 1, 1) \ |
| + F(ExportToRuntime, 1, 1) \ |
| F(InstallJSBuiltins, 1, 1) \ |
| F(Throw, 1, 1) \ |
| F(ReThrow, 1, 1) \ |
| @@ -982,13 +982,17 @@ class Runtime : public AllStatic { |
| enum FunctionId { |
| #define F(name, nargs, ressize) k##name, |
| #define I(name, nargs, ressize) kInline##name, |
| - FOR_EACH_INTRINSIC(F) FOR_EACH_INTRINSIC(I) |
| +#define C(index, type, name) kContext_##name, |
| + FOR_EACH_INTRINSIC(F) |
| + FOR_EACH_INTRINSIC(I) |
| + NATIVE_CONTEXT_IMPORTED_FIELDS(C) |
| +#undef C |
| #undef I |
| #undef F |
| - kNumFunctions, |
| + kNumFunctions, |
| }; |
| - enum IntrinsicType { RUNTIME, INLINE }; |
| + enum IntrinsicType { RUNTIME, INLINE, CONTEXT }; |
|
Michael Starzinger
2015/08/25 18:12:09
High-level feedback: I am not sure whether overloa
|
| // Intrinsic function descriptor. |
| struct Function { |
| @@ -997,14 +1001,19 @@ class Runtime : public AllStatic { |
| // The JS name of the function. |
| const char* name; |
| - // The C++ (native) entry point. NULL if the function is inlined. |
| - byte* entry; |
| + // For RUNTIME functions, this is the C++ entry point. |
| + // For INLINE functions this is the C++ entry point of the fall back. |
| + // For CONTEXT functions this is the native context index. |
| + union { |
| + Address entry; |
| + Context::Index index; |
| + }; |
| // The number of arguments expected. nargs is -1 if the function takes |
| // a variable number of arguments. |
| - int nargs; |
| + int8_t nargs; |
| // Size of result. Most functions return a single pointer, size 1. |
| - int result_size; |
| + int8_t result_size; |
| }; |
| static const int kNotFound = -1; |