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

Side by Side Diff: test/cctest/test-heap.cc

Issue 48913008: Remove calls to JSObject::SetLocalPropertyIgnoreAttributesTrampoline within objects.cc (Closed) Base URL: https://github.com/v8/v8.git@bleeding_edge
Patch Set: last one 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | test/cctest/test-weakmaps.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2741 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 2752
2753 for (int i = 0; i < 2; i++) { 2753 for (int i = 0; i < 2; i++) {
2754 // Store identity hash first and common hidden property second. 2754 // Store identity hash first and common hidden property second.
2755 v8::Handle<v8::Object> obj = v8::Object::New(); 2755 v8::Handle<v8::Object> obj = v8::Object::New();
2756 Handle<JSObject> internal_obj = v8::Utils::OpenHandle(*obj); 2756 Handle<JSObject> internal_obj = v8::Utils::OpenHandle(*obj);
2757 CHECK(internal_obj->HasFastProperties()); 2757 CHECK(internal_obj->HasFastProperties());
2758 2758
2759 // In the first iteration, set hidden value first and identity hash second. 2759 // In the first iteration, set hidden value first and identity hash second.
2760 // In the second iteration, reverse the order. 2760 // In the second iteration, reverse the order.
2761 if (i == 0) obj->SetHiddenValue(v8_str("key string"), value); 2761 if (i == 0) obj->SetHiddenValue(v8_str("key string"), value);
2762 JSObject::SetIdentityHash(internal_obj, hash); 2762 JSObject::SetIdentityHash(internal_obj, handle(hash, CcTest::i_isolate()));
2763 if (i == 1) obj->SetHiddenValue(v8_str("key string"), value); 2763 if (i == 1) obj->SetHiddenValue(v8_str("key string"), value);
2764 2764
2765 // Check values. 2765 // Check values.
2766 CHECK_EQ(hash, 2766 CHECK_EQ(hash,
2767 internal_obj->GetHiddenProperty(heap->identity_hash_string())); 2767 internal_obj->GetHiddenProperty(heap->identity_hash_string()));
2768 CHECK(value->Equals(obj->GetHiddenValue(v8_str("key string")))); 2768 CHECK(value->Equals(obj->GetHiddenValue(v8_str("key string"))));
2769 2769
2770 // Check size. 2770 // Check size.
2771 DescriptorArray* descriptors = internal_obj->map()->instance_descriptors(); 2771 DescriptorArray* descriptors = internal_obj->map()->instance_descriptors();
2772 ObjectHashTable* hashtable = ObjectHashTable::cast( 2772 ObjectHashTable* hashtable = ObjectHashTable::cast(
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
3509 " var a = new Array(n);" 3509 " var a = new Array(n);"
3510 " for (var i = 0; i < n; i += 100) a[i] = i;" 3510 " for (var i = 0; i < n; i += 100) a[i] = i;"
3511 "};" 3511 "};"
3512 "f(10 * 1024 * 1024);"); 3512 "f(10 * 1024 * 1024);");
3513 IncrementalMarking* marking = CcTest::heap()->incremental_marking(); 3513 IncrementalMarking* marking = CcTest::heap()->incremental_marking();
3514 if (marking->IsStopped()) marking->Start(); 3514 if (marking->IsStopped()) marking->Start();
3515 // This big step should be sufficient to mark the whole array. 3515 // This big step should be sufficient to mark the whole array.
3516 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); 3516 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
3517 ASSERT(marking->IsComplete()); 3517 ASSERT(marking->IsComplete());
3518 } 3518 }
OLDNEW
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | test/cctest/test-weakmaps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698