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

Unified Diff: src/bootstrapper.cc

Issue 3079: Remove the old builtins framework with the huge, nasty (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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 | « no previous file | 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 312)
+++ src/bootstrapper.cc (working copy)
@@ -486,14 +486,15 @@
Factory::NewFunction(symbol, Factory::null_value());
{ // --- E m p t y ---
- Handle<Code> call_code =
+ Handle<Code> code =
Handle<Code>(Builtins::builtin(Builtins::EmptyFunction));
Handle<String> source = Factory::NewStringFromAscii(CStrVector("() {}"));
- empty_function->set_code(*call_code);
+ empty_function->set_code(*code);
empty_function->shared()->set_script(*Factory::NewScript(source));
empty_function->shared()->set_start_position(0);
empty_function->shared()->set_end_position(source->length());
+ empty_function->shared()->DontAdaptArguments();
global_context()->function_map()->set_prototype(*empty_function);
global_context()->function_instance_map()->set_prototype(*empty_function);
@@ -580,6 +581,7 @@
InstallFunction(global, "Array", JS_ARRAY_TYPE, JSArray::kSize,
Top::initial_object_prototype(), Builtins::ArrayCode,
true);
+ array_function->shared()->DontAdaptArguments();
// This seems a bit hackish, but we need to make sure Array.length
// is 1.
@@ -709,6 +711,7 @@
Factory::NewFunction(Factory::empty_symbol(), JS_OBJECT_TYPE,
JSObject::kHeaderSize, code, true);
global_context()->set_call_as_function_delegate(*delegate);
+ delegate->shared()->DontAdaptArguments();
global_context()->set_special_function_table(Heap::empty_fixed_array());
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698