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

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

Issue 24169005: remove HEAP from tests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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-decls.cc ('k') | test/cctest/test-dictionary.cc » ('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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 private: 97 private:
98 bool allow_natives_syntax_; 98 bool allow_natives_syntax_;
99 bool use_inlining_; 99 bool use_inlining_;
100 bool concurrent_recompilation_; 100 bool concurrent_recompilation_;
101 }; 101 };
102 102
103 103
104 // Abort any ongoing incremental marking to make sure that all weak global 104 // Abort any ongoing incremental marking to make sure that all weak global
105 // handle callbacks are processed. 105 // handle callbacks are processed.
106 static void NonIncrementalGC() { 106 static void NonIncrementalGC() {
107 HEAP->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask); 107 CcTest::heap()->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask);
108 } 108 }
109 109
110 110
111 static Handle<JSFunction> GetJSFunction(v8::Handle<v8::Object> obj, 111 static Handle<JSFunction> GetJSFunction(v8::Handle<v8::Object> obj,
112 const char* property_name) { 112 const char* property_name) {
113 v8::Local<v8::Function> fun = 113 v8::Local<v8::Function> fun =
114 v8::Local<v8::Function>::Cast(obj->Get(v8_str(property_name))); 114 v8::Local<v8::Function>::Cast(obj->Get(v8_str(property_name)));
115 return v8::Utils::OpenHandle(*fun); 115 return v8::Utils::OpenHandle(*fun);
116 } 116 }
117 117
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 NonIncrementalGC(); 685 NonIncrementalGC();
686 686
687 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); 687 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized());
688 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); 688 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized());
689 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); 689 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized());
690 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); 690 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
691 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); 691 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value());
692 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); 692 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
693 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate())); 693 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
694 } 694 }
OLDNEW
« no previous file with comments | « test/cctest/test-decls.cc ('k') | test/cctest/test-dictionary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698