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

Unified Diff: src/objects.h

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 fcc6436e47748d636aba6eb46d20c679ffe8efb5..65dc8bb4814d6fc094facd8959e506485c80ddf2 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2155,14 +2155,14 @@ class JSObject: public JSReceiver {
// In the fast mode elements is a FixedArray and so each element can
// be quickly accessed. This fact is used in the generated code. The
// elements array can have one of three maps in this mode:
- // fixed_array_map, non_strict_arguments_elements_map or
+ // fixed_array_map, sloppy_arguments_elements_map or
// fixed_cow_array_map (for copy-on-write arrays). In the latter case
// the elements array may be shared by a few objects and so before
// writing to any element the array must be copied. Use
// EnsureWritableFastElements in this case.
//
// In the slow mode the elements is either a NumberDictionary, an
- // ExternalArray, or a FixedArray parameter map for a (non-strict)
+ // ExternalArray, or a FixedArray parameter map for a (sloppy)
// arguments object.
DECL_ACCESSORS(elements, FixedArrayBase)
inline void initialize_elements();
@@ -2184,7 +2184,7 @@ class JSObject: public JSReceiver {
// Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS
// ElementsKind.
inline bool HasFastHoleyElements();
- inline bool HasNonStrictArgumentsElements();
+ inline bool HasSloppyArgumentsElements();
inline bool HasDictionaryElements();
inline bool HasExternalUint8ClampedElements();
@@ -4316,9 +4316,9 @@ class ScopeInfo : public FixedArray {
// Return the language mode of this scope.
LanguageMode language_mode();
- // Does this scope make a non-strict eval call?
- bool CallsNonStrictEval() {
- return CallsEval() && (language_mode() == CLASSIC_MODE);
+ // Does this scope make a sloppy eval call?
+ bool CallsSloppyEval() {
+ return CallsEval() && (language_mode() == SLOPPY_MODE);
}
// Return the total number of locals allocated on the stack and in the
@@ -5905,8 +5905,8 @@ class Map: public HeapObject {
return IsFastElementsKind(elements_kind());
}
- inline bool has_non_strict_arguments_elements() {
- return elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS;
+ inline bool has_sloppy_arguments_elements() {
+ return elements_kind() == SLOPPY_ARGUMENTS_ELEMENTS;
}
inline bool has_external_array_elements() {
@@ -5923,7 +5923,7 @@ class Map: public HeapObject {
inline bool has_slow_elements_kind() {
return elements_kind() == DICTIONARY_ELEMENTS
- || elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS;
+ || elements_kind() == SLOPPY_ARGUMENTS_ELEMENTS;
}
static bool IsValidElementsTransition(ElementsKind from_kind,
@@ -6910,14 +6910,14 @@ class SharedFunctionInfo: public HeapObject {
// Indicates the language mode of the function's code as defined by the
// current harmony drafts for the next ES language standard. Possible
// values are:
- // 1. CLASSIC_MODE - Unrestricted syntax and semantics, same as in ES5.
+ // 1. SLOPPY_MODE - Unrestricted syntax and semantics, same as in ES5.
// 2. STRICT_MODE - Restricted syntax and semantics, same as in ES5.
// 3. EXTENDED_MODE - Only available under the harmony flag, not part of ES5.
inline LanguageMode language_mode();
inline void set_language_mode(LanguageMode language_mode);
- // Indicates whether the language mode of this function is CLASSIC_MODE.
- inline bool is_classic_mode();
+ // Indicates whether the language mode of this function is SLOPPY_MODE.
+ inline bool is_sloppy_mode();
// Indicates whether the language mode of this function is EXTENDED_MODE.
inline bool is_extended_mode();
@@ -8430,8 +8430,8 @@ class AllocationMemento: public Struct {
};
-// Representation of a slow alias as part of a non-strict arguments objects.
-// For fast aliases (if HasNonStrictArgumentsElements()):
+// Representation of a slow alias as part of a sloppy arguments objects.
+// For fast aliases (if HasSloppyArgumentsElements()):
// - the parameter map contains an index into the context
// - all attributes of the element have default values
// For slow aliases (if HasDictionaryArgumentsElements()):

Powered by Google App Engine
This is Rietveld 408576698