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

Side by Side Diff: src/factory.cc

Issue 999173007: Make compiler more acceptive wrt Isolate::use_crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | src/objects.cc » ('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/conversions.h" 9 #include "src/conversions.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 if (!function->shared()->is_generator()) { 1346 if (!function->shared()->is_generator()) {
1347 JSObject::AddProperty(prototype, constructor_string(), function, DONT_ENUM); 1347 JSObject::AddProperty(prototype, constructor_string(), function, DONT_ENUM);
1348 } 1348 }
1349 1349
1350 return prototype; 1350 return prototype;
1351 } 1351 }
1352 1352
1353 1353
1354 static bool ShouldOptimizeNewClosure(Isolate* isolate, 1354 static bool ShouldOptimizeNewClosure(Isolate* isolate,
1355 Handle<SharedFunctionInfo> info) { 1355 Handle<SharedFunctionInfo> info) {
1356 return isolate->use_crankshaft() && !info->is_toplevel() && 1356 return !info->is_toplevel() && info->is_compiled() &&
1357 info->is_compiled() && info->allows_lazy_compilation(); 1357 info->allows_lazy_compilation();
1358 } 1358 }
1359 1359
1360 1360
1361 Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo( 1361 Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
1362 Handle<SharedFunctionInfo> info, 1362 Handle<SharedFunctionInfo> info,
1363 Handle<Context> context, 1363 Handle<Context> context,
1364 PretenureFlag pretenure) { 1364 PretenureFlag pretenure) {
1365 int map_index = 1365 int map_index =
1366 Context::FunctionMapIndex(info->language_mode(), info->kind()); 1366 Context::FunctionMapIndex(info->language_mode(), info->kind());
1367 Handle<Map> map(Map::cast(context->native_context()->get(map_index))); 1367 Handle<Map> map(Map::cast(context->native_context()->get(map_index)));
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 return Handle<Object>::null(); 2321 return Handle<Object>::null();
2322 } 2322 }
2323 2323
2324 2324
2325 Handle<Object> Factory::ToBoolean(bool value) { 2325 Handle<Object> Factory::ToBoolean(bool value) {
2326 return value ? true_value() : false_value(); 2326 return value ? true_value() : false_value();
2327 } 2327 }
2328 2328
2329 2329
2330 } } // namespace v8::internal 2330 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698