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

Unified Diff: runtime/vm/code_generator_ia32.cc

Issue 9949020: Move HandlerList to shared ExceptionHandlerList. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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/code_generator_ia32.h ('k') | runtime/vm/code_generator_x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_ia32.cc
===================================================================
--- runtime/vm/code_generator_ia32.cc (revision 6234)
+++ runtime/vm/code_generator_ia32.cc (working copy)
@@ -58,54 +58,6 @@
}
-class CodeGenerator::HandlerList : public ZoneAllocated {
- public:
- struct HandlerDesc {
- intptr_t try_index; // Try block index handled by the handler.
- intptr_t pc_offset; // Handler PC offset value.
- };
-
- HandlerList() : list_() {
- }
- ~HandlerList() { }
-
- intptr_t Length() const {
- return list_.length();
- }
-
- intptr_t TryIndex(int index) const {
- return list_[index].try_index;
- }
- intptr_t PcOffset(int index) const {
- return list_[index].pc_offset;
- }
- void SetPcOffset(int index, intptr_t handler_pc) {
- list_[index].pc_offset = handler_pc;
- }
-
- void AddHandler(intptr_t try_index, intptr_t pc_offset) {
- struct HandlerDesc data;
- data.try_index = try_index;
- data.pc_offset = pc_offset;
- list_.Add(data);
- }
-
- RawExceptionHandlers* FinalizeExceptionHandlers(uword entry_point) {
- intptr_t num_handlers = Length();
- const ExceptionHandlers& handlers =
- ExceptionHandlers::Handle(ExceptionHandlers::New(num_handlers));
- for (intptr_t i = 0; i < num_handlers; i++) {
- handlers.SetHandlerEntry(i, TryIndex(i), (entry_point + PcOffset(i)));
- }
- return handlers.raw();
- }
-
- private:
- GrowableArray<struct HandlerDesc> list_;
- DISALLOW_COPY_AND_ASSIGN(HandlerList);
-};
-
-
CodeGenerator::CodeGenerator(Assembler* assembler,
const ParsedFunction& parsed_function)
: assembler_(assembler),
@@ -122,7 +74,7 @@
ASSERT(Isolate::Current()->long_jump_base()->IsSafeToJump());
pc_descriptors_list_ = new DescriptorList();
// We do not build any stack maps in the unoptimizing compiler.
- exception_handlers_list_ = new CodeGenerator::HandlerList();
+ exception_handlers_list_ = new ExceptionHandlerList();
}
« no previous file with comments | « runtime/vm/code_generator_ia32.h ('k') | runtime/vm/code_generator_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698