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

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

Issue 2786073002: Stream SymbolLiteral & BigIntLiteral (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « runtime/vm/kernel_binary_flowgraph.cc ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "vm/kernel_to_il.h" 9 #include "vm/kernel_to_il.h"
10 10
(...skipping 4254 matching lines...) Expand 10 before | Expand all | Expand 10 after
4265 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset()); 4265 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
4266 } 4266 }
4267 4267
4268 4268
4269 void FlowGraphBuilder::VisitIntLiteral(IntLiteral* node) { 4269 void FlowGraphBuilder::VisitIntLiteral(IntLiteral* node) {
4270 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset()); 4270 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
4271 } 4271 }
4272 4272
4273 4273
4274 void FlowGraphBuilder::VisitBigintLiteral(BigintLiteral* node) { 4274 void FlowGraphBuilder::VisitBigintLiteral(BigintLiteral* node) {
4275 const dart::String& value = H.DartString(node->value()); 4275 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
4276 fragment_ = Constant(Integer::ZoneHandle(Z, Integer::New(value, Heap::kOld)));
4277 } 4276 }
4278 4277
4279 4278
4280 void FlowGraphBuilder::VisitDoubleLiteral(DoubleLiteral* node) { 4279 void FlowGraphBuilder::VisitDoubleLiteral(DoubleLiteral* node) {
4281 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset()); 4280 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
4282 } 4281 }
4283 4282
4284 4283
4285 void FlowGraphBuilder::VisitStringLiteral(StringLiteral* node) { 4284 void FlowGraphBuilder::VisitStringLiteral(StringLiteral* node) {
4286 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset()); 4285 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
4287 } 4286 }
4288 4287
4289 4288
4290 void FlowGraphBuilder::VisitSymbolLiteral(SymbolLiteral* node) { 4289 void FlowGraphBuilder::VisitSymbolLiteral(SymbolLiteral* node) {
4291 fragment_ = Constant(constant_evaluator_.EvaluateExpression(node)); 4290 fragment_ = streaming_flow_graph_builder_->BuildAt(node->kernel_offset());
4292 } 4291 }
4293 4292
4294 4293
4295 AbstractType& DartTypeTranslator::TranslateType(DartType* node) { 4294 AbstractType& DartTypeTranslator::TranslateType(DartType* node) {
4296 node->AcceptDartTypeVisitor(this); 4295 node->AcceptDartTypeVisitor(this);
4297 4296
4298 // We return a new `ZoneHandle` here on purpose: The intermediate language 4297 // We return a new `ZoneHandle` here on purpose: The intermediate language
4299 // instructions do not make a copy of the handle, so we do it. 4298 // instructions do not make a copy of the handle, so we do it.
4300 return dart::AbstractType::ZoneHandle(Z, result_.raw()); 4299 return dart::AbstractType::ZoneHandle(Z, result_.raw());
4301 } 4300 }
(...skipping 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after
6468 thread->clear_sticky_error(); 6467 thread->clear_sticky_error();
6469 return error.raw(); 6468 return error.raw();
6470 } 6469 }
6471 } 6470 }
6472 6471
6473 6472
6474 } // namespace kernel 6473 } // namespace kernel
6475 } // namespace dart 6474 } // namespace dart
6476 6475
6477 #endif // !defined(DART_PRECOMPILED_RUNTIME) 6476 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/vm/kernel_binary_flowgraph.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698