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

Unified Diff: src/bootstrapper.cc

Issue 1425333002: Use inline constants instead of typed array for math constants. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/js/prologue.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 6d887bc6921410332200b47b5e90d96f09cf949f..f95d615301ef1ebf86fa47c31748585041df6aeb 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1811,7 +1811,6 @@ Handle<JSTypedArray> CreateTypedArray(Isolate* isolate, ExternalArrayType type,
bool Genesis::InitializeBuiltinTypedArrays() {
HandleScope scope(isolate());
Handle<JSTypedArray> rng_state;
- Handle<JSTypedArray> math_constants;
Handle<JSTypedArray> rempio2result;
{
@@ -1826,13 +1825,6 @@ bool Genesis::InitializeBuiltinTypedArrays() {
} while (state[0] == 0 || state[1] == 0);
}
- { // Initialize trigonometric lookup tables and constants.
- const size_t num_elements = arraysize(fdlibm::MathConstants::constants);
- double* constants = const_cast<double*>(fdlibm::MathConstants::constants);
- math_constants = CreateTypedArray(isolate(), kExternalFloat64Array,
- num_elements, &constants);
- }
-
{ // Initialize a result array for rempio2 calculation
const size_t num_elements = 2;
double* data = NULL;
@@ -1847,7 +1839,7 @@ bool Genesis::InitializeBuiltinTypedArrays() {
"InitializeBuiltinTypedArrays");
Handle<Object> fun = JSObject::GetDataProperty(utils, name_string);
Handle<Object> receiver = isolate()->factory()->undefined_value();
- Handle<Object> args[] = {utils, rng_state, math_constants, rempio2result};
+ Handle<Object> args[] = {utils, rng_state, rempio2result};
return !Execution::Call(isolate(), fun, receiver, arraysize(args), args)
.is_null();
}
« no previous file with comments | « no previous file | src/js/prologue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698