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

Side by Side Diff: src/virtual-frame-light-inl.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/version.cc ('k') | src/vm-state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void VirtualFrame::PrepareForReturn() { 76 void VirtualFrame::PrepareForReturn() {
77 // Don't bother flushing tos registers as returning does not require more 77 // Don't bother flushing tos registers as returning does not require more
78 // access to the expression stack. 78 // access to the expression stack.
79 top_of_stack_state_ = NO_TOS_REGISTERS; 79 top_of_stack_state_ = NO_TOS_REGISTERS;
80 } 80 }
81 81
82 82
83 VirtualFrame::RegisterAllocationScope::RegisterAllocationScope( 83 VirtualFrame::RegisterAllocationScope::RegisterAllocationScope(
84 CodeGenerator* cgen) 84 CodeGenerator* cgen)
85 : cgen_(cgen), 85 : cgen_(cgen),
86 old_is_spilled_(SpilledScope::is_spilled_) { 86 old_is_spilled_(
87 SpilledScope::is_spilled_ = false; 87 Isolate::Current()->is_virtual_frame_in_spilled_scope()) {
88 Isolate::Current()->set_is_virtual_frame_in_spilled_scope(false);
88 if (old_is_spilled_) { 89 if (old_is_spilled_) {
89 VirtualFrame* frame = cgen->frame(); 90 VirtualFrame* frame = cgen->frame();
90 if (frame != NULL) { 91 if (frame != NULL) {
91 frame->AssertIsSpilled(); 92 frame->AssertIsSpilled();
92 } 93 }
93 } 94 }
94 } 95 }
95 96
96 97
97 VirtualFrame::RegisterAllocationScope::~RegisterAllocationScope() { 98 VirtualFrame::RegisterAllocationScope::~RegisterAllocationScope() {
98 SpilledScope::is_spilled_ = old_is_spilled_; 99 Isolate::Current()->set_is_virtual_frame_in_spilled_scope(old_is_spilled_);
99 if (old_is_spilled_) { 100 if (old_is_spilled_) {
100 VirtualFrame* frame = cgen_->frame(); 101 VirtualFrame* frame = cgen_->frame();
101 if (frame != NULL) { 102 if (frame != NULL) {
102 frame->SpillAll(); 103 frame->SpillAll();
103 } 104 }
104 } 105 }
105 } 106 }
106 107
107 108
108 CodeGenerator* VirtualFrame::cgen() const { 109 CodeGenerator* VirtualFrame::cgen() const {
109 return CodeGeneratorScope::Current(); 110 return CodeGeneratorScope::Current(Isolate::Current());
110 } 111 }
111 112
112 113
113 MacroAssembler* VirtualFrame::masm() { return cgen()->masm(); } 114 MacroAssembler* VirtualFrame::masm() { return cgen()->masm(); }
114 115
115 116
116 void VirtualFrame::CallStub(CodeStub* stub, int arg_count) { 117 void VirtualFrame::CallStub(CodeStub* stub, int arg_count) {
117 if (arg_count != 0) Forget(arg_count); 118 if (arg_count != 0) Forget(arg_count);
118 ASSERT(cgen()->HasValidEntryRegisters()); 119 ASSERT(cgen()->HasValidEntryRegisters());
119 masm()->CallStub(stub); 120 masm()->CallStub(stub);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 162
162 MemOperand VirtualFrame::LocalAt(int index) { 163 MemOperand VirtualFrame::LocalAt(int index) {
163 ASSERT(0 <= index); 164 ASSERT(0 <= index);
164 ASSERT(index < local_count()); 165 ASSERT(index < local_count());
165 return MemOperand(fp, kLocal0Offset - index * kPointerSize); 166 return MemOperand(fp, kLocal0Offset - index * kPointerSize);
166 } 167 }
167 168
168 } } // namespace v8::internal 169 } } // namespace v8::internal
169 170
170 #endif // V8_VIRTUAL_FRAME_LIGHT_INL_H_ 171 #endif // V8_VIRTUAL_FRAME_LIGHT_INL_H_
OLDNEW
« no previous file with comments | « src/version.cc ('k') | src/vm-state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698