OLD | NEW |
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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 | 807 |
808 obj->SetProperty( | 808 obj->SetProperty( |
809 *first, Smi::FromInt(1), NONE, kNonStrictMode)->ToObjectChecked(); | 809 *first, Smi::FromInt(1), NONE, kNonStrictMode)->ToObjectChecked(); |
810 obj->SetProperty( | 810 obj->SetProperty( |
811 *second, Smi::FromInt(2), NONE, kNonStrictMode)->ToObjectChecked(); | 811 *second, Smi::FromInt(2), NONE, kNonStrictMode)->ToObjectChecked(); |
812 | 812 |
813 obj->SetElement(0, *first, NONE, kNonStrictMode)->ToObjectChecked(); | 813 obj->SetElement(0, *first, NONE, kNonStrictMode)->ToObjectChecked(); |
814 obj->SetElement(1, *second, NONE, kNonStrictMode)->ToObjectChecked(); | 814 obj->SetElement(1, *second, NONE, kNonStrictMode)->ToObjectChecked(); |
815 | 815 |
816 // Make the clone. | 816 // Make the clone. |
817 Handle<JSObject> clone = JSObject::Copy(obj); | 817 Handle<JSObject> clone = Copy(obj); |
818 CHECK(!clone.is_identical_to(obj)); | 818 CHECK(!clone.is_identical_to(obj)); |
819 | 819 |
820 CHECK_EQ(obj->GetElement(isolate, 0), clone->GetElement(isolate, 0)); | 820 CHECK_EQ(obj->GetElement(isolate, 0), clone->GetElement(isolate, 0)); |
821 CHECK_EQ(obj->GetElement(isolate, 1), clone->GetElement(isolate, 1)); | 821 CHECK_EQ(obj->GetElement(isolate, 1), clone->GetElement(isolate, 1)); |
822 | 822 |
823 CHECK_EQ(obj->GetProperty(*first), clone->GetProperty(*first)); | 823 CHECK_EQ(obj->GetProperty(*first), clone->GetProperty(*first)); |
824 CHECK_EQ(obj->GetProperty(*second), clone->GetProperty(*second)); | 824 CHECK_EQ(obj->GetProperty(*second), clone->GetProperty(*second)); |
825 | 825 |
826 // Flip the values. | 826 // Flip the values. |
827 clone->SetProperty( | 827 clone->SetProperty( |
(...skipping 2615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3443 " var a = new Array(n);" | 3443 " var a = new Array(n);" |
3444 " for (var i = 0; i < n; i += 100) a[i] = i;" | 3444 " for (var i = 0; i < n; i += 100) a[i] = i;" |
3445 "};" | 3445 "};" |
3446 "f(10 * 1024 * 1024);"); | 3446 "f(10 * 1024 * 1024);"); |
3447 IncrementalMarking* marking = HEAP->incremental_marking(); | 3447 IncrementalMarking* marking = HEAP->incremental_marking(); |
3448 if (marking->IsStopped()) marking->Start(); | 3448 if (marking->IsStopped()) marking->Start(); |
3449 // This big step should be sufficient to mark the whole array. | 3449 // This big step should be sufficient to mark the whole array. |
3450 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 3450 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
3451 ASSERT(marking->IsComplete()); | 3451 ASSERT(marking->IsComplete()); |
3452 } | 3452 } |
OLD | NEW |