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

Side by Side Diff: src/bootstrapper.cc

Issue 274463003: Directly create API functions with readonly prototypes rather than converting. Remove FunctionSetRe… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove test Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/apinatives.js ('k') | src/contexts.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bootstrapper.h" 5 #include "bootstrapper.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "isolate-inl.h" 8 #include "isolate-inl.h"
9 #include "natives.h" 9 #include "natives.h"
10 #include "snapshot.h" 10 #include "snapshot.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 Handle<Map> function_without_prototype_map = 444 Handle<Map> function_without_prototype_map =
445 CreateFunctionMap(DONT_ADD_PROTOTYPE); 445 CreateFunctionMap(DONT_ADD_PROTOTYPE);
446 native_context()->set_sloppy_function_without_prototype_map( 446 native_context()->set_sloppy_function_without_prototype_map(
447 *function_without_prototype_map); 447 *function_without_prototype_map);
448 448
449 // Allocate the function map. This map is temporary, used only for processing 449 // Allocate the function map. This map is temporary, used only for processing
450 // of builtins. 450 // of builtins.
451 // Later the map is replaced with writable prototype map, allocated below. 451 // Later the map is replaced with writable prototype map, allocated below.
452 Handle<Map> function_map = CreateFunctionMap(ADD_READONLY_PROTOTYPE); 452 Handle<Map> function_map = CreateFunctionMap(ADD_READONLY_PROTOTYPE);
453 native_context()->set_sloppy_function_map(*function_map); 453 native_context()->set_sloppy_function_map(*function_map);
454 native_context()->set_sloppy_function_with_readonly_prototype_map(
455 *function_map);
454 456
455 // The final map for functions. Writeable prototype. 457 // The final map for functions. Writeable prototype.
456 // This map is installed in MakeFunctionInstancePrototypeWritable. 458 // This map is installed in MakeFunctionInstancePrototypeWritable.
457 sloppy_function_map_writable_prototype_ = 459 sloppy_function_map_writable_prototype_ =
458 CreateFunctionMap(ADD_WRITEABLE_PROTOTYPE); 460 CreateFunctionMap(ADD_WRITEABLE_PROTOTYPE);
459 461
460 Factory* factory = isolate->factory(); 462 Factory* factory = isolate->factory();
461 463
462 Handle<String> object_name = factory->Object_string(); 464 Handle<String> object_name = factory->Object_string();
463 465
(...skipping 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2652 return from + sizeof(NestingCounterType); 2654 return from + sizeof(NestingCounterType);
2653 } 2655 }
2654 2656
2655 2657
2656 // Called when the top-level V8 mutex is destroyed. 2658 // Called when the top-level V8 mutex is destroyed.
2657 void Bootstrapper::FreeThreadResources() { 2659 void Bootstrapper::FreeThreadResources() {
2658 ASSERT(!IsActive()); 2660 ASSERT(!IsActive());
2659 } 2661 }
2660 2662
2661 } } // namespace v8::internal 2663 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/apinatives.js ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698