d4b533d41b
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/259183002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
28 lines
783 B
C++
28 lines
783 B
C++
// Copyright 2011 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef V8_REWRITER_H_
|
|
#define V8_REWRITER_H_
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
class CompilationInfo;
|
|
|
|
class Rewriter {
|
|
public:
|
|
// Rewrite top-level code (ECMA 262 "programs") so as to conservatively
|
|
// include an assignment of the value of the last statement in the code to
|
|
// a compiler-generated temporary variable wherever needed.
|
|
//
|
|
// Assumes code has been parsed and scopes have been analyzed. Mutates the
|
|
// AST, so the AST should not continue to be used in the case of failure.
|
|
static bool Rewrite(CompilationInfo* info);
|
|
};
|
|
|
|
|
|
} } // namespace v8::internal
|
|
|
|
#endif // V8_REWRITER_H_
|