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

Side by Side Diff: src/stub-cache.cc

Issue 55007: Mark some of the places we leave V8 via callbacks as transitions to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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/objects.cc ('k') | src/top.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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 // NOTE: If we can align the structure of an AccessorInfo with the 667 // NOTE: If we can align the structure of an AccessorInfo with the
668 // locations of the arguments to this function maybe we don't have 668 // locations of the arguments to this function maybe we don't have
669 // to explicitly create the structure but can just pass a pointer 669 // to explicitly create the structure but can just pass a pointer
670 // into the stack. 670 // into the stack.
671 v8::AccessorInfo info(v8::Utils::ToLocal(recv), 671 v8::AccessorInfo info(v8::Utils::ToLocal(recv),
672 v8::Utils::ToLocal(data), 672 v8::Utils::ToLocal(data),
673 v8::Utils::ToLocal(holder)); 673 v8::Utils::ToLocal(holder));
674 v8::Handle<v8::Value> result; 674 v8::Handle<v8::Value> result;
675 { 675 {
676 // Leaving JavaScript. 676 // Leaving JavaScript.
677 VMState state(OTHER); 677 VMState state(EXTERNAL);
678 result = fun(v8::Utils::ToLocal(name), info); 678 result = fun(v8::Utils::ToLocal(name), info);
679 } 679 }
680 RETURN_IF_SCHEDULED_EXCEPTION(); 680 RETURN_IF_SCHEDULED_EXCEPTION();
681 if (result.IsEmpty()) return Heap::undefined_value(); 681 if (result.IsEmpty()) return Heap::undefined_value();
682 return *v8::Utils::OpenHandle(*result); 682 return *v8::Utils::OpenHandle(*result);
683 } 683 }
684 684
685 685
686 Object* StoreCallbackProperty(Arguments args) { 686 Object* StoreCallbackProperty(Arguments args) {
687 Handle<JSObject> recv = args.at<JSObject>(0); 687 Handle<JSObject> recv = args.at<JSObject>(0);
688 AccessorInfo* callback = AccessorInfo::cast(args[1]); 688 AccessorInfo* callback = AccessorInfo::cast(args[1]);
689 Address setter_address = v8::ToCData<Address>(callback->setter()); 689 Address setter_address = v8::ToCData<Address>(callback->setter());
690 v8::AccessorSetter fun = FUNCTION_CAST<v8::AccessorSetter>(setter_address); 690 v8::AccessorSetter fun = FUNCTION_CAST<v8::AccessorSetter>(setter_address);
691 ASSERT(fun != NULL); 691 ASSERT(fun != NULL);
692 Handle<String> name = args.at<String>(2); 692 Handle<String> name = args.at<String>(2);
693 Handle<Object> value = args.at<Object>(3); 693 Handle<Object> value = args.at<Object>(3);
694 HandleScope scope; 694 HandleScope scope;
695 Handle<Object> data(callback->data()); 695 Handle<Object> data(callback->data());
696 LOG(ApiNamedPropertyAccess("store", *recv, *name)); 696 LOG(ApiNamedPropertyAccess("store", *recv, *name));
697 v8::AccessorInfo info(v8::Utils::ToLocal(recv), 697 v8::AccessorInfo info(v8::Utils::ToLocal(recv),
698 v8::Utils::ToLocal(data), 698 v8::Utils::ToLocal(data),
699 v8::Utils::ToLocal(recv)); 699 v8::Utils::ToLocal(recv));
700 { 700 {
701 // Leaving JavaScript. 701 // Leaving JavaScript.
702 VMState state(OTHER); 702 VMState state(EXTERNAL);
703 fun(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info); 703 fun(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info);
704 } 704 }
705 RETURN_IF_SCHEDULED_EXCEPTION(); 705 RETURN_IF_SCHEDULED_EXCEPTION();
706 return *value; 706 return *value;
707 } 707 }
708 708
709 709
710 Object* LoadInterceptorProperty(Arguments args) { 710 Object* LoadInterceptorProperty(Arguments args) {
711 JSObject* recv = JSObject::cast(args[0]); 711 JSObject* recv = JSObject::cast(args[0]);
712 JSObject* holder = JSObject::cast(args[1]); 712 JSObject* holder = JSObject::cast(args[1]);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 912
913 913
914 Object* CallStubCompiler::GetCode(PropertyType type, String* name) { 914 Object* CallStubCompiler::GetCode(PropertyType type, String* name) {
915 int argc = arguments_.immediate(); 915 int argc = arguments_.immediate();
916 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::CALL_IC, type, argc); 916 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::CALL_IC, type, argc);
917 return GetCodeWithFlags(flags, name); 917 return GetCodeWithFlags(flags, name);
918 } 918 }
919 919
920 920
921 } } // namespace v8::internal 921 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698