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

Side by Side Diff: src/bootstrapper.cc

Issue 10831153: Improve load IC so it can call a native accessor even if the holder is (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 isolate()->object_function(), NONE)); 740 isolate()->object_function(), NONE));
741 } else { 741 } else {
742 Handle<FunctionTemplateInfo> js_global_constructor( 742 Handle<FunctionTemplateInfo> js_global_constructor(
743 FunctionTemplateInfo::cast(js_global_template->constructor())); 743 FunctionTemplateInfo::cast(js_global_template->constructor()));
744 js_global_function = 744 js_global_function =
745 factory()->CreateApiFunction(js_global_constructor, 745 factory()->CreateApiFunction(js_global_constructor,
746 factory()->InnerGlobalObject); 746 factory()->InnerGlobalObject);
747 } 747 }
748 748
749 js_global_function->initial_map()->set_is_hidden_prototype(); 749 js_global_function->initial_map()->set_is_hidden_prototype();
750 js_global_function->initial_map()->set_dictionary_map(true);
750 Handle<GlobalObject> inner_global = 751 Handle<GlobalObject> inner_global =
751 factory()->NewGlobalObject(js_global_function); 752 factory()->NewGlobalObject(js_global_function);
752 if (inner_global_out != NULL) { 753 if (inner_global_out != NULL) {
753 *inner_global_out = inner_global; 754 *inner_global_out = inner_global;
754 } 755 }
755 756
756 // Step 2: create or re-initialize the global proxy object. 757 // Step 2: create or re-initialize the global proxy object.
757 Handle<JSFunction> global_proxy_function; 758 Handle<JSFunction> global_proxy_function;
758 if (global_template.IsEmpty()) { 759 if (global_template.IsEmpty()) {
759 Handle<String> name = Handle<String>(heap()->empty_symbol()); 760 Handle<String> name = Handle<String>(heap()->empty_symbol());
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 // (itself) and a reference to the global_context directly in the object. 1425 // (itself) and a reference to the global_context directly in the object.
1425 Handle<Code> code = Handle<Code>( 1426 Handle<Code> code = Handle<Code>(
1426 isolate()->builtins()->builtin(Builtins::kIllegal)); 1427 isolate()->builtins()->builtin(Builtins::kIllegal));
1427 Handle<JSFunction> builtins_fun = 1428 Handle<JSFunction> builtins_fun =
1428 factory()->NewFunction(factory()->empty_symbol(), 1429 factory()->NewFunction(factory()->empty_symbol(),
1429 JS_BUILTINS_OBJECT_TYPE, 1430 JS_BUILTINS_OBJECT_TYPE,
1430 JSBuiltinsObject::kSize, code, true); 1431 JSBuiltinsObject::kSize, code, true);
1431 1432
1432 Handle<String> name = factory()->LookupAsciiSymbol("builtins"); 1433 Handle<String> name = factory()->LookupAsciiSymbol("builtins");
1433 builtins_fun->shared()->set_instance_class_name(*name); 1434 builtins_fun->shared()->set_instance_class_name(*name);
1435 builtins_fun->initial_map()->set_dictionary_map(true);
1434 1436
1435 // Allocate the builtins object. 1437 // Allocate the builtins object.
1436 Handle<JSBuiltinsObject> builtins = 1438 Handle<JSBuiltinsObject> builtins =
1437 Handle<JSBuiltinsObject>::cast(factory()->NewGlobalObject(builtins_fun)); 1439 Handle<JSBuiltinsObject>::cast(factory()->NewGlobalObject(builtins_fun));
1438 builtins->set_builtins(*builtins); 1440 builtins->set_builtins(*builtins);
1439 builtins->set_global_context(*global_context()); 1441 builtins->set_global_context(*global_context());
1440 builtins->set_global_receiver(*builtins); 1442 builtins->set_global_receiver(*builtins);
1441 1443
1442 // Set up the 'global' properties of the builtins object. The 1444 // Set up the 'global' properties of the builtins object. The
1443 // 'global' property that refers to the global object is the only 1445 // 'global' property that refers to the global object is the only
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 return from + sizeof(NestingCounterType); 2388 return from + sizeof(NestingCounterType);
2387 } 2389 }
2388 2390
2389 2391
2390 // Called when the top-level V8 mutex is destroyed. 2392 // Called when the top-level V8 mutex is destroyed.
2391 void Bootstrapper::FreeThreadResources() { 2393 void Bootstrapper::FreeThreadResources() {
2392 ASSERT(!IsActive()); 2394 ASSERT(!IsActive());
2393 } 2395 }
2394 2396
2395 } } // namespace v8::internal 2397 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698