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

Side by Side Diff: src/objects.cc

Issue 8391045: Handlify the remaining CallStubCompiler functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 MaybeObject* JSObject::GetPropertyWithCallback(Object* receiver, 213 MaybeObject* JSObject::GetPropertyWithCallback(Object* receiver,
214 Object* structure, 214 Object* structure,
215 String* name) { 215 String* name) {
216 Isolate* isolate = name->GetIsolate(); 216 Isolate* isolate = name->GetIsolate();
217 // To accommodate both the old and the new api we switch on the 217 // To accommodate both the old and the new api we switch on the
218 // data structure used to store the callbacks. Eventually foreign 218 // data structure used to store the callbacks. Eventually foreign
219 // callbacks should be phased out. 219 // callbacks should be phased out.
220 if (structure->IsForeign()) { 220 if (structure->IsForeign()) {
221 AccessorDescriptor* callback = 221 AccessorDescriptor* callback =
222 reinterpret_cast<AccessorDescriptor*>( 222 reinterpret_cast<AccessorDescriptor*>(
223 Foreign::cast(structure)->address()); 223 Foreign::cast(structure)->foreign_address());
224 MaybeObject* value = (callback->getter)(receiver, callback->data); 224 MaybeObject* value = (callback->getter)(receiver, callback->data);
225 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 225 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
226 return value; 226 return value;
227 } 227 }
228 228
229 // api style callbacks. 229 // api style callbacks.
230 if (structure->IsAccessorInfo()) { 230 if (structure->IsAccessorInfo()) {
231 AccessorInfo* data = AccessorInfo::cast(structure); 231 AccessorInfo* data = AccessorInfo::cast(structure);
232 Object* fun_obj = data->getter(); 232 Object* fun_obj = data->getter();
233 v8::AccessorGetter call_fun = v8::ToCData<v8::AccessorGetter>(fun_obj); 233 v8::AccessorGetter call_fun = v8::ToCData<v8::AccessorGetter>(fun_obj);
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 // value since a const declaration would conflict with the setter. 1999 // value since a const declaration would conflict with the setter.
2000 ASSERT(!value->IsTheHole()); 2000 ASSERT(!value->IsTheHole());
2001 Handle<Object> value_handle(value, isolate); 2001 Handle<Object> value_handle(value, isolate);
2002 2002
2003 // To accommodate both the old and the new api we switch on the 2003 // To accommodate both the old and the new api we switch on the
2004 // data structure used to store the callbacks. Eventually foreign 2004 // data structure used to store the callbacks. Eventually foreign
2005 // callbacks should be phased out. 2005 // callbacks should be phased out.
2006 if (structure->IsForeign()) { 2006 if (structure->IsForeign()) {
2007 AccessorDescriptor* callback = 2007 AccessorDescriptor* callback =
2008 reinterpret_cast<AccessorDescriptor*>( 2008 reinterpret_cast<AccessorDescriptor*>(
2009 Foreign::cast(structure)->address()); 2009 Foreign::cast(structure)->foreign_address());
2010 MaybeObject* obj = (callback->setter)(this, value, callback->data); 2010 MaybeObject* obj = (callback->setter)(this, value, callback->data);
2011 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 2011 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
2012 if (obj->IsFailure()) return obj; 2012 if (obj->IsFailure()) return obj;
2013 return *value_handle; 2013 return *value_handle;
2014 } 2014 }
2015 2015
2016 if (structure->IsAccessorInfo()) { 2016 if (structure->IsAccessorInfo()) {
2017 // api style callbacks 2017 // api style callbacks
2018 AccessorInfo* data = AccessorInfo::cast(structure); 2018 AccessorInfo* data = AccessorInfo::cast(structure);
2019 Object* call_obj = data->setter(); 2019 Object* call_obj = data->setter();
(...skipping 10728 matching lines...) Expand 10 before | Expand all | Expand 10 after
12748 if (break_point_objects()->IsUndefined()) return 0; 12748 if (break_point_objects()->IsUndefined()) return 0;
12749 // Single break point. 12749 // Single break point.
12750 if (!break_point_objects()->IsFixedArray()) return 1; 12750 if (!break_point_objects()->IsFixedArray()) return 1;
12751 // Multiple break points. 12751 // Multiple break points.
12752 return FixedArray::cast(break_point_objects())->length(); 12752 return FixedArray::cast(break_point_objects())->length();
12753 } 12753 }
12754 #endif // ENABLE_DEBUGGER_SUPPORT 12754 #endif // ENABLE_DEBUGGER_SUPPORT
12755 12755
12756 12756
12757 } } // namespace v8::internal 12757 } } // namespace v8::internal
OLDNEW
« src/arm/stub-cache-arm.cc ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698