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

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: Added ARM port, introduced GenerateTailCall 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
« no previous file with comments | « 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 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 // originating from two different native contexts. 2415 // originating from two different native contexts.
2416 v8::Context::GetCurrent()->Global()->Set(v8_str("obj1"), obj1); 2416 v8::Context::GetCurrent()->Global()->Set(v8_str("obj1"), obj1);
2417 v8::Context::GetCurrent()->Global()->Set(v8_str("obj2"), obj2); 2417 v8::Context::GetCurrent()->Global()->Set(v8_str("obj2"), obj2);
2418 CompileRun("function f(o) { return o.x; } f(obj1); f(obj1); f(obj2);"); 2418 CompileRun("function f(o) { return o.x; } f(obj1); f(obj1); f(obj2);");
2419 Handle<JSFunction> f = 2419 Handle<JSFunction> f =
2420 v8::Utils::OpenHandle( 2420 v8::Utils::OpenHandle(
2421 *v8::Handle<v8::Function>::Cast( 2421 *v8::Handle<v8::Function>::Cast(
2422 v8::Context::GetCurrent()->Global()->Get(v8_str("f")))); 2422 v8::Context::GetCurrent()->Global()->Get(v8_str("f"))));
2423 2423
2424 Code* ic_before = FindFirstIC(f->shared()->code(), Code::LOAD_IC); 2424 Code* ic_before = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
2425 CHECK(ic_before->ic_state() == MEGAMORPHIC); 2425 CHECK(ic_before->ic_state() == POLYMORPHIC);
2426 2426
2427 // Fire context dispose notification. 2427 // Fire context dispose notification.
2428 v8::V8::ContextDisposedNotification(); 2428 v8::V8::ContextDisposedNotification();
2429 SimulateIncrementalMarking(); 2429 SimulateIncrementalMarking();
2430 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 2430 HEAP->CollectAllGarbage(Heap::kNoGCFlags);
2431 2431
2432 Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC); 2432 Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
2433 CHECK(ic_after->ic_state() == UNINITIALIZED); 2433 CHECK(ic_after->ic_state() == UNINITIALIZED);
2434 } 2434 }
2435 2435
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2924 // explicitly enqueued. 2924 // explicitly enqueued.
2925 SimulateIncrementalMarking(); 2925 SimulateIncrementalMarking();
2926 2926
2927 // Now enable the debugger which in turn will disable code flushing. 2927 // Now enable the debugger which in turn will disable code flushing.
2928 CHECK(isolate->debug()->Load()); 2928 CHECK(isolate->debug()->Load());
2929 2929
2930 // This cycle will bust the heap and subsequent cycles will go ballistic. 2930 // This cycle will bust the heap and subsequent cycles will go ballistic.
2931 heap->CollectAllGarbage(Heap::kNoGCFlags); 2931 heap->CollectAllGarbage(Heap::kNoGCFlags);
2932 heap->CollectAllGarbage(Heap::kNoGCFlags); 2932 heap->CollectAllGarbage(Heap::kNoGCFlags);
2933 } 2933 }
OLDNEW
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698