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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 953563002: Implement experimental exponentiation operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use Number() instead of OrderedNumber() to include NaN 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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-operator.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 REPLACE_BINARY_OP_IC_CALL(JSBitwiseXor, Token::BIT_XOR) 59 REPLACE_BINARY_OP_IC_CALL(JSBitwiseXor, Token::BIT_XOR)
60 REPLACE_BINARY_OP_IC_CALL(JSBitwiseAnd, Token::BIT_AND) 60 REPLACE_BINARY_OP_IC_CALL(JSBitwiseAnd, Token::BIT_AND)
61 REPLACE_BINARY_OP_IC_CALL(JSShiftLeft, Token::SHL) 61 REPLACE_BINARY_OP_IC_CALL(JSShiftLeft, Token::SHL)
62 REPLACE_BINARY_OP_IC_CALL(JSShiftRight, Token::SAR) 62 REPLACE_BINARY_OP_IC_CALL(JSShiftRight, Token::SAR)
63 REPLACE_BINARY_OP_IC_CALL(JSShiftRightLogical, Token::SHR) 63 REPLACE_BINARY_OP_IC_CALL(JSShiftRightLogical, Token::SHR)
64 REPLACE_BINARY_OP_IC_CALL(JSAdd, Token::ADD) 64 REPLACE_BINARY_OP_IC_CALL(JSAdd, Token::ADD)
65 REPLACE_BINARY_OP_IC_CALL(JSSubtract, Token::SUB) 65 REPLACE_BINARY_OP_IC_CALL(JSSubtract, Token::SUB)
66 REPLACE_BINARY_OP_IC_CALL(JSMultiply, Token::MUL) 66 REPLACE_BINARY_OP_IC_CALL(JSMultiply, Token::MUL)
67 REPLACE_BINARY_OP_IC_CALL(JSDivide, Token::DIV) 67 REPLACE_BINARY_OP_IC_CALL(JSDivide, Token::DIV)
68 REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD) 68 REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD)
69 REPLACE_BINARY_OP_IC_CALL(JSExponentiate, Token::EXP)
69 #undef REPLACE_BINARY_OP_IC_CALL 70 #undef REPLACE_BINARY_OP_IC_CALL
70 71
71 72
72 #define REPLACE_COMPARE_IC_CALL(op, token) \ 73 #define REPLACE_COMPARE_IC_CALL(op, token) \
73 void JSGenericLowering::Lower##op(Node* node) { \ 74 void JSGenericLowering::Lower##op(Node* node) { \
74 ReplaceWithCompareIC(node, token); \ 75 ReplaceWithCompareIC(node, token); \
75 } 76 }
76 REPLACE_COMPARE_IC_CALL(JSEqual, Token::EQ) 77 REPLACE_COMPARE_IC_CALL(JSEqual, Token::EQ)
77 REPLACE_COMPARE_IC_CALL(JSNotEqual, Token::NE) 78 REPLACE_COMPARE_IC_CALL(JSNotEqual, Token::NE)
78 REPLACE_COMPARE_IC_CALL(JSStrictEqual, Token::EQ_STRICT) 79 REPLACE_COMPARE_IC_CALL(JSStrictEqual, Token::EQ_STRICT)
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 475
475 476
476 void JSGenericLowering::LowerJSCallRuntime(Node* node) { 477 void JSGenericLowering::LowerJSCallRuntime(Node* node) {
477 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); 478 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op());
478 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); 479 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity()));
479 } 480 }
480 481
481 } // namespace compiler 482 } // namespace compiler
482 } // namespace internal 483 } // namespace internal
483 } // namespace v8 484 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698