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

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

Issue 9608006: Add kAbortIncrementalMarkingMask flag for GC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ulan Degenbaev. Created 8 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-api.cc ('k') | test/cctest/test-heap.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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 private: 94 private:
95 bool allow_natives_syntax_; 95 bool allow_natives_syntax_;
96 bool use_inlining_; 96 bool use_inlining_;
97 }; 97 };
98 98
99 99
100 // Abort any ongoing incremental marking to make sure that all weak global 100 // Abort any ongoing incremental marking to make sure that all weak global
101 // handle callbacks are processed. 101 // handle callbacks are processed.
102 static void NonIncrementalGC() { 102 static void NonIncrementalGC() {
103 // TODO(1608): This should use kAbortIncrementalMarking. 103 HEAP->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask);
104 HEAP->CollectAllGarbage(i::Heap::kMakeHeapIterableMask);
105 } 104 }
106 105
107 106
108 static Handle<JSFunction> GetJSFunction(v8::Handle<v8::Object> obj, 107 static Handle<JSFunction> GetJSFunction(v8::Handle<v8::Object> obj,
109 const char* property_name) { 108 const char* property_name) {
110 v8::Local<v8::Function> fun = 109 v8::Local<v8::Function> fun =
111 v8::Local<v8::Function>::Cast(obj->Get(v8_str(property_name))); 110 v8::Local<v8::Function>::Cast(obj->Get(v8_str(property_name)));
112 return v8::Utils::OpenHandle(*fun); 111 return v8::Utils::OpenHandle(*fun);
113 } 112 }
114 113
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 NonIncrementalGC(); 681 NonIncrementalGC();
683 682
684 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); 683 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized());
685 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); 684 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized());
686 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); 685 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized());
687 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); 686 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
688 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); 687 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value());
689 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); 688 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
690 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(Isolate::Current())); 689 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(Isolate::Current()));
691 } 690 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698