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

Unified Diff: src/objects-inl.h

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
« src/heap.h ('K') | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 68358ef8f85f3dac074e8bd3fcb511f42557bc9d..74ce87a0e1808854568e5220d38302c629b6ce47 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -574,7 +574,7 @@ bool Object::IsContext() {
return (map == heap->function_context_map() ||
map == heap->catch_context_map() ||
map == heap->with_context_map() ||
- map == heap->global_context_map() ||
+ map == heap->native_context_map() ||
map == heap->block_context_map() ||
map == heap->module_context_map());
}
@@ -582,10 +582,10 @@ bool Object::IsContext() {
}
-bool Object::IsGlobalContext() {
+bool Object::IsNativeContext() {
return Object::IsHeapObject() &&
HeapObject::cast(this)->map() ==
- HeapObject::cast(this)->GetHeap()->global_context_map();
+ HeapObject::cast(this)->GetHeap()->native_context_map();
}
@@ -1339,8 +1339,8 @@ MaybeObject* JSObject::GetElementsTransitionMap(Isolate* isolate,
ElementsKind from_kind = current_map->elements_kind();
if (from_kind == to_kind) return current_map;
- Context* global_context = isolate->context()->global_context();
- Object* maybe_array_maps = global_context->js_array_maps();
+ Context* native_context = isolate->context()->native_context();
+ Object* maybe_array_maps = native_context->js_array_maps();
if (maybe_array_maps->IsFixedArray()) {
FixedArray* array_maps = FixedArray::cast(maybe_array_maps);
if (array_maps->get(from_kind) == current_map) {
@@ -3669,7 +3669,7 @@ ACCESSORS(JSFunction, literals_or_bindings, FixedArray, kLiteralsOffset)
ACCESSORS(JSFunction, next_function_link, Object, kNextFunctionLinkOffset)
ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset)
-ACCESSORS(GlobalObject, global_context, Context, kGlobalContextOffset)
+ACCESSORS(GlobalObject, native_context, Context, kNativeContextOffset)
ACCESSORS(GlobalObject, global_receiver, JSObject, kGlobalReceiverOffset)
ACCESSORS(JSGlobalProxy, context, Object, kContextOffset)
@@ -4224,10 +4224,10 @@ void JSFunction::ReplaceCode(Code* code) {
// Add/remove the function from the list of optimized functions for this
// context based on the state change.
if (!was_optimized && is_optimized) {
- context()->global_context()->AddOptimizedFunction(this);
+ context()->native_context()->AddOptimizedFunction(this);
}
if (was_optimized && !is_optimized) {
- context()->global_context()->RemoveOptimizedFunction(this);
+ context()->native_context()->RemoveOptimizedFunction(this);
}
}
@@ -4270,12 +4270,12 @@ void JSFunction::set_initial_map(Map* value) {
MaybeObject* JSFunction::set_initial_map_and_cache_transitions(
Map* initial_map) {
- Context* global_context = context()->global_context();
+ Context* native_context = context()->native_context();
Object* array_function =
- global_context->get(Context::ARRAY_FUNCTION_INDEX);
+ native_context->get(Context::ARRAY_FUNCTION_INDEX);
if (array_function->IsJSFunction() &&
this == JSFunction::cast(array_function)) {
- // Replace all of the cached initial array maps in the global context with
+ // Replace all of the cached initial array maps in the native context with
// the appropriate transitioned elements kind maps.
Heap* heap = GetHeap();
MaybeObject* maybe_maps =
@@ -4297,7 +4297,7 @@ MaybeObject* JSFunction::set_initial_map_and_cache_transitions(
maps->set(next_kind, new_map);
current_map = new_map;
}
- global_context->set_js_array_maps(maps);
+ native_context->set_js_array_maps(maps);
}
set_initial_map(initial_map);
return this;
« src/heap.h ('K') | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698