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

Side by Side Diff: src/jump-target-light.cc

Issue 1604002: Simple register allocation for ARM. Only top of expression... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 71
72 DeferredCode::DeferredCode() 72 DeferredCode::DeferredCode()
73 : masm_(CodeGeneratorScope::Current()->masm()), 73 : masm_(CodeGeneratorScope::Current()->masm()),
74 statement_position_(masm_->current_statement_position()), 74 statement_position_(masm_->current_statement_position()),
75 position_(masm_->current_position()) { 75 position_(masm_->current_position()) {
76 ASSERT(statement_position_ != RelocInfo::kNoPosition); 76 ASSERT(statement_position_ != RelocInfo::kNoPosition);
77 ASSERT(position_ != RelocInfo::kNoPosition); 77 ASSERT(position_ != RelocInfo::kNoPosition);
78 78
79 CodeGeneratorScope::Current()->AddDeferred(this); 79 CodeGeneratorScope::Current()->AddDeferred(this);
80
80 #ifdef DEBUG 81 #ifdef DEBUG
81 comment_ = ""; 82 CodeGeneratorScope::Current()->frame()->AssertIsSpilled();
82 #endif 83 #endif
83
84 // Copy the register locations from the code generator's frame.
85 // These are the registers that will be spilled on entry to the
86 // deferred code and restored on exit.
87 VirtualFrame* frame = CodeGeneratorScope::Current()->frame();
88 for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) {
89 int loc = frame->register_location(i);
90 if (loc == VirtualFrame::kIllegalIndex) {
91 registers_[i] = kIgnore;
92 } else {
93 // Needs to be restored on exit but not saved on entry.
94 registers_[i] = frame->fp_relative(loc) | kSyncedFlag;
95 }
96 }
97 } 84 }
98 85
99 } } // namespace v8::internal 86 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698