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

Unified Diff: runtime/vm/object_test.cc

Issue 868103002: VM: Use PC offset instead of absolute PC in exception handler info. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
===================================================================
--- runtime/vm/object_test.cc (revision 43131)
+++ runtime/vm/object_test.cc (working copy)
@@ -2733,10 +2733,10 @@
exception_handlers ^= ExceptionHandlers::New(kNumEntries);
const bool kNeedsStacktrace = true;
const bool kNoStacktrace = false;
- exception_handlers.SetHandlerInfo(0, -1, 20, kNeedsStacktrace, false);
- exception_handlers.SetHandlerInfo(1, 0, 30, kNeedsStacktrace, false);
- exception_handlers.SetHandlerInfo(2, -1, 40, kNoStacktrace, true);
- exception_handlers.SetHandlerInfo(3, 1, 150, kNoStacktrace, true);
+ exception_handlers.SetHandlerInfo(0, -1, 20u, kNeedsStacktrace, false);
+ exception_handlers.SetHandlerInfo(1, 0, 30u, kNeedsStacktrace, false);
+ exception_handlers.SetHandlerInfo(2, -1, 40u, kNoStacktrace, true);
+ exception_handlers.SetHandlerInfo(3, 1, 150u, kNoStacktrace, true);
extern void GenerateIncrement(Assembler* assembler);
Assembler _assembler_;
@@ -2753,12 +2753,12 @@
handlers.GetHandlerInfo(0, &info);
EXPECT_EQ(-1, handlers.OuterTryIndex(0));
EXPECT_EQ(-1, info.outer_try_index);
- EXPECT_EQ(20, handlers.HandlerPC(0));
+ EXPECT_EQ(20u, handlers.HandlerPCOffset(0));
EXPECT(handlers.NeedsStacktrace(0));
EXPECT(!handlers.HasCatchAll(0));
- EXPECT_EQ(20, info.handler_pc);
+ EXPECT_EQ(20u, info.handler_pc_offset);
EXPECT_EQ(1, handlers.OuterTryIndex(3));
- EXPECT_EQ(150, handlers.HandlerPC(3));
+ EXPECT_EQ(150u, handlers.HandlerPCOffset(3));
EXPECT(!handlers.NeedsStacktrace(3));
EXPECT(handlers.HasCatchAll(3));
}
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698