Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: runtime/vm/compiler.cc

Issue 12212050: Fix allocation of array tables (use store barrier if needed, store values directly instead of via s… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 629
630 // We compile the function here, even though InvokeStatic() below 630 // We compile the function here, even though InvokeStatic() below
631 // would compile func automatically. We are checking fewer invariants 631 // would compile func automatically. We are checking fewer invariants
632 // here. 632 // here.
633 ParsedFunction* parsed_function = new ParsedFunction(func); 633 ParsedFunction* parsed_function = new ParsedFunction(func);
634 parsed_function->SetNodeSequence(fragment); 634 parsed_function->SetNodeSequence(fragment);
635 parsed_function->set_default_parameter_values(Array::ZoneHandle()); 635 parsed_function->set_default_parameter_values(Array::ZoneHandle());
636 parsed_function->set_expression_temp_var( 636 parsed_function->set_expression_temp_var(
637 ParsedFunction::CreateExpressionTempVar(0)); 637 ParsedFunction::CreateExpressionTempVar(0));
638 fragment->scope()->AddVariable(parsed_function->expression_temp_var()); 638 fragment->scope()->AddVariable(parsed_function->expression_temp_var());
639 parsed_function->set_array_literal_var(
640 ParsedFunction::CreateArrayLiteralVar(0));
641 fragment->scope()->AddVariable(parsed_function->array_literal_var());
639 parsed_function->AllocateVariables(); 642 parsed_function->AllocateVariables();
640 643
641 // Non-optimized code generator. 644 // Non-optimized code generator.
642 CompileParsedFunctionHelper(*parsed_function, false); 645 CompileParsedFunctionHelper(*parsed_function, false);
643 646
644 const Object& result = Object::Handle( 647 const Object& result = Object::Handle(
645 DartEntry::InvokeStatic(func, Object::empty_array())); 648 DartEntry::InvokeStatic(func, Object::empty_array()));
646 isolate->set_long_jump_base(base); 649 isolate->set_long_jump_base(base);
647 return result.raw(); 650 return result.raw();
648 } else { 651 } else {
649 const Object& result = 652 const Object& result =
650 Object::Handle(isolate->object_store()->sticky_error()); 653 Object::Handle(isolate->object_store()->sticky_error());
651 isolate->object_store()->clear_sticky_error(); 654 isolate->object_store()->clear_sticky_error();
652 isolate->set_long_jump_base(base); 655 isolate->set_long_jump_base(base);
653 return result.raw(); 656 return result.raw();
654 } 657 }
655 UNREACHABLE(); 658 UNREACHABLE();
656 return Object::null(); 659 return Object::null();
657 } 660 }
658 661
659 } // namespace dart 662 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698