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

Side by Side Diff: src/factory.cc

Issue 1077343002: [turbofan] Optimize loads of global constants in JSTypedLowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/factory.h ('k') | src/types.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/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 store->set(JSRegExp::kIrregexpUC16CodeIndex, uninitialized); 2335 store->set(JSRegExp::kIrregexpUC16CodeIndex, uninitialized);
2336 store->set(JSRegExp::kIrregexpLatin1CodeSavedIndex, uninitialized); 2336 store->set(JSRegExp::kIrregexpLatin1CodeSavedIndex, uninitialized);
2337 store->set(JSRegExp::kIrregexpUC16CodeSavedIndex, uninitialized); 2337 store->set(JSRegExp::kIrregexpUC16CodeSavedIndex, uninitialized);
2338 store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0)); 2338 store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0));
2339 store->set(JSRegExp::kIrregexpCaptureCountIndex, 2339 store->set(JSRegExp::kIrregexpCaptureCountIndex,
2340 Smi::FromInt(capture_count)); 2340 Smi::FromInt(capture_count));
2341 regexp->set_data(*store); 2341 regexp->set_data(*store);
2342 } 2342 }
2343 2343
2344 2344
2345 Handle<Object> Factory::GlobalConstantFor(Handle<String> name) { 2345 Handle<Object> Factory::GlobalConstantFor(Handle<Name> name) {
2346 if (String::Equals(name, undefined_string())) return undefined_value(); 2346 if (Name::Equals(name, undefined_string())) return undefined_value();
2347 if (String::Equals(name, nan_string())) return nan_value(); 2347 if (Name::Equals(name, nan_string())) return nan_value();
2348 if (String::Equals(name, infinity_string())) return infinity_value(); 2348 if (Name::Equals(name, infinity_string())) return infinity_value();
2349 return Handle<Object>::null(); 2349 return Handle<Object>::null();
2350 } 2350 }
2351 2351
2352 2352
2353 Handle<Object> Factory::ToBoolean(bool value) { 2353 Handle<Object> Factory::ToBoolean(bool value) {
2354 return value ? true_value() : false_value(); 2354 return value ? true_value() : false_value();
2355 } 2355 }
2356 2356
2357 2357
2358 } } // namespace v8::internal 2358 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698