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

Side by Side Diff: src/x64/deoptimizer-x64.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 node->set_next(data->deoptimizing_code_list_); 99 node->set_next(data->deoptimizing_code_list_);
100 data->deoptimizing_code_list_ = node; 100 data->deoptimizing_code_list_ = node;
101 101
102 // We might be in the middle of incremental marking with compaction. 102 // We might be in the middle of incremental marking with compaction.
103 // Tell collector to treat this code object in a special way and 103 // Tell collector to treat this code object in a special way and
104 // ignore all slots that might have been recorded on it. 104 // ignore all slots that might have been recorded on it.
105 isolate->heap()->mark_compact_collector()->InvalidateCode(code); 105 isolate->heap()->mark_compact_collector()->InvalidateCode(code);
106 106
107 // Iterate over all the functions which share the same code object 107 // Iterate over all the functions which share the same code object
108 // and make them use unoptimized version. 108 // and make them use unoptimized version.
109 Context* context = function->context()->global_context(); 109 Context* context = function->context()->native_context();
110 Object* element = context->get(Context::OPTIMIZED_FUNCTIONS_LIST); 110 Object* element = context->get(Context::OPTIMIZED_FUNCTIONS_LIST);
111 SharedFunctionInfo* shared = function->shared(); 111 SharedFunctionInfo* shared = function->shared();
112 while (!element->IsUndefined()) { 112 while (!element->IsUndefined()) {
113 JSFunction* func = JSFunction::cast(element); 113 JSFunction* func = JSFunction::cast(element);
114 // Grab element before code replacement as ReplaceCode alters the list. 114 // Grab element before code replacement as ReplaceCode alters the list.
115 element = func->next_function_link(); 115 element = func->next_function_link();
116 if (func->code() == code) { 116 if (func->code() == code) {
117 func->ReplaceCode(shared->code()); 117 func->ReplaceCode(shared->code());
118 } 118 }
119 } 119 }
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 } 998 }
999 __ bind(&done); 999 __ bind(&done);
1000 } 1000 }
1001 1001
1002 #undef __ 1002 #undef __
1003 1003
1004 1004
1005 } } // namespace v8::internal 1005 } } // namespace v8::internal
1006 1006
1007 #endif // V8_TARGET_ARCH_X64 1007 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/heap.h ('K') | « src/x64/code-stubs-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698