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

Unified Diff: src/ic.h

Issue 12038012: Merge Load from Keyed|Named load code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | src/ic.cc » ('j') | src/ic.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.h
diff --git a/src/ic.h b/src/ic.h
index a0c0f381e25f2d72a6fa677f75fde9af5a6f5cbd..c95f2e3c8dc314684378d3fcded1058ff1edcc06 100644
--- a/src/ic.h
+++ b/src/ic.h
@@ -132,6 +132,10 @@ class IC {
static inline JSObject* GetCodeCacheHolder(Object* object,
InlineCacheHolderFlag holder);
+ MUST_USE_RESULT MaybeObject* Load(State state,
+ Handle<Object> object,
+ Handle<String> name);
+
protected:
virtual Handle<Code> pre_monomorphic_stub() {
UNREACHABLE();
@@ -141,10 +145,20 @@ class IC {
UNREACHABLE();
return Handle<Code>::null();
}
+ virtual Handle<Code> generic_stub() const {
+ UNREACHABLE();
+ return Handle<Code>::null();
+ }
virtual Code::Kind kind() const {
UNREACHABLE();
return Code::STUB;
}
+ virtual void UpdateLoadCaches(LookupResult* lookup,
+ State state,
+ Handle<Object> object,
+ Handle<String> name) {
+ UNREACHABLE();
+ }
Address fp() const { return fp_; }
Address pc() const { return *pc_address_; }
Isolate* isolate() const { return isolate_; }
@@ -177,11 +191,6 @@ class IC {
static inline void SetTargetAtAddress(Address address, Code* target);
static void PostPatching(Address address, Code* target, Code* old_target);
- bool HandleLoad(State state,
- Handle<Object> object,
- Handle<String> name,
- MaybeObject** result);
-
private:
// Frame pointer for the frame that uses (calls) the IC.
Address fp_;
@@ -340,10 +349,6 @@ class LoadIC: public IC {
ASSERT(target()->is_load_stub());
}
- MUST_USE_RESULT MaybeObject* Load(State state,
- Handle<Object> object,
- Handle<String> name);
-
// Code generator routines.
static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
static void GeneratePreMonomorphic(MacroAssembler* masm) {
@@ -364,14 +369,14 @@ class LoadIC: public IC {
return isolate()->builtins()->LoadIC_Megamorphic();
}
- private:
// Update the inline cache and the global stub cache based on the
// lookup result.
- void UpdateCaches(LookupResult* lookup,
- State state,
- Handle<Object> object,
- Handle<String> name);
+ virtual void UpdateLoadCaches(LookupResult* lookup,
+ State state,
+ Handle<Object> object,
+ Handle<String> name);
+ private:
// Stub accessors.
static Code* initialize_stub() {
return Isolate::Current()->builtins()->builtin(
@@ -540,6 +545,9 @@ class KeyedLoadIC: public KeyedIC {
virtual Handle<Code> megamorphic_stub() {
return isolate()->builtins()->KeyedLoadIC_Generic();
}
+ virtual Handle<Code> generic_stub() const {
+ return isolate()->builtins()->KeyedLoadIC_Generic();
+ }
virtual Handle<Code> ComputePolymorphicStub(MapHandleList* receiver_maps,
StrictModeFlag strict_mode,
@@ -549,21 +557,18 @@ class KeyedLoadIC: public KeyedIC {
return isolate()->builtins()->KeyedLoadIC_String();
}
- private:
// Update the inline cache.
- void UpdateCaches(LookupResult* lookup,
- State state,
- Handle<Object> object,
- Handle<String> name);
+ virtual void UpdateLoadCaches(LookupResult* lookup,
+ State state,
+ Handle<Object> object,
+ Handle<String> name);
+ private:
// Stub accessors.
static Code* initialize_stub() {
return Isolate::Current()->builtins()->builtin(
Builtins::kKeyedLoadIC_Initialize);
}
- Handle<Code> generic_stub() const {
- return isolate()->builtins()->KeyedLoadIC_Generic();
- }
virtual Handle<Code> pre_monomorphic_stub() {
return isolate()->builtins()->KeyedLoadIC_PreMonomorphic();
}
« no previous file with comments | « no previous file | src/ic.cc » ('j') | src/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698