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

Unified Diff: src/x64/register-allocator-x64.cc

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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 | « src/x64/regexp-macro-assembler-x64.cc ('k') | src/x64/simulator-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/register-allocator-x64.cc
===================================================================
--- src/x64/register-allocator-x64.cc (revision 7267)
+++ src/x64/register-allocator-x64.cc (working copy)
@@ -42,9 +42,11 @@
void Result::ToRegister() {
ASSERT(is_valid());
if (is_constant()) {
- Result fresh = CodeGeneratorScope::Current()->allocator()->Allocate();
+ CodeGenerator* code_generator =
+ CodeGeneratorScope::Current(Isolate::Current());
+ Result fresh = code_generator->allocator()->Allocate();
ASSERT(fresh.is_valid());
- CodeGeneratorScope::Current()->masm()->Move(fresh.reg(), handle());
+ code_generator->masm()->Move(fresh.reg(), handle());
// This result becomes a copy of the fresh one.
fresh.set_type_info(type_info());
*this = fresh;
@@ -55,21 +57,23 @@
void Result::ToRegister(Register target) {
ASSERT(is_valid());
+ CodeGenerator* code_generator =
+ CodeGeneratorScope::Current(Isolate::Current());
if (!is_register() || !reg().is(target)) {
- Result fresh = CodeGeneratorScope::Current()->allocator()->Allocate(target);
+ Result fresh = code_generator->allocator()->Allocate(target);
ASSERT(fresh.is_valid());
if (is_register()) {
- CodeGeneratorScope::Current()->masm()->movq(fresh.reg(), reg());
+ code_generator->masm()->movq(fresh.reg(), reg());
} else {
ASSERT(is_constant());
- CodeGeneratorScope::Current()->masm()->Move(fresh.reg(), handle());
+ code_generator->masm()->Move(fresh.reg(), handle());
}
fresh.set_type_info(type_info());
*this = fresh;
} else if (is_register() && reg().is(target)) {
- ASSERT(CodeGeneratorScope::Current()->has_valid_frame());
- CodeGeneratorScope::Current()->frame()->Spill(target);
- ASSERT(CodeGeneratorScope::Current()->allocator()->count(target) == 1);
+ ASSERT(code_generator->has_valid_frame());
+ code_generator->frame()->Spill(target);
+ ASSERT(code_generator->allocator()->count(target) == 1);
}
ASSERT(is_register());
ASSERT(reg().is(target));
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.cc ('k') | src/x64/simulator-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698