| 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/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 | 986 |
| 987 ValueGraphVisitor for_right_value(owner(), temp_index()); | 987 ValueGraphVisitor for_right_value(owner(), temp_index()); |
| 988 node->right()->Visit(&for_right_value); | 988 node->right()->Visit(&for_right_value); |
| 989 Append(for_right_value); | 989 Append(for_right_value); |
| 990 PushArgumentInstr* push_right = PushArgument(for_right_value.value()); | 990 PushArgumentInstr* push_right = PushArgument(for_right_value.value()); |
| 991 | 991 |
| 992 ZoneGrowableArray<PushArgumentInstr*>* arguments = | 992 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 993 new ZoneGrowableArray<PushArgumentInstr*>(2); | 993 new ZoneGrowableArray<PushArgumentInstr*>(2); |
| 994 arguments->Add(push_left); | 994 arguments->Add(push_left); |
| 995 arguments->Add(push_right); | 995 arguments->Add(push_right); |
| 996 const String& name = String::ZoneHandle(Symbols::New(node->Name())); | 996 const String& name = String::ZoneHandle(Symbols::New(node->TokenName())); |
| 997 const intptr_t kNumArgsChecked = 2; | 997 const intptr_t kNumArgsChecked = 2; |
| 998 InstanceCallInstr* call = new InstanceCallInstr(node->token_pos(), | 998 InstanceCallInstr* call = new InstanceCallInstr(node->token_pos(), |
| 999 name, | 999 name, |
| 1000 node->kind(), | 1000 node->kind(), |
| 1001 arguments, | 1001 arguments, |
| 1002 Object::null_array(), | 1002 Object::null_array(), |
| 1003 kNumArgsChecked, | 1003 kNumArgsChecked, |
| 1004 owner()->ic_data_array()); | 1004 owner()->ic_data_array()); |
| 1005 ReturnDefinition(call); | 1005 ReturnDefinition(call); |
| 1006 } | 1006 } |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 | 1431 |
| 1432 ValueGraphVisitor for_right_value(owner(), temp_index()); | 1432 ValueGraphVisitor for_right_value(owner(), temp_index()); |
| 1433 node->right()->Visit(&for_right_value); | 1433 node->right()->Visit(&for_right_value); |
| 1434 Append(for_right_value); | 1434 Append(for_right_value); |
| 1435 PushArgumentInstr* push_right = PushArgument(for_right_value.value()); | 1435 PushArgumentInstr* push_right = PushArgument(for_right_value.value()); |
| 1436 arguments->Add(push_right); | 1436 arguments->Add(push_right); |
| 1437 | 1437 |
| 1438 ASSERT(Token::IsRelationalOperator(node->kind())); | 1438 ASSERT(Token::IsRelationalOperator(node->kind())); |
| 1439 InstanceCallInstr* comp = | 1439 InstanceCallInstr* comp = |
| 1440 new InstanceCallInstr(node->token_pos(), | 1440 new InstanceCallInstr(node->token_pos(), |
| 1441 String::ZoneHandle(Symbols::New(node->Name())), | 1441 String::ZoneHandle(Symbols::New(node->TokenName())), |
| 1442 node->kind(), | 1442 node->kind(), |
| 1443 arguments, | 1443 arguments, |
| 1444 Object::null_array(), | 1444 Object::null_array(), |
| 1445 2, | 1445 2, |
| 1446 owner()->ic_data_array()); | 1446 owner()->ic_data_array()); |
| 1447 ReturnDefinition(comp); | 1447 ReturnDefinition(comp); |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 | 1450 |
| 1451 void EffectGraphVisitor::VisitUnaryOpNode(UnaryOpNode* node) { | 1451 void EffectGraphVisitor::VisitUnaryOpNode(UnaryOpNode* node) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1466 | 1466 |
| 1467 ValueGraphVisitor for_value(owner(), temp_index()); | 1467 ValueGraphVisitor for_value(owner(), temp_index()); |
| 1468 node->operand()->Visit(&for_value); | 1468 node->operand()->Visit(&for_value); |
| 1469 Append(for_value); | 1469 Append(for_value); |
| 1470 PushArgumentInstr* push_value = PushArgument(for_value.value()); | 1470 PushArgumentInstr* push_value = PushArgument(for_value.value()); |
| 1471 ZoneGrowableArray<PushArgumentInstr*>* arguments = | 1471 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1472 new ZoneGrowableArray<PushArgumentInstr*>(1); | 1472 new ZoneGrowableArray<PushArgumentInstr*>(1); |
| 1473 arguments->Add(push_value); | 1473 arguments->Add(push_value); |
| 1474 InstanceCallInstr* call = | 1474 InstanceCallInstr* call = |
| 1475 new InstanceCallInstr(node->token_pos(), | 1475 new InstanceCallInstr(node->token_pos(), |
| 1476 String::ZoneHandle(Symbols::New(node->Name())), | 1476 String::ZoneHandle(Symbols::New(node->TokenName())), |
| 1477 node->kind(), | 1477 node->kind(), |
| 1478 arguments, | 1478 arguments, |
| 1479 Object::null_array(), | 1479 Object::null_array(), |
| 1480 1, | 1480 1, |
| 1481 owner()->ic_data_array()); | 1481 owner()->ic_data_array()); |
| 1482 ReturnDefinition(call); | 1482 ReturnDefinition(call); |
| 1483 } | 1483 } |
| 1484 | 1484 |
| 1485 | 1485 |
| 1486 void EffectGraphVisitor::VisitConditionalExprNode(ConditionalExprNode* node) { | 1486 void EffectGraphVisitor::VisitConditionalExprNode(ConditionalExprNode* node) { |
| (...skipping 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3820 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 3820 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
| 3821 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 3821 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 3822 OS::SNPrint(chars, len, kFormat, function_name, reason); | 3822 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 3823 const Error& error = Error::Handle( | 3823 const Error& error = Error::Handle( |
| 3824 LanguageError::New(String::Handle(String::New(chars)))); | 3824 LanguageError::New(String::Handle(String::New(chars)))); |
| 3825 Isolate::Current()->long_jump_base()->Jump(1, error); | 3825 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 3826 } | 3826 } |
| 3827 | 3827 |
| 3828 | 3828 |
| 3829 } // namespace dart | 3829 } // namespace dart |
| OLD | NEW |