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

Side by Side Diff: src/runtime/runtime-test.cc

Issue 832003002: Fix %NeverOptimizeFunction() intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | test/mjsunit/compiler/regress-445732.js » ('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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/full-codegen.h" 9 #include "src/full-codegen.h"
10 #include "src/natives.h" 10 #include "src/natives.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 return isolate->heap()->undefined_value(); 89 return isolate->heap()->undefined_value();
90 } 90 }
91 91
92 92
93 RUNTIME_FUNCTION(Runtime_NeverOptimizeFunction) { 93 RUNTIME_FUNCTION(Runtime_NeverOptimizeFunction) {
94 HandleScope scope(isolate); 94 HandleScope scope(isolate);
95 DCHECK(args.length() == 1); 95 DCHECK(args.length() == 1);
96 CONVERT_ARG_CHECKED(JSFunction, function, 0); 96 CONVERT_ARG_CHECKED(JSFunction, function, 0);
97 function->shared()->set_disable_optimization_reason(kOptimizationDisabled);
97 function->shared()->set_optimization_disabled(true); 98 function->shared()->set_optimization_disabled(true);
98 return isolate->heap()->undefined_value(); 99 return isolate->heap()->undefined_value();
99 } 100 }
100 101
101 102
102 RUNTIME_FUNCTION(Runtime_GetOptimizationStatus) { 103 RUNTIME_FUNCTION(Runtime_GetOptimizationStatus) {
103 HandleScope scope(isolate); 104 HandleScope scope(isolate);
104 RUNTIME_ASSERT(args.length() == 1 || args.length() == 2); 105 RUNTIME_ASSERT(args.length() == 1 || args.length() == 2);
105 if (!isolate->use_crankshaft()) { 106 if (!isolate->use_crankshaft()) {
106 return Smi::FromInt(4); // 4 == "never". 107 return Smi::FromInt(4); // 4 == "never".
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ 409 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \
409 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ 410 CONVERT_ARG_CHECKED(JSObject, obj, 0); \
410 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ 411 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \
411 } 412 }
412 413
413 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) 414 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION)
414 415
415 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION 416 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION
416 } 417 }
417 } // namespace v8::internal 418 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-445732.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698