Revision: 24866
Author: [email protected]
Date: Fri Oct 24 12:28:22 2014 UTC
Log: PropertyICCompiler: expose monomorphic keyed load handler
creation.
Simple refactoring that is useful for upcoming --vector-ic changes.
[email protected]
Review URL: https://codereview.chromium.org/673933005
https://code.google.com/p/v8/source/detail?r=24866
Modified:
/branches/bleeding_edge/src/ic/ic-compiler.cc
/branches/bleeding_edge/src/ic/ic-compiler.h
=======================================
--- /branches/bleeding_edge/src/ic/ic-compiler.cc Thu Oct 16 11:42:47 2014
UTC
+++ /branches/bleeding_edge/src/ic/ic-compiler.cc Fri Oct 24 12:28:22 2014
UTC
@@ -92,6 +92,20 @@
Handle<Object> probe(receiver_map->FindInCodeCache(*name, flags),
isolate);
if (probe->IsCode()) return Handle<Code>::cast(probe);
+ Handle<Code> stub = ComputeKeyedLoadMonomorphicHandler(receiver_map);
+ PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC);
+ Handle<Code> code =
+ compiler.CompileMonomorphic(HeapType::Class(receiver_map, isolate),
stub,
+ isolate->factory()->empty_string(),
ELEMENT);
+
+ Map::UpdateCodeCache(receiver_map, name, code);
+ return code;
+}
+
+
+Handle<Code> PropertyICCompiler::ComputeKeyedLoadMonomorphicHandler(
+ Handle<Map> receiver_map) {
+ Isolate* isolate = receiver_map->GetIsolate();
ElementsKind elements_kind = receiver_map->elements_kind();
Handle<Code> stub;
if (receiver_map->has_indexed_interceptor()) {
@@ -110,13 +124,7 @@
} else {
stub = LoadDictionaryElementStub(isolate).GetCode();
}
- PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC);
- Handle<Code> code =
- compiler.CompileMonomorphic(HeapType::Class(receiver_map, isolate),
stub,
- isolate->factory()->empty_string(),
ELEMENT);
-
- Map::UpdateCodeCache(receiver_map, name, code);
- return code;
+ return stub;
}
=======================================
--- /branches/bleeding_edge/src/ic/ic-compiler.h Fri Oct 10 13:27:52 2014
UTC
+++ /branches/bleeding_edge/src/ic/ic-compiler.h Fri Oct 24 12:28:22 2014
UTC
@@ -34,6 +34,8 @@
ExtraICState extra_ic_state);
// Keyed
+ static Handle<Code> ComputeKeyedLoadMonomorphicHandler(
+ Handle<Map> receiver_map);
static Handle<Code> ComputeKeyedLoadMonomorphic(Handle<Map>
receiver_map);
static Handle<Code> ComputeKeyedStoreMonomorphic(
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.