[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}
This commit is contained in:
mstarzinger 2016-03-07 02:17:03 -08:00 committed by Commit bot
parent fc936302fd
commit f53418b8ba
8 changed files with 7 additions and 12 deletions

View File

@ -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()) {

View File

@ -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 };
// ===========================================================================

View File

@ -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;
}

View File

@ -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

View File

@ -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.

View File

@ -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());

View File

@ -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();
}

View File

@ -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);