mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 00:37:42 +00:00
db3a736c33
Fix bug 5422033: Const expressions don't work with named arguments. Review URL: https://chromereviews.googleplex.com/3552015 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@168 260f80e4-7a28-3924-810f-c04153c831b5
53 lines
1.5 KiB
C++
53 lines
1.5 KiB
C++
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef VM_CODE_GENERATOR_X64_H_
|
|
#define VM_CODE_GENERATOR_X64_H_
|
|
|
|
#ifndef VM_CODE_GENERATOR_H_
|
|
#error Do not include code_generator_x64.h directly; use assembler.h instead.
|
|
#endif
|
|
|
|
#include "vm/allocation.h"
|
|
#include "vm/ast.h"
|
|
#include "vm/growable_array.h"
|
|
|
|
namespace dart {
|
|
|
|
// Forward declarations.
|
|
class Assembler;
|
|
class AstNode;
|
|
class ParsedFunction;
|
|
|
|
class CodeGenerator : public AstNodeVisitor {
|
|
public:
|
|
CodeGenerator(Assembler* assembler, const ParsedFunction& parsed_function) { }
|
|
virtual ~CodeGenerator() { }
|
|
|
|
bool GenerateCode() {
|
|
return false;
|
|
}
|
|
|
|
// Add an exception handler table to code.
|
|
void FinalizeExceptionHandlers(const Code& code) { UNIMPLEMENTED(); }
|
|
|
|
// Add Pcdescriptors to code.
|
|
void FinalizePcDescriptors(const Code& code) { UNIMPLEMENTED(); }
|
|
|
|
// Allocate and return an arguments descriptor.
|
|
// Let 'num_names' be the length of 'optional_arguments_names'.
|
|
// Treat the first 'num_arguments - num_names' arguments as positional and
|
|
// treat the following 'num_names' arguments as named optional arguments.
|
|
static const Array& ArgumentsDescriptor(
|
|
int num_arguments,
|
|
const Array& optional_arguments_names);
|
|
|
|
private:
|
|
DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator);
|
|
};
|
|
|
|
} // namespace dart
|
|
|
|
#endif // VM_CODE_GENERATOR_X64_H_
|