Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 8fb74b5c1b9e80406a6f424baa91c39dd1e53925..63e9f0721bec3b096a2fff4d925b25a7cd63f749 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -96,6 +96,7 @@ namespace internal { |
V(InternalArrayConstructor) \ |
V(ProfileEntryHook) \ |
V(StoreGlobal) \ |
+ V(CallApiFunction) \ |
/* IC Handler stubs */ \ |
V(LoadField) \ |
V(KeyedLoadField) \ |
@@ -1035,6 +1036,32 @@ class StoreGlobalStub : public HandlerStub { |
}; |
+class CallApiFunctionStub : public PlatformCodeStub { |
+ public: |
+ CallApiFunctionStub(bool restore_context, |
+ bool call_data_undefined, |
+ int argc) { |
+ bit_field_ = |
+ RestoreContextBits::encode(restore_context) | |
+ CallDataUndefinedBits::encode(call_data_undefined) | |
+ ArgumentBits::encode(argc); |
+ } |
+ |
+ private: |
+ virtual void Generate(MacroAssembler* masm) V8_OVERRIDE; |
+ virtual Major MajorKey() V8_OVERRIDE { return CallApiFunction; } |
+ virtual int MinorKey() V8_OVERRIDE { return bit_field_; } |
+ |
+ class RestoreContextBits: public BitField<bool, 0, 1> {}; |
+ class CallDataUndefinedBits: public BitField<bool, 1, 1> {}; |
+ class ArgumentBits: public BitField<int, 2, Code::kArgumentsBits> {}; |
+ |
+ int bit_field_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CallApiFunctionStub); |
+}; |
+ |
+ |
class KeyedLoadFieldStub: public LoadFieldStub { |
public: |
KeyedLoadFieldStub(bool inobject, int index, Representation representation) |