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

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

Issue 683433003: Integrate the Irregexp Regular Expression Engine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more comments Created 6 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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
11 #include "vm/flow_graph_builder.h" 11 #include "vm/flow_graph_builder.h"
12 #include "vm/flow_graph_compiler.h" 12 #include "vm/flow_graph_compiler.h"
13 #include "vm/flow_graph_optimizer.h" 13 #include "vm/flow_graph_optimizer.h"
14 #include "vm/flow_graph_range_analysis.h" 14 #include "vm/flow_graph_range_analysis.h"
15 #include "vm/locations.h" 15 #include "vm/locations.h"
16 #include "vm/method_recognizer.h" 16 #include "vm/method_recognizer.h"
17 #include "vm/object.h" 17 #include "vm/object.h"
18 #include "vm/object_store.h" 18 #include "vm/object_store.h"
19 #include "vm/os.h" 19 #include "vm/os.h"
20 #include "vm/regexp_assembler.h"
20 #include "vm/resolver.h" 21 #include "vm/resolver.h"
21 #include "vm/scopes.h" 22 #include "vm/scopes.h"
22 #include "vm/stub_code.h" 23 #include "vm/stub_code.h"
23 #include "vm/symbols.h" 24 #include "vm/symbols.h"
24 25
25 #include "vm/il_printer.h" 26 #include "vm/il_printer.h"
26 27
27 namespace dart { 28 namespace dart {
28 29
29 DEFINE_FLAG(bool, propagate_ic_data, true, 30 DEFINE_FLAG(bool, propagate_ic_data, true,
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 } 445 }
445 446
446 447
447 GraphEntryInstr::GraphEntryInstr(const ParsedFunction* parsed_function, 448 GraphEntryInstr::GraphEntryInstr(const ParsedFunction* parsed_function,
448 TargetEntryInstr* normal_entry, 449 TargetEntryInstr* normal_entry,
449 intptr_t osr_id) 450 intptr_t osr_id)
450 : BlockEntryInstr(0, CatchClauseNode::kInvalidTryIndex), 451 : BlockEntryInstr(0, CatchClauseNode::kInvalidTryIndex),
451 parsed_function_(parsed_function), 452 parsed_function_(parsed_function),
452 normal_entry_(normal_entry), 453 normal_entry_(normal_entry),
453 catch_entries_(), 454 catch_entries_(),
455 indirect_entries_(),
454 initial_definitions_(), 456 initial_definitions_(),
455 osr_id_(osr_id), 457 osr_id_(osr_id),
456 entry_count_(0), 458 entry_count_(0),
457 spill_slot_count_(0), 459 spill_slot_count_(0),
458 fixed_slot_count_(0) { 460 fixed_slot_count_(0) {
459 } 461 }
460 462
461 463
462 ConstantInstr* GraphEntryInstr::constant_null() { 464 ConstantInstr* GraphEntryInstr::constant_null() {
463 ASSERT(initial_definitions_.length() > 0); 465 ASSERT(initial_definitions_.length() > 0);
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
2542 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, 2544 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
2543 GetDeoptId(), 2545 GetDeoptId(),
2544 Scanner::kNoSourcePos); 2546 Scanner::kNoSourcePos);
2545 } 2547 }
2546 if (HasParallelMove()) { 2548 if (HasParallelMove()) {
2547 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 2549 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
2548 } 2550 }
2549 } 2551 }
2550 2552
2551 2553
2554 LocationSummary* IndirectEntryInstr::MakeLocationSummary(
2555 Isolate* isolate, bool optimizing) const {
2556 return JoinEntryInstr::MakeLocationSummary(isolate, optimizing);
2557 }
2558
2559
2560 void IndirectEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2561 JoinEntryInstr::EmitNativeCode(compiler);
2562 }
2563
2564
2552 LocationSummary* PhiInstr::MakeLocationSummary(Isolate* isolate, 2565 LocationSummary* PhiInstr::MakeLocationSummary(Isolate* isolate,
2553 bool optimizing) const { 2566 bool optimizing) const {
2554 UNREACHABLE(); 2567 UNREACHABLE();
2555 return NULL; 2568 return NULL;
2556 } 2569 }
2557 2570
2558 2571
2559 void PhiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2572 void PhiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2560 UNREACHABLE(); 2573 UNREACHABLE();
2561 } 2574 }
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
3332 case kIllegal: return "illegal"; 3345 case kIllegal: return "illegal";
3333 case kSin: return "sin"; 3346 case kSin: return "sin";
3334 case kCos: return "cos"; 3347 case kCos: return "cos";
3335 case kSqrt: return "sqrt"; 3348 case kSqrt: return "sqrt";
3336 case kDoubleSquare: return "double-square"; 3349 case kDoubleSquare: return "double-square";
3337 } 3350 }
3338 UNREACHABLE(); 3351 UNREACHABLE();
3339 return ""; 3352 return "";
3340 } 3353 }
3341 3354
3355 typedef RawBool* (*CaseInsensitiveCompareUC16Function) (
3356 RawString* string_raw,
3357 RawSmi* lhs_index_raw,
3358 RawSmi* rhs_index_raw,
3359 RawSmi* length_raw);
3360
3361
3362 extern const RuntimeEntry kCaseInsensitiveCompareUC16RuntimeEntry(
3363 "CaseInsensitiveCompareUC16", reinterpret_cast<RuntimeFunction>(
3364 static_cast<CaseInsensitiveCompareUC16Function>(
3365 &IRRegExpMacroAssembler::CaseInsensitiveCompareUC16)), 4, true, false);
3366
3367
3368 const RuntimeEntry& CaseInsensitiveCompareUC16Instr::TargetFunction() const {
3369 return kCaseInsensitiveCompareUC16RuntimeEntry;
3370 }
3371
3342 3372
3343 MergedMathInstr::MergedMathInstr(ZoneGrowableArray<Value*>* inputs, 3373 MergedMathInstr::MergedMathInstr(ZoneGrowableArray<Value*>* inputs,
3344 intptr_t deopt_id, 3374 intptr_t deopt_id,
3345 MergedMathInstr::Kind kind) 3375 MergedMathInstr::Kind kind)
3346 : PureDefinition(deopt_id), 3376 : PureDefinition(deopt_id),
3347 inputs_(inputs), 3377 inputs_(inputs),
3348 kind_(kind) { 3378 kind_(kind) {
3349 ASSERT(inputs_->length() == InputCountFor(kind_)); 3379 ASSERT(inputs_->length() == InputCountFor(kind_));
3350 for (intptr_t i = 0; i < inputs_->length(); ++i) { 3380 for (intptr_t i = 0; i < inputs_->length(); ++i) {
3351 ASSERT((*inputs)[i] != NULL); 3381 ASSERT((*inputs)[i] != NULL);
(...skipping 17 matching lines...) Expand all
3369 case Token::kTRUNCDIV: return 0; 3399 case Token::kTRUNCDIV: return 0;
3370 case Token::kMOD: return 1; 3400 case Token::kMOD: return 1;
3371 default: UNIMPLEMENTED(); return -1; 3401 default: UNIMPLEMENTED(); return -1;
3372 } 3402 }
3373 } 3403 }
3374 3404
3375 3405
3376 #undef __ 3406 #undef __
3377 3407
3378 } // namespace dart 3408 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698