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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 10038032: Add node id for return node. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 const intptr_t temp_index_; 1260 const intptr_t temp_index_;
1261 Computation* computation_; 1261 Computation* computation_;
1262 Instruction* successor_; 1262 Instruction* successor_;
1263 1263
1264 DISALLOW_COPY_AND_ASSIGN(BindInstr); 1264 DISALLOW_COPY_AND_ASSIGN(BindInstr);
1265 }; 1265 };
1266 1266
1267 1267
1268 class ReturnInstr : public Instruction { 1268 class ReturnInstr : public Instruction {
1269 public: 1269 public:
1270 ReturnInstr(Value* value, intptr_t token_index) 1270 ReturnInstr(intptr_t node_id, intptr_t token_index, Value* value)
1271 : value_(value), token_index_(token_index) { 1271 : node_id_(node_id), token_index_(token_index), value_(value) {
1272 ASSERT(value_ != NULL); 1272 ASSERT(value_ != NULL);
1273 } 1273 }
1274 1274
1275 DECLARE_INSTRUCTION(Return) 1275 DECLARE_INSTRUCTION(Return)
1276 1276
1277 Value* value() const { return value_; } 1277 Value* value() const { return value_; }
1278 intptr_t token_index() const { return token_index_; } 1278 intptr_t token_index() const { return token_index_; }
1279 intptr_t node_id() const { return node_id_; }
1279 1280
1280 virtual Instruction* StraightLineSuccessor() const { return NULL; } 1281 virtual Instruction* StraightLineSuccessor() const { return NULL; }
1281 virtual void SetSuccessor(Instruction* instr) { UNREACHABLE(); } 1282 virtual void SetSuccessor(Instruction* instr) { UNREACHABLE(); }
1282 1283
1283 private: 1284 private:
1285 const intptr_t node_id_;
1286 const intptr_t token_index_;
1284 Value* value_; 1287 Value* value_;
1285 intptr_t token_index_;
1286 1288
1287 DISALLOW_COPY_AND_ASSIGN(ReturnInstr); 1289 DISALLOW_COPY_AND_ASSIGN(ReturnInstr);
1288 }; 1290 };
1289 1291
1290 1292
1291 class ThrowInstr : public Instruction { 1293 class ThrowInstr : public Instruction {
1292 public: 1294 public:
1293 ThrowInstr(intptr_t node_id, 1295 ThrowInstr(intptr_t node_id,
1294 intptr_t token_index, 1296 intptr_t token_index,
1295 intptr_t try_index, 1297 intptr_t try_index,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 const GrowableArray<BlockEntryInstr*>& block_order_; 1450 const GrowableArray<BlockEntryInstr*>& block_order_;
1449 1451
1450 private: 1452 private:
1451 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 1453 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
1452 }; 1454 };
1453 1455
1454 1456
1455 } // namespace dart 1457 } // namespace dart
1456 1458
1457 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 1459 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698