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

Side by Side Diff: src/factory.cc

Issue 1433923002: Maintain a FixedArray for the optimized code map. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 1 month 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/debug/debug.cc ('k') | src/heap/heap.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/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 Handle<Map> map = shared_function_info_map(); 2064 Handle<Map> map = shared_function_info_map();
2065 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE); 2065 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE);
2066 2066
2067 // Set pointer fields. 2067 // Set pointer fields.
2068 share->set_name(*name); 2068 share->set_name(*name);
2069 Handle<Code> code; 2069 Handle<Code> code;
2070 if (!maybe_code.ToHandle(&code)) { 2070 if (!maybe_code.ToHandle(&code)) {
2071 code = handle(isolate()->builtins()->builtin(Builtins::kIllegal)); 2071 code = handle(isolate()->builtins()->builtin(Builtins::kIllegal));
2072 } 2072 }
2073 share->set_code(*code); 2073 share->set_code(*code);
2074 share->set_optimized_code_map(Smi::FromInt(0)); 2074 share->set_optimized_code_map(*cleared_optimized_code_map());
2075 share->set_scope_info(ScopeInfo::Empty(isolate())); 2075 share->set_scope_info(ScopeInfo::Empty(isolate()));
2076 Code* construct_stub = 2076 Code* construct_stub =
2077 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric); 2077 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric);
2078 share->set_construct_stub(construct_stub); 2078 share->set_construct_stub(construct_stub);
2079 share->set_instance_class_name(*Object_string()); 2079 share->set_instance_class_name(*Object_string());
2080 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER); 2080 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER);
2081 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER); 2081 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER);
2082 share->set_debug_info(*undefined_value(), SKIP_WRITE_BARRIER); 2082 share->set_debug_info(*undefined_value(), SKIP_WRITE_BARRIER);
2083 share->set_inferred_name(*empty_string(), SKIP_WRITE_BARRIER); 2083 share->set_inferred_name(*empty_string(), SKIP_WRITE_BARRIER);
2084 StaticFeedbackVectorSpec empty_spec; 2084 StaticFeedbackVectorSpec empty_spec;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 } 2334 }
2335 2335
2336 2336
2337 Handle<Object> Factory::ToBoolean(bool value) { 2337 Handle<Object> Factory::ToBoolean(bool value) {
2338 return value ? true_value() : false_value(); 2338 return value ? true_value() : false_value();
2339 } 2339 }
2340 2340
2341 2341
2342 } // namespace internal 2342 } // namespace internal
2343 } // namespace v8 2343 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698