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

Side by Side Diff: src/ic/ic.cc

Issue 1102923002: [strong] Disallow implicit conversions for bitwise ops, shifts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback 2 Created 5 years, 7 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/js-typed-lowering.cc ('k') | src/runtime.js » ('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 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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after
2814 Builtins::JavaScript BinaryOpIC::TokenToJSBuiltin(Token::Value op, 2814 Builtins::JavaScript BinaryOpIC::TokenToJSBuiltin(Token::Value op,
2815 LanguageMode language_mode) { 2815 LanguageMode language_mode) {
2816 if (is_strong(language_mode)) { 2816 if (is_strong(language_mode)) {
2817 switch (op) { 2817 switch (op) {
2818 default: UNREACHABLE(); 2818 default: UNREACHABLE();
2819 case Token::ADD: return Builtins::ADD; 2819 case Token::ADD: return Builtins::ADD;
2820 case Token::SUB: return Builtins::SUB_STRONG; 2820 case Token::SUB: return Builtins::SUB_STRONG;
2821 case Token::MUL: return Builtins::MUL_STRONG; 2821 case Token::MUL: return Builtins::MUL_STRONG;
2822 case Token::DIV: return Builtins::DIV_STRONG; 2822 case Token::DIV: return Builtins::DIV_STRONG;
2823 case Token::MOD: return Builtins::MOD_STRONG; 2823 case Token::MOD: return Builtins::MOD_STRONG;
2824 case Token::BIT_OR: return Builtins::BIT_OR; 2824 case Token::BIT_OR: return Builtins::BIT_OR_STRONG;
2825 case Token::BIT_AND: return Builtins::BIT_AND; 2825 case Token::BIT_AND: return Builtins::BIT_AND_STRONG;
2826 case Token::BIT_XOR: return Builtins::BIT_XOR; 2826 case Token::BIT_XOR: return Builtins::BIT_XOR_STRONG;
2827 case Token::SAR: return Builtins::SAR; 2827 case Token::SAR: return Builtins::SAR_STRONG;
2828 case Token::SHR: return Builtins::SHR; 2828 case Token::SHR: return Builtins::SHR_STRONG;
2829 case Token::SHL: return Builtins::SHL; 2829 case Token::SHL: return Builtins::SHL_STRONG;
2830 } 2830 }
2831 } else { 2831 } else {
2832 switch (op) { 2832 switch (op) {
2833 default: UNREACHABLE(); 2833 default: UNREACHABLE();
2834 case Token::ADD: return Builtins::ADD; 2834 case Token::ADD: return Builtins::ADD;
2835 case Token::SUB: return Builtins::SUB; 2835 case Token::SUB: return Builtins::SUB;
2836 case Token::MUL: return Builtins::MUL; 2836 case Token::MUL: return Builtins::MUL;
2837 case Token::DIV: return Builtins::DIV; 2837 case Token::DIV: return Builtins::DIV;
2838 case Token::MOD: return Builtins::MOD; 2838 case Token::MOD: return Builtins::MOD;
2839 case Token::BIT_OR: return Builtins::BIT_OR; 2839 case Token::BIT_OR: return Builtins::BIT_OR;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 static const Address IC_utilities[] = { 3046 static const Address IC_utilities[] = {
3047 #define ADDR(name) FUNCTION_ADDR(name), 3047 #define ADDR(name) FUNCTION_ADDR(name),
3048 IC_UTIL_LIST(ADDR) NULL 3048 IC_UTIL_LIST(ADDR) NULL
3049 #undef ADDR 3049 #undef ADDR
3050 }; 3050 };
3051 3051
3052 3052
3053 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 3053 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
3054 } 3054 }
3055 } // namespace v8::internal 3055 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698