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

Unified Diff: src/objects.h

Issue 1221713003: Distinguish slow from fast sloppy arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 70e219390964376ad583cc952b9d61d87fe6a58b..40d2a8325df8bd67ba2b03e18539d00be4e9dac8 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1826,8 +1826,8 @@ class JSObject: public JSReceiver {
inline bool HasFixedFloat32Elements();
inline bool HasFixedFloat64Elements();
- bool HasFastArgumentsElements();
- bool HasDictionaryArgumentsElements();
+ inline bool HasFastArgumentsElements();
+ inline bool HasSlowArgumentsElements();
inline SeededNumberDictionary* element_dictionary(); // Gets slow elements.
// Requires: HasFastElements().
@@ -5702,7 +5702,8 @@ class Map: public HeapObject {
}
inline bool has_sloppy_arguments_elements() {
- return elements_kind() == SLOPPY_ARGUMENTS_ELEMENTS;
+ return elements_kind() == FAST_SLOPPY_ARGUMENTS_ELEMENTS ||
Igor Sheludko 2015/07/02 13:28:42 return IsSloppyArgumentsElements(elements_kind());
Toon Verwaest 2015/07/02 13:49:02 Done.
+ elements_kind() == SLOW_SLOPPY_ARGUMENTS_ELEMENTS;
}
inline bool has_external_array_elements() {
@@ -5717,11 +5718,6 @@ class Map: public HeapObject {
return IsDictionaryElementsKind(elements_kind());
}
- inline bool has_slow_elements_kind() {
- return elements_kind() == DICTIONARY_ELEMENTS
- || elements_kind() == SLOPPY_ARGUMENTS_ELEMENTS;
- }
-
static bool IsValidElementsTransition(ElementsKind from_kind,
ElementsKind to_kind);
@@ -6046,7 +6042,8 @@ class Map: public HeapObject {
// Returns the transitioned map for this map with the most generic
// elements_kind that's found in |candidates|, or null handle if no match is
// found at all.
- Handle<Map> FindTransitionedMap(MapHandleList* candidates);
+ static Handle<Map> FindTransitionedMap(Handle<Map> map,
+ MapHandleList* candidates);
bool CanTransition() {
// Only JSObject and subtypes have map transitions and back pointers.

Powered by Google App Engine
This is Rietveld 408576698