| 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 3452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3463 Value* parent_context = NULL; | 3463 Value* parent_context = NULL; |
| 3464 if (MustSaveRestoreContext(node)) { | 3464 if (MustSaveRestoreContext(node)) { |
| 3465 BuildSaveContext( | 3465 BuildSaveContext( |
| 3466 *owner()->parsed_function()->saved_entry_context_var()); | 3466 *owner()->parsed_function()->saved_entry_context_var()); |
| 3467 parent_context = Bind( | 3467 parent_context = Bind( |
| 3468 new(I) ConstantInstr(Object::ZoneHandle(I, Object::null()))); | 3468 new(I) ConstantInstr(Object::ZoneHandle(I, Object::null()))); |
| 3469 } else { | 3469 } else { |
| 3470 parent_context = Bind(new(I) CurrentContextInstr()); | 3470 parent_context = Bind(new(I) CurrentContextInstr()); |
| 3471 } | 3471 } |
| 3472 Do(new(I) StoreInstanceFieldInstr(Context::parent_offset(), | 3472 Do(new(I) StoreInstanceFieldInstr(Context::parent_offset(), |
| 3473 tmp_val, | 3473 tmp_val, |
| 3474 parent_context, | 3474 parent_context, |
| 3475 kEmitStoreBarrier, | 3475 kEmitStoreBarrier, |
| 3476 Scanner::kNoSourcePos)); | 3476 Scanner::kNoSourcePos)); |
| 3477 AddInstruction( | 3477 AddInstruction( |
| 3478 new(I) StoreContextInstr(Bind(ExitTempLocalScope(tmp_var)))); | 3478 new(I) StoreContextInstr(Bind(ExitTempLocalScope(tmp_var)))); |
| 3479 } | 3479 } |
| 3480 | 3480 |
| 3481 // If this node_sequence is the body of the function being compiled, copy | 3481 // If this node_sequence is the body of the function being compiled, copy |
| 3482 // the captured parameters from the frame into the context. | 3482 // the captured parameters from the frame into the context. |
| 3483 if (node == owner()->parsed_function()->node_sequence()) { | 3483 if (node == owner()->parsed_function()->node_sequence()) { |
| 3484 ASSERT(scope->context_level() == 1); | 3484 ASSERT(scope->context_level() == 1); |
| 3485 const Function& function = owner()->parsed_function()->function(); | 3485 const Function& function = owner()->parsed_function()->function(); |
| 3486 const int num_params = function.NumParameters(); | 3486 const int num_params = function.NumParameters(); |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3956 Report::MessageF(Report::kBailout, | 3956 Report::MessageF(Report::kBailout, |
| 3957 Script::Handle(function.script()), | 3957 Script::Handle(function.script()), |
| 3958 function.token_pos(), | 3958 function.token_pos(), |
| 3959 "FlowGraphBuilder Bailout: %s %s", | 3959 "FlowGraphBuilder Bailout: %s %s", |
| 3960 String::Handle(function.name()).ToCString(), | 3960 String::Handle(function.name()).ToCString(), |
| 3961 reason); | 3961 reason); |
| 3962 UNREACHABLE(); | 3962 UNREACHABLE(); |
| 3963 } | 3963 } |
| 3964 | 3964 |
| 3965 } // namespace dart | 3965 } // namespace dart |
| OLD | NEW |