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

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

Issue 1409123003: [runtime] Avoid @@isConcatSpreadable lookup for fast path Array.prototype.concat (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merging with master Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/es6/array-concat.js » ('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 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 CompileRun(source.start()); 1639 CompileRun(source.start());
1640 } 1640 }
1641 1641
1642 1642
1643 // Count the number of native contexts in the weak list of native contexts. 1643 // Count the number of native contexts in the weak list of native contexts.
1644 int CountNativeContexts() { 1644 int CountNativeContexts() {
1645 int count = 0; 1645 int count = 0;
1646 Object* object = CcTest::heap()->native_contexts_list(); 1646 Object* object = CcTest::heap()->native_contexts_list();
1647 while (!object->IsUndefined()) { 1647 while (!object->IsUndefined()) {
1648 count++; 1648 count++;
1649 object = Context::cast(object)->get(Context::NEXT_CONTEXT_LINK); 1649 object = Context::cast(object)->next_context_link();
1650 } 1650 }
1651 return count; 1651 return count;
1652 } 1652 }
1653 1653
1654 1654
1655 // Count the number of user functions in the weak list of optimized 1655 // Count the number of user functions in the weak list of optimized
1656 // functions attached to a native context. 1656 // functions attached to a native context.
1657 static int CountOptimizedUserFunctions(v8::Local<v8::Context> context) { 1657 static int CountOptimizedUserFunctions(v8::Local<v8::Context> context) {
1658 int count = 0; 1658 int count = 0;
1659 Handle<Context> icontext = v8::Utils::OpenHandle(*context); 1659 Handle<Context> icontext = v8::Utils::OpenHandle(*context);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 // Count the number of native contexts in the weak list of native contexts 1777 // Count the number of native contexts in the weak list of native contexts
1778 // causing a GC after the specified number of elements. 1778 // causing a GC after the specified number of elements.
1779 static int CountNativeContextsWithGC(Isolate* isolate, int n) { 1779 static int CountNativeContextsWithGC(Isolate* isolate, int n) {
1780 Heap* heap = isolate->heap(); 1780 Heap* heap = isolate->heap();
1781 int count = 0; 1781 int count = 0;
1782 Handle<Object> object(heap->native_contexts_list(), isolate); 1782 Handle<Object> object(heap->native_contexts_list(), isolate);
1783 while (!object->IsUndefined()) { 1783 while (!object->IsUndefined()) {
1784 count++; 1784 count++;
1785 if (count == n) heap->CollectAllGarbage(); 1785 if (count == n) heap->CollectAllGarbage();
1786 object = 1786 object =
1787 Handle<Object>(Context::cast(*object)->get(Context::NEXT_CONTEXT_LINK), 1787 Handle<Object>(Context::cast(*object)->next_context_link(), isolate);
1788 isolate);
1789 } 1788 }
1790 return count; 1789 return count;
1791 } 1790 }
1792 1791
1793 1792
1794 // Count the number of user functions in the weak list of optimized 1793 // Count the number of user functions in the weak list of optimized
1795 // functions attached to a native context causing a GC after the 1794 // functions attached to a native context causing a GC after the
1796 // specified number of elements. 1795 // specified number of elements.
1797 static int CountOptimizedUserFunctionsWithGC(v8::Local<v8::Context> context, 1796 static int CountOptimizedUserFunctionsWithGC(v8::Local<v8::Context> context,
1798 int n) { 1797 int n) {
(...skipping 4939 matching lines...) Expand 10 before | Expand all | Expand 10 after
6738 // All objects need to be black after marking. If a white object crossed the 6737 // All objects need to be black after marking. If a white object crossed the
6739 // progress bar, we would fail here. 6738 // progress bar, we would fail here.
6740 for (int i = 0; i < arr.get()->length(); i++) { 6739 for (int i = 0; i < arr.get()->length(); i++) {
6741 CHECK(Marking::IsBlack( 6740 CHECK(Marking::IsBlack(
6742 Marking::MarkBitFrom(HeapObject::cast(arr.get()->get(i))))); 6741 Marking::MarkBitFrom(HeapObject::cast(arr.get()->get(i)))));
6743 } 6742 }
6744 } 6743 }
6745 6744
6746 } // namespace internal 6745 } // namespace internal
6747 } // namespace v8 6746 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/es6/array-concat.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698