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

Unified Diff: src/hydrogen.h

Issue 57123002: Reland 21774: Generate KeyedLoadGeneric with Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Turn off by default Created 7 years, 1 month 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/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 6a6aef0b38e992f1c7aaee302e6ab04453196d65..03a8176c63abd03548539c071f97befc9928fb40 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1261,6 +1261,8 @@ class HGraphBuilder {
HBasicBlock* CreateBasicBlock(HEnvironment* env);
HBasicBlock* CreateLoopHeaderBlock();
+ HValue* BuildGetElementsKind(HValue* object);
+
HValue* BuildCheckHeapObject(HValue* object);
HValue* BuildCheckMap(HValue* obj, Handle<Map> map);
HValue* BuildCheckString(HValue* string);
@@ -1287,8 +1289,34 @@ class HGraphBuilder {
HValue* BuildNumberToString(HValue* object, Handle<Type> type);
+ void BuildReceiverCheck(HValue* receiver,
+ int bit_field_mask);
+
+ HValue* BuildHashToIndex(HValue *hash);
Toon Verwaest 2013/12/04 17:29:26 nit: move * to HValue.
danno 2014/06/06 15:43:51 Done.
+
+ // Checks a key value that's being used for a keyed element access context. If
+ // the key is a index, i.e. a smi or a number in a unique string with a cached
+ // numeric value, the "true" of the continuation is joined. Otherwise,
+ // if the key is a name or a unique string, the "false" of the continuation is
+ // joined. Otherwise, a deoptimization is triggered. In both paths of the
+ // continuation, the key is pushed on the top of the environment.
+ void BuildKeyedIndexCheck(HValue* key,
+ HIfContinuation* join_continuation);
+
+ // Checks the properties of an object if they are in dictionary case, in which
+ // case "true" of continuation is taken, otherwise the "false"
+ void BuildCheckForDictionaryProperties(HValue* object,
+ HIfContinuation* continuation);
+
+ void BuildGlobalInstanceTypeCheck(HValue* receiver);
+
+ HValue* BuildKeyedLookupCacheHash(HValue* object,
+ HValue* key);
+
HValue* BuildUncheckedDictionaryElementLoad(HValue* receiver,
- HValue* key);
+ HValue* elements,
+ HValue* key,
+ HValue* hash);
// Computes the size for a sequential string of the given length and encoding.
HValue* BuildSeqStringSizeFor(HValue* length,
@@ -1605,6 +1633,27 @@ class HGraphBuilder {
bool finished_;
};
+ template <class A, class P1>
+ void DeoptimizeIf(P1 p1, char* const reason) {
+ IfBuilder builder(this);
+ builder.If<A>(p1);
+ builder.ThenDeopt(reason);
+ }
+
+ template <class A, class P1, class P2>
+ void DeoptimizeIf(P1 p1, P2 p2, const char* reason) {
+ IfBuilder builder(this);
+ builder.If<A>(p1, p2);
+ builder.ThenDeopt(reason);
+ }
+
+ template <class A, class P1, class P2, class P3>
+ void DeoptimizeIf(P1 p1, P2 p2, P3 p3, const char* reason) {
+ IfBuilder builder(this);
+ builder.If<A>(p1, p2, p3);
+ builder.ThenDeopt(reason);
+ }
+
HValue* BuildNewElementsCapacity(HValue* old_capacity);
void BuildNewSpaceArrayCheck(HValue* length,

Powered by Google App Engine
This is Rietveld 408576698