Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: src/code-stubs.h

Issue 140613004: stub fast api calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698