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

Unified Diff: src/code-stubs.h

Issue 442763002: Load constants from the DescriptorArray (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also removed from arm64 Created 6 years, 4 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/arm64/stub-cache-arm64.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 7017ab8faedd21e09ec43244e3f6968ff101de65..01f83ed54f5f7afa5274919620643b7521458fca 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -76,6 +76,7 @@ namespace internal {
V(CallApiGetter) \
/* IC Handler stubs */ \
V(LoadField) \
+ V(LoadConstant) \
V(StringLength)
// List of code stubs only used on ARM 32 bits platforms.
@@ -903,6 +904,9 @@ class HandlerStub : public HydrogenCodeStub {
virtual ExtraICState GetExtraICState() const { return kind(); }
virtual InlineCacheState GetICState() { return MONOMORPHIC; }
+ virtual void InitializeInterfaceDescriptor(
+ CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
+
protected:
explicit HandlerStub(Isolate* isolate)
: HydrogenCodeStub(isolate), bit_field_(0) {}
@@ -922,9 +926,6 @@ class LoadFieldStub: public HandlerStub {
virtual Handle<Code> GenerateCode() V8_OVERRIDE;
- virtual void InitializeInterfaceDescriptor(
- CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
-
Representation representation() {
if (unboxed_double()) return Representation::Double();
return Representation::Tagged();
@@ -945,12 +946,30 @@ class LoadFieldStub: public HandlerStub {
};
+class LoadConstantStub : public HandlerStub {
+ public:
+ LoadConstantStub(Isolate* isolate, int descriptor) : HandlerStub(isolate) {
+ bit_field_ = descriptor;
+ }
+
+ virtual Handle<Code> GenerateCode() V8_OVERRIDE;
+
+ int descriptor() const { return bit_field_; }
+
+ protected:
+ explicit LoadConstantStub(Isolate* isolate);
+ virtual Code::Kind kind() const { return Code::LOAD_IC; }
+ virtual Code::StubType GetStubType() { return Code::FAST; }
+
+ private:
+ virtual CodeStub::Major MajorKey() const { return LoadConstant; }
+};
+
+
class StringLengthStub: public HandlerStub {
public:
explicit StringLengthStub(Isolate* isolate) : HandlerStub(isolate) {}
virtual Handle<Code> GenerateCode() V8_OVERRIDE;
- virtual void InitializeInterfaceDescriptor(
- CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
protected:
virtual Code::Kind kind() const { return Code::LOAD_IC; }
@@ -992,9 +1011,6 @@ class StoreGlobalStub : public HandlerStub {
virtual Handle<Code> GenerateCode() V8_OVERRIDE;
- virtual void InitializeInterfaceDescriptor(
- CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
-
bool is_constant() const {
return IsConstantBits::decode(bit_field_);
}
« no previous file with comments | « src/arm64/stub-cache-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698