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

Side by Side Diff: src/builtins.cc

Issue 7535004: Merge bleeding edge up to 8774 into the GC branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 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
« no previous file with comments | « src/bootstrapper.cc ('k') | src/code-stubs.h » ('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 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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 // a function (without new). 1206 // a function (without new).
1207 MUST_USE_RESULT static MaybeObject* HandleApiCallAsFunctionOrConstructor( 1207 MUST_USE_RESULT static MaybeObject* HandleApiCallAsFunctionOrConstructor(
1208 Isolate* isolate, 1208 Isolate* isolate,
1209 bool is_construct_call, 1209 bool is_construct_call,
1210 BuiltinArguments<NO_EXTRA_ARGUMENTS> args) { 1210 BuiltinArguments<NO_EXTRA_ARGUMENTS> args) {
1211 // Non-functions are never called as constructors. Even if this is an object 1211 // Non-functions are never called as constructors. Even if this is an object
1212 // called as a constructor the delegate call is not a construct call. 1212 // called as a constructor the delegate call is not a construct call.
1213 ASSERT(!CalledAsConstructor(isolate)); 1213 ASSERT(!CalledAsConstructor(isolate));
1214 Heap* heap = isolate->heap(); 1214 Heap* heap = isolate->heap();
1215 1215
1216 Handle<Object> receiver = args.at<Object>(0); 1216 Handle<Object> receiver = args.receiver();
1217 1217
1218 // Get the object called. 1218 // Get the object called.
1219 JSObject* obj = JSObject::cast(*args.receiver()); 1219 JSObject* obj = JSObject::cast(*receiver);
1220 1220
1221 // Get the invocation callback from the function descriptor that was 1221 // Get the invocation callback from the function descriptor that was
1222 // used to create the called object. 1222 // used to create the called object.
1223 ASSERT(obj->map()->has_instance_call_handler()); 1223 ASSERT(obj->map()->has_instance_call_handler());
1224 JSFunction* constructor = JSFunction::cast(obj->map()->constructor()); 1224 JSFunction* constructor = JSFunction::cast(obj->map()->constructor());
1225 ASSERT(constructor->shared()->IsApiFunction()); 1225 ASSERT(constructor->shared()->IsApiFunction());
1226 Object* handler = 1226 Object* handler =
1227 constructor->shared()->get_api_func_data()->instance_call_handler(); 1227 constructor->shared()->get_api_func_data()->instance_call_handler();
1228 ASSERT(!handler->IsUndefined()); 1228 ASSERT(!handler->IsUndefined());
1229 CallHandlerInfo* call_data = CallHandlerInfo::cast(handler); 1229 CallHandlerInfo* call_data = CallHandlerInfo::cast(handler);
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 return Handle<Code>(code_address); \ 1715 return Handle<Code>(code_address); \
1716 } 1716 }
1717 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1717 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1718 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1718 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1719 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1719 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1720 #undef DEFINE_BUILTIN_ACCESSOR_C 1720 #undef DEFINE_BUILTIN_ACCESSOR_C
1721 #undef DEFINE_BUILTIN_ACCESSOR_A 1721 #undef DEFINE_BUILTIN_ACCESSOR_A
1722 1722
1723 1723
1724 } } // namespace v8::internal 1724 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698