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

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

Issue 9664062: Support allocating and calling closures in the new non-optimizing compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 8 years, 9 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/code_generator_x64.cc ('k') | runtime/vm/flow_graph_builder.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 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_index_table.h" 10 #include "vm/code_index_table.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 TIMERSCOPE(time_compilation); 120 TIMERSCOPE(time_compilation);
121 ParsedFunction parsed_function(function); 121 ParsedFunction parsed_function(function);
122 const char* function_fullname = function.ToFullyQualifiedCString(); 122 const char* function_fullname = function.ToFullyQualifiedCString();
123 if (FLAG_trace_compiler) { 123 if (FLAG_trace_compiler) {
124 OS::Print("Compiling %sfunction: '%s' @ token %d\n", 124 OS::Print("Compiling %sfunction: '%s' @ token %d\n",
125 (optimized ? "optimized " : ""), 125 (optimized ? "optimized " : ""),
126 function_fullname, 126 function_fullname,
127 function.token_index()); 127 function.token_index());
128 } 128 }
129 Parser::ParseFunction(&parsed_function); 129 Parser::ParseFunction(&parsed_function);
130 parsed_function.AllocateVariables();
130 131
131 CodeIndexTable* code_index_table = isolate->code_index_table(); 132 CodeIndexTable* code_index_table = isolate->code_index_table();
132 ASSERT(code_index_table != NULL); 133 ASSERT(code_index_table != NULL);
133 bool is_compiled = false; 134 bool is_compiled = false;
134 if (FLAG_use_new_compiler) { 135 if (FLAG_use_new_compiler) {
135 ASSERT(!optimized); 136 ASSERT(!optimized);
136 LongJump* old_base = isolate->long_jump_base(); 137 LongJump* old_base = isolate->long_jump_base();
137 LongJump bailout_jump; 138 LongJump bailout_jump;
138 isolate->set_long_jump_base(&bailout_jump); 139 isolate->set_long_jump_base(&bailout_jump);
139 if (setjmp(*bailout_jump.Set()) == 0) { 140 if (setjmp(*bailout_jump.Set()) == 0) {
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } else { 396 } else {
396 result = isolate->object_store()->sticky_error(); 397 result = isolate->object_store()->sticky_error();
397 isolate->object_store()->clear_sticky_error(); 398 isolate->object_store()->clear_sticky_error();
398 } 399 }
399 isolate->set_long_jump_base(base); 400 isolate->set_long_jump_base(base);
400 return result.raw(); 401 return result.raw();
401 } 402 }
402 403
403 404
404 } // namespace dart 405 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_x64.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698