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

Side by Side Diff: runtime/vm/unit_test.cc

Issue 10871005: Make ClassFinalizer indifferent on whether we are generating a snapshot or not. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
« runtime/vm/parser.cc ('K') | « runtime/vm/snapshot_test.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 temp->set_is_final(); 208 temp->set_is_final();
209 node_sequence_->scope()->AddVariable(temp); 209 node_sequence_->scope()->AddVariable(temp);
210 return temp; 210 return temp;
211 } 211 }
212 212
213 213
214 bool CompilerTest::TestCompileScript(const Library& library, 214 bool CompilerTest::TestCompileScript(const Library& library,
215 const Script& script) { 215 const Script& script) {
216 Isolate* isolate = Isolate::Current(); 216 Isolate* isolate = Isolate::Current();
217 ASSERT(isolate != NULL); 217 ASSERT(isolate != NULL);
218 const Error& error = Error::Handle(Compiler::Compile(library, script)); 218 const Error& error = Error::Handle(Compiler::Compile(
219 library, script, ClassFinalizer::kNotGeneratingSnapshot));
219 return error.IsNull(); 220 return error.IsNull();
220 } 221 }
221 222
222 223
223 bool CompilerTest::TestCompileFunction(const Function& function) { 224 bool CompilerTest::TestCompileFunction(const Function& function) {
224 Isolate* isolate = Isolate::Current(); 225 Isolate* isolate = Isolate::Current();
225 ASSERT(isolate != NULL); 226 ASSERT(isolate != NULL);
226 ASSERT(ClassFinalizer::AllClassesFinalized()); 227 ASSERT(ClassFinalizer::AllClassesFinalized());
227 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 228 const Error& error = Error::Handle(Compiler::CompileFunction(function));
228 return error.IsNull(); 229 return error.IsNull();
229 } 230 }
230 231
231 } // namespace dart 232 } // namespace dart
OLDNEW
« runtime/vm/parser.cc ('K') | « runtime/vm/snapshot_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698