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

Unified Diff: src/factory.cc

Issue 10832342: Rename "global context" to "native 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
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 913b75601551593eb93bf5f61a5b4e9567dd4b07..85a37ad217d03ca4a47261a390937b1872a45acf 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -284,10 +284,10 @@ Handle<String> Factory::NewExternalStringFromTwoByte(
}
-Handle<Context> Factory::NewGlobalContext() {
+Handle<Context> Factory::NewNativeContext() {
CALL_HEAP_FUNCTION(
isolate(),
- isolate()->heap()->AllocateGlobalContext(),
+ isolate()->heap()->AllocateNativeContext(),
Context);
}
@@ -552,16 +552,16 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
result->set_context(*context);
- int index = function_info->SearchOptimizedCodeMap(context->global_context());
+ int index = function_info->SearchOptimizedCodeMap(context->native_context());
if (!function_info->bound() && index < 0) {
int number_of_literals = function_info->num_literals();
Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure);
if (number_of_literals > 0) {
- // Store the global context in the literals array prefix. This
+ // Store the native context in the literals array prefix. This
// context will be used when creating object, regexp and array
// literals in this function.
- literals->set(JSFunction::kLiteralGlobalContextIndex,
- context->global_context());
+ literals->set(JSFunction::kLiteralNativeContextIndex,
+ context->native_context());
}
result->set_literals(*literals);
}
@@ -1110,7 +1110,7 @@ Handle<JSFunction> Factory::NewFunctionHelper(Handle<String> name,
Handle<JSFunction> Factory::NewFunction(Handle<String> name,
Handle<Object> prototype) {
Handle<JSFunction> fun = NewFunctionHelper(name, prototype);
- fun->set_context(isolate()->context()->global_context());
+ fun->set_context(isolate()->context()->native_context());
return fun;
}
@@ -1136,7 +1136,7 @@ Handle<JSFunction> Factory::NewFunctionWithoutPrototype(
LanguageMode language_mode) {
Handle<JSFunction> fun =
NewFunctionWithoutPrototypeHelper(name, language_mode);
- fun->set_context(isolate()->context()->global_context());
+ fun->set_context(isolate()->context()->native_context());
return fun;
}
@@ -1147,8 +1147,8 @@ Handle<Object> Factory::ToObject(Handle<Object> object) {
Handle<Object> Factory::ToObject(Handle<Object> object,
- Handle<Context> global_context) {
- CALL_HEAP_FUNCTION(isolate(), object->ToObject(*global_context), Object);
+ Handle<Context> native_context) {
+ CALL_HEAP_FUNCTION(isolate(), object->ToObject(*native_context), Object);
}
@@ -1320,7 +1320,7 @@ Handle<MapCache> Factory::AddToMapCache(Handle<Context> context,
Handle<Map> Factory::ObjectLiteralMapFromCache(Handle<Context> context,
Handle<FixedArray> keys) {
if (context->map_cache()->IsUndefined()) {
- // Allocate the new map cache for the global context.
+ // Allocate the new map cache for the native context.
Handle<MapCache> new_cache = NewMapCache(24);
context->set_map_cache(*new_cache);
}

Powered by Google App Engine
This is Rietveld 408576698