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

Unified Diff: src/ic/ic.h

Issue 755513003: Hydrogen: fix keyed loads with string keys (Closed) Base URL: gh:v8/v8@master
Patch Set: better fix Created 6 years 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
Index: src/ic/ic.h
diff --git a/src/ic/ic.h b/src/ic/ic.h
index 5ed8082ed1e05e07dd3e0bf4dd0f4408a003c0b7..5db3ba741e8040e1c5eb818b24104396171df933 100644
--- a/src/ic/ic.h
+++ b/src/ic/ic.h
@@ -434,6 +434,14 @@ class LoadIC : public IC {
class KeyedLoadIC : public LoadIC {
public:
+ static ExtraICState ComputeExtraICState(IcCheckType key_type) {
+ return KeyedLoadICState(key_type).GetExtraICState();
+ }
+
+ IcCheckType GetKeyType() const {
+ return KeyedLoadICState::GetKeyType(extra_ic_state());
+ }
+
explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate)
: LoadIC(depth, isolate) {
DCHECK(target()->is_keyed_load_stub());
@@ -465,12 +473,14 @@ class KeyedLoadIC : public LoadIC {
protected:
// receiver is HeapObject because it could be a String or a JSObject
- Handle<Code> LoadElementStub(Handle<HeapObject> receiver);
+ Handle<Code> LoadElementStub(Handle<HeapObject> receiver,
+ Handle<Object> key);
virtual Handle<Code> pre_monomorphic_stub() const {
return pre_monomorphic_stub(isolate());
}
private:
+ inline void set_target(Code* code);
Jakob Kummerow 2014/12/10 15:21:18 Why do you need to override this? Can you explain
Handle<Code> generic_stub() const { return generic_stub(isolate()); }
static void Clear(Isolate* isolate, Address address, Code* target,

Powered by Google App Engine
This is Rietveld 408576698