OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 const ParsedFunction& parsed_function) | 181 const ParsedFunction& parsed_function) |
182 : assembler_(assembler), | 182 : assembler_(assembler), |
183 parsed_function_(parsed_function), | 183 parsed_function_(parsed_function), |
184 locals_space_size_(-1), | 184 locals_space_size_(-1), |
185 state_(NULL), | 185 state_(NULL), |
186 pc_descriptors_list_(NULL), | 186 pc_descriptors_list_(NULL), |
187 exception_handlers_list_(NULL), | 187 exception_handlers_list_(NULL), |
188 try_index_(CatchClauseNode::kInvalidTryIndex) { | 188 try_index_(CatchClauseNode::kInvalidTryIndex) { |
189 ASSERT(assembler_ != NULL); | 189 ASSERT(assembler_ != NULL); |
190 ASSERT(parsed_function.node_sequence() != NULL); | 190 ASSERT(parsed_function.node_sequence() != NULL); |
| 191 ASSERT(Isolate::Current()->long_jump_base()->IsSafeToJump()); |
191 pc_descriptors_list_ = new CodeGenerator::DescriptorList(); | 192 pc_descriptors_list_ = new CodeGenerator::DescriptorList(); |
192 exception_handlers_list_ = new CodeGenerator::HandlerList(); | 193 exception_handlers_list_ = new CodeGenerator::HandlerList(); |
193 } | 194 } |
194 | 195 |
195 | 196 |
196 bool CodeGenerator::IsResultNeeded(AstNode* node) const { | 197 bool CodeGenerator::IsResultNeeded(AstNode* node) const { |
197 return !state()->IsRootNode(node); | 198 return !state()->IsRootNode(node); |
198 } | 199 } |
199 | 200 |
200 | 201 |
(...skipping 2597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2798 const Error& error = Error::Handle( | 2799 const Error& error = Error::Handle( |
2799 Parser::FormatError(script, token_index, "Error", format, args)); | 2800 Parser::FormatError(script, token_index, "Error", format, args)); |
2800 va_end(args); | 2801 va_end(args); |
2801 Isolate::Current()->long_jump_base()->Jump(1, error); | 2802 Isolate::Current()->long_jump_base()->Jump(1, error); |
2802 UNREACHABLE(); | 2803 UNREACHABLE(); |
2803 } | 2804 } |
2804 | 2805 |
2805 } // namespace dart | 2806 } // namespace dart |
2806 | 2807 |
2807 #endif // defined TARGET_ARCH_IA32 | 2808 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |