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

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

Issue 12340112: Polymorphism support for load IC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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
« src/type-info.cc ('K') | « src/x64/stub-cache-x64.cc ('k') | no next file » | 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 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "compilation-cache.h" 7 #include "compilation-cache.h"
8 #include "execution.h" 8 #include "execution.h"
9 #include "factory.h" 9 #include "factory.h"
10 #include "macro-assembler.h" 10 #include "macro-assembler.h"
(...skipping 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 // originating from two different native contexts. 2414 // originating from two different native contexts.
2415 v8::Context::GetCurrent()->Global()->Set(v8_str("obj1"), obj1); 2415 v8::Context::GetCurrent()->Global()->Set(v8_str("obj1"), obj1);
2416 v8::Context::GetCurrent()->Global()->Set(v8_str("obj2"), obj2); 2416 v8::Context::GetCurrent()->Global()->Set(v8_str("obj2"), obj2);
2417 CompileRun("function f(o) { return o.x; } f(obj1); f(obj1); f(obj2);"); 2417 CompileRun("function f(o) { return o.x; } f(obj1); f(obj1); f(obj2);");
2418 Handle<JSFunction> f = 2418 Handle<JSFunction> f =
2419 v8::Utils::OpenHandle( 2419 v8::Utils::OpenHandle(
2420 *v8::Handle<v8::Function>::Cast( 2420 *v8::Handle<v8::Function>::Cast(
2421 v8::Context::GetCurrent()->Global()->Get(v8_str("f")))); 2421 v8::Context::GetCurrent()->Global()->Get(v8_str("f"))));
2422 2422
2423 Code* ic_before = FindFirstIC(f->shared()->code(), Code::LOAD_IC); 2423 Code* ic_before = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
2424 CHECK(ic_before->ic_state() == MEGAMORPHIC); 2424 CHECK(ic_before->ic_state() == POLYMORPHIC);
2425 2425
2426 // Fire context dispose notification. 2426 // Fire context dispose notification.
2427 v8::V8::ContextDisposedNotification(); 2427 v8::V8::ContextDisposedNotification();
2428 SimulateIncrementalMarking(); 2428 SimulateIncrementalMarking();
2429 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 2429 HEAP->CollectAllGarbage(Heap::kNoGCFlags);
2430 2430
2431 Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC); 2431 Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
2432 CHECK(ic_after->ic_state() == UNINITIALIZED); 2432 CHECK(ic_after->ic_state() == UNINITIALIZED);
2433 } 2433 }
2434 2434
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2923 // explicitly enqueued. 2923 // explicitly enqueued.
2924 SimulateIncrementalMarking(); 2924 SimulateIncrementalMarking();
2925 2925
2926 // Now enable the debugger which in turn will disable code flushing. 2926 // Now enable the debugger which in turn will disable code flushing.
2927 CHECK(isolate->debug()->Load()); 2927 CHECK(isolate->debug()->Load());
2928 2928
2929 // This cycle will bust the heap and subsequent cycles will go ballistic. 2929 // This cycle will bust the heap and subsequent cycles will go ballistic.
2930 heap->CollectAllGarbage(Heap::kNoGCFlags); 2930 heap->CollectAllGarbage(Heap::kNoGCFlags);
2931 heap->CollectAllGarbage(Heap::kNoGCFlags); 2931 heap->CollectAllGarbage(Heap::kNoGCFlags);
2932 } 2932 }
OLDNEW
« src/type-info.cc ('K') | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698