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

Unified Diff: test/cctest/test-heap.cc

Issue 181543002: Eliminate extended mode, and other modes clean-up (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
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 9ed107f617bea303354cabae151a7407ed85f059..8cd8316e7265b306c20724cc5b3224cff480a4c1 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -275,11 +275,11 @@ TEST(GarbageCollection) {
Handle<Map> initial_map =
factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
function->set_initial_map(*initial_map);
- JSReceiver::SetProperty(global, name, function, NONE, kSloppyMode);
+ JSReceiver::SetProperty(global, name, function, NONE, SLOPPY);
// Allocate an object. Unrooted after leaving the scope.
Handle<JSObject> obj = factory->NewJSObject(function);
- JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, kSloppyMode);
- JSReceiver::SetProperty(obj, prop_namex, twenty_four, NONE, kSloppyMode);
+ JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, SLOPPY);
+ JSReceiver::SetProperty(obj, prop_namex, twenty_four, NONE, SLOPPY);
CHECK_EQ(Smi::FromInt(23), obj->GetProperty(*prop_name));
CHECK_EQ(Smi::FromInt(24), obj->GetProperty(*prop_namex));
@@ -299,8 +299,8 @@ TEST(GarbageCollection) {
HandleScope inner_scope(isolate);
// Allocate another object, make it reachable from global.
Handle<JSObject> obj = factory->NewJSObject(function);
- JSReceiver::SetProperty(global, obj_name, obj, NONE, kSloppyMode);
- JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, kSloppyMode);
+ JSReceiver::SetProperty(global, obj_name, obj, NONE, SLOPPY);
+ JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, SLOPPY);
}
// After gc, it should survive.
@@ -635,11 +635,10 @@ TEST(FunctionAllocation) {
Handle<String> prop_name = factory->InternalizeUtf8String("theSlot");
Handle<JSObject> obj = factory->NewJSObject(function);
- JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, kSloppyMode);
+ JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, SLOPPY);
CHECK_EQ(Smi::FromInt(23), obj->GetProperty(*prop_name));
// Check that we can add properties to function objects.
- JSReceiver::SetProperty(function, prop_name, twenty_four, NONE,
- kSloppyMode);
+ JSReceiver::SetProperty(function, prop_name, twenty_four, NONE, SLOPPY);
CHECK_EQ(Smi::FromInt(24), function->GetProperty(*prop_name));
}
@@ -666,7 +665,7 @@ TEST(ObjectProperties) {
CHECK(!JSReceiver::HasLocalProperty(obj, first));
// add first
- JSReceiver::SetProperty(obj, first, one, NONE, kSloppyMode);
+ JSReceiver::SetProperty(obj, first, one, NONE, SLOPPY);
CHECK(JSReceiver::HasLocalProperty(obj, first));
// delete first
@@ -674,8 +673,8 @@ TEST(ObjectProperties) {
CHECK(!JSReceiver::HasLocalProperty(obj, first));
// add first and then second
- JSReceiver::SetProperty(obj, first, one, NONE, kSloppyMode);
- JSReceiver::SetProperty(obj, second, two, NONE, kSloppyMode);
+ JSReceiver::SetProperty(obj, first, one, NONE, SLOPPY);
+ JSReceiver::SetProperty(obj, second, two, NONE, SLOPPY);
CHECK(JSReceiver::HasLocalProperty(obj, first));
CHECK(JSReceiver::HasLocalProperty(obj, second));
@@ -687,8 +686,8 @@ TEST(ObjectProperties) {
CHECK(!JSReceiver::HasLocalProperty(obj, second));
// add first and then second
- JSReceiver::SetProperty(obj, first, one, NONE, kSloppyMode);
- JSReceiver::SetProperty(obj, second, two, NONE, kSloppyMode);
+ JSReceiver::SetProperty(obj, first, one, NONE, SLOPPY);
+ JSReceiver::SetProperty(obj, second, two, NONE, SLOPPY);
CHECK(JSReceiver::HasLocalProperty(obj, first));
CHECK(JSReceiver::HasLocalProperty(obj, second));
@@ -702,14 +701,14 @@ TEST(ObjectProperties) {
// check string and internalized string match
const char* string1 = "fisk";
Handle<String> s1 = factory->NewStringFromAscii(CStrVector(string1));
- JSReceiver::SetProperty(obj, s1, one, NONE, kSloppyMode);
+ JSReceiver::SetProperty(obj, s1, one, NONE, SLOPPY);
Handle<String> s1_string = factory->InternalizeUtf8String(string1);
CHECK(JSReceiver::HasLocalProperty(obj, s1_string));
// check internalized string and string match
const char* string2 = "fugl";
Handle<String> s2_string = factory->InternalizeUtf8String(string2);
- JSReceiver::SetProperty(obj, s2_string, one, NONE, kSloppyMode);
+ JSReceiver::SetProperty(obj, s2_string, one, NONE, SLOPPY);
Handle<String> s2 = factory->NewStringFromAscii(CStrVector(string2));
CHECK(JSReceiver::HasLocalProperty(obj, s2));
}
@@ -733,7 +732,7 @@ TEST(JSObjectMaps) {
// Set a propery
Handle<Smi> twenty_three(Smi::FromInt(23), isolate);
- JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, kSloppyMode);
+ JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, SLOPPY);
CHECK_EQ(Smi::FromInt(23), obj->GetProperty(*prop_name));
// Check the map has changed
@@ -766,7 +765,7 @@ TEST(JSArray) {
CHECK(array->HasFastSmiOrObjectElements());
// array[length] = name.
- JSReceiver::SetElement(array, 0, name, NONE, kSloppyMode);
+ JSReceiver::SetElement(array, 0, name, NONE, SLOPPY);
CHECK_EQ(Smi::FromInt(1), array->length());
CHECK_EQ(array->GetElement(isolate, 0), *name);
@@ -781,7 +780,7 @@ TEST(JSArray) {
CHECK(array->HasDictionaryElements()); // Must be in slow mode.
// array[length] = name.
- JSReceiver::SetElement(array, int_length, name, NONE, kSloppyMode);
+ JSReceiver::SetElement(array, int_length, name, NONE, SLOPPY);
uint32_t new_int_length = 0;
CHECK(array->length()->ToArrayIndex(&new_int_length));
CHECK_EQ(static_cast<double>(int_length), new_int_length - 1);
@@ -808,11 +807,11 @@ TEST(JSObjectCopy) {
Handle<Smi> one(Smi::FromInt(1), isolate);
Handle<Smi> two(Smi::FromInt(2), isolate);
- JSReceiver::SetProperty(obj, first, one, NONE, kSloppyMode);
- JSReceiver::SetProperty(obj, second, two, NONE, kSloppyMode);
+ JSReceiver::SetProperty(obj, first, one, NONE, SLOPPY);
+ JSReceiver::SetProperty(obj, second, two, NONE, SLOPPY);
- JSReceiver::SetElement(obj, 0, first, NONE, kSloppyMode);
- JSReceiver::SetElement(obj, 1, second, NONE, kSloppyMode);
+ JSReceiver::SetElement(obj, 0, first, NONE, SLOPPY);
+ JSReceiver::SetElement(obj, 1, second, NONE, SLOPPY);
// Make the clone.
Handle<JSObject> clone = JSObject::Copy(obj);
@@ -825,11 +824,11 @@ TEST(JSObjectCopy) {
CHECK_EQ(obj->GetProperty(*second), clone->GetProperty(*second));
// Flip the values.
- JSReceiver::SetProperty(clone, first, two, NONE, kSloppyMode);
- JSReceiver::SetProperty(clone, second, one, NONE, kSloppyMode);
+ JSReceiver::SetProperty(clone, first, two, NONE, SLOPPY);
+ JSReceiver::SetProperty(clone, second, one, NONE, SLOPPY);
- JSReceiver::SetElement(clone, 0, second, NONE, kSloppyMode);
- JSReceiver::SetElement(clone, 1, first, NONE, kSloppyMode);
+ JSReceiver::SetElement(clone, 0, second, NONE, SLOPPY);
+ JSReceiver::SetElement(clone, 1, first, NONE, SLOPPY);
CHECK_EQ(obj->GetElement(isolate, 1), clone->GetElement(isolate, 0));
CHECK_EQ(obj->GetElement(isolate, 0), clone->GetElement(isolate, 1));
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698