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

Unified Diff: src/codegen.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/code-stubs.cc ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698