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

Unified Diff: src/objects-inl.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-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 4c49170182a3888f7ef07ef8e456f28ca09754a0..328a8739d8189d9cc5fb261c9a573357e7b63ece 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1740,7 +1740,7 @@ MaybeObject* JSObject::ResetElements() {
SeededNumberDictionary* dictionary;
MaybeObject* maybe = SeededNumberDictionary::Allocate(GetHeap(), 0);
if (!maybe->To(&dictionary)) return maybe;
- if (map() == GetHeap()->non_strict_arguments_elements_map()) {
+ if (map() == GetHeap()->sloppy_arguments_elements_map()) {
FixedArray::cast(elements())->set(1, dictionary);
} else {
set_elements(dictionary);
@@ -5139,27 +5139,27 @@ LanguageMode SharedFunctionInfo::language_mode() {
return EXTENDED_MODE;
}
return BooleanBit::get(hints, kStrictModeFunction)
- ? STRICT_MODE : CLASSIC_MODE;
+ ? STRICT_MODE : SLOPPY_MODE;
}
void SharedFunctionInfo::set_language_mode(LanguageMode language_mode) {
// We only allow language mode transitions that go set the same language mode
// again or go up in the chain:
- // CLASSIC_MODE -> STRICT_MODE -> EXTENDED_MODE.
- ASSERT(this->language_mode() == CLASSIC_MODE ||
+ // SLOPPY_MODE -> STRICT_MODE -> EXTENDED_MODE.
+ ASSERT(this->language_mode() == SLOPPY_MODE ||
this->language_mode() == language_mode ||
language_mode == EXTENDED_MODE);
int hints = compiler_hints();
hints = BooleanBit::set(
- hints, kStrictModeFunction, language_mode != CLASSIC_MODE);
+ hints, kStrictModeFunction, language_mode != SLOPPY_MODE);
hints = BooleanBit::set(
hints, kExtendedModeFunction, language_mode == EXTENDED_MODE);
set_compiler_hints(hints);
}
-bool SharedFunctionInfo::is_classic_mode() {
+bool SharedFunctionInfo::is_sloppy_mode() {
return !BooleanBit::get(compiler_hints(), kStrictModeFunction);
}
@@ -5916,7 +5916,7 @@ ElementsKind JSObject::GetElementsKind() {
fixed_array->IsFixedArray() &&
fixed_array->IsDictionary()) ||
(kind > DICTIONARY_ELEMENTS));
- ASSERT((kind != NON_STRICT_ARGUMENTS_ELEMENTS) ||
+ ASSERT((kind != SLOPPY_ARGUMENTS_ELEMENTS) ||
(elements()->IsFixedArray() && elements()->length() >= 2));
}
#endif
@@ -5964,8 +5964,8 @@ bool JSObject::HasDictionaryElements() {
}
-bool JSObject::HasNonStrictArgumentsElements() {
- return GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS;
+bool JSObject::HasSloppyArgumentsElements() {
+ return GetElementsKind() == SLOPPY_ARGUMENTS_ELEMENTS;
}

Powered by Google App Engine
This is Rietveld 408576698