| Index: runtime/vm/code_generator_x64.cc
|
| ===================================================================
|
| --- runtime/vm/code_generator_x64.cc (revision 6234)
|
| +++ runtime/vm/code_generator_x64.cc (working copy)
|
| @@ -30,12 +30,6 @@
|
|
|
| #define __ assembler_->
|
|
|
| -
|
| -// TODO(regis): CodeGeneratorState, CodeGenerator::DescriptorList, and
|
| -// CodeGenerator::HandlerList can probably be moved to code_generator.cc, since
|
| -// they seem to be architecture independent.
|
| -
|
| -
|
| CodeGeneratorState::CodeGeneratorState(CodeGenerator* codegen)
|
| : StackResource(Isolate::Current()),
|
| codegen_(codegen),
|
| @@ -56,54 +50,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),
|
| @@ -120,7 +66,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();
|
| }
|
|
|
|
|
|
|