Index: src/codegen.h |
=================================================================== |
--- src/codegen.h (revision 7267) |
+++ src/codegen.h (working copy) |
@@ -92,26 +92,26 @@ |
// of active code generators. |
class CodeGeneratorScope BASE_EMBEDDED { |
public: |
- explicit CodeGeneratorScope(CodeGenerator* cgen) { |
- previous_ = top_; |
- top_ = cgen; |
+ explicit CodeGeneratorScope(Isolate* isolate, CodeGenerator* cgen) |
+ : isolate_(isolate) { |
+ previous_ = isolate->current_code_generator(); |
+ isolate->set_current_code_generator(cgen); |
} |
~CodeGeneratorScope() { |
- top_ = previous_; |
+ isolate_->set_current_code_generator(previous_); |
} |
- static CodeGenerator* Current() { |
- ASSERT(top_ != NULL); |
- return top_; |
+ static CodeGenerator* Current(Isolate* isolate) { |
+ ASSERT(isolate->current_code_generator() != NULL); |
+ return isolate->current_code_generator(); |
} |
private: |
- static CodeGenerator* top_; |
CodeGenerator* previous_; |
+ Isolate* isolate_; |
}; |
- |
#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 |
// State of used registers in a virtual frame. |