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

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

Issue 196283015: Revert "Moved type feedback vector to SharedFunctionInfo." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « test/cctest/test-compiler.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 // 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 2839 matching lines...) Expand 10 before | Expand all | Expand 10 after
2850 // originating from two different native contexts. 2850 // originating from two different native contexts.
2851 CcTest::global()->Set(v8_str("fun1"), fun1); 2851 CcTest::global()->Set(v8_str("fun1"), fun1);
2852 CcTest::global()->Set(v8_str("fun2"), fun2); 2852 CcTest::global()->Set(v8_str("fun2"), fun2);
2853 CompileRun("function f(a, b) { a(); b(); } f(fun1, fun2);"); 2853 CompileRun("function f(a, b) { a(); b(); } f(fun1, fun2);");
2854 2854
2855 Handle<JSFunction> f = 2855 Handle<JSFunction> f =
2856 v8::Utils::OpenHandle( 2856 v8::Utils::OpenHandle(
2857 *v8::Handle<v8::Function>::Cast( 2857 *v8::Handle<v8::Function>::Cast(
2858 CcTest::global()->Get(v8_str("f")))); 2858 CcTest::global()->Get(v8_str("f"))));
2859 2859
2860 Handle<FixedArray> feedback_vector(f->shared()->feedback_vector()); 2860 Handle<FixedArray> feedback_vector(TypeFeedbackInfo::cast(
2861 f->shared()->code()->type_feedback_info())->feedback_vector());
2861 2862
2862 CHECK_EQ(2, feedback_vector->length()); 2863 CHECK_EQ(2, feedback_vector->length());
2863 CHECK(feedback_vector->get(0)->IsJSFunction()); 2864 CHECK(feedback_vector->get(0)->IsJSFunction());
2864 CHECK(feedback_vector->get(1)->IsJSFunction()); 2865 CHECK(feedback_vector->get(1)->IsJSFunction());
2865 2866
2866 SimulateIncrementalMarking(); 2867 SimulateIncrementalMarking();
2867 CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags); 2868 CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
2868 2869
2869 CHECK_EQ(2, feedback_vector->length()); 2870 CHECK_EQ(2, feedback_vector->length());
2870 CHECK_EQ(feedback_vector->get(0), 2871 CHECK_EQ(feedback_vector->get(0),
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
3733 v8::Handle<v8::Object> global = CcTest::global(); 3734 v8::Handle<v8::Object> global = CcTest::global();
3734 v8::Handle<v8::Function> g = 3735 v8::Handle<v8::Function> g =
3735 v8::Handle<v8::Function>::Cast(global->Get(v8_str("crash"))); 3736 v8::Handle<v8::Function>::Cast(global->Get(v8_str("crash")));
3736 v8::Handle<v8::Value> args1[] = { v8_num(1) }; 3737 v8::Handle<v8::Value> args1[] = { v8_num(1) };
3737 heap->DisableInlineAllocation(); 3738 heap->DisableInlineAllocation();
3738 heap->set_allocation_timeout(1); 3739 heap->set_allocation_timeout(1);
3739 g->Call(global, 1, args1); 3740 g->Call(global, 1, args1);
3740 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); 3741 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
3741 } 3742 }
3742 #endif 3743 #endif
OLDNEW
« no previous file with comments | « test/cctest/test-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698