| 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 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 kNumArgsChecked, | 1360 kNumArgsChecked, |
| 1361 owner()->ic_data_array()); | 1361 owner()->ic_data_array()); |
| 1362 ReturnDefinition(call); | 1362 ReturnDefinition(call); |
| 1363 } | 1363 } |
| 1364 | 1364 |
| 1365 | 1365 |
| 1366 StrictCompareInstr* EffectGraphVisitor::BuildStrictCompare(AstNode* left, | 1366 StrictCompareInstr* EffectGraphVisitor::BuildStrictCompare(AstNode* left, |
| 1367 AstNode* right, | 1367 AstNode* right, |
| 1368 Token::Kind kind, | 1368 Token::Kind kind, |
| 1369 intptr_t token_pos) { | 1369 intptr_t token_pos) { |
| 1370 ValueGraphVisitor for_left_value(owner(), temp_index()); | 1370 ValueGraphVisitor for_left_value(owner()); |
| 1371 left->Visit(&for_left_value); | 1371 left->Visit(&for_left_value); |
| 1372 Append(for_left_value); | 1372 Append(for_left_value); |
| 1373 ValueGraphVisitor for_right_value(owner(), temp_index()); | 1373 ValueGraphVisitor for_right_value(owner()); |
| 1374 right->Visit(&for_right_value); | 1374 right->Visit(&for_right_value); |
| 1375 Append(for_right_value); | 1375 Append(for_right_value); |
| 1376 StrictCompareInstr* comp = new StrictCompareInstr(token_pos, | 1376 StrictCompareInstr* comp = new StrictCompareInstr(token_pos, |
| 1377 kind, | 1377 kind, |
| 1378 for_left_value.value(), | 1378 for_left_value.value(), |
| 1379 for_right_value.value()); | 1379 for_right_value.value()); |
| 1380 return comp; | 1380 return comp; |
| 1381 } | 1381 } |
| 1382 | 1382 |
| 1383 | 1383 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1413 StrictCompareInstr* compare = | 1413 StrictCompareInstr* compare = |
| 1414 BuildStrictCompare(node->left(), node->right(), | 1414 BuildStrictCompare(node->left(), node->right(), |
| 1415 kind, node->token_pos()); | 1415 kind, node->token_pos()); |
| 1416 ReturnDefinition(compare); | 1416 ReturnDefinition(compare); |
| 1417 return; | 1417 return; |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 ZoneGrowableArray<PushArgumentInstr*>* arguments = | 1420 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1421 new ZoneGrowableArray<PushArgumentInstr*>(2); | 1421 new ZoneGrowableArray<PushArgumentInstr*>(2); |
| 1422 | 1422 |
| 1423 ValueGraphVisitor for_left_value(owner(), temp_index()); | 1423 ValueGraphVisitor for_left_value(owner()); |
| 1424 node->left()->Visit(&for_left_value); | 1424 node->left()->Visit(&for_left_value); |
| 1425 Append(for_left_value); | 1425 Append(for_left_value); |
| 1426 PushArgumentInstr* push_left = PushArgument(for_left_value.value()); | 1426 PushArgumentInstr* push_left = PushArgument(for_left_value.value()); |
| 1427 arguments->Add(push_left); | 1427 arguments->Add(push_left); |
| 1428 | 1428 |
| 1429 ValueGraphVisitor for_right_value(owner(), temp_index()); | 1429 ValueGraphVisitor for_right_value(owner()); |
| 1430 node->right()->Visit(&for_right_value); | 1430 node->right()->Visit(&for_right_value); |
| 1431 Append(for_right_value); | 1431 Append(for_right_value); |
| 1432 PushArgumentInstr* push_right = PushArgument(for_right_value.value()); | 1432 PushArgumentInstr* push_right = PushArgument(for_right_value.value()); |
| 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, |
| (...skipping 2444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3884 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 3884 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
| 3885 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 3885 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 3886 OS::SNPrint(chars, len, kFormat, function_name, reason); | 3886 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 3887 const Error& error = Error::Handle( | 3887 const Error& error = Error::Handle( |
| 3888 LanguageError::New(String::Handle(String::New(chars)))); | 3888 LanguageError::New(String::Handle(String::New(chars)))); |
| 3889 Isolate::Current()->long_jump_base()->Jump(1, error); | 3889 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 3890 } | 3890 } |
| 3891 | 3891 |
| 3892 | 3892 |
| 3893 } // namespace dart | 3893 } // namespace dart |
| OLD | NEW |