| 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/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 arguments->Add(push_right); | 1433 arguments->Add(push_right); |
| 1434 | 1434 |
| 1435 Definition* result = | 1435 Definition* result = |
| 1436 new InstanceCallInstr(node->token_pos(), | 1436 new InstanceCallInstr(node->token_pos(), |
| 1437 Symbols::EqualOperator(), | 1437 Symbols::EqualOperator(), |
| 1438 Token::kEQ, // Result is negated later for kNE. | 1438 Token::kEQ, // Result is negated later for kNE. |
| 1439 arguments, | 1439 arguments, |
| 1440 Object::null_array(), | 1440 Object::null_array(), |
| 1441 2, | 1441 2, |
| 1442 owner()->ic_data_array()); | 1442 owner()->ic_data_array()); |
| 1443 if (FLAG_enable_type_checks) { | |
| 1444 Value* value = Bind(result); | |
| 1445 result = new AssertBooleanInstr(node->token_pos(), value); | |
| 1446 } | |
| 1447 | |
| 1448 if (node->kind() == Token::kNE) { | 1443 if (node->kind() == Token::kNE) { |
| 1444 if (FLAG_enable_type_checks) { |
| 1445 Value* value = Bind(result); |
| 1446 result = new AssertBooleanInstr(node->token_pos(), value); |
| 1447 } |
| 1449 Value* value = Bind(result); | 1448 Value* value = Bind(result); |
| 1450 result = new BooleanNegateInstr(value); | 1449 result = new BooleanNegateInstr(value); |
| 1451 } | 1450 } |
| 1452 ReturnDefinition(result); | 1451 ReturnDefinition(result); |
| 1453 return; | 1452 return; |
| 1454 } | 1453 } |
| 1455 | 1454 |
| 1456 ZoneGrowableArray<PushArgumentInstr*>* arguments = | 1455 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1457 new ZoneGrowableArray<PushArgumentInstr*>(2); | 1456 new ZoneGrowableArray<PushArgumentInstr*>(2); |
| 1458 | 1457 |
| (...skipping 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3884 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 3883 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
| 3885 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 3884 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 3886 OS::SNPrint(chars, len, kFormat, function_name, reason); | 3885 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 3887 const Error& error = Error::Handle( | 3886 const Error& error = Error::Handle( |
| 3888 LanguageError::New(String::Handle(String::New(chars)))); | 3887 LanguageError::New(String::Handle(String::New(chars)))); |
| 3889 Isolate::Current()->long_jump_base()->Jump(1, error); | 3888 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 3890 } | 3889 } |
| 3891 | 3890 |
| 3892 | 3891 |
| 3893 } // namespace dart | 3892 } // namespace dart |
| OLD | NEW |