OLD | NEW |
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 #include "vm/unit_test.h" | 5 #include "vm/unit_test.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 true, false, false, false, false, cls, | 396 true, false, false, false, false, cls, |
397 TokenPosition::kMinSource)); | 397 TokenPosition::kMinSource)); |
398 code_ = Code::FinalizeCode(function, assembler_); | 398 code_ = Code::FinalizeCode(function, assembler_); |
399 code_.set_owner(function); | 399 code_.set_owner(function); |
400 code_.set_exception_handlers(Object::empty_exception_handlers()); | 400 code_.set_exception_handlers(Object::empty_exception_handlers()); |
401 #ifndef PRODUCT | 401 #ifndef PRODUCT |
402 if (FLAG_disassemble) { | 402 if (FLAG_disassemble) { |
403 OS::Print("Code for test '%s' {\n", name_); | 403 OS::Print("Code for test '%s' {\n", name_); |
404 const Instructions& instructions = | 404 const Instructions& instructions = |
405 Instructions::Handle(code_.instructions()); | 405 Instructions::Handle(code_.instructions()); |
406 uword start = instructions.EntryPoint(); | 406 uword start = instructions.PayloadStart(); |
407 Disassembler::Disassemble(start, start + assembler_->CodeSize()); | 407 Disassembler::Disassemble(start, start + assembler_->CodeSize()); |
408 OS::Print("}\n"); | 408 OS::Print("}\n"); |
409 } | 409 } |
410 #endif // !PRODUCT | 410 #endif // !PRODUCT |
411 } | 411 } |
412 | 412 |
413 | 413 |
414 CodeGenTest::CodeGenTest(const char* name) | 414 CodeGenTest::CodeGenTest(const char* name) |
415 : function_(Function::ZoneHandle()), | 415 : function_(Function::ZoneHandle()), |
416 node_sequence_(new SequenceNode(TokenPosition::kMinSource, | 416 node_sequence_(new SequenceNode(TokenPosition::kMinSource, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 } | 491 } |
492 // Copy the remainder of in to out. | 492 // Copy the remainder of in to out. |
493 while (*in != '\0') { | 493 while (*in != '\0') { |
494 *out++ = *in++; | 494 *out++ = *in++; |
495 } | 495 } |
496 *out = '\0'; | 496 *out = '\0'; |
497 } | 497 } |
498 | 498 |
499 | 499 |
500 } // namespace dart | 500 } // namespace dart |
OLD | NEW |