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

Side by Side Diff: src/top.cc

Issue 819001: Revert change to always call builtins for Array functions.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/top.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 } 943 }
944 } 944 }
945 #endif // ENABLE_DEBUGGER_SUPPORT 945 #endif // ENABLE_DEBUGGER_SUPPORT
946 if (it.done()) return Handle<Context>::null(); 946 if (it.done()) return Handle<Context>::null();
947 JavaScriptFrame* frame = it.frame(); 947 JavaScriptFrame* frame = it.frame();
948 Context* context = Context::cast(frame->context()); 948 Context* context = Context::cast(frame->context());
949 return Handle<Context>(context->global_context()); 949 return Handle<Context>(context->global_context());
950 } 950 }
951 951
952 952
953 bool Top::CanHaveSpecialFunctions(JSObject* object) {
954 return object->IsJSArray();
955 }
956
957
958 Object* Top::LookupSpecialFunction(JSObject* receiver,
959 JSObject* prototype,
960 JSFunction* function) {
961 if (CanHaveSpecialFunctions(receiver)) {
962 FixedArray* table = context()->global_context()->special_function_table();
963 for (int index = 0; index < table->length(); index +=3) {
964 if ((prototype == table->get(index)) &&
965 (function == table->get(index+1))) {
966 return table->get(index+2);
967 }
968 }
969 }
970 return Heap::undefined_value();
971 }
972
973
953 char* Top::ArchiveThread(char* to) { 974 char* Top::ArchiveThread(char* to) {
954 memcpy(to, reinterpret_cast<char*>(&thread_local_), sizeof(thread_local_)); 975 memcpy(to, reinterpret_cast<char*>(&thread_local_), sizeof(thread_local_));
955 InitializeThreadLocal(); 976 InitializeThreadLocal();
956 return to + sizeof(thread_local_); 977 return to + sizeof(thread_local_);
957 } 978 }
958 979
959 980
960 char* Top::RestoreThread(char* from) { 981 char* Top::RestoreThread(char* from) {
961 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(thread_local_)); 982 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(thread_local_));
962 return from + sizeof(thread_local_); 983 return from + sizeof(thread_local_);
963 } 984 }
964 985
965 986
966 ExecutionAccess::ExecutionAccess() { 987 ExecutionAccess::ExecutionAccess() {
967 Top::break_access_->Lock(); 988 Top::break_access_->Lock();
968 } 989 }
969 990
970 991
971 ExecutionAccess::~ExecutionAccess() { 992 ExecutionAccess::~ExecutionAccess() {
972 Top::break_access_->Unlock(); 993 Top::break_access_->Unlock();
973 } 994 }
974 995
975 996
976 } } // namespace v8::internal 997 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/top.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698