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

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

Issue 137083002: Get rid of ContextualMode for call ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Restore HCallGlobal until a follow-up CL Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/regress/regress-2284.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 3072 matching lines...) Expand 10 before | Expand all | Expand 10 after
3083 Isolate* isolate = CcTest::i_isolate(); 3083 Isolate* isolate = CcTest::i_isolate();
3084 Heap* heap = isolate->heap(); 3084 Heap* heap = isolate->heap();
3085 HandleScope scope(isolate); 3085 HandleScope scope(isolate);
3086 3086
3087 // First make sure that the uninitialized CallIC stub is on a single page 3087 // First make sure that the uninitialized CallIC stub is on a single page
3088 // that will later be selected as an evacuation candidate. 3088 // that will later be selected as an evacuation candidate.
3089 { 3089 {
3090 HandleScope inner_scope(isolate); 3090 HandleScope inner_scope(isolate);
3091 AlwaysAllocateScope always_allocate; 3091 AlwaysAllocateScope always_allocate;
3092 SimulateFullSpace(heap->code_space()); 3092 SimulateFullSpace(heap->code_space());
3093 isolate->stub_cache()->ComputeCallInitialize(9, NOT_CONTEXTUAL); 3093 isolate->stub_cache()->ComputeCallInitialize(9);
3094 } 3094 }
3095 3095
3096 // Second compile a CallIC and execute it once so that it gets patched to 3096 // Second compile a CallIC and execute it once so that it gets patched to
3097 // the pre-monomorphic stub. These code objects are on yet another page. 3097 // the pre-monomorphic stub. These code objects are on yet another page.
3098 { 3098 {
3099 HandleScope inner_scope(isolate); 3099 HandleScope inner_scope(isolate);
3100 AlwaysAllocateScope always_allocate; 3100 AlwaysAllocateScope always_allocate;
3101 SimulateFullSpace(heap->code_space()); 3101 SimulateFullSpace(heap->code_space());
3102 CompileRun("var o = { f:function(a,b,c,d,e,f,g,h,i) {}};" 3102 CompileRun("var o = { f:function(a,b,c,d,e,f,g,h,i) {}};"
3103 "function call() { o.f(1,2,3,4,5,6,7,8,9); };" 3103 "function call() { o.f(1,2,3,4,5,6,7,8,9); };"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3657 for (int i = 0; i < 4; i++) { 3657 for (int i = 0; i < 4; i++) {
3658 heap->CollectAllGarbage(false); 3658 heap->CollectAllGarbage(false);
3659 } 3659 }
3660 3660
3661 // The site still exists because of our global handle, but the code is no 3661 // The site still exists because of our global handle, but the code is no
3662 // longer referred to by dependent_code(). 3662 // longer referred to by dependent_code().
3663 DependentCode::GroupStartIndexes starts(site->dependent_code()); 3663 DependentCode::GroupStartIndexes starts(site->dependent_code());
3664 int index = starts.at(DependentCode::kAllocationSiteTransitionChangedGroup); 3664 int index = starts.at(DependentCode::kAllocationSiteTransitionChangedGroup);
3665 CHECK(!(site->dependent_code()->is_code_at(index))); 3665 CHECK(!(site->dependent_code()->is_code_at(index)));
3666 } 3666 }
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/regress/regress-2284.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698