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

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: Missed a case, also turn on flag for testing. 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
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 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2133 Handle<Map> map = shared_function_info_map(); 2133 Handle<Map> map = shared_function_info_map();
2134 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE); 2134 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE);
2135 2135
2136 // Set pointer fields. 2136 // Set pointer fields.
2137 share->set_name(*name); 2137 share->set_name(*name);
2138 Handle<Code> code; 2138 Handle<Code> code;
2139 if (!maybe_code.ToHandle(&code)) { 2139 if (!maybe_code.ToHandle(&code)) {
2140 code = handle(isolate()->builtins()->builtin(Builtins::kIllegal)); 2140 code = handle(isolate()->builtins()->builtin(Builtins::kIllegal));
2141 } 2141 }
2142 share->set_code(*code); 2142 share->set_code(*code);
2143 share->set_optimized_code_map(Smi::FromInt(0)); 2143 share->set_optimized_code_map(*cleared_optimized_code_map());
2144 share->set_scope_info(ScopeInfo::Empty(isolate())); 2144 share->set_scope_info(ScopeInfo::Empty(isolate()));
2145 Code* construct_stub = 2145 Code* construct_stub =
2146 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric); 2146 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric);
2147 share->set_construct_stub(construct_stub); 2147 share->set_construct_stub(construct_stub);
2148 share->set_instance_class_name(*Object_string()); 2148 share->set_instance_class_name(*Object_string());
2149 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER); 2149 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER);
2150 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER); 2150 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER);
2151 share->set_debug_info(*undefined_value(), SKIP_WRITE_BARRIER); 2151 share->set_debug_info(*undefined_value(), SKIP_WRITE_BARRIER);
2152 share->set_inferred_name(*empty_string(), SKIP_WRITE_BARRIER); 2152 share->set_inferred_name(*empty_string(), SKIP_WRITE_BARRIER);
2153 StaticFeedbackVectorSpec empty_spec; 2153 StaticFeedbackVectorSpec empty_spec;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 } 2403 }
2404 2404
2405 2405
2406 Handle<Object> Factory::ToBoolean(bool value) { 2406 Handle<Object> Factory::ToBoolean(bool value) {
2407 return value ? true_value() : false_value(); 2407 return value ? true_value() : false_value();
2408 } 2408 }
2409 2409
2410 2410
2411 } // namespace internal 2411 } // namespace internal
2412 } // namespace v8 2412 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/flag-definitions.h » ('j') | src/flag-definitions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698