1.1 --- a/src/compiler/HIR.cpp Mon Nov 19 01:13:44 2012 -0800
1.2 +++ b/src/compiler/HIR.cpp Mon Nov 19 02:12:13 2012 -0800
1.3 @@ -16,6 +16,7 @@
1.4 * You should have received a copy of the GNU General Public License along with
1.5 * JITCraft. If not, see http://www.gnu.org/licenses/.
1.6 */
1.7 +#include "AST.h"
1.8 #include "HIR.h"
1.9 #include "BytecodeEmitter.h"
1.10 #include "../Heap-inl.h"
1.11 @@ -73,8 +74,9 @@
1.12
1.13 assert(call->args()->length() == fun->parameters()->length());
1.14
1.15 + __ note_position(call->node()->pos());
1.16 +
1.17 unsigned argc = call->args()->length();
1.18 -
1.19 for (size_t i = call->args()->length() - 1; i < call->args()->length(); i--) {
1.20 HIR *hir = call->args()->at(i);
1.21 hir->accept(this);
1.22 @@ -174,6 +176,7 @@
1.23 void
1.24 HIndex::bind(HIRVisitor *visitor, BytecodeEmitter &emitter_)
1.25 {
1.26 + __ note_position(node()->pos());
1.27 left_->accept(visitor);
1.28 right_->accept(visitor);
1.29 }
1.30 @@ -326,6 +329,9 @@
1.31 //
1.32 Opcode op = TokenToOpcode(binary->token());
1.33
1.34 + if (op == OP_DIV)
1.35 + __ note_position(binary->node()->pos());
1.36 +
1.37 if (op >= OP_ADD && op <= OP_NE) {
1.38 if (binary->type()->isFloat())
1.39 op = Opcode(int(op) + int(OP_ADD_F - OP_ADD));