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

Side by Side Diff: vm/compiler.cc

Issue 11648006: Create read only handles for empty_array and sentinel objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | « vm/code_generator_test.cc ('k') | vm/dart.h » ('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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 parsed_function->SetNodeSequence(fragment); 618 parsed_function->SetNodeSequence(fragment);
619 parsed_function->set_default_parameter_values(Array::ZoneHandle()); 619 parsed_function->set_default_parameter_values(Array::ZoneHandle());
620 parsed_function->set_expression_temp_var( 620 parsed_function->set_expression_temp_var(
621 ParsedFunction::CreateExpressionTempVar(0)); 621 ParsedFunction::CreateExpressionTempVar(0));
622 fragment->scope()->AddVariable(parsed_function->expression_temp_var()); 622 fragment->scope()->AddVariable(parsed_function->expression_temp_var());
623 parsed_function->AllocateVariables(); 623 parsed_function->AllocateVariables();
624 624
625 // Non-optimized code generator. 625 // Non-optimized code generator.
626 CompileParsedFunctionHelper(*parsed_function, false); 626 CompileParsedFunctionHelper(*parsed_function, false);
627 627
628 const Array& args = Array::Handle(Object::empty_array()); 628 const Object& result = Object::Handle(
629 const Object& result = Object::Handle(DartEntry::InvokeStatic(func, args)); 629 DartEntry::InvokeStatic(func, Object::empty_array()));
630 isolate->set_long_jump_base(base); 630 isolate->set_long_jump_base(base);
631 return result.raw(); 631 return result.raw();
632 } else { 632 } else {
633 const Object& result = 633 const Object& result =
634 Object::Handle(isolate->object_store()->sticky_error()); 634 Object::Handle(isolate->object_store()->sticky_error());
635 isolate->object_store()->clear_sticky_error(); 635 isolate->object_store()->clear_sticky_error();
636 isolate->set_long_jump_base(base); 636 isolate->set_long_jump_base(base);
637 return result.raw(); 637 return result.raw();
638 } 638 }
639 UNREACHABLE(); 639 UNREACHABLE();
640 return Object::null(); 640 return Object::null();
641 } 641 }
642 642
643 } // namespace dart 643 } // namespace dart
OLDNEW
« no previous file with comments | « vm/code_generator_test.cc ('k') | vm/dart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698