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

Unified Diff: src/bootstrapper.cc

Issue 113634: Propagate information on whether a non function was called as constructor or not (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/builtins.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
===================================================================
--- src/bootstrapper.cc (revision 2013)
+++ src/bootstrapper.cc (working copy)
@@ -820,15 +820,29 @@
global_context()->set_context_extension_function(*context_extension_fun);
}
- // Setup the call-as-function delegate.
- Handle<Code> code =
- Handle<Code>(Builtins::builtin(Builtins::HandleApiCallAsFunction));
- Handle<JSFunction> delegate =
- Factory::NewFunction(Factory::empty_symbol(), JS_OBJECT_TYPE,
- JSObject::kHeaderSize, code, true);
- global_context()->set_call_as_function_delegate(*delegate);
- delegate->shared()->DontAdaptArguments();
+ {
+ // Setup the call-as-function delegate.
+ Handle<Code> code =
+ Handle<Code>(Builtins::builtin(Builtins::HandleApiCallAsFunction));
+ Handle<JSFunction> delegate =
+ Factory::NewFunction(Factory::empty_symbol(), JS_OBJECT_TYPE,
+ JSObject::kHeaderSize, code, true);
+ global_context()->set_call_as_function_delegate(*delegate);
+ delegate->shared()->DontAdaptArguments();
+ }
+
+ {
+ // Setup the call-as-constructor delegate.
+ Handle<Code> code =
+ Handle<Code>(Builtins::builtin(Builtins::HandleApiCallAsConstructor));
+ Handle<JSFunction> delegate =
+ Factory::NewFunction(Factory::empty_symbol(), JS_OBJECT_TYPE,
+ JSObject::kHeaderSize, code, true);
+ global_context()->set_call_as_constructor_delegate(*delegate);
+ delegate->shared()->DontAdaptArguments();
+ }
+
global_context()->set_special_function_table(Heap::empty_fixed_array());
// Initialize the out of memory slot.
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698