Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 34da148e5d1a9d8ca6f3603d8eee025e15b5b865..1141cb56b31e16bd11f9bb46284849d47c58a918 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -38,6 +38,7 @@ namespace internal { |
// List of code stubs used on all platforms. |
#define CODE_STUB_LIST_ALL_PLATFORMS(V) \ |
V(CallFunction) \ |
+ V(CallConstruct) \ |
V(UnaryOp) \ |
V(BinaryOp) \ |
V(StringAdd) \ |
@@ -738,32 +739,10 @@ class CallFunctionStub: public CodeStub { |
void Generate(MacroAssembler* masm); |
- virtual void FinishCode(Handle<Code> code); |
- |
- static void Clear(Heap* heap, Address address); |
- |
- static Object* GetCachedValue(Address address); |
- |
static int ExtractArgcFromMinorKey(int minor_key) { |
return ArgcBits::decode(minor_key); |
} |
- // The object that indicates an uninitialized cache. |
- static Handle<Object> UninitializedSentinel(Isolate* isolate) { |
- return isolate->factory()->the_hole_value(); |
- } |
- |
- // A raw version of the uninitialized sentinel that's safe to read during |
- // garbage collection (e.g., for patching the cache). |
- static Object* RawUninitializedSentinel(Heap* heap) { |
- return heap->raw_unchecked_the_hole_value(); |
- } |
- |
- // The object that indicates a megamorphic state. |
- static Handle<Object> MegamorphicSentinel(Isolate* isolate) { |
- return isolate->factory()->undefined_value(); |
- } |
- |
private: |
int argc_; |
CallFunctionFlags flags_; |
@@ -790,6 +769,26 @@ class CallFunctionStub: public CodeStub { |
}; |
+class CallConstructStub: public CodeStub { |
+ public: |
+ explicit CallConstructStub(CallFunctionFlags flags) : flags_(flags) {} |
+ |
+ void Generate(MacroAssembler* masm); |
+ |
+ private: |
+ CallFunctionFlags flags_; |
+ |
+ virtual void PrintName(StringStream* stream); |
+ |
+ Major MajorKey() { return CallConstruct; } |
+ int MinorKey() { return flags_; } |
+ |
+ bool RecordCallTarget() { |
+ return (flags_ & RECORD_CALL_TARGET) != 0; |
+ } |
+}; |
+ |
+ |
enum StringIndexFlags { |
// Accepts smis or heap numbers. |
STRING_INDEX_IS_NUMBER, |