Commit f53418b8 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[compiler] Move ClearExceptionFlag into Compiler.

The enum in question is (and should) no longer be used outside of the
compiler API and hence is being moved back into the Compiler class.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1762323002

Cr-Commit-Position: refs/heads/master@{#34526}
parent fc936302
......@@ -817,7 +817,7 @@ void Accessors::FunctionLengthGetter(
} else {
// If the function isn't compiled yet, the length is not computed
// correctly yet. Compile it now and return the right length.
if (Compiler::Compile(function, KEEP_EXCEPTION)) {
if (Compiler::Compile(function, Compiler::KEEP_EXCEPTION)) {
length = function->shared()->length();
}
if (isolate->has_pending_exception()) {
......
......@@ -583,6 +583,7 @@ class OptimizedCompileJob: public ZoneObject {
// of the source code or deferred for lazy compilation at a later point.
class Compiler : public AllStatic {
public:
enum ClearExceptionFlag { KEEP_EXCEPTION, CLEAR_EXCEPTION };
enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT };
// ===========================================================================
......
......@@ -1524,7 +1524,7 @@ bool Debug::EnsureDebugInfo(Handle<SharedFunctionInfo> shared,
if (function.is_null()) {
DCHECK(shared->HasDebugCode());
} else if (!Compiler::Compile(function, CLEAR_EXCEPTION)) {
} else if (!Compiler::Compile(function, Compiler::CLEAR_EXCEPTION)) {
return false;
}
......
......@@ -930,12 +930,6 @@ enum MaybeAssignedFlag { kNotAssigned, kMaybeAssigned };
enum ParseErrorType { kSyntaxError = 0, kReferenceError = 1 };
enum ClearExceptionFlag {
KEEP_EXCEPTION,
CLEAR_EXCEPTION
};
enum MinusZeroMode {
TREAT_MINUS_ZERO_AS_ZERO,
FAIL_ON_MINUS_ZERO
......
......@@ -12987,7 +12987,7 @@ void JSFunction::EnsureHasInitialMap(Handle<JSFunction> function) {
// The constructor should be compiled for the optimization hints to be
// available.
Compiler::Compile(function, CLEAR_EXCEPTION);
Compiler::Compile(function, Compiler::CLEAR_EXCEPTION);
// First create a new map with the size and number of in-object properties
// suggested by the function.
......
......@@ -32,7 +32,7 @@ RUNTIME_FUNCTION(Runtime_CompileLazy) {
StackLimitCheck check(isolate);
if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
if (!Compiler::Compile(function, KEEP_EXCEPTION)) {
if (!Compiler::Compile(function, Compiler::KEEP_EXCEPTION)) {
return isolate->heap()->exception();
}
DCHECK(function->is_compiled());
......
......@@ -153,7 +153,7 @@ RUNTIME_FUNCTION(Runtime_SetCode) {
Handle<SharedFunctionInfo> target_shared(target->shared());
Handle<SharedFunctionInfo> source_shared(source->shared());
if (!Compiler::Compile(source, KEEP_EXCEPTION)) {
if (!Compiler::Compile(source, Compiler::KEEP_EXCEPTION)) {
return isolate->heap()->exception();
}
......
......@@ -398,7 +398,7 @@ RUNTIME_FUNCTION(Runtime_DisassembleFunction) {
DCHECK(args.length() == 1);
// Get the function and make sure it is compiled.
CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0);
if (!Compiler::Compile(func, KEEP_EXCEPTION)) {
if (!Compiler::Compile(func, Compiler::KEEP_EXCEPTION)) {
return isolate->heap()->exception();
}
OFStream os(stdout);
......
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