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

Unified Diff: src/code-stubs.h

Issue 155723005: A64: Synchronize with r19001. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/bootstrapper.cc ('k') | src/code-stubs.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 3171ef31c8a99ed8d5896333760a1faf201a7efa..2a0a6609e05c00d10762a4c08079dae99e0ba4cd 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -90,16 +90,15 @@ namespace internal {
V(TransitionElementsKind) \
V(StoreArrayLiteralElement) \
V(StubFailureTrampoline) \
- V(StubFailureTailCallTrampoline) \
V(ArrayConstructor) \
V(InternalArrayConstructor) \
V(ProfileEntryHook) \
V(StoreGlobal) \
V(CallApiFunction) \
+ V(CallApiGetter) \
/* IC Handler stubs */ \
V(LoadField) \
- V(KeyedLoadField) \
- V(KeyedArrayCall)
+ V(KeyedLoadField)
// List of code stubs only used on ARM platforms.
#if V8_TARGET_ARCH_ARM
@@ -169,7 +168,6 @@ class CodeStub BASE_EMBEDDED {
virtual ~CodeStub() {}
static void GenerateStubsAheadOfTime(Isolate* isolate);
- static void GenerateStubsRequiringBuiltinsAheadOfTime(Isolate* isolate);
static void GenerateFPStubs(Isolate* isolate);
// Some stubs put untagged junk on the stack that cannot be scanned by the
@@ -280,9 +278,6 @@ class PlatformCodeStub : public CodeStub {
enum StubFunctionMode { NOT_JS_FUNCTION_STUB_MODE, JS_FUNCTION_STUB_MODE };
enum HandlerArgumentsMode { DONT_PASS_ARGUMENTS, PASS_ARGUMENTS };
-enum ContinuationType { NORMAL_CONTINUATION, TAIL_CALL_CONTINUATION };
-
-
struct CodeStubInterfaceDescriptor {
CodeStubInterfaceDescriptor();
int register_param_count_;
@@ -291,7 +286,6 @@ struct CodeStubInterfaceDescriptor {
// if hint_stack_parameter_count_ > 0, the code stub can optimize the
// return sequence. Default value is -1, which means it is ignored.
int hint_stack_parameter_count_;
- ContinuationType continuation_type_;
StubFunctionMode function_mode_;
Register* register_params_;
@@ -300,10 +294,6 @@ struct CodeStubInterfaceDescriptor {
bool initialized() const { return register_param_count_ >= 0; }
- bool HasTailCallContinuation() const {
- return continuation_type_ == TAIL_CALL_CONTINUATION;
- }
-
int environment_length() const {
return register_param_count_;
}
@@ -1052,43 +1042,24 @@ class CallApiFunctionStub : public PlatformCodeStub {
};
-class KeyedLoadFieldStub: public LoadFieldStub {
+class CallApiGetterStub : public PlatformCodeStub {
public:
- KeyedLoadFieldStub(bool inobject, int index, Representation representation)
- : LoadFieldStub() {
- Initialize(Code::KEYED_LOAD_IC, inobject, index, representation);
- }
-
- virtual void InitializeInterfaceDescriptor(
- Isolate* isolate,
- CodeStubInterfaceDescriptor* descriptor);
-
- virtual Handle<Code> GenerateCode(Isolate* isolate);
+ CallApiGetterStub() {}
private:
- virtual CodeStub::Major MajorKey() { return KeyedLoadField; }
+ virtual void Generate(MacroAssembler* masm) V8_OVERRIDE;
+ virtual Major MajorKey() V8_OVERRIDE { return CallApiGetter; }
+ virtual int MinorKey() V8_OVERRIDE { return 0; }
+
+ DISALLOW_COPY_AND_ASSIGN(CallApiGetterStub);
};
-class KeyedArrayCallStub: public HICStub {
+class KeyedLoadFieldStub: public LoadFieldStub {
public:
- KeyedArrayCallStub(bool holey, int argc) : HICStub(), argc_(argc) {
- bit_field_ = HoleyBits::encode(holey);
- }
-
- virtual Code::Kind kind() const { return Code::KEYED_CALL_IC; }
- virtual ExtraICState GetExtraICState() { return bit_field_; }
-
- ElementsKind elements_kind() {
- return HoleyBits::decode(bit_field_) ? FAST_HOLEY_ELEMENTS : FAST_ELEMENTS;
- }
-
- int argc() { return argc_; }
- virtual int GetStubFlags() { return argc(); }
-
- static bool IsHoley(Handle<Code> code) {
- ExtraICState state = code->extra_ic_state();
- return HoleyBits::decode(state);
+ KeyedLoadFieldStub(bool inobject, int index, Representation representation)
+ : LoadFieldStub() {
+ Initialize(Code::KEYED_LOAD_IC, inobject, index, representation);
}
virtual void InitializeInterfaceDescriptor(
@@ -1098,16 +1069,7 @@ class KeyedArrayCallStub: public HICStub {
virtual Handle<Code> GenerateCode(Isolate* isolate);
private:
- virtual int NotMissMinorKey() {
- return GetExtraICState() | ArgcBits::encode(argc_);
- }
-
- class HoleyBits: public BitField<bool, 0, 1> {};
- STATIC_ASSERT(Code::kArgumentsBits <= kStubMinorKeyBits - 1);
- class ArgcBits: public BitField<int, 1, Code::kArgumentsBits> {};
- virtual CodeStub::Major MajorKey() { return KeyedArrayCall; }
- int bit_field_;
- int argc_;
+ virtual CodeStub::Major MajorKey() { return KeyedLoadField; }
};
@@ -1648,8 +1610,8 @@ class CallFunctionStub: public PlatformCodeStub {
virtual void PrintName(StringStream* stream);
// Minor key encoding in 32 bits with Bitfield <Type, shift, size>.
- class FlagBits: public BitField<CallFunctionFlags, 0, 1> {};
- class ArgcBits: public BitField<unsigned, 1, 32 - 1> {};
+ class FlagBits: public BitField<CallFunctionFlags, 0, 2> {};
+ class ArgcBits: public BitField<unsigned, 2, 32 - 2> {};
Major MajorKey() { return CallFunction; }
int MinorKey() {
@@ -1658,7 +1620,15 @@ class CallFunctionStub: public PlatformCodeStub {
}
bool RecordCallTarget() {
- return (flags_ & RECORD_CALL_TARGET) != 0;
+ return flags_ == RECORD_CALL_TARGET;
+ }
+
+ bool CallAsMethod() {
+ return flags_ == CALL_AS_METHOD || flags_ == WRAP_AND_CALL;
+ }
+
+ bool NeedsChecks() {
+ return flags_ != WRAP_AND_CALL;
}
};
@@ -1684,6 +1654,10 @@ class CallConstructStub: public PlatformCodeStub {
bool RecordCallTarget() {
return (flags_ & RECORD_CALL_TARGET) != 0;
}
+
+ bool CallAsMethod() {
+ return (flags_ & CALL_AS_METHOD) != 0;
+ }
};
@@ -2509,25 +2483,6 @@ class StubFailureTrampolineStub : public PlatformCodeStub {
};
-class StubFailureTailCallTrampolineStub : public PlatformCodeStub {
- public:
- StubFailureTailCallTrampolineStub() : fp_registers_(CanUseFPRegisters()) {}
-
- static void GenerateAheadOfTime(Isolate* isolate);
-
- private:
- class FPRegisters: public BitField<bool, 0, 1> {};
- Major MajorKey() { return StubFailureTailCallTrampoline; }
- int MinorKey() { return FPRegisters::encode(fp_registers_); }
-
- void Generate(MacroAssembler* masm);
-
- bool fp_registers_;
-
- DISALLOW_COPY_AND_ASSIGN(StubFailureTailCallTrampolineStub);
-};
-
-
class ProfileEntryHookStub : public PlatformCodeStub {
public:
explicit ProfileEntryHookStub() {}
« no previous file with comments | « src/bootstrapper.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698