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

Unified Diff: src/top.cc

Issue 1148007: Merge bleeding_edge from version 2.1.3 up to revision 4205... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 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
« src/runtime.cc ('K') | « src/top.h ('k') | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/top.cc
===================================================================
--- src/top.cc (revision 4205)
+++ src/top.cc (working copy)
@@ -88,19 +88,30 @@
}
+void Top::IterateThread(ThreadVisitor* v) {
+ v->VisitThread(&thread_local_);
+}
+
+
+void Top::IterateThread(ThreadVisitor* v, char* t) {
+ ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(t);
+ v->VisitThread(thread);
+}
+
+
void Top::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) {
v->VisitPointer(&(thread->pending_exception_));
v->VisitPointer(&(thread->pending_message_obj_));
v->VisitPointer(
- bit_cast<Object**, Script**>(&(thread->pending_message_script_)));
- v->VisitPointer(bit_cast<Object**, Context**>(&(thread->context_)));
+ BitCast<Object**, Script**>(&(thread->pending_message_script_)));
+ v->VisitPointer(BitCast<Object**, Context**>(&(thread->context_)));
v->VisitPointer(&(thread->scheduled_exception_));
for (v8::TryCatch* block = thread->TryCatchHandler();
block != NULL;
block = TRY_CATCH_FROM_ADDRESS(block->next_)) {
- v->VisitPointer(bit_cast<Object**, void**>(&(block->exception_)));
- v->VisitPointer(bit_cast<Object**, void**>(&(block->message_)));
+ v->VisitPointer(BitCast<Object**, void**>(&(block->exception_)));
+ v->VisitPointer(BitCast<Object**, void**>(&(block->message_)));
}
// Iterate over pointers on native execution stack.
@@ -439,10 +450,9 @@
// Get the data object from access check info.
JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
- Object* info = constructor->shared()->function_data();
- if (info == Heap::undefined_value()) return;
-
- Object* data_obj = FunctionTemplateInfo::cast(info)->access_check_info();
+ if (!constructor->shared()->IsApiFunction()) return;
+ Object* data_obj =
+ constructor->shared()->get_api_func_data()->access_check_info();
if (data_obj == Heap::undefined_value()) return;
HandleScope scope;
@@ -502,10 +512,10 @@
// Get named access check callback
JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
- Object* info = constructor->shared()->function_data();
- if (info == Heap::undefined_value()) return false;
+ if (!constructor->shared()->IsApiFunction()) return false;
- Object* data_obj = FunctionTemplateInfo::cast(info)->access_check_info();
+ Object* data_obj =
+ constructor->shared()->get_api_func_data()->access_check_info();
if (data_obj == Heap::undefined_value()) return false;
Object* fun_obj = AccessCheckInfo::cast(data_obj)->named_callback();
@@ -547,10 +557,10 @@
// Get indexed access check callback
JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
- Object* info = constructor->shared()->function_data();
- if (info == Heap::undefined_value()) return false;
+ if (!constructor->shared()->IsApiFunction()) return false;
- Object* data_obj = FunctionTemplateInfo::cast(info)->access_check_info();
+ Object* data_obj =
+ constructor->shared()->get_api_func_data()->access_check_info();
if (data_obj == Heap::undefined_value()) return false;
Object* fun_obj = AccessCheckInfo::cast(data_obj)->indexed_callback();
@@ -950,27 +960,6 @@
}
-bool Top::CanHaveSpecialFunctions(JSObject* object) {
- return object->IsJSArray();
-}
-
-
-Object* Top::LookupSpecialFunction(JSObject* receiver,
- JSObject* prototype,
- JSFunction* function) {
- if (CanHaveSpecialFunctions(receiver)) {
- FixedArray* table = context()->global_context()->special_function_table();
- for (int index = 0; index < table->length(); index +=3) {
- if ((prototype == table->get(index)) &&
- (function == table->get(index+1))) {
- return table->get(index+2);
- }
- }
- }
- return Heap::undefined_value();
-}
-
-
char* Top::ArchiveThread(char* to) {
memcpy(to, reinterpret_cast<char*>(&thread_local_), sizeof(thread_local_));
InitializeThreadLocal();
« src/runtime.cc ('K') | « src/top.h ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698