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 "vm/ast_printer.h" | 7 #include "vm/ast_printer.h" |
8 #include "vm/code_descriptors.h" | 8 #include "vm/code_descriptors.h" |
9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2117 const int num_params = | 2117 const int num_params = |
2118 owner()->parsed_function().function().NumberOfParameters(); | 2118 owner()->parsed_function().function().NumberOfParameters(); |
2119 for (int pos = 0; pos < num_params; pos++) { | 2119 for (int pos = 0; pos < num_params; pos++) { |
2120 const LocalVariable& parameter = *scope->VariableAt(pos); | 2120 const LocalVariable& parameter = *scope->VariableAt(pos); |
2121 ASSERT(parameter.owner() == scope); | 2121 ASSERT(parameter.owner() == scope); |
2122 if (!CanSkipTypeCheck(NULL, parameter.type())) { | 2122 if (!CanSkipTypeCheck(NULL, parameter.type())) { |
2123 LoadLocalComp* load = new LoadLocalComp(parameter, | 2123 LoadLocalComp* load = new LoadLocalComp(parameter, |
2124 owner()->context_level()); | 2124 owner()->context_level()); |
2125 AddInstruction(new BindInstr(temp_index(), load)); | 2125 AddInstruction(new BindInstr(temp_index(), load)); |
2126 TempVal* argument_value = new TempVal(temp_index()); | 2126 TempVal* argument_value = new TempVal(temp_index()); |
2127 BuildAssertAssignable(node->id(), | 2127 BuildAssertAssignable(node->ParameterIdAt(pos), |
2128 parameter.token_index(), | 2128 parameter.token_index(), |
2129 argument_value, | 2129 argument_value, |
2130 parameter.type(), | 2130 parameter.type(), |
2131 parameter.name(), | 2131 parameter.name(), |
2132 temp_index()); | 2132 temp_index()); |
2133 } | 2133 } |
2134 } | 2134 } |
2135 } | 2135 } |
2136 | 2136 |
2137 intptr_t i = 0; | 2137 intptr_t i = 0; |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2834 char* chars = reinterpret_cast<char*>( | 2834 char* chars = reinterpret_cast<char*>( |
2835 Isolate::Current()->current_zone()->Allocate(len)); | 2835 Isolate::Current()->current_zone()->Allocate(len)); |
2836 OS::SNPrint(chars, len, kFormat, function_name, reason); | 2836 OS::SNPrint(chars, len, kFormat, function_name, reason); |
2837 const Error& error = Error::Handle( | 2837 const Error& error = Error::Handle( |
2838 LanguageError::New(String::Handle(String::New(chars)))); | 2838 LanguageError::New(String::Handle(String::New(chars)))); |
2839 Isolate::Current()->long_jump_base()->Jump(1, error); | 2839 Isolate::Current()->long_jump_base()->Jump(1, error); |
2840 } | 2840 } |
2841 | 2841 |
2842 | 2842 |
2843 } // namespace dart | 2843 } // namespace dart |
OLD | NEW |