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

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: more test formatting Created 5 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
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 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2808 Builtins::JavaScript BinaryOpIC::TokenToJSBuiltin(Token::Value op, 2808 Builtins::JavaScript BinaryOpIC::TokenToJSBuiltin(Token::Value op,
2809 LanguageMode language_mode) { 2809 LanguageMode language_mode) {
2810 if (is_strong(language_mode)) { 2810 if (is_strong(language_mode)) {
2811 switch (op) { 2811 switch (op) {
2812 default: UNREACHABLE(); 2812 default: UNREACHABLE();
2813 case Token::ADD: return Builtins::ADD; 2813 case Token::ADD: return Builtins::ADD;
2814 case Token::SUB: return Builtins::SUB_STRONG; 2814 case Token::SUB: return Builtins::SUB_STRONG;
2815 case Token::MUL: return Builtins::MUL_STRONG; 2815 case Token::MUL: return Builtins::MUL_STRONG;
2816 case Token::DIV: return Builtins::DIV_STRONG; 2816 case Token::DIV: return Builtins::DIV_STRONG;
2817 case Token::MOD: return Builtins::MOD_STRONG; 2817 case Token::MOD: return Builtins::MOD_STRONG;
2818 case Token::BIT_OR: return Builtins::BIT_OR; 2818 case Token::BIT_OR: return Builtins::BIT_OR_STRONG;
2819 case Token::BIT_AND: return Builtins::BIT_AND; 2819 case Token::BIT_AND: return Builtins::BIT_AND_STRONG;
2820 case Token::BIT_XOR: return Builtins::BIT_XOR; 2820 case Token::BIT_XOR: return Builtins::BIT_XOR_STRONG;
2821 case Token::SAR: return Builtins::SAR; 2821 case Token::SAR: return Builtins::SAR_STRONG;
2822 case Token::SHR: return Builtins::SHR; 2822 case Token::SHR: return Builtins::SHR_STRONG;
2823 case Token::SHL: return Builtins::SHL; 2823 case Token::SHL: return Builtins::SHL_STRONG;
2824 } 2824 }
2825 } else { 2825 } else {
2826 switch (op) { 2826 switch (op) {
2827 default: UNREACHABLE(); 2827 default: UNREACHABLE();
2828 case Token::ADD: return Builtins::ADD; 2828 case Token::ADD: return Builtins::ADD;
2829 case Token::SUB: return Builtins::SUB; 2829 case Token::SUB: return Builtins::SUB;
2830 case Token::MUL: return Builtins::MUL; 2830 case Token::MUL: return Builtins::MUL;
2831 case Token::DIV: return Builtins::DIV; 2831 case Token::DIV: return Builtins::DIV;
2832 case Token::MOD: return Builtins::MOD; 2832 case Token::MOD: return Builtins::MOD;
2833 case Token::BIT_OR: return Builtins::BIT_OR; 2833 case Token::BIT_OR: return Builtins::BIT_OR;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3040 static const Address IC_utilities[] = { 3040 static const Address IC_utilities[] = {
3041 #define ADDR(name) FUNCTION_ADDR(name), 3041 #define ADDR(name) FUNCTION_ADDR(name),
3042 IC_UTIL_LIST(ADDR) NULL 3042 IC_UTIL_LIST(ADDR) NULL
3043 #undef ADDR 3043 #undef ADDR
3044 }; 3044 };
3045 3045
3046 3046
3047 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 3047 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
3048 } 3048 }
3049 } // namespace v8::internal 3049 } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698