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

Unified Diff: runtime/vm/code_generator_x64.cc

Issue 9464009: Add enough compiler support to compile empty functions on x64. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Include file inadvertently left out. Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/code_generator_x64.cc
diff --git a/runtime/vm/code_generator_x64.cc b/runtime/vm/code_generator_x64.cc
index 1c5ba7c4cd3ca7b31784fd7ab1e31f131c4f8f5d..892a24912bd57e7e716ecafdb7dfffb85880020f 100644
--- a/runtime/vm/code_generator_x64.cc
+++ b/runtime/vm/code_generator_x64.cc
@@ -62,75 +62,6 @@ CodeGeneratorState::~CodeGeneratorState() {
}
-class CodeGenerator::DescriptorList : public ZoneAllocated {
- public:
- struct PcDesc {
- intptr_t pc_offset; // PC offset value of the descriptor.
- PcDescriptors::Kind kind; // Descriptor kind (kDeopt, kOther).
- intptr_t node_id; // AST node id.
- intptr_t token_index; // Token position in source of PC.
- intptr_t try_index; // Try block index of PC.
- };
-
- DescriptorList() : list_() {
- }
- ~DescriptorList() { }
-
- intptr_t Length() const {
- return list_.length();
- }
-
- intptr_t PcOffset(int index) const {
- return list_[index].pc_offset;
- }
- PcDescriptors::Kind Kind(int index) const {
- return list_[index].kind;
- }
- intptr_t NodeId(int index) const {
- return list_[index].node_id;
- }
- intptr_t TokenIndex(int index) const {
- return list_[index].token_index;
- }
- intptr_t TryIndex(int index) const {
- return list_[index].try_index;
- }
-
- void AddDescriptor(PcDescriptors::Kind kind,
- intptr_t pc_offset,
- intptr_t node_id,
- intptr_t token_index,
- intptr_t try_index) {
- struct PcDesc data;
- data.pc_offset = pc_offset;
- data.kind = kind;
- data.node_id = node_id;
- data.token_index = token_index;
- data.try_index = try_index;
- list_.Add(data);
- }
-
- RawPcDescriptors* FinalizePcDescriptors(uword entry_point) {
- intptr_t num_descriptors = Length();
- const PcDescriptors& descriptors =
- PcDescriptors::Handle(PcDescriptors::New(num_descriptors));
- for (intptr_t i = 0; i < num_descriptors; i++) {
- descriptors.AddDescriptor(i,
- (entry_point + PcOffset(i)),
- Kind(i),
- NodeId(i),
- TokenIndex(i),
- TryIndex(i));
- }
- return descriptors.raw();
- }
-
- private:
- GrowableArray<struct PcDesc> list_;
- DISALLOW_COPY_AND_ASSIGN(DescriptorList);
-};
-
-
class CodeGenerator::HandlerList : public ZoneAllocated {
public:
struct HandlerDesc {

Powered by Google App Engine
This is Rietveld 408576698