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

Unified Diff: src/compiler.h

Issue 10872084: Allocate block-scoped global bindings to global context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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/bootstrapper.cc ('k') | src/compiler.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 6ff53cc5ec4611c6587d4477499adc1c464b7909..63101e168594fd335930f3e51e2471c4bccef533 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -72,7 +72,7 @@ class CompilationInfo {
Handle<Script> script() const { return script_; }
v8::Extension* extension() const { return extension_; }
ScriptDataImpl* pre_parse_data() const { return pre_parse_data_; }
- Handle<Context> calling_context() const { return calling_context_; }
+ Handle<Context> context() const { return context_; }
BailoutId osr_ast_id() const { return osr_ast_id_; }
void MarkAsEval() {
@@ -120,9 +120,8 @@ class CompilationInfo {
ASSERT(!is_lazy());
pre_parse_data_ = pre_parse_data;
}
- void SetCallingContext(Handle<Context> context) {
- ASSERT(is_eval());
- calling_context_ = context;
+ void SetContext(Handle<Context> context) {
+ context_ = context;
}
void MarkCompilingForDebugging(Handle<Code> current_code) {
ASSERT(mode_ != OPTIMIZE);
@@ -180,7 +179,7 @@ class CompilationInfo {
void SaveHandles() {
SaveHandle(&closure_);
SaveHandle(&shared_info_);
- SaveHandle(&calling_context_);
+ SaveHandle(&context_);
SaveHandle(&script_);
}
@@ -258,9 +257,9 @@ class CompilationInfo {
v8::Extension* extension_;
ScriptDataImpl* pre_parse_data_;
- // The context of the caller is needed for eval code, and will be a null
- // handle otherwise.
- Handle<Context> calling_context_;
+ // The context of the caller for eval code, and the global context for a
+ // global script. Will be a null handle otherwise.
+ Handle<Context> context_;
// Compilation mode flag and whether deoptimization is allowed.
Mode mode_;
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compiler.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698