Commit e938b7a3 authored by Creddy's avatar Creddy Committed by Commit Bot

Enable OneShot optimizations by default

BUG=v8:8072

Change-Id: I2068d66644628fe1de7a6be30b8d43ecfae04e93
Reviewed-on: https://chromium-review.googlesource.com/1220047
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55875}
parent 726e2793
...@@ -324,7 +324,7 @@ DEFINE_BOOL(optimize_for_size, false, ...@@ -324,7 +324,7 @@ DEFINE_BOOL(optimize_for_size, false,
"speed") "speed")
// Flag for one shot optimiztions. // Flag for one shot optimiztions.
DEFINE_BOOL(enable_one_shot_optimization, false, DEFINE_BOOL(enable_one_shot_optimization, true,
"Enable size optimizations for the code that will " "Enable size optimizations for the code that will "
"only be executed once") "only be executed once")
......
...@@ -337,6 +337,7 @@ TEST(SetAccessorSetSideEffectReceiverCheck2) { ...@@ -337,6 +337,7 @@ TEST(SetAccessorSetSideEffectReceiverCheck2) {
LocalContext env; LocalContext env;
v8::Isolate* isolate = env->GetIsolate(); v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate); v8::HandleScope scope(isolate);
i::FLAG_enable_one_shot_optimization = false;
v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New( v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(
isolate, ConstructCallback, v8::Local<v8::Value>(), isolate, ConstructCallback, v8::Local<v8::Value>(),
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --no-enable-one-shot-optimization
Debug = debug.Debug; Debug = debug.Debug;
// StaCurrentContextSlot // StaCurrentContextSlot
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --no-enable-one-shot-optimization
Debug = debug.Debug Debug = debug.Debug
var exception = null; var exception = null;
......
...@@ -4,11 +4,15 @@ ...@@ -4,11 +4,15 @@
// Flags: --mock-arraybuffer-allocator --expose-gc // Flags: --mock-arraybuffer-allocator --expose-gc
var buffer = new ArrayBuffer(0xc0000000); function test() {
assertEquals(0xc0000000, buffer.byteLength); var buffer = new ArrayBuffer(0xc0000000);
// We call the GC here to free up the large array buffer. Otherwise, the assertEquals(0xc0000000, buffer.byteLength);
// mock allocator would allow us to allocate more than the physical memory // We call the GC here to free up the large array buffer. Otherwise, the
// available on 32bit platforms, leaving the internal counters in an invalid // mock allocator would allow us to allocate more than the physical memory
// state. // available on 32bit platforms, leaving the internal counters in an invalid
buffer = null; // state.
gc(); buffer = null;
gc();
}
test();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment