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

Side by Side Diff: src/factory.cc

Issue 2401653002: [turbofan] Discard the shared code entry in the optimized code map. (Closed)
Patch Set: Comments and REBASE. Created 4 years, 2 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/crankshaft/hydrogen-instructions.h ('k') | src/flag-definitions.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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 Handle<Map> map = shared_function_info_map(); 2208 Handle<Map> map = shared_function_info_map();
2209 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE); 2209 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE);
2210 2210
2211 // Set pointer fields. 2211 // Set pointer fields.
2212 share->set_name(*name); 2212 share->set_name(*name);
2213 Handle<Code> code; 2213 Handle<Code> code;
2214 if (!maybe_code.ToHandle(&code)) { 2214 if (!maybe_code.ToHandle(&code)) {
2215 code = isolate()->builtins()->Illegal(); 2215 code = isolate()->builtins()->Illegal();
2216 } 2216 }
2217 share->set_code(*code); 2217 share->set_code(*code);
2218 share->set_optimized_code_map(*cleared_optimized_code_map()); 2218 share->set_optimized_code_map(*empty_fixed_array());
2219 share->set_scope_info(ScopeInfo::Empty(isolate())); 2219 share->set_scope_info(ScopeInfo::Empty(isolate()));
2220 share->set_outer_scope_info(*the_hole_value()); 2220 share->set_outer_scope_info(*the_hole_value());
2221 Handle<Code> construct_stub = 2221 Handle<Code> construct_stub =
2222 is_constructor ? isolate()->builtins()->JSConstructStubGeneric() 2222 is_constructor ? isolate()->builtins()->JSConstructStubGeneric()
2223 : isolate()->builtins()->ConstructedNonConstructable(); 2223 : isolate()->builtins()->ConstructedNonConstructable();
2224 share->SetConstructStub(*construct_stub); 2224 share->SetConstructStub(*construct_stub);
2225 share->set_instance_class_name(*Object_string()); 2225 share->set_instance_class_name(*Object_string());
2226 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER); 2226 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER);
2227 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER); 2227 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER);
2228 share->set_debug_info(DebugInfo::uninitialized(), SKIP_WRITE_BARRIER); 2228 share->set_debug_info(DebugInfo::uninitialized(), SKIP_WRITE_BARRIER);
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2603 Handle<AccessorInfo> prototype = 2603 Handle<AccessorInfo> prototype =
2604 Accessors::FunctionPrototypeInfo(isolate(), attribs); 2604 Accessors::FunctionPrototypeInfo(isolate(), attribs);
2605 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2605 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2606 prototype, attribs); 2606 prototype, attribs);
2607 map->AppendDescriptor(&d); 2607 map->AppendDescriptor(&d);
2608 } 2608 }
2609 } 2609 }
2610 2610
2611 } // namespace internal 2611 } // namespace internal
2612 } // namespace v8 2612 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698