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

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

Issue 9314053: Revert Dart_PropagateError until I can track down the problems in (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | « runtime/vm/unit_test.h ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } else { 179 } else {
180 retval = false; 180 retval = false;
181 } 181 }
182 EXPECT(retval); 182 EXPECT(retval);
183 isolate->set_long_jump_base(base); 183 isolate->set_long_jump_base(base);
184 } 184 }
185 185
186 186
187 bool CompilerTest::TestCompileScript(const Library& library, 187 bool CompilerTest::TestCompileScript(const Library& library,
188 const Script& script) { 188 const Script& script) {
189 bool retval;
189 Isolate* isolate = Isolate::Current(); 190 Isolate* isolate = Isolate::Current();
190 ASSERT(isolate != NULL); 191 ASSERT(isolate != NULL);
191 const Error& error = Error::Handle(Compiler::Compile(library, script)); 192 LongJump* base = isolate->long_jump_base();
192 return error.IsNull(); 193 LongJump jump;
194 isolate->set_long_jump_base(&jump);
195 if (setjmp(*jump.Set()) == 0) {
196 Compiler::Compile(library, script);
197 retval = true;
198 } else {
199 retval = false;
200 }
201 isolate->set_long_jump_base(base);
202 return retval;
193 } 203 }
194 204
195 205
196 bool CompilerTest::TestCompileFunction(const Function& function) { 206 bool CompilerTest::TestCompileFunction(const Function& function) {
207 bool retval;
197 Isolate* isolate = Isolate::Current(); 208 Isolate* isolate = Isolate::Current();
198 ASSERT(isolate != NULL); 209 ASSERT(isolate != NULL);
199 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 210 LongJump* base = isolate->long_jump_base();
200 return error.IsNull(); 211 LongJump jump;
212 isolate->set_long_jump_base(&jump);
213 if (setjmp(*jump.Set()) == 0) {
214 Compiler::CompileFunction(function);
215 retval = true;
216 } else {
217 retval = false;
218 }
219 isolate->set_long_jump_base(base);
220 return retval;
201 } 221 }
202 222
203 } // namespace dart 223 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/unit_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698