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

Side by Side Diff: src/full-codegen.cc

Issue 953563002: Implement experimental exponentiation operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add more tests and fix some bugs Created 5 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 uint8_t depth = Min(loop_depth(), Code::kMaxLoopNestingMarker); 489 uint8_t depth = Min(loop_depth(), Code::kMaxLoopNestingMarker);
490 BackEdgeEntry entry = 490 BackEdgeEntry entry =
491 { ast_id, static_cast<unsigned>(masm_->pc_offset()), depth }; 491 { ast_id, static_cast<unsigned>(masm_->pc_offset()), depth };
492 back_edges_.Add(entry, zone()); 492 back_edges_.Add(entry, zone());
493 } 493 }
494 494
495 495
496 bool FullCodeGenerator::ShouldInlineSmiCase(Token::Value op) { 496 bool FullCodeGenerator::ShouldInlineSmiCase(Token::Value op) {
497 // Inline smi case inside loops, but not division and modulo which 497 // Inline smi case inside loops, but not division and modulo which
498 // are too complicated and take up too much space. 498 // are too complicated and take up too much space.
499 if (op == Token::DIV ||op == Token::MOD) return false; 499 if (op == Token::DIV ||op == Token::MOD || op == Token::EXP) return false;
500 if (FLAG_always_inline_smi_code) return true; 500 if (FLAG_always_inline_smi_code) return true;
501 return loop_depth_ > 0; 501 return loop_depth_ > 0;
502 } 502 }
503 503
504 504
505 void FullCodeGenerator::EffectContext::Plug(Register reg) const { 505 void FullCodeGenerator::EffectContext::Plug(Register reg) const {
506 } 506 }
507 507
508 508
509 void FullCodeGenerator::AccumulatorValueContext::Plug(Register reg) const { 509 void FullCodeGenerator::AccumulatorValueContext::Plug(Register reg) const {
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 } 1823 }
1824 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); 1824 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS);
1825 codegen_->scope_ = saved_scope_; 1825 codegen_->scope_ = saved_scope_;
1826 } 1826 }
1827 1827
1828 1828
1829 #undef __ 1829 #undef __
1830 1830
1831 1831
1832 } } // namespace v8::internal 1832 } } // namespace v8::internal
OLDNEW
« src/compiler/typer.cc ('K') | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698