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

Side by Side Diff: src/bootstrapper.cc

Issue 1207583002: Revert "Keep a canonical list of shared function infos." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « src/ast.cc ('k') | src/codegen.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 "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 DCHECK(!empty_function_map->is_dictionary_map()); 556 DCHECK(!empty_function_map->is_dictionary_map());
557 Map::SetPrototype(empty_function_map, object_function_prototype); 557 Map::SetPrototype(empty_function_map, object_function_prototype);
558 empty_function_map->set_is_prototype_map(true); 558 empty_function_map->set_is_prototype_map(true);
559 559
560 empty_function->set_map(*empty_function_map); 560 empty_function->set_map(*empty_function_map);
561 561
562 // --- E m p t y --- 562 // --- E m p t y ---
563 Handle<String> source = factory->NewStringFromStaticChars("() {}"); 563 Handle<String> source = factory->NewStringFromStaticChars("() {}");
564 Handle<Script> script = factory->NewScript(source); 564 Handle<Script> script = factory->NewScript(source);
565 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); 565 script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
566 empty_function->shared()->set_script(*script);
566 empty_function->shared()->set_start_position(0); 567 empty_function->shared()->set_start_position(0);
567 empty_function->shared()->set_end_position(source->length()); 568 empty_function->shared()->set_end_position(source->length());
568 empty_function->shared()->DontAdaptArguments(); 569 empty_function->shared()->DontAdaptArguments();
569 SharedFunctionInfo::SetScript(handle(empty_function->shared()), script);
570 570
571 // Set prototypes for the function maps. 571 // Set prototypes for the function maps.
572 Handle<Map> sloppy_function_map(native_context()->sloppy_function_map(), 572 Handle<Map> sloppy_function_map(native_context()->sloppy_function_map(),
573 isolate); 573 isolate);
574 Handle<Map> sloppy_function_without_prototype_map( 574 Handle<Map> sloppy_function_without_prototype_map(
575 native_context()->sloppy_function_without_prototype_map(), isolate); 575 native_context()->sloppy_function_without_prototype_map(), isolate);
576 Map::SetPrototype(sloppy_function_map, empty_function); 576 Map::SetPrototype(sloppy_function_map, empty_function);
577 Map::SetPrototype(sloppy_function_without_prototype_map, empty_function); 577 Map::SetPrototype(sloppy_function_without_prototype_map, empty_function);
578 Map::SetPrototype(sloppy_function_map_writable_prototype_, empty_function); 578 Map::SetPrototype(sloppy_function_map_writable_prototype_, empty_function);
579 579
(...skipping 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after
3198 } 3198 }
3199 3199
3200 3200
3201 // Called when the top-level V8 mutex is destroyed. 3201 // Called when the top-level V8 mutex is destroyed.
3202 void Bootstrapper::FreeThreadResources() { 3202 void Bootstrapper::FreeThreadResources() {
3203 DCHECK(!IsActive()); 3203 DCHECK(!IsActive());
3204 } 3204 }
3205 3205
3206 } // namespace internal 3206 } // namespace internal
3207 } // namespace v8 3207 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698